This content has been marked as final. Show 6 replies
For the refresh use a dynamic action of type refresh.
Triggering item is then item P1_EMP_NUMBER
Affected item is then the region "Registration"
By the region set "Page Items to Submit" to P1_EMP_NUMBER so the value gets submitted.
So after showing the result of query it should be submitted without futher user interaction.
Maybe the plugin timer can be used [url http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-plug-ins-182042.html#dynamic] see timer plugin
The timer should then fire a dynamic action to submit the page. Or execute pl/sql that does the DML.
If there is no user action between showing between refreshing the report and submitting why not doing the submitting directly and only show the end result?
I did already use dynamic action for refresh but it didn't work.
I used dynamic event 'before page submit' and P1_EMP_NUMBER 'submit when enter pressed' property was set to 'yes'.
But before page submit dynamic action didn't start.
Your dynamic action set a static value of 1, since there wasn't an employee with id 1, even if your report refresh worked it wouldn't do the trick.
I modified your dynamic action so when NW is clicked your value is stored to the session, and the report refreshed.
I don't think refresing a report on page submit is going to work.
Simple because a new page is shown before the region can be refreshed.
So what I did is create a dynamic action on the change of the item. (When event = change)
The action of the dynamic action is refresh.
This refreshes the employees region.
The region has a dynamic action with "when event" = After Refresh
There are two actions
* Show This shows the region.
* Timer This is the plugin I mentioned in my earlier post.
The settings for the timer are
Action Add Timer
Timer Name left empty
Expire in x Milliseconds 1000
The affected element is the employees region
As the end of the timer is reached the "Timer expired" event is fired.
To submit the page a second dynamic action on the employees region is needed.
For this dynamic action the "when event" = "Timer expired" en the action is "Submit Page"
To hide the employees region I use a dynamic action on page load with action Hide.
The show and hide actions are just for some flair.
I have set up a [url http://apex.oracle.com/pls/apex/f?p=VANBAREN_FORUM_TRY_OUT:REFRESHSUBMIT&c=VANBAREN] demo here
Sorry for the late response.
This is almost what i need.
I need to enter the department, submit record to database and show that record for 3-5 seconds and clear region.
DejanH wrote:Add a "execute pl/sql" action to the onchange dynamic action.
I need to enter the department, submit record to database
The pl/sql code would be a DML action to submit the record.
DejanH wrote:Set the timer to 3-5 seconds. And use a hide action instead of the submit action I have used in the demo.
show that record for 3-5 seconds and clear region.