0 Replies Latest reply on Dec 5, 2007 6:43 AM by dreuzel

    Help Facelets  in seam  are  not  recursive

      Facelets NOT RECURSIVE
      As I call a facelet indiectly from an other facelet the returned attributs
      are different. This leads to impossible interpretation of the final Tag value
      and causes facelets using <c:if test="${arg}" to fail depending on the recursive level
      where it is called.

      Any help is welcome

      More detailed :

      
      as I can produce a facelet :
      
      The value of "${action}" is different depending on its use
      Detected by TagHandler
      
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html>
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j">
      
       <m:xxx tag="${action}">
       </m:xxx>
      </ui:composition>
       THIS TEXT WILL BE REMOVED AS WELL
      </html>
      

      I'm checking for the obtained value using xxx as Taghandler
      
       String Tag=((TagAttribute) tag).getValue(); // the value offered to the taglib
       String Tag2=((TagAttribute) tag).getValue(ctx);// the value offered from myapplication
       String TmpStripped=Tag.replaceAll("($\\{)|(\\#\\{)|(})", "");//just the symbol
       String tmpResolved=Value(ctx,TmpStripped);//ve=ctx.getVariableMapper().resolveVariable(TmpStripped)
       log.info("tagAttribute "+ expression+ " Tag "+Tag+"/("+TmpStripped + ") rtn "+tmpResolved );//+" tag2=" + Tag2)
      

      As I call the above facelet as
       <facelet action="${mymodule.value}"> in the main thread it offers
      
       Tag="${mymodule.value}" .... and I suppose this is correct
      

      As I call the above facelet through an other facelet

      
       <faceletGroup act="${mymodule.value}">
      

      with FaceletGroup defined as

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html>
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:c="http://java.sun.com/jstl/core"
       xmlns:s="http://jboss.com/products/seam/taglib"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:rich="http://richfaces.org/rich"
       xmlns:a4j="http://richfaces.org/a4j">
      
      
       <facelet action="${act}">
      </ui:composition>
       THIS TEXT WILL BE REMOVED AS WELL
      </html>
      
      

      and I'm checking the taghandler xxx again
      I'm checking for the obtained value using xxx as Taghandler

       String Tag=((TagAttribute) tag).getValue(); // the value offered to the taglib
       String Tag2=((TagAttribute) tag).getValue(ctx);// the value offered from myapplication
       String TmpStripped=Tag.replaceAll("($\\{)|(\\#\\{)|(})", "");//just the symbol
       String tmpResolved=Value(ctx,TmpStripped);//ve=ctx.getVariableMapper().resolveVariable(TmpStripped)
       log.info("tagAttribute "+ expression+ " Tag "+Tag+"/("+TmpStripped + ") rtn "+
      

      I receive different values
       Tag = "${act}" //I receive the symbol name instead of the content
       act seams to be defined as a variable in the variable mapper
       and I can resolve Tag stripping of "${}" to the correct value
      
       "${mymodule.value}"
      

      This is highly annoying since the taghandler needs to react differently
      dependent on the recursive level it is. This is breaking down the value
      of facelets.

      Additionaly the response is dependent upon the content defined in the intermediate
      facelet. as we used ${act}, the TagHanler can not know what value was choisen, it could vary
      depending on the facelet grouping...

      this value is ambigious since I can have the argument act and the a potential module act
      defined in my application. I would not be able to distinguish

      between a module called tag or an intermediate value called Tag


      Is there a way to uniquely resolve the tag ?? ,
      temporarly I look for ".({" in the returned value, these characters are not part
      of an xml attribute, but this does not solve all the problems ....



      any help apreciated