4 Replies Latest reply on Jun 18, 2007 7:50 AM by Ilya Shaikovsky

    Ajax4jsf <h:inputText /> not skinned

    Jarno Walgemoed Newbie


      I've been assigned to test the Ajax4JSF framework on an OC4J instance, together with Richfaces to use as a component library for a new web application. I've been going through the developer guide and some of the older examples, and quite frankly they've got me puzzled quite a bit.

      I've enabled skinning by using the ajax4jsf filter, which basically should alter my existing jsf facelet to the ajax4jsf selected look and feel, yet it doesn't. My web.xml contains the following:

       <display-name>Ajax4jsf Filter</display-name>
       <servlet-name>Faces Servlet</servlet-name>

      According to the developer guide and one of the examples I looked at (JSFColors from the exadel site) this addition should change the look of any of the inputText and outputText fields I might be using. This is actually not happening, everything looks exactly the same as before, no new styling is applied.

      When I include richfaces components to the page, they in turn are rendered according to the skin setting used by ajax4jsf, so this must mean that skinning does in fact work. Why are the standard JSF components unaffected by the ajax4jsf filter? I think this is a bug, because building a screen that has some skinned items and some unskinned items just looks a bit strange. Especially the font size differences are quite ugly.

      NOTE: I've checked the online demo, if you have a look at the suggestionbox component, you can see that the inputText it is assigned to also lacks the styling you'd expect the component to have. This means the problem is not only occuring on my system.


      I am using Facelets, Sun RI 1.1, OC4J standalone, ajax4jsf 1.1.1, richfaces 3.0.1



        • 1. Re: Ajax4jsf <h:inputText /> not skinned
          Jarno Walgemoed Newbie


          I decided to add to this topic, because I am still wondering about this. I've found a tutorial on the exadel site, http://www.exadel.com/EVCPTutorial/EVCPGSskinability.pdf and this implies that skinnability should in fact work on standard JSF components.

          What I'm not sure about however, is the whole idea behind this skinnability. If in fact skinning or styling of html elements is a developers job, why does a skinning suite exist? If some components are skinned, while other components need to be manually skinned, what's the added value of the skinning functionality?

          Also, isn't skinning a means of creating a uniform application, that looks and feels the same on every page, and on every single component? I'm not sure what the use for skinning is if it just leaves components to stand out in a negative fashion. If I have to go in to an application to change the look of the components to match the skinned components I feel I am doing something that shouldn't normally be required. At least, not if there is a skinning engine available.

          Can anyone shed some light on this?

          • 2. Re: Ajax4jsf <h:inputText /> not skinned
            Sergey Smirnov Master

            EVCP is a previous major version of RichFaces. The skinability approach is simplified significantly. In the previous version, the new renderKit was required to make standard components skinable. Now, you can reference to the skin parameters from the css classes (or style attribute) to make any component sensitive to the changing skins.
            The way how to define the styles depends of the environment you use. For example, facelets make this job much simple.
            We plan to have an article (see http://jboss.com/index.html?module=bb&op=viewtopic&t=105234) about Skinability in addition to standard documentation set. Vote for this article if you want it to be published earlier (As I see it does not too popular based on the current vote result )

            • 3. Re: Ajax4jsf <h:inputText /> not skinned
              Jarno Walgemoed Newbie


              Thanks for the information Sergey. I will put in my vote. Still, as the look of a webapplication is quite important, and I am quite keen on using richfaces and ajax4jsf, can you point me to at least some information on using the styles defined by ajax4jsf on default jsf(html) components?

              I'd love to see how it's done properly - preferably before development starts - so I won't have to go back in to redo everything if I get my hands on that documentation later on in development.



              • 4. Re: Ajax4jsf <h:inputText /> not skinned
                Ilya Shaikovsky Master

                You need to style the standard components yourself. We do not provide its skinnning in this version. You may point its styles properties to some skin properties you need or use its classes attributes.