Hi All,I got 2 xpages(say page1 and page2)…i need to pass a value of page1 when submitting the page to page2…what i did was
i put this script on submit button of page1
sessionScope.put(‘getDesc’,desc);
and i have a editbox on page2…i put this script as it’s default value
sessionScope.get(‘getDesc’);
this doesn’t work for me…Pls help
shana
Subject: Check your variable scope…
sessionScope.getDesc=someServerDesc; on the first pagesomeServerVar=sessionScope.getDesc; on the second page.
- One thing that continually bites me in the posterior is scope. Far as I know, all the scoped variable (sessionScope for instance) are server only. If you are trying to use that value client side, it will fail. You can do an “inline” though:
someClientVar=${sessionScope.getDesc};
At least I think you can. Like I said, scoping always manages to bite me.
- You can not set sessionScope from the client, so if you are setting “sessionScope” in client-side JS this will always end in tears. You must find some way to apply your client data to the server sessionScope variable.
Hope this helps…