0

我正在学习一本书的教程,但遇到了一个我无法解决的问题。希望这里有人可以提供帮助。

本质上是一个模态对话框 - 向导对话框 - 具有动态 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 行,但这是输出:

在此处输入图像描述

我不知道它是否有帮助,但是...

在此处输入图像描述

4

1 回答 1

1

Have you set a height for your modal page in page settings?

Try to put this css in your page settings:

*Change this number (400) by the height of your modal or something close to that.

.CustomerInfo {
    height: 400px;
    overflow: auto !important;
}

I don't know why this happen, I think this issue is related of this property https://www.w3schools.com/cssref/pr_pos_overflow.asp


EDIT

I created this page to test: page 25 is the modal page, page 23 have a link to the modal page.

https://apex.oracle.com/pls/apex/f?p=145797:23

Login on: https://apex.oracle.com/pls/apex/f?p=4550:1

workspace: stackquestions
user: test
pwd: test
app: 145797
wizard modal page: 25

Could check if is there any diference in the page settings or in the region settings between your modal page and this page above? or could you try to replicate this problem in this workspace?

The wizard modal page have a region with this pl/sql, the same of yours, but with fake data.

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;
于 2018-04-24T21:14:46.127 回答