|
|
|
Re: Passing parameters from JSP to Oracle forms.. [message #385516 is a reply to message #385506] |
Tue, 10 February 2009 00:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/67467.jpg) |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
Google returned http://oracle.anilpassi.com/call-oa-framework-page-from-oracle-forms-passing-parameters-2.html and http://www.oracle.com/technology/pub/articles/wilfred-adf-forms.html
The later contains:
Quote: | Getting Context into Oracle Forms
The legacy lifecycle feature introduces a problem when passing context from the Web application to Oracle Forms. What if you want to incorporate an Oracle Forms form to edit an order in an Oracle ADF Faces page? You probably want to pass the selected order ID from the Oracle ADF Faces application to Oracle Forms. Again, you cannot do this the typical way by adding the parameter in the HTML to include the Oracle Forms applet. This would mean different HTML for each order and would defeat the reuse of the suspended applet.
Once more , you can work around this issue with the outbound JavaScript API. You can incorporate the order ID (or whatever context you want to pass) as an invisible item on the Oracle ADF Faces pages. The Oracle Forms form can inspect this value during the WHEN-NEW-FORM-INSTANCE trigger and act accordingly:
declare
orderID number;
begin
-- get the order ID
set_custom_property('BLK_PJC.PJC', 1, 'EvalExpression',
'document.getElementById(''frm:orderID'').value');
customerID := get_custom_property('BLK_PJC.PJC', 1, 'EvalResult');
:parameter.ordid:=orderID;
-- execute query (where clause refers :parameter.ordid)
do_key('execute_query');
end;
|
David
|
|
|