Improving JSF by Dumping JSP
Subject:   ... and CSS
Date:   2004-06-10 10:06:35
From:   bergsten
Response to: ... and CSS

I'm sure this is a hot potato, but the HTML elements the JSF components render already sets the "id" attribute, so this issue isn't specific to the custom ViewHandler described in the article.

For CSS, I believe the "class" attribute is more commonly used than the "id" attribute, so I don't see that as a big deal (but I may be wrong).

For JavaScript, I admit it's a problem that needs to be dealt with in upcoming versions of the JSF spec. With JSF 1.0, there are methods that should be called to get the "id" attribute value from code that generates JavaScript dynamically (such as a Renderer), but this could be automated a lot more. For JavaScript entered as static text in the template, you currently need to understand the rules for how the specified "id" attribute can be adjusted by JSF and apply the same rules manually to the JavaScript code (which isn't totally fail-safe, but works pretty well for HTML at least).

1 to 1 of 1
  1. ... and CSS
    2004-06-10 13:32:50  denka [View]

    • ... and CSS
      2004-06-14 15:06:52  jt2190 [View]

      • ... and CSS
        2004-06-14 15:08:16  jt2190 [View]

1 to 1 of 1