2 Replies Latest reply on Feb 25, 2009 6:00 PM by Ronald van Kuijk

    appearance of div based on attribute

    Ronald van Kuijk Master

      In my custom XForms editor, I got the question from a respected person to see if I could render dojo components.

      From what I see, they do the following:


      <div dojoType="dijit.form.DropDownButton" label="click me">
      .
      </div>


      and runtime (html body onload I think) check the dojoType attribute to render something or not by manipulating the DOM.

      Is there any way to achieve this in the VPE? Or Should I ask them to evaluate adding a prefix to the div like

      <dojo:div dojoType="dijit.form.DropDownButton" label="click me">
      .
      </dojo:div>


      because the latter is easy to parse in the vpe

      and when doing the xslt to strip this again?

        • 1. Re: appearance of div based on attribute
          Max Rydahl Andersen Master

          As it is now I don't believe we have a way for having selection of the matching template based on attribute values - it could be a good addition though ;)

          The prefix would work, but then it won't be xforms anymore would it ?

          • 2. Re: appearance of div based on attribute
            Ronald van Kuijk Master

            well... yes and no...

            The container page needs to be valid xhtml (valid xml for that matter). If you put this div in it's own namespace, it still is. Compare it to having richfaces tags in an xhtml source page. Most editors do not know how to render all these namespaced tags anyway, so...

            With jsf the components spit out xhtml, and this is done in Chiba with an xslt. I do not see the difference and it is an

            Would have been nice to create an jsf component set that did this. I think it would have been faster I think, but not sure.

            But now I re-read your post... It is indeed selection based on an attribute, but how could I in my xforms module override the processing of the generic div? That is a bigger problem I think (and I do not want that) Choosing a template based on an attribute is not that important. That can always be done in java anyway... so...

            Another milestone reached just now.... I can make inputs read-only, hidden, invalid etc... based on attributes... look and feel done with css... this is way cool... Now I just should not forget refactoring things, since a lot can be put in a generic BaseXFormsTemplate.

            So little code remains.. well little...