struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Propery way to change getText()'s source
Date Wed, 04 Mar 2009 23:18:28 GMT
On Wednesday 04 March 2009 15:52:37 Security Management wrote:
> I would like the getText() methods to pull information from a database
> "Meaning" table.
>
> Would the proper way to do that be to subclass ActionSupport and
> re-implement that interface?  Then, all my actions inherit from
> MyActionSupport, and the getText stuff is different.
>
> If that's not the way to do it, what's the best way?
>

The best way would be to write your code in a class that implements 
TextProvider - 

http://struts.apache.org/2.x/struts2-
core/apidocs/com/opensymphony/xwork2/TextProvider.html

Then, specify your class as the text provider bean in your app.

-Wes

-- 

Wes Wannemacher
Author - Struts 2 In Practice 
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher


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


Mime
View raw message