2 Replies Latest reply: Dec 19, 2012 7:58 AM by 980819 RSS

    APEX 4.2 Radio Group NULL value behaves differently than on APEX 4.1.1

    Ilmar.Kerm
      DB version: 11.2.0.3 on Linux
      APEX: 4.2
      APEX Listener 1.1.4 on tomcat6
      Firefox 16.0.2

      Radio Group NULL values behave differently than on APEX 4.1.1.
      In 4.2, when creating Radio Group and selecting:
      Display Null Value=Yes
      Null Display Value=No value (or any string)
      Null Return Value= (leave empty, to get NULL returned)

      When user selects that "No value" option, then APEX item value is set to "on", but on APEX 4.1, the item value was set to NULL as expected.

      When looking at the webpage source code, the reason seems to be, that APEX does not generate value attribute for the NULL value (so browser returns default value "on"):
      <input type="radio" id="P1_X_0" name="p_t01"  ><label for="P1_X_0">No value</label>
        • 1. Re: APEX 4.2 Radio Group NULL value behaves differently than on APEX 4.1.1
          Jens Marre
          Hi Ilmar,

          same here. The best workaround I could came up with is to create an application process again (before computation / validation)
          BEGIN
            FOR x IN (
                 SELECT *
                 FROM (
                   SELECT item_name
                   FROM apex_application_page_items aapi
                   WHERE aapi.application_id = :app_id
                   AND aapi.page_id = :app_page_id
                   AND LOWER (aapi.lov_display_null) = 'yes'
                   AND aapi.display_as_code='NATIVE_RADIOGROUP'
                   AND aapi.lov_definition IS NOT NULL
                   AND aapi.lov_null_value IS NULL
                   AND ROWNUM > 0
              ) x
                    WHERE LOWER (v (x.item_name)) = 'on'
            ) LOOP
              apex_util.set_session_state (x.item_name, NULL);
            END LOOP;
          END;
          Jens
          • 2. Re: APEX 4.2 Radio Group NULL value behaves differently than on APEX 4.1.1
            980819
            Jens, many thanks!
            I've the same problem, solved with your workaround! (only different "where"...)
            Stefano Corradi