Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-1018

Default JSF Converters evaluate value-bindings only at converter creation time

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.1.7-SNAPSHOT
    • None
    • New Component
    • None
    • Tomcat 5.0.28
      MyFaces 1.15

    Description

      After a longer discussion in the Nabble-Forum with Mike Kienenberger from your Team he advised me to open this issue.

      Problemdescription:
      All the myfaces-components evaluates value binding within the rendering-phase but the JSF-components do this step in an earlyer step.
      So we have the following problem. We want to use a columns-tag from tomahawk and inside this tag a converter from jsf. Now the converter has an EL-Expression as an attribute. This EL-Expression should set through the var-variable from the columns-tag. As described above the result of that is that the EL-Expression can't be resolved by the converter-tag because the var-variable is not set at that phase.

      Quote from Mike Kienenberger:
      "Converters that evaluate at rendertime would be an excellent addition
      to Tomahawk. I don't currently see any Tomahawk equivalents of the
      existing converters. "

      I can only say that that is absolutly important for our development because at the moment we are totally blocked by this bug.

      For a better understanding here are some samplefiles which should describe the problem enought:
      ListItem.java
      public class ListItem {
      private String dateString;
      public ListItem()

      { dateString = "date"; }

      public String getDateString()

      { return dateString; }

      public void setDateString(String tollerString)

      { this.dateString = tollerString; }

      }

      MyBean.java
      import java.util.ArrayList;
      import java.util.List;
      public class MyBean {
      private List justAList;
      public MyBean()

      { justAList = new ArrayList<ListItem>(); justAList.add(new ListItem()); }

      public List getJustAList()

      { return justAList; }

      public void setJustAList(List justAList)

      { this.justAList = justAList; }

      }

      columnsTest.jsp
      <%@ page language="java" pageEncoding="ISO-8859-1"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
      <html>
      <body>
      <f:view>
      <t:dataTable value="#

      {myBean.justAList}" var="rowData">
      <t:columns value="#{myBean.justAList}

      " var="columnData" >
      <h:inputText>
      <f:convertDateTime type="#

      {columnData.dateString}

      " />
      </h:inputText>
      </t:columns>
      </t:dataTable>
      </f:view>
      </body>
      </html>

      Attachments

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              fish Daniel Herb
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: