This discussion is archived
1 2 3 Previous Next 37 Replies Latest reply: Nov 21, 2012 4:27 AM by 974630 Go to original post RSS
  • 30. Re: Cascading Select List - Not refreshing on Load?
    Spam Newbie
    Currently Being Moderated
    Because isnt the DA overwriting that query with the value of '1', 'Scotland'?
  • 31. Re: Cascading Select List - Not refreshing on Load?
    974630 Newbie
    Currently Being Moderated
    Rohit Kapoor wrote:
    How can it select only one value when the LOV query for CHILD returns 2 records?
    Because the LOV query determines from how many options I can choose.
    Instead of manually choosing the option Glasgow. the OP wants it done by a DA.

    I think the following is happening.
    The DA is fired and this changes the values of the p1_parent and p1_child items.
    Because p1_parent is the parent item of the cascading LOV on p1_child on the change of p1_parent the selectlist of p1_child is changed and the value of p1_child is set to null.

    I don't have access (at the moment) to the JS file for the selectlist widget to see if there is an event fired when the LOV is refreshed.

    If there is an event fired then I would do something like:
    * In the original DA set the value for the child item to a new hidden item.
    * Add an action to the DA of type execute javascript.
      $('document').one('name of event',function(){$s('P1_CHILD',$v('P1_CILD_HIDDEN'));});
    The code is not tested.

    The idea is to set the value of the child item a way untill after the seletlist is refresed and then sets its value.

    Nicolette
  • 32. Re: Cascading Select List - Not refreshing on Load?
    Spam Newbie
    Currently Being Moderated
    Yeah that work around was a last resort really. Will update asap.
  • 33. Re: Cascading Select List - Not refreshing on Load?
    Spam Newbie
    Currently Being Moderated
    On what event could I set it to the child? Becuase the LOV process seems to kick off last.
  • 34. Re: Cascading Select List - Not refreshing on Load?
    974630 Newbie
    Currently Being Moderated
    Spam
    Spam wrote:
    On what event could I set it to the child? Becuase the LOV process seems to kick off last.
    I have had a look at the code of widget.selectList.js and widget.util.js
    The event is apexafterrefresh.

    The code would then be
    $('#P1_CHILD').one('apexafterrefresh',function(){$s('P1_CHILD',$v('P1_CHILD_HIDDEN'));});
    In [url http://apex.oracle.com/pls/apex/f?p=FORUM_TRY_OUT:CASCADINGLOV]this example I use a dynamic action on P6_CHILD with the event afterrefresh.
    The dynamic action is of type set value with type javascript en code
    $v('P6_CHILD_HIDDEN')
    Nicolette
  • 35. Re: Cascading Select List - Not refreshing on Load?
    Spam Newbie
    Currently Being Moderated
    Thanks Nic, will try v soon.

    Edited by: Spam on Nov 21, 2012 8:24 AM
  • 36. Re: Cascading Select List - Not refreshing on Load?
    Spam Newbie
    Currently Being Moderated
    Ok Nic I have done the following and its still not working.

    - Created a DA to populate the p1_parent, p1_child, p1_child_hidden on click.

    - Created a DA to SET VALUE of p1_child, javascript expression: $v('P1_CHILD_HIDDEN'), effected item p1_child

    Can you open up your app so I can take a look please?
  • 37. Re: Cascading Select List - Not refreshing on Load?
    974630 Newbie
    Currently Being Moderated
    Spam
    Spam wrote:
    Ok Nic I have done the following and its still not working.
    What is not working?
    Add actions of type alert to see of the dynamic actions go of.

    >
    - Created a DA to populate the p1_parent, p1_child, p1_child_hidden on click.
    Mine dynamic action on the button returns only the values to the p6_parent and p6_child_hidden items.
    Is the value of the hidden item set after the button is clicked?
    >
    - Created a DA to SET VALUE of p1_child, javascript expression: $v('P1_CHILD_HIDDEN'), effected item p1_child

    Can you open up your app so I can take a look please?
    Login credentials are
    Workspace : VANBAREN
    Username Guest
    password: 123tseug

    Nicolette
1 2 3 Previous Next

Legend

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