From: Smith, E. <Edw...@te...> - 2007-06-11 18:36:39
|
That did the trick. Thanks!=20 -----Original Message----- From: str...@li... [mailto:str...@li...] On Behalf Of Aaron Porter Sent: Monday, June 11, 2007 1:19 PM To: str...@li... Subject: Re: [Stripes-users] ValidationErrors and CSS I guess I wasn't clear. The order in the tag doesn't matter <input class=3D"field error"> and <input class=3D"error field"> will look the same. What you need to do is move the CSS rules around. Instead of =2Eerror { background: #f99; } =2Efield { background: #fff; } do this: =2Efield { background: #fff; } =2Eerror { background: #f99; } That should fix it. Aaron Smith, Edward wrote: > That would definitely work. However, Stripes is generating the HTML=20 > and placing the error class before the field class so I currently have > no way of controlling the order. >=20 > -----Original Message----- > From: str...@li... > [mailto:str...@li...] On Behalf Of=20 > Aaron Porter > Sent: Monday, June 11, 2007 12:50 PM > To: str...@li... > Subject: Re: [Stripes-users] ValidationErrors and CSS >=20 > In my experience, the last CSS class rule that the browser parses will > override previous conflicting rules. The order in the tag doesn't=20 > matter. If you move the rule for the error class below the rule for=20 > the field class it should work the way you're wanting it to. >=20 > Aaron >=20 > Smith, Edward wrote: >> Hello, >> =20 >> I have a stripes:text field initially defined with a CSS class=20 >> name >=20 >> called "field" which defines the default background and font colors=20 >> for the input: >> =20 >> <stripes:text class=3D"field" name=3D"foo" value=3D"" size=3D"10"=20 >> maxlength=3D"10"/> >> =20 >> I also have a typical ValidationMethod on the action bean that=20 >> checks the text field value. If the value is in error, the=20 >> validation >=20 >> method adds a SimpleError tied to the foo field. This is displayed=20 >> by >=20 >> the <stripes:errors> tag on the JSP. The problem is that the=20 >> resulting html for the foo field when it is in error looks like: >> =20 >> <input type=3D"text" class=3D"error field" name=3D"foo" value=3D"" > size=3D"10"=20 >> maxlength=3D"10"/> >> =20 >> I want the error style to override the field style, but instead=20 >> the >=20 >> default field style is overriding the error style and consequently=20 >> there is no visual indicator that the foo field has an error. Any=20 >> ideas how to get field-level error styling to work in this situation? >> =20 >> Thanks, >> =20 >> Ed >> >> The information contained in this message and any attachments is=20 >> intended only for the use of the individual or entity to which it is=20 >> addressed, and may contain information that is PRIVILEGED,=20 >> CONFIDENTIAL, and exempt from disclosure under applicable law. If you >> are not the intended recipient, you are prohibited from copying,=20 >> distributing, or using the information. Please contact the sender=20 >> immediately by return e-mail and delete the original message from=20 >> your > system. >> >> --------------------------------------------------------------------- >> - >> -- >> >> --------------------------------------------------------------------- >> - >> --- This SF.net email is sponsored by DB2 Express Download DB2=20 >> Express >=20 >> C - the FREE version of DB2 express and take control of your XML. No=20 >> limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> >> >> --------------------------------------------------------------------- >> - >> -- >> >> _______________________________________________ >> Stripes-users mailing list >> Str...@li... >> https://lists.sourceforge.net/lists/listinfo/stripes-users >=20 >=20 > ---------------------------------------------------------------------- > -- > - > This SF.net email is sponsored by DB2 Express Download DB2 Express C - > the FREE version of DB2 express and take control of your XML. No limits. > Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Stripes-users mailing list > Str...@li... > https://lists.sourceforge.net/lists/listinfo/stripes-users >=20 >=20 >=20 >=20 > The information contained in this message and any attachments is intended only for the use of the individual or entity to which it is addressed, and may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from disclosure under applicable law. If you are not the intended recipient, you are prohibited from copying, distributing, or using the information. Please contact the sender immediately by return e-mail and delete the original message from your system. >=20 > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by DB2 Express Download DB2 Express > C - the FREE version of DB2 express and take control of your XML. No=20 > limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Stripes-users mailing list Str...@li... https://lists.sourceforge.net/lists/listinfo/stripes-users The information contained in this message and any attachments is intended= only for the use of the individual or entity to which it is addressed, a= nd may contain information that is PRIVILEGED, CONFIDENTIAL, and exempt f= rom disclosure under applicable law. If you are not the intended recipie= nt, you are prohibited from copying, distributing, or using the informati= on. Please contact the sender immediately by return e-mail and delete th= e original message from your system. |