3 Replies Latest reply: Jan 14, 2013 2:40 PM by raoul RSS

    Lov list

    raoul
      Hi all,

      Does a lov list always need a page submit in order to read out of it?
      If you don't submit the page it seems that the value is not in session so I cant retrieve the value.
      I have a page with a select (lov) list where the value that is selected will be used as an input parameter for a link.

      Is it possible to be able to read the selected value from the LOV list without submitting the page?

      I have a funny feeling that I did not have this problem in earlier version of apex. Now working in 4.1.1.

      Thanks in advance,
      Raoul
        • 1. Re: Lov list
          Joni Vandenberghe
          An item has always two values the value on the server (session), and on the client (browser).
          If you want the value of the browser to be written to the server you need to make contact with the database somehow.

          One way is ofc a full page submit, but thats a little overkill for one item. An easy workaround since Apex 4.0 is creating a dynamic action.
          The event is then the change of the item select list.
          And the action is PL/SQL code. As code you can just type NULL; and in items to submit you enter your item. This way the value of the browser is written to the session after the item was changed in the browser.
          • 2. Re: Lov list
            Andreas Wismann
            Hi,

            you can either read the select list value using JavaScript (if you don't need to persist its value immediately).

            Or, if you need a persisted session state value, but you don't want to submit the whole page, then you can create a Dynamic Action that fires when the select list changes:
            Event: Change, Selection Type: Item(s), Item Name,
            Specify Action as "Execute PL/SQL Code",
            enter
            NULL;
            as the code to be executed,
            and finally enter the select list's item name in "Page Items to Submit".
            This will momentarily send the select list's value to the server and persist it in session state.

            @Joni: you were faster :-)
            • 3. Re: Lov list
              raoul
              Thanks guys.

              We also did this :). I was hoping for a not sneaky way, but I guess this is the way to go.