How to auto-query a form
Hi,
I have made two forms. The fisrt form passes a parameter into second form ant call that form after inserting. It works successfuly that after insert i can pass-parameter into second form and forms auomaticalY calls 2nd form. But now i want that 2nd form take that parameter and make a query before displaying the page. How can i autoquery 2nd form. I read the FAQ and i used the method in FAQ to pass parameters from one form to another after inserting. Can you tell me what i need to modify my code under the form's ON SUCCESSFUL SUBMISSION PL/SQL block(see below).
I have created two forms.
Now i am inserting appl_id in first form and after that i will be able to pass the appl_id parameter to the second form by the form's ON SUCCESSFUL SUBMISSION PL/SQL block.
declare
my_url varchar2(1000) := null;
v_appl_id number;
begin
v_appl_id := p_session.get_value_as_NUMBER(
p_block_name => 'DEFAULT',
p_attribute_name => 'A_appl_id');
my_url := 'PORTAL30.wwa_app_module.link?' ||
'p_arg_names=_moduleid&p_arg_values= 2027783301' ||
'&p_arg_names=_show_header&p_arg_values=YES' ||
'&p_arg_names=appl_id&p_arg_values='||
LTRIM(TO_CHAR(v_appl_id))||
'&p_arg_names=_APPL_ID_cond&p_arg_values=%3D';
call(my_url);
end;
Thanks in advance for your help.
Whatever you have done seems OK .. it should work.
I tried out the same and it works.
Similar Messages
-
Hi,
I'd like to have a form on a page and when the user navigates to that page I'd like the form to pick up a session variable and put it in a field on the form and run a query. So effectively auto querying a form.
I've seen it done before but cant seem to find it again.
I think that it was done by putting some PL/SQL in the 'before displaying the page' area of the additional PL/SQL section. The code would load the session, get the value, set the field value and somehow make it run a query. doQuery doesn't work here.
Any help with this would be great.
Thaks,
MichelleI have a similar problem. In particular:
There is a private form (named MOD_ANAGRAFE_DITTA) based on a database table. The URL to
run this form is
https://portal.websanity.it/pls/portal/PORTAL.wwa_app_module.new_instance?p_moduleid=6994683181.
There is also a page from which the MOD_ANAGRAFE_DITTA form is called. To do this, a URL element was added to the page in whi
ch the above url was specified.
Based on some of the OID attributes of the user who connects to the page, when the user runs the form, the form would have to show only the record that satisfies those attributes.
To do this the following code was entered in the 'BEFORE DISPLAY PAGE' section of the FORMs Wizard:
declare
scopo varchar2(50);
user varchar2(200) := portal.wwctx_api.get_user;
BEGIN
select attrvalue into scopo
from ods.ct_scope
where entryid in (select entryid
from ods.ct_uid
where attrvalue=lower(user));
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => 'A_ID',
p_value => to_number(substr(scopo,1,1)));
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => 'A_SEDE',
p_value => substr(scopo,5));
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => '_CALLED_FROM_LINK',
p_value => 'SEDE');
PORTAL.wwa_api_module_event.do_event
('DEFAULT','QUERY_BOTTOM',1,'ON_CLICK',True,'',p_session);
END;
where scope is the OID attribute of user; ID and SEDE are the two table columns must to be filtered
The code to auto-query a form doesn't work as it should. The form shows all the table records. .
Perhaps the attribute used to do the query is not a session variable?
How can this be resolved? -
How can I query data from XML file stored as a CLOB ?
Hi folks,
please see below sample of XML file, which is stored in "os_import_docs", column "document" as CLOB.
I would like to query this XML file using some SQL select.
How can I query data form below XML?
<?xml version="1.0" encoding="UTF-8"?>
<etd>
<header>
<AR>000000000</AR>
<AW>0</AW>
<CT>S</CT>
<CU>H</CU>
<CZ>SS48</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-11-01</CK>
<CL>21:18</CL>
<CW>225</CW>
<CX>0</CX>
<CF>SS-CZL18</CF>
<DV>2</DV>
</header>
<account_group id="234">
<account id="234">
<invoice id="000742024">
<da>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>A</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>88754515</BS>
<AD>Mike Tyson</AD>
<AC>Mike Tyson</AC>
<AZ>CZ6521232465</AZ>
<AE/>
<CG>A</CG>
<AL>A</AL>
<BZ>.</BZ>
<AH>Some street</AH>
<AI/>
<AF>Some city</AF>
<AK>Kraj</AK>
<AG>CZ</AG>
<AJ>885 21</AJ>
<CR>21-11-2012</CR>
<AY>602718709</AY>
<AV>800184965</AV>
<AP/>
<AO/>
<AQ/>
<AN/>
</da>
<da>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>A</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>88754515</BS>
<AD>Mike Tyson</AD>
<AC>Mike Tyson</AC>
<AZ>CZ6521232465</AZ>
<AE/>
<CG>A</CG>
<AL>L</AL>
<BZ>Mike Tyson</BZ>
<AH>Some street</AH>
<AI/>
<AF>Some city</AF>
<AK>Kraj</AK>
<AG>CZ</AG>
<AJ>885 21</AJ>
<CR>21-11-2012</CR>
<AY/>
<AV>800184965</AV>
<AP/>
<AO/>
<AQ/>
<AN/>
</da>
<detaildc CH="0032" AB="234" BS="11888954" BB="32" BA="CZ" AT="" CI="7077329000002340342" AU="" DU="1Z48395" CB="CZK">
<dc>
<AW>0</AW>
<CT>D</CT>
<CU>C</CU>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<CV>8151</CV>
<BT>12111</BT>
<CJ>1</CJ>
<AM>0</AM>
<DR>PC</DR>
<DS/>
<DO>25-10-2012</DO>
<DQ>18:42</DQ>
<CE>1</CE>
<BH>8151</BH>
<CY>8151 SHELL MALKOVICE P</CY>
<DP>049336</DP>
<DT/>
<BQ/>
<BR>500000</BR>
<CN>30</CN>
<CM>030</CM>
<BO>160,00</BO>
<BF>38,900</BF>
<BC>6224,00</BC>
<BI>32,417</BI>
<CD>B</CD>
<BG>0,600</BG>
<BK>31,817</BK>
<BJ>0,000</BJ>
<DI>8</DI>
<BP>20,00%</BP>
<CC>CZK</CC>
<BM>5090,67</BM>
<BN>1018,13</BN>
<BL>6108,80</BL>
<BD>5090,67</BD>
<BE>1018,13</BE>
<DW>6108,80</DW>
<CO>Nafta</CO>
</dc>
</detaildc>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>1</DG>
<CN>30</CN>
<CM>030</CM>
<DF>160,00</DF>
<DH>litr</DH>
<DJ>20,00%</DJ>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA>P</DA>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>2</DG>
<CN/>
<CM/>
<DF>160,00</DF>
<DH>litr</DH>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>19</DG>
<CN/>
<CM/>
<DF/>
<DH/>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
<dt>
<AR>000742024</AR>
<AW>0</AW>
<CT>D</CT>
<CU>T</CU>
<CH>0032</CH>
<BY>31-10-2012</BY>
<CA>25-10-2012</CA>
<AB>234</AB>
<AA>234</AA>
<BS>11888954</BS>
<BB/>
<BA>CZ</BA>
<DG>8</DG>
<CN/>
<CM/>
<DF/>
<DH/>
<DJ/>
<DD>5090,67</DD>
<DE>1018,13</DE>
<DC>6108,80</DC>
<DB>CZK</DB>
<DA/>
<AX/>
<CQ/>
<CP/>
</dt>
</invoice>
</account>
</account_group>
<footer>
<AR>999999999</AR>
<AW>0</AW>
<CT>S</CT>
<CU>T</CU>
<CZ>SS48</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-11-01</CK>
<CL>23:04</CL>
<CW>225</CW>
<BX>1</BX>
<CS>7</CS>
<BW>0000000000000610880</BW>
</footer>
</etd>sample - not working:
select x.*
from os_import_docs d
,XMLTABLE('/etd/header'
PASSING httpuritype(d.document).getXML()
COLUMNS
response_status varchar2(50) PATH 'AR'
) x
where d.object_id = 2587058
and rownum = 1;
ORA-22835: Buffer too small for CLOB to CHAR or BLOB to RAW conversion (actual: 6196, maximum: 4000)Many thanks,
TomasHello,
many thanks for the reply. Your examples are very usefull for me.
To answer your questions.
An XML structure:
/etd
/header - repeat in each row in output
/account_group/account
/invoice
/da - repeat for each details under "selected "invoice
/detaildc/dc - the lowest level
/detaildn/dn - the lowest level
/dt - repeat for each details under "selected "invoice
/footer - repeat in each row in outputI would like to to have a 1 row for each "record" in /detaildc section and include related nodes at higher levels.
Please see below XML file, which is simplified file of example in first post, but includes a complete xml structure which needs to be queried in db.
<?xml version="1.0" encoding="UTF-8"?>
<etd>
<header>
<AR>000000000</AR>
<CK>2012-10-31</CK>
<CF>SS-CZL19</CF>
</header>
<account_group id="234">
<account id="234">
<invoice id="EI08P4000">
<da>
<AR>EI08P4000</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z56655" CB="EUR">
<dc>
<DO>16-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>1940,60</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="2Z55050" CB="EUR">
<dc>
<DO>17-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>1328,10</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="2Z90001" CB="EUR">
<dc>
<DO>27-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>185,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI08P4000</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI13T7777">
<da>
<AR>EI13T7777</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z48302" CB="EUR">
<dc>
<DO>26-10-2012</DO>
<CY>SANEF 07706 A 07704</CY>
<BM>232,10</BM>
<CO>Dalnicni poplatek</CO>
</dc>
</detaildc>
<detaildc DU="1Z48302" CB="EUR">
<dc>
<DO>20-10-2012</DO>
<CY>TEST A 07704</CY>
<BM>30,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI13T7777</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI327744">
<da>
<AR>EI327744</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildn CI="707732 00000234" >
<dn>
<BY>30-10-2012</BY>
<BM>8,10</BM>
</dn>
</detaildn>
<detaildn CI="707732 00000234" >
<dn>
<BY>30-10-2012</BY>
<BM>399,50</BM>
</dn>
</detaildn>
<dt>
<AR>EI327744</AR>
</dt>
</invoice>
</account>
<account id="234">
<invoice id="EI349515">
<da>
<AR>EI349515</AR>
<AD>Mickey Mouse</AD>
</da>
<detaildc DU="1Z56514" CB="EUR">
<dc>
<DO>29-10-2012</DO>
<CY>ALLAMI AUTOPALYAKEZE</CY>
<BM>1240,60</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="1Z56515" CB="EUR">
<dc>
<DO>19-10-2012</DO>
<CY>ASFINAG POST_MAUT</CY>
<BM>7428,10</BM>
<CO>Dalnicni znamka</CO>
</dc>
</detaildc>
<detaildc DU="1Z56515" CB="EUR">
<dc>
<DO>12-10-2012</DO>
<CY>UK</CY>
<BM>954,10</BM>
<CO>Poplatek</CO>
</dc>
</detaildc>
<dt>
<AR>EI349515</AR>
<DG>8</DG>
</dt>
</invoice>
</account>
</account_group>
<footer>
<CZ>SS47</CZ>
<BU>4</BU>
<CH>0032</CH>
<CK>2012-10-31</CK>
<CL>01:25</CL>
</footer>
</etd>Expected output
AR CK CF AR4 AD DU CB DO CY BM CO AR5 DG CI BY BM6 CZ BU CH CK7 CL
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 1Z56655 EUR 16-10-2012 ASFINAG POST_MAUT 1940,60 Dalnicni znamka EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 2Z55050 EUR 17-10-2012 ASFINAG POST_MAUT 1328,10 Dalnicni znamka EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI08P4000 Mickey Mouse 2Z90001 EUR 27-10-2012 ASFINAG POST_MAUT 185,10 Poplatek EI08P4000 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI13T7777 Mickey Mouse 1Z48302 EUR 26-10-2012 SANEF 07706 A 07704 232,10 Dalnicni poplatek EI13T7777 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI13T7777 Mickey Mouse 1Z48302 EUR 20-10-2012 TEST A 07704 30,10 Poplatek EI13T7777 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI327744 Mickey Mouse EI327744 707732 00000234 30-10-2012 8,10 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI327744 Mickey Mouse EI327744 707732 00000234 30-10-2012 399,50 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56514 EUR 29-10-2012 ALLAMI AUTOPALYAKEZE 1240,60 Dalnicni znamka EI349515 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56515 EUR 19-10-2012 ASFINAG POST_MAUT 7428,10 Dalnicni znamka EI349515 8 SS47 4 32 41213 01:25
0 41213 SS-CZL19 EI349515 Mickey Mouse 1Z56515 EUR 12-10-2012 UK 954,10 Poplatek EI349515 8 SS47 4 32 41213 01:25 -
Auto querying using Portal form?
A friend of mine has a report that is linked to a form, where users can edit the data. The value from the report is passed to the report, no problem, but the user must manaully click on the query button to display the information. My question is: how can I make the report query on the passed value without having to manually click the "query" button? Thanks
RichRichard,
Please take a look at our FAQ:
http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm
"Building Applications" section has several examples of links how to call a form in "auto-query" mode.
Thanks,
Dmitry -
Portal Master-detail form how to auto assign detail record sequence number
Portal Master-detail form how to auto assign detail record sequence number.Please help me?
You can just read the following section
Can I specify a sequence number generator as the default value for a form column?
Yes. Enter the following in the "default value" field for the column:
#<schema name>.<sequence name>.nextval
where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
#SCOTT.CUSTOMER_SEQ.NEXTVAL
same way you can do for master - detail form.
for more information on forms please refer the following URL.
http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
hope it helps. -
Auto Query Form on Page not working
Hi,
I created a simple form portlet and want to autoquery it on a certain record. I added this code to "Before displaying the page" :
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => 'A_STC_SAMPLINK',
p_value => 620352);
p_session.set_value(p_block_name => 'DEFAULT',
p_attribute_name => '_CALLED_FROM_LINK',
p_value => 'STC_SAMPLINK');
PORTAL.wwa_api_module_event.do_event('DEFAULT', 'QUERY_BOTTOM', 1, 'ON_CLICK', True, '', p_session);
This performs the query but i see this first record of my table, while it should show the record with STC_SAMPLINK = 620352. When I remove the do_event statement, i can see the field filled in correctly and when pressing the query-button manually, it does show the record with STC_SAMPLINK = 620352.
What am I doing wrong?
Using Application Server 10.1.2.0.2 on HP-UXI just discovered that it does work using p_session.set_shadow_value (with extra p_language parameter). Does this mean that note 316158.1 on metalink (based on Auto Query Form on Page is no longer valid for 10g ?
-
How to run recordset SQL query in FORM DATA event
How can I run recordset SQL query in FORM DATA event upon clicking on Add button in the document?
Hi Slamet,
When you receive a form data event you have a class containing inside it a ObjectKeys xml info regarding the object added/modified,...
With the objects keys you can then use the DI API method called GetByKeys to obtain the DI Object.
There is some information about it in the SDK Help file, mainly in the "FormDataEvent" class definition:
<i>The event provides the unique ID (BusinessObjectInfo.ObjectKey) of the modified business object. You can use the value of this property as an input parameter in the DI API DataBrowser.GetByKeys method to get a DI object.</i>
Pay attention you don't have this information in the Before=True event of the Add as it is not yet in the database.
Hope it helps
Trinidad. -
How to Implement KFF Range (Low and High) in query find form in oracle apps
Hi,
Please provide some sample script for using KFF range LOV (Low and High) in one of the query find form in Oracle apps R12.
I need to customize one of the standard form and add this range functionality for that search form.
Thanks,
PrasannaYuvaraaj,
Your request is unique to the Oracle Enterprise Business Suite (EBS). Please post your question in the General EBS Discussion forum. If you have a general Forms question, by all means, ask it here! ;-)
Craig... -
Custom Search Portlet: How to specify a page in the auto query?
I want to specify a page in an auto query (Automatically display search results).
I'm able to specify a pagegroup (Tab What to Search), but unable to select a specific page and to include/exclude subpages.
This option is available on the SearchForm Tab. We are running 9.0.4.A similar question was asked in this discussion:
Custom Search Portlet
A Portal Search Team member replied that this feature might be included in 9.0.4.
We are testing 9.0.4 and it's not available. When is feature this scheduled? -
How to Re-query a standard form.
Hi there,
There is a need to Requery a standard Service Request Form.
When "Launch Workflow" button is pressed, it updates a DFF at the database.
After this if we wish to add description in Task Description Field, it throws error "Record updated by another user"
As Attribute value has been changed at the database but this value is not reflected on the Standard Form.
we have to hit CNTRL+F11 manually before we can update any field again..
Is there any way to Re-query the form?
Is it possible through Form Personalization on some event?
I have tried DO_KEY(EXECUTE_QUERY) but its not working.
Please help.can the field on form be updated without gettin "Record updated by another user" error?I already suggested a way to do so in my former post
In general, its more easy to re-read the updated value in the POST-UPDATE (or POST-INSERT) trigger instead of doing a full re-query.But i'm not quiet sure if you're talking abount an eBusiness-form and if its possible to intercept that trigger there.
I did try GO_BLOCK before DO_KEY('EXECUTE_QUERY')So, is the execute-query executed or not? Did the GO_BLOCK succeed? If not, any errors?
You could also issue an EXECUTE_QUERY; instead of a DO_KEY('EXECUTE_QUERY'); -
How to change a LOV query from Forms Personalization(Doc ID 1534116.1)
Customer followed the step on Note 1534116.1, but after that close the form and reopening the form , cus is unable to query the form.
Please advise.
Thanks,
LingPl post EBS version - what does "unable to query the form" mean ? Any error codes / messages ? Was FRD trace enable to troubleshoot ?
MOS Doc 438652.1 -
How can I create a form for users wherein the text field will expand to accommodate additional text?
You need to use LiveCycle (PC Only) to create a dynamic form like that.
The best you can do with Acrobat to view all of the text in a field is to set the field to multiline, and set the size to "Auto" (If you don't set the size to 'Auto', you can enter as much text as you wish, but the user will need to use the scrollbar to view all of the text.) -
How can I restrict a form to be used for Query-Only sometime (for some users) which can also be used as Insert/Update etc another time (for other users).
I am using Open_Form not Call_Form.use
CALL_FORM('<formname>', no_hide, no_replace,
query_only);
Thanks -
Passing a default value to the master block and do the auto query
Hi
My problem is i have a MD FORM to which i have to pass a default value and do an auto query so that when i run the form the form should open with this default value and do the query and get the details.
I tried many things like trying to set the value of the column using p_session.set_value and then calling the same form using wwa_app_module_link by using the value in the condition but every time unless i press the query button i did not get the values.
Now i don't know what to do.
My portal version is 3.0.7.6.2
Some body please help me
thanks
SreedharI don't think this works for 3 parameters, but I know it will work for 1. Maybe you can do something with it.
1. Create a link to the destination component (YourProvider.YourLink)
2. Use the code below to use that link to pass the value of a form field to the destination component. 'FieldName' is the field on the destination component you want to query, and '_FieldName_cond' is the condition. This creates the destination URL.
3. wwa_app_module.set_target(l_url) will send you to the URL you generated.
l_url := PORTAL.wwv_user_utilities.get_url('YourProvider.YourLink', 'FieldName', v_YourParameterValue, '_FieldName_cond', '=');
portal.wwa_app_module.set_target(l_url);
I'm not the best at this, but this works for me in most cases. -
Can't figure out how to create an update form in a cfwindow tag
I finally was able to figure out how to do an add form inside
of a cfwindow tag yesterday. But I want this form to be
multipurpose, and allow edits as well. But for the life of me, I
can't figure out how to pass a row of data to the form inside a
cfwindow. Normally, I'd pass the primary key via the URL but if I
try to do that here, it basically reloads the page and closes out
the cfwindow since I have the window set to not show by default.
My page has a list of departments. My page is called
departments.cfm. For each row in the department list, there is a
link called edit. When the user clicks this link, I want the
cfwindow to open with the cfform populated with the data from the
department list for the row selected. Sounds simple enough, except
how do I pass the department_id to the form? If my link is <a
href="departments.cfm?id=#department_id#>Edit</a>, the
cfwindow tag displays and I can see the data in it, but then closes
right away. I finally figured out that it was calling the page
again and the cfwindow is closing because I have it set to not
display by default. I'm about ready to drop this cfwindow and just
do real popup windows via javascript. And I'm normally not in favor
of doing popup windows, but the application I'm working on doesn't
have enough real estate on the screen to do a hidden form, so a
separate window containing the form is my best solution.
Anyone have any suggestions?Well, this is kind of a tough one for me, but it sounds like
the best way will be to launch a JavaScript function everytime the
user clicks the link, like this:
<cfoutput query="getDepartments">
<a href="javascript:showWin(#yourID#)">show
window</a>
<br>
</cfoutput>
the showWin function will both create the window and launch
it, passing in the user chosen var:
function showWin(id) {
var URL = 'editDeptPage.cfm?dept_id=' + id;
var winName = 'deptWin' + id;
ColdFusion.Window.create(winName, 'Edit the Department',
URL,
{x:100,y:100,height:300,width:400,modal:false,closable:true,
draggable:true,resizable:true,center:true,initshow:true,
minheight:200,minwidth:200 })
The following line of code is supposedly to make sure that
the window refreshes each time it is launched, by naming it
something new each time:
var winName = 'deptWin' + id;
However, if it doesn't work, I think there's a Window refresh
function in the Ext library but I'm not sure.
Also, in the showWin function, after the Window is created,
you might need this but I'm not sure:
ColdFusion.Window.show(winName)
Talk to you later,
Peter
Maybe you are looking for
-
Hi Iweb Wont open on my desktop. in the tab it shows that it is open but i cant see the iweb page? thanks
-
I cannot click "Approve" in "my activities" to move on
scsmsp installed in server 2012 and with sharepoint 2010 foundation. I cannot click "Approve" in "my activities" to move on. What's the problem? can anyone help me? thank you so much!
-
Are the macbook's and macbook pro keyboards the same size
I have an older macbok the MC207xx/A model. I am lookng for a keyboard cover for it, and can only find newer model macbook pro covers and I was wondering if it would fit my mb.
-
Browsing in iTunes Store is flawed?
Hi All, When browsing the categories in the pod-casting directory, I've started getting the text listing, as you can see below. I can't get back to the graphical interface with the artwork displayed. When I hit the 'eye' icon in the lower right, it b
-
Is aggregate DB index is required for query performance
Hi, Cube mange tab when i check for the aggregate DB index it shows red, here my doubt is, is the DB index is required for query performance is the check statics should be in green? Please let me know Regards, Kiran