On Fri, May 27, 2011 at 10:40 AM, Sachin Lale wrote:
> 1. In Jsp while displaying text box and i want this to populate from
> ApplicationResource.properties file. I did this be adding getText() method
> like below. Is this the only way?
> <s:textfield name="name" label="%{getText('site.name')}"/>

Nope; you can use the "key" tag attribute to define the property name
and label key at once.

JSP: <s:textfield key="name"/>
Resource: name=Full Name

> 2. I want the 'action' property of s:form tag to be populated dynamically.
> For this i added a instance variable in my action 'onsubmitAction' and
> setting this value before action forward to result.
> <s:form action="onSubmitAction"> or <s:form action="%{onSubmitAction}">. But
> this is not working. Is there any way for this use case.

Not sure; I might consider doing this a different way, though, perhaps
through a custom JSP-based tag (possibly a thin layer over an existing
tag).

(Why that way? I find it more informative, and it allows some
interesting games to be played.)

In any case, which version of S2 are you using?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to