Re: Dynamically set the 'value' attribute of html:text element...??

2002-09-20 Thread Adolfo Miguelez

Not tested but shuld be close to:

bean:define id=pp name=customer property=firstName scope=session/

html:text property=firstName value=%=pp%/

Adolfo.

From: John Sherlock [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: Dynamically set the 'value' attribute of html:text element...??
Date: Thu, 19 Sep 2002 17:43:21 +0100

Hi,

I'm new to struts development so this should be a no-brainer for someone...

I have an object in the session and i need to access the object to set the
'value' attribute of a html:text element. I can set the value of an
ordinary html input tag using the bean:write tag as follows...

input type=text name=firstName value=bean:write name=customer
property=firstName scope=session/

...but i can't use the same approach to set the 'value' attribute of a
html:text tag as it requires putting one tag-lib tag inside the other...

html:text property=firstName value=bean:write name=customer
property=firstName scope=session//

is there a simple way of doing this?

Thanks in advance,

Jonny :)

Software Engineer
Macalla Software Ltd

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





HTML
  HEAD
 TITLEAdolfo's signature/TITLE
  /HEAD
  BODY
 centerbemAdolfo Rodriguez Miguelez/emb/center

  /BODY
  /HTML





_
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


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




Dynamically set the 'value' attribute of html:text element...??

2002-09-19 Thread John Sherlock

Hi,

I'm new to struts development so this should be a no-brainer for someone...

I have an object in the session and i need to access the object to set the
'value' attribute of a html:text element. I can set the value of an
ordinary html input tag using the bean:write tag as follows...

input type=text name=firstName value=bean:write name=customer
property=firstName scope=session/

...but i can't use the same approach to set the 'value' attribute of a
html:text tag as it requires putting one tag-lib tag inside the other...

html:text property=firstName value=bean:write name=customer
property=firstName scope=session//

is there a simple way of doing this? 

Thanks in advance,

Jonny :)

Software Engineer 
Macalla Software Ltd

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




Re: Dynamically set the 'value' attribute of html:text element...??

2002-09-19 Thread Eddie Bush

John - what are you actually trying to do here?  My guess is that you're 
trying to pre-load the form with values you already have (probably 
obtained from JDBC or some such).  That being the case, you should 
really take a look at how forms can use formbeans.  A really good read 
for someone learning Struts is Chuck Cavaness' book review on 
theserverside.com:

http://www.theserverside.com/resources/strutsreview.jsp

That should de-newbiefy you pretty quick.  Give it a quick once-over and 
then you can reference back to a given section as needed.

John Sherlock wrote:

Hi,

I'm new to struts development so this should be a no-brainer for someone...

I have an object in the session and i need to access the object to set the
'value' attribute of a html:text element. I can set the value of an
ordinary html input tag using the bean:write tag as follows...

input type=text name=firstName value=bean:write name=customer
property=firstName scope=session/

...but i can't use the same approach to set the 'value' attribute of a
html:text tag as it requires putting one tag-lib tag inside the other...

html:text property=firstName value=bean:write name=customer
property=firstName scope=session//

is there a simple way of doing this? 

Thanks in advance,

Jonny :)

Software Engineer 
Macalla Software Ltd


-- 
Eddie Bush




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