我跟着一本书教程,我遇到了一个无法解决的问题。希望这里有人可以提供帮助。
基本上有一个模态对话框 - 向导对话框 - 带有动态pl / sql内容,由于某种原因被截断。我想知道这是否是正常行为:
db正在发送超过Product / Price表中显示的那3行。如果我破解代码停止在一行之后渲染行:
这是否可以轻松解释?构建所有这些东西的代码是这样的;我不希望任何人详细阅读它,但我只是想知道浏览器是否应该自动插入垂直滚动条:
[删除原始冗长代码]
由于
编辑: 我已经删除了页面上的内联CSS,并将动态PL / SQL缩减到了这一点,但它仍然在发生:
declare
l_customer_id varchar2(30) := :P11_CUSTOMER_ID;
begin
-- display products
sys.htp.p('<div class="Products" >');
sys.htp.p('<table width="100%" cellspacing="0" cellpadding="0" border="0">
<thead>
<tr><th class="left">Product</th><th>Price</th><th></th></tr>
</thead>
<tbody>');
for c1 in (select product_id, product_name, list_price, 'Add to Cart' add_to_order from demo_product_info where product_avail = 'Y' union all
select product_id, product_name, list_price, 'Add to Cart' add_to_order from demo_product_info where product_avail = 'Y'order by product_name) loop
sys.htp.p('<tr><td class="left">'||sys.htf.escape_sc(c1.product_name)||'</td>
<td>'||trim(to_char(c1.list_price,'999G999G990D00')) || '</td>
<td><a ><span>Add<i class="iR"></i></span></a></td>
</tr>');
end loop;
sys.htp.p('</tbody></table>');
sys.htp.p('</div>');
sys.htp.p('<b>DONE</b>');
end;
sql查询返回了11行;我把它们加倍到22,所以在结果表中应该有22行,但这是输出:
我不知道它是否有帮助,但是......
答案 0 :(得分:1)
您是否在页面设置中为模态页面设置了高度?
尝试将此css放入页面设置中:
*将此数字(400)更改为模态的高度或接近该模式的高度。
.CustomerInfo {
height: 400px;
overflow: auto !important;
}
我不知道为什么会发生这种情况,我认为此问题与此属性相关https://www.w3schools.com/cssref/pr_pos_overflow.asp
修改强>
我创建了这个页面进行测试:第25页是模态页面,第23页有一个指向模态页面的链接。
https://apex.oracle.com/pls/apex/f?p=145797:23
登录:https://apex.oracle.com/pls/apex/f?p=4550:1
workspace: stackquestions
user: test
pwd: test
app: 145797
wizard modal page: 25
可以检查您的模态页面和上面的此页面之间的页面设置或区域设置是否有任何差异?或者你可以尝试在这个工作区中复制这个问题吗?
向导模态页面有一个带有这个pl / sql的区域,与你的相同,但是有假数据。
declare
v_count NUMBER := 0;
v_max_count NUMBER := 30;
begin
-- display products
sys.htp.p('<div class="Products" >');
sys.htp.p('<table width="100%" cellspacing="0" cellpadding="0" border="0">
<thead>
<tr><th class="left">Product</th><th>Price</th><th></th></tr>
</thead>
<tbody>');
loop
sys.htp.p('<tr><td class="left">'||'product - ' || v_count ||'</td>
<td>'|| '50 - ' || v_count || '</td>
<td><a ><span>Add<i class="iR"></i></span></a></td>
</tr>');
v_count := v_count + 1;
EXIT WHEN v_count >= v_max_count;
end loop;
sys.htp.p('</tbody></table>');
sys.htp.p('</div>');
sys.htp.p('<b>DONE</b>');
end;