RE: html:hidden +session

2003-10-29 Thread shishir.katdare
neted tags i guess are not available in struts?

-Original Message-
From: struts [mailto:[EMAIL PROTECTED]
Sent: 29 October 2003 13:41
To: Struts Users Mailing List
Subject: html:hidden +session 


how can i print a session value in a hidden field.

This doesn't work...

html:hidden property=users.userAccount value=session:attribute 
name=userAccount//

any solutions ?

Thanks

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:hidden +session

2003-10-29 Thread EL AKARI Mehdi
You can do it either like that :

bean:define id=myValue 
bean:write property=userAccount scope=session /
/bean:define
html:hidden property==users.userAccount value=%=myValue% /

or like that (using JSTL) :

c:set var=myValue 
bean:write property=userAccount scope=session /
/c:set
html-el:hidden property==users.userAccount value=${myValue} /

I hope that it will help
Mehdi

- Original Message - 
From: struts [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 1:41 PM
Subject: html:hidden +session


how can i print a session value in a hidden field.

This doesn't work...

html:hidden property=users.userAccount value=session:attribute
name=userAccount//

any solutions ?

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:hidden +session

2003-10-29 Thread Mark Lowe
If the variable users.userAccount is in an available scope it will be 
there anyway, without all the messing around.

..

session.setAttribute(users,...);
..
html:hidden property=users.userAccount /

if you've a getUserAccount() method as a property of user it will work 
like this.

On Wednesday, October 29, 2003, at 02:11 PM, EL AKARI Mehdi wrote:

You can do it either like that :

bean:define id=myValue 
bean:write property=userAccount scope=session /
/bean:define
html:hidden property==users.userAccount value=%=myValue% /
or like that (using JSTL) :

c:set var=myValue 
bean:write property=userAccount scope=session /
/c:set
html-el:hidden property==users.userAccount value=${myValue} /
I hope that it will help
Mehdi
- Original Message -
From: struts [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 1:41 PM
Subject: html:hidden +session
how can i print a session value in a hidden field.

This doesn't work...

html:hidden property=users.userAccount value=session:attribute
name=userAccount//
any solutions ?

Thanks

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:hidden +session

2003-10-29 Thread struts
error: According to the TLD attribute name is mandatory for tag write

thx

- Original Message - 
From: EL AKARI Mehdi [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 3:11 PM
Subject: Re: html:hidden +session


 You can do it either like that :
 
 bean:define id=myValue 
 bean:write property=userAccount scope=session /
 /bean:define
 html:hidden property==users.userAccount value=%=myValue% /
 
 or like that (using JSTL) :
 
 c:set var=myValue 
 bean:write property=userAccount scope=session /
 /c:set
 html-el:hidden property==users.userAccount value=${myValue} /
 
 I hope that it will help
 Mehdi
 
 - Original Message - 
 From: struts [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, October 29, 2003 1:41 PM
 Subject: html:hidden +session
 
 
 how can i print a session value in a hidden field.
 
 This doesn't work...
 
 html:hidden property=users.userAccount value=session:attribute
 name=userAccount//
 
 any solutions ?
 
 Thanks
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:hidden +session

2003-10-29 Thread Kris Schneider
Struts has nothing to do with it. That's a general JSP syntax error pure and
simple. What do you want the rendered HTML input element to look like? Do you
really want:

input type=hidden name=users.userAccount value=userAccountValue

If so, you can do:

input type=hidden
   name=users.userAccount
   value=bean:write name=userAccount scope=session/

Quoting [EMAIL PROTECTED]:

 neted tags i guess are not available in struts?
 
 -Original Message-
 From: struts [mailto:[EMAIL PROTECTED]
 Sent: 29 October 2003 13:41
 To: Struts Users Mailing List
 Subject: html:hidden +session 
 
 
 how can i print a session value in a hidden field.
 
 This doesn't work...
 
 html:hidden property=users.userAccount value=session:attribute
 name=userAccount//
 
 any solutions ?
 
 Thanks

-- 
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: html:hidden +session

2003-10-29 Thread Greg Dunn

This might work but you're ignoring the relationship between Struts HTML
form tags and ActionForms.  All you need to do is prefill the values in the
action leading to your JSP, then add the form element to your pages and it
will be filled.  All you need is:

html:hidden property=users.userAccount /

If you don't want to prefill your form in the Action for some reason, then
the easiest way to get the value, IMO, is with Struts-el, where you can use
this:

html-el:hidden property=users.userAccount
value=${sessionScope.myBean.myProperty} /

Greg


-Original Message-
From: Kris Schneider [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 29, 2003 9:04 AM
To: Struts Users Mailing List
Subject: RE: html:hidden +session


Struts has nothing to do with it. That's a general JSP syntax error pure and
simple. What do you want the rendered HTML input element to look like? Do
you
really want:

input type=hidden name=users.userAccount value=userAccountValue

If so, you can do:

input type=hidden
   name=users.userAccount
   value=bean:write name=userAccount scope=session/

Quoting [EMAIL PROTECTED]:

 neted tags i guess are not available in struts?

 -Original Message-
 From: struts [mailto:[EMAIL PROTECTED]
 Sent: 29 October 2003 13:41
 To: Struts Users Mailing List
 Subject: html:hidden +session


 how can i print a session value in a hidden field.

 This doesn't work...

 html:hidden property=users.userAccount value=session:attribute
 name=userAccount//

 any solutions ?

 Thanks

--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:hidden +session

2003-10-29 Thread Caroline Lauferon
I'm quite sure you can use scriptlet in your struts tags :

html:hidden property=users.userAccount
value=%=request.getSession().getAttribute(userAccount)%/

Caroline


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]