I'm using Application Express 4.0.0.00.25 ( Apex 4.0 EA2 ). I've created a simple form, with few fields. Each of the field are not direct entry, but rather a LOV picker is attached to these, and on selecting the LOV value, the id gets stored in the field.
I have a dynamic action associated to开发者_开发百科 the field, ( event - change in item, condition - always, action - Set value via SQL query ). However, on selecting the value from the LOV, the dynamic action doesn't get triggered. If I select the dynamic action to be fired on page load, then it works but not upon selection of an item from the LOV. Why is this so, is it by design or a bug ?
Apex 4.0 dynamic actions don't yet work on popup LOVs. I suspect they will work by the time Apex 4.0 is released, though I don't know that for sure. I have read in Patrick Wolf's blog that the cascading LOV functionality will eventually work for popup LOVs though it does not at the moment, and I imagine the same applies here.
If your LOV isn't too huge you can change the item to a select list and the dynamic action will work.
Your popup Lov item makes 2 inputs in the form, P1_ITEM and P1_ITEM_HIDDENVALUE. I had no problem setting the hidden item(P1_ITEM_HIDDENVALUE) with Dynamic Action. For the P1_ITEM i created an extra hidden item(P1_EXTRA - Value Protected should be "No"), added another true action that sets P1_EXTRA with the value i need to populate in P1_ITEM. Then i added another true action (Execute JavaScript Code) with the following code:
$s('P1_ITEM',$('#P1_ITEM_HIDDENVALUE').val(),$('#P1_EXTRA').val());
hope this helps anyone
精彩评论