Ok... so you could create a Number format type converter, but what about
getting the locale (i18n) format from resource bundles?

I could not find a way to get a text from the message resource bundles (like
getText('format.number') in the Action classes).

Anyone facing the same problem?


Luiz Henrique Rossetti wrote:
> 
> I resolved the problem creating a class that extends a class
> StrutsTypeConverter.
> 
> On 6/21/07, Célio Cidral Junior <[EMAIL PROTECTED]> wrote:
>>
>> I have the same problem, but as far as I could see, formatting support
>> in S2 is nasty.  You can format something with <s:text> using the
>> format defined in your resource bundle, but you can't do that with
>> <s:textfield>. WTF?!  Man, so far I've spent 3 hours trying to do make
>> that work, but just couldn't.  I'm going crazy!  Serious...
>>
>> Célio
>>
>> 2007/6/19, Luiz Henrique Rossetti <[EMAIL PROTECTED]>:
>> > Hi guys,
>> >
>> > How can I use the s: param with s:textfield?
>> > I need to format a Timestamp property of my Action using the mask
>> > "dd/MM/yyyy".
>> >
>> > MyAction
>> >
>> > public BlablaAction extens ActionSupport{
>> >
>> >    private Employee employee;
>> >
>> >    getters and setters
>> >
>> > }
>> >
>> > public class Employee{
>> >
>> >    private Timestamp finalDate;
>> >
>> >    getters and setters
>> > }
>> >
>> > My jsp page
>> >
>> >      <s:textfield cssClass="textfield" name="emp.finalDate"
>> maxlength="10">
>> >             <s:param name="value" value="employee.finalDate"/>
>> >      </s:textfield>
>> >
>> > My package.properties
>> >
>> > emp.finalDate = {dd/MM/yyyy}
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-use-the-%3Cs%3Aparam%3E-tag-with-%3Cs%3Atextfield%3E--tf3945930.html#a12270273
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to