Oracle Apex Session State update from JS -


i updating session variables using javascript. page->javascript->execute when page loads.

apex.server.process ( "update session", {     pageitems: "#p1_item1, p1_item2"     }, {         datatype: "text"         , success: function( pdata ) {            //pdata should contain valid or invalid - alert            if ( pdata === 'invalid' ) {             // here when result invalid               alert('invalid data: contact admin:');           };         }     } ); 

}

i using p1_item1 , p1_item2 populate data in region of page. problem is: region uses session value seems load before execution of js code due older values of items used instead of new value. there way around it, region loads after session values updated?

sorry can't add comment. try put proccess in pre-rendering section of page(before header, before regions...). can try condition on change of p1_item1, p1_item2 item refresh region first solution should enough.


Comments