> The SPAN id is "_idJsp0:failures" not "failures",

Right. Or, depending on his environment (e.g. portlets) it could be something else. The point is, it won't be simply "failures" unless he uses forceId.

> so the CSS rule
> should be
> #_idJsp0:failures{ color: red; min-width:300px; max-height:200px;
> overflow:auto; }.

Bad bad bad bad! Please don't encourage this sort of thing. :)

> The problem is that CSS will not recognize the selector with a ":" in
> the middle. You have to add a "class" to your element and use that.
>

That, and the fact that you can't and shouldn't count on the generated client id always being "_idJsp0". Yes, a class is a much better choice. All those xxxClass attributes on the h:message tag are there for a reason! See my other post.

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Fred Janon wrote:
The SPAN id is "_idJsp0:failures" not "failures", so the CSS rule
should be
#_idJsp0:failures{ color: red; min-width:300px; max-height:200px;
overflow:auto; }.

The problem is that CSS will not recognize the selector with a ":" in
the middle. You have to add a "class" to your element and use that.

Fred

--- Mick Knutson <[EMAIL PROTECTED]> wrote:

I am not able to see my messages in the defined css style.

...
    <script type='text/javascript'
src='/tro/skins/default/scripts/generic.js'> </script>
...

                        <h:inputText
value="#{UserBackingBean.user.firstName}"
required="true"
                                     id="firstName"/>
                        <h:message for="firstName" />

...


Then my output when I have an error is:

                    <TD>
                        <input id="_idJsp0:firstName"
name="_idJsp0:firstName" type="text" value="" />
                        <span
id="_idJsp0:failures">&quot;firstName&quot;: Error during model data
update.</span>
                    </TD>


But, the text is black and default, not css applied.


here is the css:

#failures { color: red; min-width:300px; max-height:200px;
overflow:auto; }


--

Thanks

DJ MICK
http://www.djmick.com
http://www.myspace.com/mickknutson







Reply via email to