0 Replies Latest reply: Jun 14, 2013 6:09 AM by Tony Andrews RSS

    APEX 4.1 and 4.2 apex_item.popup_from_lov no longer obeys p_item_id parameter

    Tony Andrews

      When using the apex_item package to generate page items you can specify the item's ID using the p_item_id parameter for example:

       

      select apex_item.text(1,'TextValue',p_item_id=>'MyText_'||rownum) mytext,

      apex_item.popup_from_lov(2,'PopupValue','LOV1',p_item_id=>'MyPopup_'||rownum) mypopup

      from dual;

       

      However, it seems that since at least APEX 4.1, the value of p_item_id is ignored for popup LOVs, so that the items generated by the SQL above have IDs "MyText_1" and "f02_0000" rather than "MyText_1" and "MyPopup_1". 

       

      We discovered this because some very old pages are being upgraded from APEX 3.1 to APEX 4.2 and are failing with Javascript errors because we have Javascript code that tries to use the items IDs we specified rather than the ones APEX has generated.

       

      I don't suppose there is anything we can do about this other than modify our pages to cope with the change, but I thought I'd raise this here anyway in case there is a simple workaround, and to flag up that there seems to be a bug, either in the apex_item package or in its documentation which still at 4.2 lists p_item_id as a parameter with the description "ID attribute of the form element" and does not say it is deprecated.