1 Reply Latest reply on Feb 23, 2012 7:02 AM by giant2

    taglib and passing parameters

    giant2

      I have created a taglib with some tags like:

        <tag>

            <tag-name>myPanel</tag-name>

            <source>myPanel.xhtml</source>

        </tag>

       

      and myPanel.xhtml code is:

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:s="http://jboss.com/products/seam/taglib"

          xmlns:rich="http://richfaces.org/rich"

          xmlns:a4j="http://richfaces.org/a4j"

          xmlns:f="http://java.sun.com/jsf/core">

      <ui:component>

          <rich:panel bodyClass="body" id="myPanel#{guid}">

           ...

          </rich:panel>

      </ui:component>

      </html>

       

      so now I try to use this tag into my xhtml pages in this manner:

      <mytag:myPanel>

           <ui:param name="guid" value="one" />    

      </mytag:myPanel>

      <mytag:myPanel>

           <ui:param name="guid" value="two" />    

      </mytag:myPanel>

       

      I use the parameter "guid" to give my panel an unique id, but I gave an error:

                     duplicate Id for a component myPanel

       

      seems the parameter "guid" is not correctly inserted in the id declaration (myPanel#{guid}).

      Is it a bug or must be passed in other manner?