Title: Message
Sorry, the docs are a little sparse for the taglib... Take a look at the example JSPs in the example web app...
 
For getting texts from a resource bundle, you can use getText() like so:
 
<ww:textfield label="getText('some.text.key')" name="'username'"/>
 
You can supply default messages, arg lists for parameterized messages, etc. Take a look at the com.opensymphony.xwork.TextProvider Interface. If your Action extends ActionSupport you've already got an implementation of this Interface, otherwise you can implement it yourself (see com.opensymphony.xwork.TextProviderSupport for an implementation you can delegate to)
-----Original Message-----
From: Mark Woon [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 31, 2003 6:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] WebWork2 taglib

Jason Carreira wrote:
It evaluates them against the value stack...
 
For instance, if you have a property processingAction on your Action, then
 
<ww:form action="" method="'POST'">
 
would call getProcessingAction on your Action instance and use that value. This allows your taglib attributes to be dynamically evaluated while allowing the use of constants by enclosing the values in single quotes.

Hmm...  Is there a way to access the ResourceBundle associated with the Action?

Say I'd like to have

<ww:textfield label="username" name="username"/>

where username evaluates to the username property in the ResourceBundle associated with this Action?


In fact, is there any decent documentation (or examples) available on the use of WebWork2 tags?  The example in CVS uses Velocity tags, which doesn't really help much since I'm not familiar with Velocity.  I've also taken a look at the WW1 docs on the taglib, but that wasn't very helpful either.


Thanks,
-Mark

Reply via email to