You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by David Graham <dg...@hotmail.com> on 2003/05/16 18:59:53 UTC
[OT] Re: Validator question
You've placed the style in the <tr> tag so every column will apply the
style.
David
>hi All,
>
>I am using validator xml for validating my forms.
>In the case of an error i specify the global error
>messages. i also want to change the color of the form
>elements's display names where the error occured. I do
>this with a style sheet control. The code looks
>something like this :
> <tr <logic:messagesPresent> class="fieldlabel"
></logic:messagesPresent> >
> <th align="left">
> <bean:message
>key="loginForm.username.displayname"/>
> </th>
> <td align="left">
> <html:text property="userName" size="30"
>maxlength="30"/>
> </td>
> </tr>
>
>but what happens is, in the case of even a error all
>the form element display names have their color
>changed.
>
>How do i selectively change the color for indivudual
>elements.
>
>I am using Struts 1.1 RC1.
>
>regards
>Ashok
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [OT] Re: Validator question
Posted by James Mitchell <jm...@apache.org>.
Take a look at this:
http://jakarta.apache.org/struts/userGuide/struts-logic.html#messagesPresent
Use property="myField" to add the style to highlight a single field.
--
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org
----- Original Message -----
From: "Ashok Madhavan" <su...@pacbell.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, May 16, 2003 2:42 PM
Subject: Re: [OT] Re: Validator question
> hi David,
> the components in the page are placed like this :
> <table>
> <tr <logic:messagesPresent>xxx</logic:messagesPresent>
> >
> <td> user.name </td>
> <td> text box </td>
> </tr>
> <tr <logic:messagesPresent>xxx</logic:messagesPresent>
> >
> <td> password </td>
> <td> password box </td>
> </tr>
> </table>
>
> though i have placed the style class in the row, it
> should apply only for the columns in that row. The
> password comes in the next row.
>
> am i making myself clear.
> thanks a lot in advance !
> reg
> ashok
>
> --- David Graham <dg...@hotmail.com> wrote:
> > You've placed the style in the <tr> tag so every
> > column will apply the
> > style.
> >
> > David
> >
> >
> > >hi All,
> > >
> > >I am using validator xml for validating my forms.
> > >In the case of an error i specify the global error
> > >messages. i also want to change the color of the
> > form
> > >elements's display names where the error occured. I
> > do
> > >this with a style sheet control. The code looks
> > >something like this :
> > > <tr <logic:messagesPresent> class="fieldlabel"
> > ></logic:messagesPresent> >
> > > <th align="left">
> > > <bean:message
> > >key="loginForm.username.displayname"/>
> > > </th>
> > > <td align="left">
> > > <html:text property="userName" size="30"
> > >maxlength="30"/>
> > > </td>
> > > </tr>
> > >
> > >but what happens is, in the case of even a error
> > all
> > >the form element display names have their color
> > >changed.
> > >
> > >How do i selectively change the color for
> > indivudual
> > >elements.
> > >
> > >I am using Struts 1.1 RC1.
> > >
> > >regards
> > >Ashok
> > >
> > >
> > >
> > >
> >
> >---------------------------------------------------------------------
> > >To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > >For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> > >
> >
> >
> _________________________________________________________________
> > Tired of spam? Get advanced junk mail protection
> > with MSN 8.
> > http://join.msn.com/?page=features/junkmail
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > struts-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: [OT] Re: Validator question
Posted by Ashok Madhavan <su...@pacbell.net>.
hi David,
the components in the page are placed like this :
<table>
<tr <logic:messagesPresent>xxx</logic:messagesPresent>
>
<td> user.name </td>
<td> text box </td>
</tr>
<tr <logic:messagesPresent>xxx</logic:messagesPresent>
>
<td> password </td>
<td> password box </td>
</tr>
</table>
though i have placed the style class in the row, it
should apply only for the columns in that row. The
password comes in the next row.
am i making myself clear.
thanks a lot in advance !
reg
ashok
--- David Graham <dg...@hotmail.com> wrote:
> You've placed the style in the <tr> tag so every
> column will apply the
> style.
>
> David
>
>
> >hi All,
> >
> >I am using validator xml for validating my forms.
> >In the case of an error i specify the global error
> >messages. i also want to change the color of the
> form
> >elements's display names where the error occured. I
> do
> >this with a style sheet control. The code looks
> >something like this :
> > <tr <logic:messagesPresent> class="fieldlabel"
> ></logic:messagesPresent> >
> > <th align="left">
> > <bean:message
> >key="loginForm.username.displayname"/>
> > </th>
> > <td align="left">
> > <html:text property="userName" size="30"
> >maxlength="30"/>
> > </td>
> > </tr>
> >
> >but what happens is, in the case of even a error
> all
> >the form element display names have their color
> >changed.
> >
> >How do i selectively change the color for
> indivudual
> >elements.
> >
> >I am using Struts 1.1 RC1.
> >
> >regards
> >Ashok
> >
> >
> >
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> >
>
>
_________________________________________________________________
> Tired of spam? Get advanced junk mail protection
> with MSN 8.
> http://join.msn.com/?page=features/junkmail
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org