Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why is the content in a modal dialog being truncated?

Jibba JabbaApr 24 2018 — edited Apr 24 2018

Hello

I'm following along a book tutorial and I've hit a problem that I can't solve. Hopefully somebody here can help.

There is essentially a modal dialog - wizard dialog - with dynamic pl/sql content, which is being truncated for some reason:

pastedImage_0.png

The db is sending more than those 3 rows displayed in the Product/Price table. If I hack the code to stop rendering rows after one row:

pastedImage_1.png

Is this something that's easily explainable? The code that's building all this stuff is this; I don't expect anyone to read it in detail, but I'm just left wondering if a browser is supposed to automatically insert a vertical scrollbar:

declare

l_customer_id varchar2(30) := :P11_CUSTOMER_ID;

begin

--

-- display customer information

--

sys.htp.p('<div class="CustomerInfo">');

if :P11_CUSTOMER_OPTIONS = 'EXISTING' then

for x in (select * from demo_customers where customer_id = l_customer_id) loop

sys.htp.p('\<div class="CustomerInfo">');

sys.htp.p('\<strong>Customer:\</strong>'); 

sys.htp.p('\<p>');

sys.htp.p(sys.htf.escape\_sc(x.cust\_first\_name) || ' ' ||

sys.htf.escape\_sc(x.cust\_last\_name) || '\<br />');

sys.htp.p(sys.htf.escape\_sc(x.cust\_street\_address1) || '\<br />');

if x.cust\_street\_address2 is not null then

  sys.htp.p(sys.htf.escape\_sc(x.cust\_street\_address2) || '\<br />');       

end if;

sys.htp.p(sys.htf.escape\_sc(x.cust\_city) || ', ' ||

sys.htf.escape\_sc(x.cust\_state) || '  ' ||

sys.htf.escape\_sc(x.cust\_postal\_code));

sys.htp.p('\</p>');

end loop;

else

sys.htp.p('<strong>Customer:</strong>');

sys.htp.p('<p>');

sys.htp.p(sys.htf.escape_sc(:P11_CUST_FIRST_NAME) || ' ' ||

            sys.htf.escape\_sc(:P11\_CUST\_LAST\_NAME) || '\<br />');

sys.htp.p(sys.htf.escape_sc(:P11_CUST_STREET_ADDRESS1) || '<br />');

if :P11_CUST_STREET_ADDRESS2 is not null then

sys.htp.p(sys.htf.escape\_sc(:P11\_CUST\_STREET\_ADDRESS2) || '\<br />');   

end if;

sys.htp.p(sys.htf.escape_sc(:P11_CUST_CITY) || ', ' ||

sys.htf.escape_sc(:P11_CUST_STATE) || ' ' ||

sys.htf.escape_sc(:P11_CUST_POSTAL_CODE));

sys.htp.p('</p>');

end if;

sys.htp.p('</div>');

-- 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'

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 href="'||apex_util.prepare_url('f?p=&APP_ID.:12:'||:app_session||':ADD:::P12_PRODUCT_ID:'|| c1.product_id)||'" class="t-Button t-Button--simple t-Button--hot"><span>Add<i class="iR"></i></span></a></td>

</tr>');

exit;

end loop;

sys.htp.p('</tbody></table>');

sys.htp.p('</div>');

--

-- display current order

--

sys.htp.p('<div class="Products" >');

sys.htp.p('<table width="100%" cellspacing="0" cellpadding="0" border="0">

<thead>

<tr><th class="left">Current Order</th></tr>

</thead>

</table>

<table width="100%" cellspacing="0" cellpadding="0" border="0">

<tbody>');

declare

c number := 0; t number := 0;

begin

-- loop over cart values

for c1 in (select c001 pid, c002 i, to_number(c003) p, count(c002) q, sum(c003) ep, 'Remove' remove

from apex_collections

where collection_name = 'ORDER'

group by c001, c002, c003

order by c002)

loop

sys.htp.p('<div class="CartItem">

<a href="'||apex_util.prepare_url('f?p=&APP_ID.:12:&SESSION.:REMOVE:::P12_PRODUCT_ID:'||sys.htf.escape_sc(c1.pid))||'"><img src="#IMAGE_PREFIX#delete.gif" alt="Remove from cart" title="Remove from cart" /></a>

'||sys.htf.escape_sc(c1.i)||'

<span>'||trim(to_char(c1.p,'$999G999G999D00'))||'</span>

<span>Quantity: '||c1.q||'</span>

<span class="subtotal">Subtotal: '||trim(to_char(c1.ep,'$999G999G999D00'))||'</span>

</div>');

c := c + 1;

t := t + c1.ep;

end loop;

sys.htp.p('</tbody></table>');

if c > 0 then

sys.htp.p('\<div class="CartTotal">

\<p>Items: \<span>'||c||'\</span>\</p>

\<p class="CartTotal">Total: \<span>'||trim(to\_char(t,'$999G999G999D00'))||'\</span>\</p>

\</div>');

else

sys.htp.p('<div class="alertMessage info" style="margin-top: 8px;">');

 sys.htp.p('\<img src="#IMAGE\_PREFIX#f\_spacer.gif">');

 sys.htp.p('\<div class="innerMessage">');

   sys.htp.p('\<h3>Note\</h3>');

   sys.htp.p('\<p>You have no items in your current order.\</p>');

 sys.htp.p('\</div>');

sys.htp.p('</div>');

end if;

end;

sys.htp.p('</div>');

end;

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2018
Added on Apr 24 2018
5 comments
724 views