Are the sessionScope vars I set on my XPage in server-side Javascript available to my java classes? If so, what part of the JSF api are they exposed in? Maybe I am using the wrong one…
For example, on button click, I have the following code in my server-side javascript behind the button:
sessionScope.FOKeySelected = FORowData.id;
This button click currently runs a Full Update on the page so my repeat control refreshs… My repeat control in turn runs my java code that populates some java beans. In that code, I need the sessionScope var “FOKeySelected”. But FONbr does not get populated by this sessionScope var using the following code:
…
FONbr = sessionGetter().getRequestMap().get(“FOKeySelected”);
…
public static ExternalContext sessionGetter(){
FacesContext context = FacesContext.getCurrentInstance( );
ExternalContext extContext = context.getExternalContext( );
return extContext;
}
I have verified that my “sessionGetter” works by setting and getting a JSF sessionScope in two separate java calls. Matter-of-fact, my workaround involves pulling data off of a field in the XPage UI and putting it in my JSF sessionScope var… then retrieving this info later on subsequent runs.
I know I am leaving out a bunch of detail (trying to keep my example simple!)… so hopefully this makes sense! But, back to my basic question at hand… can I get a hold of the XPage sessionScope vars within my java code in the same db?
Thanks!!