struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bolsover" <da...@bolsover.com>
Subject RE: embedding dynamic text in value of text field
Date Mon, 23 Dec 2002 21:36:37 GMT
Hi

I'm sure there must be a better way but I have used code like this to solve
similar problem:

<% String temp = ((cast.to.object.type)pageContext.getAttribute("foo",
pageContext.PAGE_SCOPE)).getUserName(); %>
<html:text property="userName" value="<%= temp %>" />

db

> -----Original Message-----
> From: Richard Doust [mailto:rdoust@comcast.net]
> Sent: 23 December 2002 20:53
> To: struts-user@jakarta.apache.org
> Subject: embedding dynamic text in value of text field
>
>
> Hi.
> I have a form that wants to get the initial value for a <html:text> field
> from a property of a bean associated with a different form on the page.
> I have tried this:
> <html:text property="userName" value="<c:out value="${foo.userName}"/>"/>
> and this:
> <html:text property="userName" value="${foo.userName}"/>
> but obviously these won't work because, in the latter case, EL isn't being
> processed in the attributes of the struts tag.
> Does anyone know how I could do this?
> Thanks,
> Rich
>
>
> --
> To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message