2 Replies Latest reply on Nov 3, 2010 8:30 AM by amitesh

    Theme property resolution

    kevinerh

      Hello community,


      after migration from seam 1.2 to seam 2.1.2 I have some trouble with the theme property resolution. I use the configuration file default.properties to configure the template path, and I access the property in my JSF files over #{theme.template}, but the value seems be empty. In seam-blog example it works fine, but in my solution not :(.



      default.properties:


      css /stylesheet/theme.css
      template /layout/template.xhtml



      components.xml:


      ...
      <theme:theme-selector>
        <theme:available-themes>
          <value>default</value>
          <value>printable</value>
        </theme:available-themes>
      </theme:theme-selector>
      ...
      



      myjsf.xhtml:


      ...
      <div style="color: red;">
        template = #{theme.template}<br />
        css = #{theme.css}<br />
        theme = #{themeSelector.theme}
      </div>
      ...
      



      output:


      template = template // is wrong
      css = css // is wrong
      theme = default // works fine
      



      Have someone an idia for this problem?


      Kevin

        • 1. Re: Theme property resolution
          jarila

          Try with normal properties file format i.e.


          css=/stylesheet/theme.css
          template=/layout/template.xhtml


          • 2. Re: Theme property resolution
            amitesh

            I also have got the same problem.


            Please confirm do i need to place default.properties file in the Web-INF/classes  directory.


            Moreover my browser is returning

            template=template
            css=css
            theme=emeraldTown

            for

                    <div style="color: red;">
                      template=#{theme.template}<br />
                      css=#{theme.css}<br />
                      theme=#{themeSelector.theme}
                    </div>

            html


            Please reply as soon as possible as i have got a heavy dependency on this feature