As part of my JavaOne session on Shale, I demo'd the fact that Clay lets you
have two different views of the page:

Designer view: http://localhost:8080/myapp/login.html

Developer view: http://localhost:8080/myapp/login.faces

To demonstrate that Clay was actually parsing the HTML template, in
login.html I changed:

<span jsfid="usernameMessage">
username error message
</span>

to the following instead ("errors" is a CSS style class that turns the text
red):

<span jsfid="usernameMessage" class="errors">
username error message
</span>

When you redisplay the designer view, this does indeed show a change in
behavior -- the "username error message" string shows up in red. However, if
you redisplay the developer view and then try to enter an invalid
username/password, the text still comes up in black. One thing I noticed, in
the emitted HTML markup for the developer view, the error message string is
*not* surrounded by a <span class="errors>...</span>, which is (of course)
why the text didn't change color. Did some behavior change recently in this
regard?

I'd be fine with some alternative way of accomplishing this sort of
demonstration, but changing the HTML template and seeing the change applied
immediately is a more compelling demo than something like changing
clay-config.html.

Craig

Reply via email to