You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leandro Melo <lt...@yahoo.com.br> on 2004/10/18 04:24:47 UTC

Re: Where is the html:label tag (another workaround)???

I realized there is another work around.
I will use the bean:write tag and also create one
hidden field for each bean:write with the specific
property.
This way, this fields are reset in case of validation
failure. And i don't update these other fields in ejb
layer, there's no worry about exposing them anyway.
 

--- Craig McClanahan <cr...@gmail.com> escreveu: 
> On Sun, 17 Oct 2004 13:14:16 -0300 (ART), Leandro
> Melo
> <lt...@yahoo.com.br> wrote:
> > Hi Craig, that what i first thought, but if i try
> to
> > substitute this
> > 
> > <html:text property="partyName"/>
> > 
> > for this
> > 
> > <bean:write name="myFormBean"
> property="partyName"/>
> > 
> > ***where myFormBean is the value of the attribute
> > "attribute" for this Action (the form bean for
> this
> > action).
> > 
> > I get stuck with validation. It doesn't seem to
> > recognize this field as one of the form bean
> fields. I
> > shows me the message the partyName cannot be null
> as
> > it would if the user left this field blank when
> > submitting it.
> 
> That's definitely going to be a problem if this
> thing is sometimes an
> input field and sometimes not -- you'd need to use
> different
> validation rules in that case.
> 
> When I run into a situation like this, I use an
> input field with
> readonly set, and then use CSS to make it visually
> obvious that this
> is read-only text (such as grey text instead of
> black, and/or a
> different background color).  That way, it's still
> part of the input
> parameters.
> 
> Craig
>  


	
	
		
_______________________________________________________ 
Yahoo! Acesso Grátis - Internet rápida e grátis. Instale o discador agora! http://br.acesso.yahoo.com/

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