Ajax region pull bug?

Hi,
I have a page with two dynamic PL/SQL regions.
I want to refresh the second one without submit my page like the following example:
http://apex.oracle.com/pls/otn/f?p=11933:48:4181203731698424
here is the main of the example code.
var get = new htmldb_Get(null,$x('pFlowId').value,null,47);
gReturn = get.get(null,'<htmldb:BOX_BODY>','</htmldb:BOX_BODY>');
$x('ReportDrop').innerHTML = gReturn;
The problem is that if I use such code to retreive a dynamic pl/sql region on the SAME page (i.e. 47) gReturn gets the value *','* (?!?!?)
If I copy my dynamic PL/SQL region to another page it works fine.
Is it an APEX bug?
I expected that I can use AJAX refresh for a region on the same page and I don't want to replicate it.
Thank you very much.
Davide

Davide,
Interesting problem. One of the main reasons to use Ajax is to avoid a full page refresh because of all of the content that would need to be processed on the server side. If you didn't replicate the region alone on another page then you would not save any server side processing.
As for the bug, have you used Firebug to see exactly what the Ajax call is returning?
Regards,
Dan
http://danielmcghan.us
http://www.skillbuilders.com
You can reward this reply by marking it as either Helpful or Correct ;-)

Similar Messages

  • Ajax Region Pull - Javascript errors

    Hi All,
    I have tried implementing Carl Backstrom's excellent example Ajax region pull.... http://htmldb.oracle.com/pls/otn/f?p=11933:48:2576101578276736 and have been unable to get it to work. I have gone through it step by step but i still get a Javascript error relating to the function dhtml_GetReport(pThis). The error is "Object Expected on line 13" => var l_Val = html_SelectValue(pThis);
    I have also included the files htmldb_html_elements.js and htmldb_get.js just in case you were wondering. We are using HTMLDB 1.6.1.00.02 if that could be the issue here.
    Anyone come across this before?
    Thanks.

    Hello,
    All those examples have been built for 2.0 and above.
    Carl

  • Ajax Region Pull and checksum

    I have the page, which consists the report, which has to be pulled using ajax. The problem is this page has the checksum enabled.
    I've created the start and end of the report tags on this page (<!--REPORT_START-->,<!--REPORT_END-->).
    I was able to generate the checksum but not sure how I can add it to the request for the report.
    Here's the extract of the javascript code for the page:
    var checksum=generate_checksum(url_params);
    alert(checksum) // this part works fine
    +//start ajax call+
    var ajaxReq = new htmldb_Get  (null,&APP_ID., null,2025);
    ajaxReq.add('P2025_LIST_ID',list_id);
    +...+
    report_body=ajaxReq.get(null,'<!--REPORT_START-->','<!--REPORT_END-->');
    The report body is returned only if checksum is removed.
    BTW I thought I can stick it in the querystring parameter number 7 in htmldb_get but it does not work.
    Have anybody done that ?
    Thanks for your help
    Mikhail

    Mikhail,
    I am concerned about your approach, because if you have a 'generate_checksum' JavaScript function that provides a way for you to generate a valid checksum on the client-side, what's to stop a hacker from calling that same function and easily circumventing the SSP protection on the target page?
    Have you thought of either un-restricting the target page and adding some logic to your report query to try and protect the values (eg only show certain rows for certain users, etc), or if you really want to keep the protection level on this report page, switching to a simple full page submit?
    Also, if you're on APEX 4.0, have you looked at using the 'Refresh' dynamic action? This has the same checksum restriction, but would be an easier and more supported way of approaching this in a partial page refresh way. Please see here for more geenral info. on how to do that:
    http://anthonyrayner.blogspot.com/2010/07/report-filtering-with-apex-40-dynamic.html
    Hope that helps.
    Regards,
    Anthony.

  • AJAX region pull

    I am using ajax to display a region from another page. This region has 2 text fields and a button that when pressed branches to another page. When I input the data and click the button I get an error:
    Error Item ID (10060522396890067) is not an item defined on the current page.
    Any suggestions?

    Hello Stew,
    As I suspected, your problem (and the others who started this thread) has nothing to do with the browser you are using, but in the way you are using the technique described by Carl, and was (of course) spotted correctly by Scott.
    In my answer, I’m also referencing your post in here - Re: Partial refreshing of pages in 2.0 ?
    >> I've looked at the source that's generated by my page and don't find an extraneous <form> tag
    Carl didn’t mean the <form> tag itself but to form input components in general, like items. In your case, we are talking about ‘P20_CUST_ID’, which you defined as a hidden item on page 20. Although hidden, this item is being rendered on page 20, and is included in the ‘box’ you are clipping from this page. While submitting page 2 (apply changes) the APEX engine finds on page 2 and item which not belong to this page, so it issue an error message.
    In your specific case, where the item – P20_CUST_ID – is a hidden one, the solution is very simple. Just set the condition of the item to ‘never’. That will prevent it from being rendered on page 20, so it will not be copied to page 2. I did that on your demo application, and now it seems to work just fine.
    In general, if the item you are using in the remote page must be a regular item (and not a hidden one) you need to use Scott suggestion, and put it in a region that you don’t clip as part of your AJAX process.
    Regards,
    Arie.

  • Ajax Report Pull APEX_ITEM.DATE_POPUP  issue

    Hi all,
    I am trying to use something similar to Carl's Ajax Region Pull
    http://htmldb.oracle.com/pls/otn/f?p=11933:48:1222899842354681::NO:::
    So I have 2 pages. My LOV on Page 4 has an onchange event to trigger an Ajax call to page 5 which then displays the results in a region on Page 4.
    Now I am using apex_item calls to allow entry into the report on page 5. Problem is, when I have a date entry item where I have to use apex_item.date_popup then I get a javascript error similar to "genCalf01_0 is not defined" when I click on the date icon to popup the calendar.
    On my instance at work this error is only with the second date field but the first is fine. However on apex.oracle.com, both date icons trigger the problem.
    Any ideas? I have put a sample on http://apex.oracle.com/pls/otn/f?p=38748:4:2006073124664781:::::
    workspace: abots
    username: test
    password: apex_test.
    Cheers
    Kofi

    Hello,
    Using the built in form items pulled from ajax can cause alot of problems and is discouraged. In most cases when you pull a form item from one page into another page it will break your page when you try and submit it.
    Now with the date pickers there is an even bigger issue because there is also embedded individual javascript's associated with each datepicker and when you pull them into the page the page DOM will not pick them up.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • Cross browser issue using ajax report pull

    Hi,
    I have an application working using ajax report pull.
    Entire application is based on ajax and its currently released.
    Its performance is good. It works fine with mozilla but in ie,
    links and buttons are not working.
    my code is as follows:
    var container = document.getElementById("divlayer");
         container.innerHTML="";
         var l_Val = document.getElementById('P15_ID').value;
         var l_Val1 = document.getElementById('P15_REGION').value;
         var l_Val2 = document.getElementById('P15_COUNTRY').value;
    var get = new htmldb_Get(null,html_GetElement('pFlowId').value,null,10);
         get.add('P15_GSI_PARTY_ID',l_Val);
         get.add('P10_ID',l_Val);
         get.add('P10_REGION',l_Val1);
         get.add('P10_COUNTRY',l_Val2);
         get.add('P10_ROWS',l_Val3);
         get.add('P15_REGION',l_Val1);
         get.add('P15_COUNTRY',l_Val2);
         get.add('P15_ROWS',l_Val3);
         gReturn = get.get(null,'<htmldb:BOX_BODY>','</htmldb:BOX_BODY>');
         get = null;
    document.getElementById("divlayer").style.visibility='visible';
    document.getElementById("divlayer").style.display='block';
    var elem = document.createElement('div');
         elem.id='d1';
    elem.innerHTML=gReturn;
         container.appendChild(elem);
    The links with doSubmit is not submitting to the same page in ie.
    Please help me.
    Thanks,
    Niveditha

    Hello Niveditha,
    There're some differences in browsers... so yes it's possible that it doesn't work with the same code in another browser. The good news is that most of time there're workaround.
    When I look at your code, you could already change document.getElementById() by $x(), which is doing the same, but comes from the APEX framework.
    Do you have an idea where it fails in IE? Are you using the Developer Toolbar? Maybe that gives you more insights. You could also put some alert('hello 1'); in your code to see what's happening and how far it comes.
    If you put it on apex.oracle.com we can have a look into more detail.
    Dimitri
    -- http://dgielis.blogspot.com
    -- http://apex-evangelists.com

  • Region Pull with Region Tabs

    Hi,
    has anybody tried to have region tabs into an region pulled from other page (
    both examples from Carl (http://htmldb.oracle.com/pls/otn/f?p=11933:48 and http://htmldb.oracle.com/pls/otn/f?p=11933:55)
    I have a page (Page1) from where I call the "Region Pull" that's working fine. In the pulled page (Page2) I have created the "Region Tab". the Javascript I have added in Page1. The tabs are shown, but when I click on another one than default, nothing happens, so no other region is shown. After having a look in the javascript code, I think it is a problem of the call of the new tab region:
    function doTab(pThis){
         var lTab = html_GetElement(pThis);
         set_Some_Item('P2_ACTIVE_PANE',lTab.id);
         var lContent = lTab.id + '_content';
         html_TabClick(lTab,lContent);
    var lContent = regionX_content ... is it possible that he couldn't find this region???
    thanks for any suggestions and help
    chrissy

    Hi
    Does checking the box marked Show All Regions, & then looking for English (Japanese), help at all? May be able to reinstall it by running Optional Installs from installer DVD?
    Could always use Pacifist to extract it from Install DVD - http://www.charlessoft.com/
    Steve

  • Ajax Report Pull from another Page Pagination override

    We are on a time crunch and need to get this application working in a timely manner, any help would greatly be appreciated..
    *[History leading up to problem]*
    We followed the code from this example http://apex.oracle.com/pls/otn/f?p=11933:48:4441142106394445 which pulls a report from another page using AJAX so we could update a report (in this case a tabular form). Since Tabular Forms cannot update past 30-40 records we had to turn on pagination to prevent errors when trying to submit it.
    Since Pagination on the bottom of the report/tabular form links to the other page the report is on, I decided to attempt to override next> href link to instead call a javascript with the url from next> (Report/Tabular Form Pagination) with Jquery the following code {the override is working} {comments added here for clarification}...
    var oldhref =$("a.t20pagination").attr("href"); //get Apex Pagination a href link location
    $("a.t20pagination").attr('href', "javascript:return false"); // change the Apex Pagination a href llink location to do nothing
    $("a.t20pagination").click(function () {   // Create an onclick for Apex Pagination a href that calls a javascript function
    get_report_page(oldhref); // This function is needed because I am grabbing the report from another page, I hope to
    }); // get this javascript working [the reason why I am asking this question here]
    $("a.t20pagination").removeClass("t20pagination"); // Removed the pagination class just in case it was causing issues.
    The function I am working on below... {I figured I have to do the htmldb_get function {I am still new to Apex so I am not totally clear on it, but learning}, to get the report again from the other page, but I need to add pagination.. So I figured I could split the link location based on the : and go through the array for the parts I need to pass in the htmldb_get}, with alerts to help diagnose the problem...
    function get_report_page(curUrl) {
    alert ('Hello how are you today?');
    var temp = new Array();
    temp = curUrl.split(':');
    alert ('I like the number '+temp.length);
    for ( var i=0, len=temp.length; i<len; ++i ){
    alert (i+":"+temp); // Square brackets actually used, changed to squiggly here to show
    var get = new htmldb_Get(null,$x('pFlowId').value,null,205,null, null, temp{4}); // Square brackets actually used, changed to squiggly here to show
    gReturn = get.get(null,'<htmldb:BOX_BODY>','</htmldb:BOX_BODY>');
    get = null;
    $x('ReportDrop').innerHTML = gReturn;
    *[Actual Problem]*
    Since the report is on another page (in this case 205) and is being pulled onto Page 200 where the user is, when the user clicks on the Next> for the report/tabluar form pagination, the user is automatically thrown to page 205 {I want to keep the user on page 200 and pass the pagination, then pull the report/tabular form again}
    I looked at the link http://apex.oracle.com/pls/otn/f?p=11620:63:834860992188521::NO::: but I am not sure where to stick the report pagination{I thought it would be queryString {above you see I am setting temp[4] in the queryString parameter}..
    I know the function is working since I get the alert messages, after that where the report would be it gives the following error...
    Bad Request
    Your browser sent a request that this server could not understand.
    mod_plsql: /pls/apex/wwv_flow.show HTTP-400 Signature Mismatch or Missing '='
    Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server Server at nysastst.senate.state.ny.us Port 7778
    Can I simply splice the url like I am doing above and pass it to htmldb_get (or is there anyway to pass the report pagination using htmldb_get)?
    If so, what am I doing wrong?
    Also, does this seem like a decent solution or is there a better solution for this issue?
    - Thanks in advance,
    - Brian
    Edited by: brheitner on Dec 10, 2009 8:09 AM
    Edited by: brheitner on Dec 10, 2009 8:11 AM
    Edited by: brheitner on Dec 10, 2009 8:13 AM

    Thanks cb... it worked like a charm..
    but at first, I Could not get it to work because in my report that was being pulled from another page did not have Enable Partial Refresh set to Yes under Report Attributes > Layout and Pagination.. When it was off the a href link of the pagination was showing a standard link. Once Enable Partial Refresh was set to Yes, the pagination then showed a link to javascript:$a_report(...); which meant you can now override it with the javascript function.
    Here is the thread I found it in
    Call Process Through AJAX

  • IOS 6.1: Can't change country/region. Bug?

    After updating to iOS6.1, i am now unable to change the appstore region using my existing ID. I've noticed a few friends who have updated to iOS6.1 experiencing similar problems. Is this bug known to Apple?

    Per Diavonex on the "I cannot change my region" link to the right:
    "Diavonex
    HT1311 Re: I cannot change my region
    Oct 18, 2012 1:45 AM (in response to Lionhaart)
    Try this:
    1. App Store>Featured>Apple ID (at bottom of page)
    2. Tap on Apple ID>View Apple ID
    4. Enter your password
    5. Country/Region>Change Country or Region"
    this resolved my issue.

  • Browser hanging when using AJAX report pull.

    Any particular reason why a browser would hang while its pulling data off?
    What debugging can I do to try and find what is causing the problem.

    Hi Carl,
    Merry Xmas & happy new year. Thanks again for another year of great support.
    Sorry I should have put more details into my original query.
    When I said hangs I meant it hangs and after an extremely long time i get the following error message:
    Error Code 1460: Timeout
    Background: The gateway could not receive a timely response from the website you are trying to access, a DNS server, or another gateway server. This might indicate that the network is congested or that the website is experiencing technical difficulties.
    The page is working with the other AJAX calls I have except when it is calling the shadow page.

  • Regional Settings bug.

    Hi,
    2 week ago I received my Pre2 as part of the Developer Program, thank you for that.
    I am from Brazil.. and we still don't have the Pre avaliable in our market.. hopefully this is something that will be worked out.. so while you guys don't launch it here.. I believe I can help with the local issues I have been facing.
    - The short date Regional Settings for Brazil are wrong: on the home screen the date showed is in the wrong format YY-MM-DD, the Brazil setting should be DD-MM-YY.
    Hope this can corrected in a future fix.
    Regards and congratulations on the great work on WebOS.
    Post relates to: Pre 2 p102ueu (Unlocked EU)

    Hello!
    Palm has logged this in its software issue tracking system. We endeavor to continuously improve our software quality and thank you for bringing this to our attention.  We are grateful to the community and will evaluate options based on customer feedback and software best practices.

  • How to pull a form region in AJAX

    Carl,
    I have implemented Carl's AJAX "region pull" example and works fine. This works fine as long as the region is report region. is it possible to pull a form region with items and submit button in AJAX way?. will it be possible to submit update and submit that pulled form. I just tried to do that and gave me the following error. any ideas are appreciated.
         Error      Item ID (2304200109596392) is not an item defined on the current page.
    thanks,
    Surya

    Hello Surya,
    I guess it depends your template. If it works for a report region and not for your forms region, you might want to have a look what the difference is in the templates for both regions.
    You could give your form region the template of report region and see if that solves the problem?
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • Pulling Dynamic Conntent

    In this example
    http://htmldb.oracle.com/pls/otn/f?p=31517:98
    I am trying to do what Carl suggested in this thread:
    Partial refreshing of pages in 2.0 ?
    and this example:
    http://htmldb.oracle.com/pls/otn/f?p=11933:48
    It works as expected. Now, I am trying to get it working with a report, by clicking
    on the report row instead of selecting the value from a pull down. Obviously, the
    problem is in getting the right value from the report. The report will be pulled but it
    will show "no data found" message. Does anyone know how to modifiy the javascript
    to pass the current row value?
    One more thing: moving the mouse over the rows of "pulled" report will generate
    numerous javascript errors of the same type:
    "row_mouse_out4628953914518701556 is not defined"
    Denes Kubicek

    Hi Denes,
    I am trying to use your examples and Carl's for a reports page, with some changes that I'm not quite sure how to do. I'm hoping you, or someone, can point me in the right direction.
    I have a select list with my report names. When I select each report, I would like different parameters to appear. (Based on a hidden page value that the select list sets) Once the parameters are set, the user will hit 'Go' which submits the page and returns the report results. So far, I have 3 reports in the list, and each one is its own region (all reports regions).
    I have taken the javascript provided and placed it in a script that my page references. I have gotten this to work as far as when the select list changes, P2_ACTION gets set to the proper value, with no page submits. The ReportDrop section I dont think is working, but I think my requirements for it are a bit different?
    My question is is it possible to change the parameters that show based on this, or should I just go with a page submit on the select list?
    Here is what I have in the javascript function:
    // jehansen 033108
    // show region based on pThis value
    // from http://apex.oracle.com/pls/otn/f?p=11933:48:2193802626505248
    // Carl Backstrom app, 'Ajax Region Pull'
    function dhtml_GetReport(pThis, pPage, pReg, pAct)
    var l_Val = html_SelectValue(pThis);
    var get = new htmldb_Get(null, $x('pFlowID').value, null, pPage);
    get.add(pAct, l_Val);
    gReturn = get.get(null, '<htmldb:BOX_BODY>', '</htmldb:BOX_BODY>');
    get = null;
    $x(pReg).innerHtml = gReturn;
    return;
    Here is my call from the Select List, which is a page 0 item:
    onchange="dhtml_GetReport(this, 2, 'ReportDrop', 'P2_ACTION')";
    Do you think this is possible? Any help would be greatly appreciated!!
    Thanks,
    Janel

  • Partial page submit

    Hi,
    I have 2 HTML regions in my page. Region1 has its set of buttons like while region2 but when submit button in region 1 is clicked i want it to only refresh/submit that particular region not the entrire page, also when button in region2 is clicked it should submit only that region2.
    Any idea?
    thanks.

    Gor_Mahia wrote:
    Hi,
    I have 2 HTML regions in my page. Region1 has its set of buttons like while region2 but when submit button in region 1 is clicked i want it to only refresh/submit that particular region not the entrire page, also when button in region2 is clicked it should submit only that region2.
    Any idea?
    thanks.What version of Apex are you using? Not sure if you can partially submit a HTML region. I could think of 3 possible options:
    1. AJAX region pull as described here:
    http://apex.oracle.com/pls/otn/f?p=11933:48
    and here:
    Partial refreshing of pages in 2.0 ?
    So, in your case, you can have the Region 2 in a different page and use the technique described above to pull the region's HTML into your current page.
    2. Use the Skillbuilder's modal window plugin - http://apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/skillbuilders-modal-page_138.html
    You can have the Region 2 developed in a different page. You can then invoke it from your current page using a DA.
    3. Call a Javascript function from the "submit" button. Let the JS function call a AJAX on-demand application process to do the computation. Later, you can refresh the page items in the JS function, as described here:
    Set item value using AJAX
    Hope the above helps.
    Thanks,
    Rohit

  • Ajaxed Tree

    Hi all,
    I have created a tree which is working as my navigation aid to tabs, it is using following query
    select "PAGE_NO" id,
    "PARENT_PAGE_NO" pid,
    "NAME" name,
    CASE WHEN NAVIGATION = 'Y' THEN 'f?p=&APP_ID.:'||page_no||':&SESSION.::NO::P0_PARENT_TAB:'||PARENT_TAB||'' ELSE null END LINK,
    null a1,
    null a2
    from "#OWNER#"."APEX_PAGES" where page_no not in (select "PAGE_NO" from "#OWNER#"."APEX_USER_PAGES" where "APP_USER"=:APP_USER)
    order by IDENTIFIER
    But my problem is that page even refreshes when i just click its expand or collapse icon. How can i stop page from refreshing when i click expand or collapse button??? The answer is probably AJAX. But i don't know how can i implement ajax in application express. I have seen few examples, such as BUILDING AJAX MEMORY TREE, but was unable to proceed any furthur. Can anyone explain me step by step, how can i implement ajax in my application on the tree.
    Thanks a lot
    Sunil Bhatia

    Hi,
    OK - In my example, page 1 shows the tree but it is defined on page 2.
    To set this up, do the following:
    1 - Create TWO application items (through Shared Components, Application Items):
    G_TREE_ROOT
    TEMP_REQUEST
    2 - Create an Application Computation (through Shared Components, Application Computations):
    Application Item: G_TREE_ROOT
    Computation Point: Before Header
    Computation Type: Static Assignment
    Computation: 7839
    These settings are based on using the EMP table for the test pages - 7839 is KING, the top person in the tree, so I just need to set this value. Adjust these as required for your tree.
    This computation should be conditional on G_TREE_ROOT being NULL - this ensures that this item gets an initial value
    3 - Create a new Page template (through Shared Compenents, Templates) - this should be created "From scratch" rather than as a copy of an existing template. This new template is so that we can output only the contents of a page region rather than an entire page - I call this template "Page Snippet"
    When created, edit it. You only need two settings:
    Header: (enter a space)
    Body: #BOX_BODY#
    The space is required as the Header definition is required. #BOX_BODY# will be replaced by the contents of the region on the page
    4 - Now create a new page in your app. This should be a "Tree" page - in my example, this is page 2.
    The tree's SQL query should be:
    select "EMPNO" id,
           "MGR" pid,
           "ENAME" name,
           null link,
           EMPNO a1,
           'f?p=&APP_ID.:1:&SESSION.::::P1_EMPNO:' || EMPNO A2
    from "#OWNER#"."EMP"On my page 1, I will have a page item (P1_EMPNO) and a report filtered using this value - A2 is going to be used to create a link to populate P1_EMPNO. The link is not set using the normal LINK item.
    The Application Item for the tree needs to be set to G_TREE_ROOT. You should, though, create it as P2_TREE_ROOT to start with and we can change this later
    5 - When the tree page has been created set the page to use your new "Page Snippet" page template
    6 - You must only have one region on this page - this should, of course, be the region containing the tree. As you don't need anything else on the page, including the buttons, delete everything except for the tree region
    7 - On your tree page, add in a new Process:
    Name: P2_SET_REQUEST
    Process Point: On Load - Before Header
    Process:
    BEGIN
    APEX_APPLICATION.G_REQUEST := :TEMP_REQUEST;
    END;8 - Now click on the Tree link in the region to go to the tree's definition.
    Change the tree's Application Item setting to: G_TREE_ROOT
    Then, you need to adjust a number of the settings in the tree's templates:
    Unexpanded Parent:
    &lt;td&gt;
    &lt;a href="#" onclick="javascript:getTree('EXPAND,#A1#');"&gt;
      &lt;img src="#IMAGE_PREFIX#Fndtre02.gif" width="16" height="22" border="0"&gt;
    &lt;/a&gt;
    &lt;/td&gt;Unexpanded Parent Last:
    &lt;td&gt;
    &lt;a href="#" onclick="javascript:getTree('EXPAND,#A1#');"&gt;
      &lt;img src="#IMAGE_PREFIX#Fndtre03.gif" width="16" height="22" border="0"&gt;
    &lt;/a&gt;
    &lt;/td&gt;Expanded Parent:
    &lt;td&gt;
    &lt;a href="#" onclick="javascript:getTree('CONTRACT,#A1#');"&gt;
      &lt;img src="#IMAGE_PREFIX#Fndtre05.gif" width="16" height="22" border="0"&gt;
    &lt;/a&gt;
    &lt;/td&gt;Expanded Parent Last:
    &lt;td&gt;
    &lt;a href="#" onclick="javascript:getTree('CONTRACT,#A1#');"&gt;
      &lt;img src="#IMAGE_PREFIX#Fndtre06.gif" width="16" height="22" border="0"&gt;
    &lt;/a&gt;
    &lt;/td&gt;Parent Node Template:
    &lt;tr&gt;
    #INDENT#
    &lt;td colspan="#COLSPAN#" valign="CENTER" class="tiny"&gt;
      #NAME# #DRILL_UP#
    &lt;/td&gt;
    &lt;/tr&gt;Node Text Template:
    &lt;tr&gt;
    #INDENT#
    &lt;td colspan="#COLSPAN#" valign="CENTER" class="tiny"&gt;
      #NAME#
    &lt;/td&gt;
    &lt;/tr&gt;Name Link Anchor Tag:
    &lt;a href="#A2#"&gt;#NAME#&lt;/a&gt;Name Link Not Anchor Tag:
    &lt;a href="#A2#"&gt;#NAME#&lt;/a&gt;8 - On your page 1 (where the tree will actually be displayed), set the page template to one that includes ".. with Sidebar" - this allows you to use region position 2 to show the tree on the left
    9 - Then create a new HTML region and put this in the Page Template Region Position 2 display point. The source of this region should be:
    &lt;div id="MyTree"&gt;&lt;/div&gt;10 - Then add another HTML region on your page. This should use No Template and be in the Before Footer display point. The source of this should be:
    &lt;script type="text/javascript"&gt;
    function getTree(req)
      var get = new htmldb_Get(null,$x('pFlowId').value, null, 2);
      get.add('TEMP_REQUEST', req);
      var gReturn = get.get(null,'&lt;htmldb:BOX_BODY&gt;','&lt;/htmldb:BOX_BODY&gt;');
      document.getElementById('MyTree').innerHTML = gReturn;
      document.getElementById('MyTree').innerHTML += "";
      get = null;
      gReturn = null;
    getTree('');
    &lt;/script&gt;11 - Then add a report on the page. The source of this should be:
    SELECT EMPNO, ENAME, JOB, SAL, COMM
    FROM EMP
    WHERE EMPNO = :P1_EMPNO12 - Add a new page item to the report region. This should be a "Display as Text (saves state)" item and called P1_EMPNO
    To explain how this works:
    Firstly, a Region Pull should only pull contents of a region that does not contain any page items. The region should be the only thing on the page and the page itself must not contain the normal page layout (that is, there should be no tabs etc) - hence the "Page Snippet" page template
    When you click on a normal tree's + or - icons for an item, it actually passes a request of either CONTRACT,xxx or EXPAND,xxx (where xxx is the ID for the node being expanded/collapsed).
    The getTree() function receives as a parameter a value that we can use for the request. Initially, this is an empty string, so the tree will display in its default state.
    Then, as you click on a + or - on our adjusted tree, a call is made to the getTree() function passing in the desired CONTRACT or EXPAND value.
    In the Ajax call (the htmldb_Get() function), we do not call an application process (the second null parameter) but tell it that we want the output from page 2 (the final parameter)
    The get.add(..) line passes our request value into the TEMP_REQUEST application item. This is done before the get.get(..) call - which does the actual pull.
    When page 2 is being rendered on the server, the "On Load - Before Header" takes the value from the TEMP_REQUEST item and sets it as the proper request value for the page. The tree then renders using this (in the same way as it would if the request value was passed via the URL)
    The get.get(..) line, retrieves everything on page 2 and updates the DIV tag contents in our page 1 region - which now shows the expanded or collapsed node(s).
    As we have updated the tree's definition to call javascript when the + or - are clicked, the actual links are defined in the additional A1 and A2 fields that are available on a tree's SQL. We position #A1# and #A2# on the tree's templates where we want the link to appear - hence having to update so many of the tree's template definitions.
    Hopefully, you should be able to adjust the above to fit your application - just remember that my page 1 is the page that is being displayed to the user and page 2 contains the tree. As long as you follow the same steps as above and adjust for your page numbers and SQL, you should be able to achieve your results
    Andy

Maybe you are looking for

  • Droid DNA was a good phone - HTC please fix what you have broken

    I just got the latest update and I really don't care for the new interface.  I have talked to Verizon and HTC and both say the only way to get the older version is to root the phone which will take it out of warranty.   Not that I really care about t

  • How to get the folder structure using Sevlets

    Hi.... I have to retrieve the directory structure on the server and display it to the user. Once the user selects a folder from the tree, the files have to load on a different pane. Of course the folder structure could change on the server if any fol

  • OS Authentication uses ProcessUser instead of ThreadUser!?

    We are having a problem with OS authentication on Oracle - the connection request is going out using the identity of the process instead of the thread. I think the problem lies with Net8 client software, because all ODBC/OLEDB providers behave the sa

  • New Macbook Pro Beach Ball Lag

    Just got the laptop 2 weeks ago, and everything is updated to latest fixes and patches. One big problem I'm having is the constant beach ball showing while during simple things like opening a regular website, or chatting on adium. It will just occasi

  • Nvidea GeForce 7300 GT and ati hd 5870 issues with mac pro and dual monitors etc

    I have a mac pro 1,1 running 10.5.8   Model Name:          Mac Pro   Model Identifier:          MacPro1,1   Processor Name:          Dual-Core Intel Xeon   Processor Speed:          2.66 GHz   Number Of Processors:          2   Total Number Of Cores: