Hey, I am setting the User information in the Http Session like
below in our java app. getSession().put("user",
"admin");
But when I try to access it in xforms, I am not able to get it. But, If
I pass as parameters to the URL I am getting using get_request_parameter. <xforms:setvalue ref="instance('security-instance')/user"
value="xxforms:get-session-attribute('user')"/> Is this the right way to do it? If not what
alternative I have instead of passing as url params? Thanks in advance. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Karun,
Your use of xxforms:get-session-attribute('user') should work. Are you getting an error, or just a blank value? Are you using separate deployment? -Erik On Thu, Oct 29, 2009 at 3:56 PM, Ganaphathy, Karunamoorthy <[hidden email]> wrote: > Hey, > > > > I am setting the User information in the Http Session like below in our java > app. > > > > getSession().put("user", "admin"); > > > > But when I try to access it in xforms, I am not able to get it. But, If I > pass as parameters to the URL I am getting using get_request_parameter. > > <xforms:setvalue ref="instance('security-instance')/user" > value="xxforms:get-session-attribute('user')"/> > > Is this the right way to do it? If not what alternative I have instead of > passing as url params? > > > > Thanks in advance. > > > > Karun > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Erik,
Thanks for looking in to it. I am not getting any error. Just blank. Yes, I am using separate deployment. Am I missing some thing? Thanks Karun -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Friday, October 30, 2009 8:53 PM To: [hidden email] Subject: [ops-users] Re: Getting the User Information from Session Karun, Your use of xxforms:get-session-attribute('user') should work. Are you getting an error, or just a blank value? Are you using separate deployment? -Erik On Thu, Oct 29, 2009 at 3:56 PM, Ganaphathy, Karunamoorthy <[hidden email]> wrote: > Hey, > > > > I am setting the User information in the Http Session like below in our java > app. > > > > getSession().put("user", "admin"); > > > > But when I try to access it in xforms, I am not able to get it. But, If I > pass as parameters to the URL I am getting using get_request_parameter. > > <xforms:setvalue ref="instance('security-instance')/user" > value="xxforms:get-session-attribute('user')"/> > > Is this the right way to do it? If not what alternative I have instead of > passing as url params? > > > > Thanks in advance. > > > > Karun > > -- > You receive this message as a subscriber of the [hidden email] mailing > list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > OW2 mailing lists service home page: http://www.ow2.org/wws > > -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Karun,
On Mon, Nov 2, 2009 at 6:12 AM, Ganaphathy, Karunamoorthy <[hidden email]> wrote: > Thanks for looking in to it. I am not getting any error. Just blank. Yes, I am using separate deployment. Am I missing some thing? Would storing a request attribute work in your case? If it does you could do something along those lines: <% request.setAttribute("gaga", "<gaga>toto</gaga>"); %> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xhtml:head> <xforms:model> <xforms:instance> <instance/> </xforms:instance> <xforms:setvalue ev:event="xforms-model-construct-done" ref="." value="xxforms:get-request-attribute('gaga')"/> </xforms:model> </xhtml:head> <xhtml:body> User: <xforms:output value="."/> </xhtml:body> </xhtml:html> Alex -- Orbeon Forms - Web forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ My Twitter: http://twitter.com/avernet -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
I think what you may be running into is what I ran into. Your session or request attribute value has to be xml whether as a string or a dom. The doc seems clear now that I know.....
Nicolas
|
Free forum by Nabble | Edit this page |