2 Replies Latest reply on Nov 14, 2007 6:12 PM by kragoth

    s:decorate - default template

    kragoth

      Hi all,

      I'm not liking the fact that I have to write code like...

      <s:decorate template="/path/to/template.xhtml">
       <h:inputText ...../>
      </s:decorate>
      

      all the time for every input component.

      Does anyone know any possible way of setting the default template that will be used by the s:decorate tag?

      If not, how hard would it be to create my own tag so that I can do this?

      <mytag:validate>
       <h:inputText ..../>
      </mytag:validate>
      


      And this would basically just put the <s:decorate template="...."> in for me.


      Any ideas or help is greatly appreciated.


      In fact it would be totally awesome if we had some sort of <s:decorateAll> tag but... could be difficult I'm guessing.

        • 1. Re: s:decorate - default template
          pmuir

           

          "Kragoth" wrote:
          Does anyone know any possible way of setting the default template that will be used by the s:decorate tag?


          No, but open a feature request and we can perhaps look at doing it. You can always define the template using a factory in components.xml and reference it

          <s:decorate template="#{defaultDecorateTemplate}">
           ...


          • 2. Re: s:decorate - default template
            kragoth

            Thanks pete.

            I'm not sure what you mean by a factory in components.xml but I'll try and see if I can find some doco about that.

            I really appreciate all the help you guys give.


            I have submitted the feature request. I'm not sure of the details I should give it but it's there.

            http://jira.jboss.org/jira/browse/JBSEAM-2249