You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Archana ." <ar...@inorbit.com> on 2005/07/13 20:24:08 UTC

html:text display

Hi,

 I have a html:text field on my form whose corresponding bean property is
an integer(text field represents year). The default value is 0. I want
the text field to display blank when the value is 0, and display the
value otherswise. Would anyone know how this can be done?

Thanks,

Archana

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


Re: html:text display

Posted by Rick Reumann <st...@reumann.net>.
Rick Reumann wrote the following on 7/13/2005 3:03 PM:
> 
> slignly logic  

Ha, sounds like a cool word "slignly" - no clue what I was trying to say 
there since I typed it so fast.. I must have meant "slight."

-- 
Rick

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


Re: html:text display

Posted by Rick Reumann <st...@reumann.net>.
Archana . wrote the following on 7/13/2005 2:24 PM:

>  I have a html:text field on my form whose corresponding bean property is
> an integer(text field represents year). The default value is 0. I want
> the text field to display blank when the value is 0, and display the
> value otherswise. Would anyone know how this can be done?

You ActionForm properties should always be Strings. Make it a String and 
you are all set.

If 0 comes back from the DB and  you populate the form for say an edit, 
it will show 0, but if that's not what you want then you'll need some 
slignly logic in your ActionForm or in the Action that populates the 
Form - I'd do the later.



-- 
Rick

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