4 Replies Latest reply on Aug 11, 2008 2:17 PM by Nagni Maurizio

    HtmlDecorate template property

    Nagni Maurizio Newbie

      I have a tag which looks like

       <s:decorate template="edit.xhtml"

      With some surprise updating the SEAM 2.0.0.GA to the 2.0.1.GA I received this error message

      Property 'template' is not on type: org.jboss.seam.ui.component.html.HtmlDecorate

      After some search I found this jira as much clear as short in the answer.

      Because the Seam Dev Tools Reference Guide is still dated on 2.0.0, can someone tell me how to change the tag in order to save the previous, now lost, template property?


        • 1. Re: HtmlDecorate template property
          Pete Muir Master

          It's just been removed from the component, as the attribute is only relevant for the tag handler in facelets.

          I haven't seen that warning, can you create a JIRA, and attach code I can use to reproduce.

          • 2. Re: HtmlDecorate template property
            Nagni Maurizio Newbie

            Thanks for your reply Pete.
            Anyway I guess there is not so much code to add, because according to what you told in the jira and repeated here, the template attribute was removed, consequently I agree is not a bug (anyway I think it was a bit dangerous move to brutally delete an attribute without some deprecated period).
            Actually the point is how can I reproduce the same functionality of the previous tag like, from the view\book.xhtml page in the SEAM booking example

            <s:decorate id="checkinDateDecorate" template="edit.xhtml">
                 <ui:define name="label">Check In Date:</ui:define>
                 <rich:calendar id="checkinDate" value="#{booking.checkinDate}" required="true" datePattern="MM/dd/yyyy" event="onblur" reRender="checkinDateDecorate" style="width: auto;" />

            whitout using the template attribute.
            Sorry if I almost repeate the first mail but i suppose you got a good reason to delete the attribute so before I open a jira about this missing feature I would like to have from someones of you hints on how it should be coded now according to your planned architecture.

            • 3. Re: HtmlDecorate template property
              Pete Muir Master

              We didn't delete the attribute, it should never have been an attribute on the JSF component in the first place (it's an attribute which is applied at a higher level by facelets). The code you show still works. But there is a warning, which you are reporting, which I should remove (but I don't know how to reproduce it, as our examples don't show it).

              • 4. Re: HtmlDecorate template property
                Nagni Maurizio Newbie

                Finally I found a solution; I modified the code in something like

                       <s:decorate rendered="${not patientStat.closedState}">
                          <ui:decorate template="/templates/edit.xhtml">
                            //some code

                so finally all is working.
                For your request about how to reproduce the warning I can tell you that I was using Seam 2.0.1 (or higher) with JDK1.6. Then using Seam 2.0.0 with the old code, as well Seam2.0.2.SP1 with the code I wrote in this message, all is ok.
                Still thanks