Hide child element LOV cascading


Hi all

I have two selection lists set up in cascade LOV s, using the point of LOV cascading parameters.  Selects a Select1 element updates Select2 with child options available.  It works very well.

What I also want to do, is to hide the Select2 element when no options are available. I guess I can use a dynamic action to hide/show the item, but I can't work on how to get a number of available options and hide/show when it is required. Should be simple but good?

The apex is 4.2.5.00.08

Thank you!

~ L

OK think I worked this one, if will post it here for other peoples reference.

Create a single dynamic action:

Event: change

Type: element

Articles: List of child selection

Condition: Expression of Javascript

Value: this.triggeringElement.length - 1 > 0 (counting of list entries,-1 for a display null value)

Real Action: The child show selection list

False Action: Hide the child selection list

Tags: Database

Similar Questions

  • LOV cascading does not work when you set the value of the parent LOV with DA

    Hi all

    Using APEX 4.2.2.

    I have tow LOVs

    LOV parent article is: P50_TYPE

    Child element LOV is: P50_PROJECT_ID

    In other words in the attributes of the element P50_PROJECT_ID, we have:

    > Cascade LOV Parent article (s): P50_TYPE

    > The items to show page: P50_TYPE

    > The list of values definition: something similar to:

    Select * from mytable where type =: P50_TYPE

    I use DA as run of the JS code to set the value of the P50_TYPE element

    something similar to:

    > $('#P50_TYPE').val (2);

    After doing this, the P50_PROJECT_ID element does not get updated when the P50_TYPE value changes. Namely, P50_PROJECT_ID remains empty, unless the end user manually changes the value of P50_TYPE.

    Any help please?

    Kind regards

    I had a similar experience, he expected a change event, so you can extend the jQuery to be included

    $('#P50_TYPE').val (2) .changes ();

  • Link to page with LOV cascading don't set the element LOV

    I have a page with two elements LOV DB and TABLE. The TABLE is set cascading to the DB. These elements to work on the page very well. The problem is that if I connect to this page for an interactive report on another page, only the point DB prepares while ARRAY elements by default on the first item in the list instead of what I spend.

    URL of the link:

    http:// < servername >/apex/f? p = 101:376: < ID >:no:RIR:P376_DB, P376_TABLE:audit, Pub. ScanEvent

    With the help of Apex 4.0.

    Hello

    Rob Farver says:
    I have a page with two elements LOV DB and TABLE. The TABLE is set cascading to the DB. These elements to work on the page very well. The problem is that if I connect to this page for an interactive report on another page, only the point DB prepares while ARRAY elements by default on the first item in the list instead of what I spend.

    URL of the link:

    http:// /apex/f? p = 101:376:: No.: RIR:P376_DB, P376_TABLE:audit, PUB. ScanEvent

    With the help of Apex 4.0.

  • You must pass values of 'return' of item selection list while trying to assign the value via a URL. Make sure the audit and PUB. ScanEvent are the correct return values
  • Make sure that the child value is good for the selected parent value. that is, the table PUB. ScanEvent must be a child value for DB audit. If you pass an incorrect combination of parent-child of the values that have been created as cascading, only the parent value is defined.

    Kind regards
    Hari

  • Search using LOV cascade

    Hi all

    I'm unable to do a search using a LOV cascading,
    I have an option in the first selection list and then it is generated a list in the second selection list, where I also choose an option.
    Now when I press submit, I see the return value in my second select list and no results.
    I wrote a custom query to retrieve the results, and I also have other fields of research, which work perfectly.

    Anyone have any ideas on what I might hurt?
    Any help is appreciated.

    1st selection list (parent) is empty and then the child selection list displays only the return value

    suggests that select 1 is not registered in the session, while the second is saved, but the application does not set the value (probably because query that uses the parent selection list not returned no records). Check the session state (session in the developer toolbar in the foot buton) whenever the page is refreshed (submitted, reloaded, etc.).

  • How is sent after choosing the areas?
    You have a branch reset that one of these elements, or does this second selection a redirect (and has not set the first)

    If you are on 4 Apex, Cascading lov is built using ajax and you do not reload or submit the page when you are working with to parent-child LOV

  • LOV cascade with two items of parents (one might be hidden)

    Hello

    I have a LOV cascade which depends on two elements of parents, who works as expected. When two parent elements have values then the LOV cascading is populated with the appropriate values.

    I have the following situation, if. The elements of two parents are not always visible. According to an another page element (e.g. product code), one or the other Parent may be hidden (using JavaScript).

    The list of values for the LOV cascading is dynamic, so that part is ok

    if PARENT_ITEM_01 is hidden then  
       return 'select product_descr display, product_code ret from products where product_cat_02 = ' || :PARENT_ITEM_02 || ''';  
    elsif PARENT_ITEM_02 is hidden then  
       return 'select product_descr display, product_code ret from products where product_cat_01 = ' || :PARENT_ITEM_01 || ''';  
    else  
       return 'select product_descr display, product_code ret from products where product_cat_01 = ' || :PARENT_ITEM_01 || ' and product_cat02 = ' || :PARENT_ITEM_02 || ''';  
    end if; 
    

    Is there some sort of workaround to parent of the items but one of them may be hidden?

    Teo

    I have finally found a workaround.

    I created a dynamic action and that page_item was hidden I put this element with a default value and the works of lov cascading.

  • LOV cascading in tabular form

    Hi guys,.

    I have read many articles on the generation of LOV cascading in a tabular presentation, but have not been able to make it work

    I created an example in my apex workspace at:

    http://Apex.Oracle.com/pls/Apex/f?p=4000:1500
    XXAPPS workspace
    Name of guest user
    Password demo
    App no 17551
    Page 2

    In my test scenario, I have a table emp, dept and a desk.

    In my tabular form (based on the emp table), I have a column deptno and a column of office.

    Depending on what the user selects in the column deptno, I want the corresponding list of offices associated with this dept LOV to return to offices LOV.

    The structure of the table is

    EMP
    EMPNO
    ENAME
    JOB
    MGR
    HIREDATE
    SAL
    COMM
    DEPTNO
    OFFICE_ID

    DEPT
    DEPTNO
    DNAME
    LOC

    OFFICE
    OFFICE_ID
    OFFICE_NAME
    DEPTNO

    When the user selects a deptno in the LOV I would like that to control the values that are returned to the office of LOV.

    I used the blog post from Jari:
    http://dbswh.webhop.NET/dbswh/f?p=blog:read:0:article:2003800346210117

    but as you can see there is not enough work that LOV Office does not return anything.

    I'm fairly new new JavaScript and jQuery, so probably something wrong, because some steps are responsible for errors and are confusing me a bit for example step2 is causing the page to return to the white (I have commented the code in the example)

    Any help would be greatly appreciated.


    Thank you

    Edited by: Cashy March 7, 2012 04:05

    Hello

    See your sample now

    I have fix your dynamic action. You got some strange numbers start JavaScript.
    Also, you have used bad selectors for parent and child select list.

    I have also change the application process

    Kind regards
    Jari

  • Bug LOV cascading?

    Hi all...

    Please help with this question.
    Not sure this is a bug or browser problem.

    APEX: 4.1
    Browser: IE 7
    Database: 11g

    If I have a lov cascading, and if I have a bit of javascript
    under the HTML FORM ELEMENTS ATTRIBUTES '"onchange ="alert ('hi');" » »

    Fires the event on change twice.

    why he shoots twice onchange?

    Please check the following application.

    http://Apex.Oracle.com/pls/Apex/f?p=41803:2

    Select a Department, you will get 2 alert messages.

    Y at - it a fix for this?

    Checked Firefox and Safari on Mac and I only get the alert once on two of these browsers. Sounds like a problem with IE. Surprise, surprise...

    Earl

  • using the same LOVs cascading on multiple pages

    Hello

    I use apex 4 and try to get the LOV cascading to work.

    need basically for LOV cascade like "RÉGION" and "CTY", which is used in many pages in the application

    Because it will be used in several pages, I tried to create the LOVs in the shared component
    with the LOV for 'REGION '.

    Select the REGION display_value, REGION_ID return_value
    of MR_REGION_LOOKUP
    order by 1

    and "CTY".

    Select CTRY display_value, CTRY_ID return_value
    of MR_CTRY_LOOKUP where MR_CTRY_LOOKUP. REGION_ID AS: P3_REGION_ID
    order by 1

    He worked on the P3, but I can't use the same shared component LOV in other pages, unless I have change the P3 in the binding variable: P3_REGION_ID to the new as page number: P5_REGION_ID.
    Is there a way to use a generic approach for the CTY LOVs, which will work on several page?

    The elements of level application perhaps?
    Or at least to use the wildcard to replace the P3 to work for all pages?



    Thanks in advance for all advice :)

    Concerning
    Kian coulibaly

    Not my preferred solution but how about something like this

    select CTRY display_value, CTRY_ID return_value
    from MR_CTRY_LOOKUP Where MR_CTRY_LOOKUP.REGION_ID LIKE v('P'||v('APP_PAGE_ID')||'_REGION_ID')
    order by 1
    

    Kofi

  • lov cascading does not

    I show no result for the next lov cascading. Can someone help me understand why? The p437_a_type field will be filled by a static lov. (99-1-agency 2-Department 3-division 4-section admin.)
    My second love will tear out of different select statements based on the value of the first lov. I tried to use a case statement, then went with a union State then decided to ask for help when neither one worked.

    I have a process application called CASCADING_SELECT_LIST1 with the following process:
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< select >");
    HTP.prn ("< option value ="' | 1 |) "" ' > ' | ' - all roles - ""
    || "< / option >".
    );

    FOR c IN (SELECT, Ruy)
    (SELECT '- no roles -' d, r 0
    OF the double
    where: cascading_selectlist_item_1 = 99
    UNION SELECT agency_name d, agency_id r
    OF the Agency
    WHERE: cascading_selectlist_item_1 = 1
    UNION select D_DEPT_NAME d, D_DEPT_ID r
    of the DEPARTMENT
    WHERE: cascading_selectlist_item_1 = 2
    UNION select d_div_name d, d_div_id r
    the Division
    WHERE: cascading_selectlist_item_1 = 3
    UNION select s_sec_name d, s_id r
    Article
    WHERE: cascading_selectlist_item_1 = 4)
    )
    LOOP
    HTP.prn ("< option value ="' | c.r |) '">' || c.d | ("< / option >");
    END LOOP;

    HTP.prn ("< / select >");
    END;

    I have a named item application: CASCADING_SELECTLIST_ITEM_1

    In my form my header javascript form is the following: < script >
    function get_select_list_xml1 (pThis, pSelect) {}
    var l_Return = null;
    var l_Select = html_GetElement (pSelect);
    get var = new htmldb_Get (null, html_GetElement('pFlowId').value,
    = CASCADING_SELECT_LIST1', 0);
    Get.Add ('CASCADING_SELECTLIST_ITEM_1', pThis.value);
    gReturn = get.get ('XML');
    If (gReturn & & l_Select) {}
    var l_Count = gReturn.getElementsByTagName("option").length;
    l_Select.length = 0;
    for (var i = 0; i < l_Count; i ++) {}
    var l_Opt_Xml = gReturn.getElementsByTagName ("option");
    appendToSelect (l_Select, l_Opt_Xml.getAttribute ('value'),
    l_Opt_Xml.FirstChild.nodeValue)
    }
    }
    get = null;
    }

    function appendToSelect (pSelect, pValue, pContent) {}
    var l_Opt = document.createElement ("option");
    l_Opt.value = pValue;
    {if (document. All)}
    pSelect.options.add (l_Opt);
    l_Opt.innerText = pContent;
    } else {}
    l_Opt.appendChild (document.createTextNode (pContent));
    pSelect.appendChild (l_Opt);
    }

    }
    < /script >
    My P437 - static type lov def is: Admin; 99, agency 1, Department 2, Division; 3, section; 4
    My lov def P437-A-Number is:
    R & d, SELECT
    Of
    (SELECT '- no roles -' d, r 0
    OF the double
    where: P437_A_TYPE = 99
    UNION SELECT agency_name d, agency_id r
    OF the Agency
    WHERE: P437_A_TYPE = 1
    UNION select D_DEPT_NAME d, D_DEPT_ID r
    of the DEPARTMENT
    WHERE: P437_A_TYPE = 2
    UNION select d_div_name d, d_div_id r
    the Division
    WHERE: P437_A_TYPE = 3
    UNION select s_sec_name d, s_id r
    Article
    WHERE: P437_A_TYPE = 4)
    ORDER BY 1

    Any help will be greatly appreciated.

    Published by: ethel on May 20, 2009 08:38

    Published by: ethel on May 20, 2009 10:50

    Published by: ethel on May 20, 2009 12:11

    Published by: ethel on May 20, 2009 12:14

    Hi Andy,.

    I hope you are well.

    I have a question about it.

    Is the name of the Application element must be identical to the variable binding in code enforcement process?
    In this case is the following

    Code of the ODP

    FOR c IN (SELECT d, r
    FROM (SELECT '-No Roles- ' d, 0 r
    FROM dual
    where :CASCADING_SELECTLIST_ITEM_1 = 99
    UNION SELECT agency_name d, agency_id r
    FROM agency
    WHERE :CASCADING_SELECTLIST_ITEM_1 = 1
    

    and the name of the application must be CASCADING_SELECTLIST_ITEM_1

    I ask this because I thought that the javascript is simply passing the value of the element of the ODP and not the name of the element.

    Before thanks for your insight.

    See you soon,.
    Joel

  • HTML Parsing error: Cannot edit the item container parent before the child element is closed (KB927917).

    Original title: HTML Parsing Error:

    When I go on this particular Web page, I can open the page, but with errors.  The error I get is: HTML Parsing Error: impossible to edit the item container parent before the child element is closed (KB927917).  Can someone out there help me solve this problem.  Also, it is the only Web page devoted to this particular site that does this.

    Hi Debbie9089,

    ·         What browser do you use?

    ·         Have you been able to access this site much earlier?

    If you use Internet Explorer, you can follow this link and check if the problem persists.

    Why do I get an "Operation aborted" error message when I visit a Web page in Internet Explorer?

    Hope the helps of information.

    Please post back and we do know.

  • Cannot access a Web site, HTMLParsingError unable to change the container element parent before the child element closed

    When I go to Geaowarehouse a site to check the properties and assessments

    I can't get the information

    This message appears when I click on the yellow triangle at the bottom LHS

    HTMLParsingError unable to edit the item container parent before the child element is closed

    http://answers.Microsoft.com/en-us/IE/Forum/IE8-windows_other/HTML-parsing-error-unable-to-modify-the-parent/e64759e0-D344-42d6-b1d8-0ce27504dd71

  • Show/hide the elements if the rule is set to true on one of the many elements

    I'm sure I'm missing something really obvious but I've tried a few things and I can't get this to work...

    I need to show the element X if none of the elements A, B or C = 'Y '. Similarly, I want hide the element X if all a, B and C = 'n'.

    I tried to create a single action with A, B and C contained in the 'when' list of items and I tried also create separate stocks for A B and C, but both methods result in X being shown/hidden based on the last element that was changed, do not take into account the other fields.

    For example, if A and B are both equals Y, then I B = N, X is hidden. It must always be displayed as a still is equal to Y.

    What is the correct way to do it? Thank you.

    Hello

    create 1 dynamic action "to change" of P1_A, P1_B, P1_C

    Then set the status of the dynamic measurement JavaScript and enter the javascript, something like (assuming that the fields of the form are P1_A, P1_B, P1_C):

    $v ('P1_A') == 'Y ' |

    $v ('P1_B') == 'Y ' |

    $v ('P1_C') == 'Y '.

    And then set the true action to display the P1_X field

    Concerning

    Bottom

  • In good company the child elements of the element without terminals are not visible.

    Hi all

    Jdev version 11.1.1.7.0

    I am facing a company in good standing question...

    Scenario: I create approval Service (BPEL) with flow of human labor and the Bunises rule.

    I'm assingning HW participating using the rule based (HW and BR connection).

    Problem is:

    Shema has element 'unbounded '.

    < name of item = "ExpenseItem" maxOccurs = "unbounded" >

    < complexType >

    <>sequence

    < element name = "ItemID" type = "string" / >

    < element name = "ItemName" type = "string" / >

    < element name = "ItemPrpjectID" type = "string" / >

    < element name = "ItemStatus" type = "string" / >

    < / sequence >

    < / complexType >

    < / item >

    Whenever I have create a Busines to configure rules.

    ExpenseItem rules setting up the child elements are not visible. But those who are required to configure rules.

    If you can help solve me would be useful.

    What is a behavior bedault of the BR? If yes how can I do this?

    Thank you

    David

    Solution found:

    Click on set of rules that you have created.

    Expand rule in there.

    Select the Advanced mode and mode tree, and then click OK.

    Select the root task, click insert pattren and create pattren based on unrelated element (here actually destiny)
    Once you create pattren, will be elements of access under item boundless for the configuration of business rules.

  • Get XML child elements

    Dear Indesign scripting,

    This script is made of all the tags XML ParagraphStyles.

    But he refuses to take the child to the elements. What do I have to use the XPath expression? And how?

    function main() {  
      var xes, n, doc, ps, xe;  
      if ( !app.documents.length ) return;  
      doc = app.activeDocument;
      xes = doc.xmlElements[0].xmlElements;  
      n = xes.length;  
      while ( n-- ) {  
      xe = xes[n]; 
      st = doc.paragraphStyles.itemByName (xe.markupTag.name );  
      !st.isValid && doc.paragraphStyles.add({name:xe.markupTag.name});  
      }  
    }  
      
      
    main(); 
    

    The XML code

    <Workbook>  
         <Element_A_01>  
              <Element_A_01></Element_A_01>  
         </Element_A_01>  
         <Element_B_02>  
              <Element_B_02></Element_B_02>  
         </Element_B_02>  
    </Workbook> 
    

    Greetings from Holland

    The code creates two paragraph styles namely Element_A_01 and Element_B_02. These two are created for the immediate child nodes of the workbook node. Now, it seems you are trying to create pstyles for all nodes in the XML document, which in your case would be even these two as Element_A_01 has a child node that is also named Element_A_01 and what is the case for Element_B_02.

    If I get your straight stitch then you need to create 4 pstyles if all nodes have different names, but who doesn't. For that you recursively through each node that you receive from the fixed code [n].

    The code to be something like this

    1. main() {} function
    2. fixed var n, doc, ps, xe;
    3. If (! app.documents.length) return;
    4. doc = app.activeDocument;
    5. fixed = doc.xmlElements [0] .xmlElements; This gives the immediate children nodes of the workbook node, where the length in the next statement 2
    6. n = xes.length;
    7. While (n)-{}
    8. XE = set [n];   Here you need to recursively through the xe node
    9. The number of child elements of the xe can be obtained as xe.xmlElements.length
    10. First element can be obtained by xe.xmlElements [0]
    11. }
    12. }
    13. main();

    Hope this fixes the problem

  • Hide/show element at the click of another symbol

    Hello

    I want to hide an element by click. The item that is clicked is inside another symbol, which one that should be hidden.

    Please tell me how I can handle this.

    Thank you very much

    // Get the symbol element "kitten_1" and hide the element "kitten_paw"
    sym.getComposition().getStage().getSymbol("kitten_1").$("kitten_paw").hide();

Maybe you are looking for