After constructing the String, set it as an attribute on one of the
scopes that OGNL can search (page scope is probably sufficient for
this). 

http://struts.apache.org/2.x/docs/ognl.html

-Wes

On Tue, 2008-12-09 at 22:34 -0600, Neil Aggarwal wrote:
> Hello:
> 
> I need to compose the label for a textfield.
> 
> Here is my JSP code:
> <[EMAIL PROTECTED] prefix="s" uri="/struts-tags"%>
> 
> <% 
> String label = "Address";
> if( request.getAttribute("requireFullAddress") != null )
>       label += "*";
> %>
> <s:textfield label="%{label}" name="address"/>
> 
> This does not work, I get an empty label on the page.
> 
> I also tried using:
> <s:textfield label="%{#label}" name="address"/>
> 
> That did not work either.
> 
> Any ideas how I may do this?
> 
> Thanks,
>       Neil
> 
> --
> Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
> Eliminate junk email and reclaim your inbox.
> Visit http://www.spammilter.com for details. 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to