This discussion is archived
8 Replies Latest reply: Nov 27, 2012 12:04 PM by Max L RSS

2 region display selector in one page

915649 Newbie
Currently Being Moderated
Hi all,

Is there a way to have 2 region selector which have different region to display in one page for APEX 4.1?

Edited by: Charles on 2012-02-22 10:25
  • 1. Re: 2 region display selector in one page
    rima Pro
    Currently Being Moderated
    I'd like to help you, but I don't understand the question, could you elaborate?

    Regards,
    Richard

    -----
    blog: http://blog.warp11.nl
    twitter: @rhjmartens
    If this question is answered, please mark the thread as closed and assign points where earned..
  • 2. Re: 2 region display selector in one page
    701428 Newbie
    Currently Being Moderated
    This is possible.
    Define 3 regions in the page.
    You can provide a select List Item in Region 1, and allow user to select an option. <region 1> <region 2>
    Region 1 ->Conditions ->Request = Expression 1->Under Expression 1 -> Define the value you gave for region 1
    Region 2 ->Conditions ->Request = Expression 1->Under Expression 1 -> Define the value you gave for region 2
  • 3. Re: 2 region display selector in one page
    MalcA Explorer
    Currently Being Moderated
    You need to set the regions you want to be included in a display selector by setting that attribute to Yes in the attributes section of the region definition, then create a region of type 'Region Display Selector' (the last option on the list when creating a region). You can do this in 4.0.2 anyway. Or were you asking if you can have more than one selector on the screen?

    regards,
    Malcolm.
  • 4. Re: 2 region display selector in one page
    915649 Newbie
    Currently Being Moderated
    I was wondering if I can have more than one on the screen. Is that possible? And can I remove the Select All of the options in the region selector?

    Edited by: Charles on 23-Feb-2012 6:26 AM
  • 5. Re: 2 region display selector in one page
    MalcA Explorer
    Currently Being Moderated
    I don't think you can have multiple region display selectors out of the box. Maybe other forum uses know of a way.

    You could do this with Suzi's suggestion of a selection list or radio set, but using dynamic actions (instead of a submit and region conditions) to hide/show entire regions on change of the selection list/radio set value.
  • 6. Re: 2 region display selector in one page
    Ramesh P, Oracle APEX Developer Journeyer
    Currently Being Moderated
    Hi,
    Lets say you have 3 regions, Region 1, Region 2, Region 3
    In Region 1 have your select list with values like this:

    STATIC2: Region2;REGION2,Region 3;REGION3

    Form Element Attributes have JS like this, onChange="ShowRegion(this.value);"

    For Region 2, Region 3 give some static ids in the static id section of the region as REGION2, REGION3

    on Page level header and body attibutes have the JS code

    <script type = "text/javascript">

    function showRegion(pValue){
    if(pValue == ''){
    $x_Hide('REGION2');
    $x_Hide('REGION3');
    }
    else if(pValue == 'REGION2'){
    $x_Show('REGION2');
    $x_Hide('REGION3');
    }else if(pValue == 'REGION3'){
    $x_Show('REGION3');
    $x_Hide('REGION2');
    }
    }

    </script>

    This should resolve your issues

    Thanks,
    Ramesh P.
  • 7. Re: 2 region display selector in one page
    955908 Newbie
    Currently Being Moderated
    Use the following post to remove the 'Show All', it looked a treat for me.

    http://apexplained.wordpress.com/2012/07/16/hide-the-show-all-tab-in-a-region-selector/#comment-228
  • 8. Re: 2 region display selector in one page
    Max L Newbie
    Currently Being Moderated
    I tried the steps documented in http://apexplained.wordpress.com/2012/07/16/hide-the-show-all-tab-in-a-region-selector/#comment-228. All worked well except the last jquery code:
    (".apex-rds-container").siblings().slice(1).hide();

    It would only work if the Region Display Selector is a sub-region of another region as done by the author. Otherwise, it won't work. Here is the more general jquery code that you need to insert to the page's "Execute when Page Loads" section.


    // The following jquery code disable the "Show All" link in Region Display Selector (RDS).
    // Remove the "Show All" link from the DOM.
    $('.apex-rds li:eq(0)').remove();

    // Assign the next link to be the first and selected link.
    $('.apex-rds li:eq(0)').addClass('apex-rds-first');
    $('.apex-rds li:eq(0)').addClass('apex-rds-selected');

    // Click the first link.
    $('.apex-rds > li:eq(0) > a').trigger('click');

    Edited by: Max L on Nov 27, 2012 12:04 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points