MyFaces Tomahawk
  1. MyFaces Tomahawk
  2. TOMAHAWK-156

DataList doesn't validate or update model in 1.1.2 nightlies

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.1.2-SNAPSHOT
    • Fix Version/s: 1.1.2
    • Component/s: Data List
    • Labels:
      None

      Description

      DataList appears to be broken in 1.1.2-nightlies. My form elements are not being validated or updated. If I downgrade to 1.1.1 everything works fine. Here is the test case:

      ----------test.jsp------------
      <%@ 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"%>
      <f:view>
      <h:form>
      <t:dataList value="#

      {test.values}

      " var="value">
      <h:message for="item"/>
      <h:inputText id="item" required="true" value="#

      {value.value}

      "/><br/>
      </t:dataList>
      <br/>
      <h:commandButton/>
      </h:form>
      </f:view>

      -------------Test.java-----------(A SESSION managed bean named "test")
      import java.util.ArrayList;
      import java.util.HashMap;
      import java.util.List;
      import java.util.Map;

      public class Test {
      List values;
      public List getValues() {
      if(values == null) {
      values = new ArrayList();

      { Map valuesMap = new HashMap(); valuesMap.put("value", "Groovy"); values.add(valuesMap); } { Map valuesMap = new HashMap(); valuesMap.put("value", "Dude"); values.add(valuesMap); } { Map valuesMap = new HashMap(); valuesMap.put("value", "Bob"); values.add(valuesMap); }

      }
      return values;
      }
      }

        Issue Links

          Activity

          Hide
          Mike Kienenberger added a comment -

          Do you mind trying this with an h:dataTable and t:dataTable as well (You'll need to add in h:column elements)? That will help determine if the bug is in UIData or specific to dataList (which is probably the case).

          Maybe it's finally time to dump t:dataList as a separate component and implement it as a special renderer for dataTable.

          Also, I see similar bugs fixed in MYFACES-716 and MYFACES-561 (is this one really fixed?)

          -Mike

          Show
          Mike Kienenberger added a comment - Do you mind trying this with an h:dataTable and t:dataTable as well (You'll need to add in h:column elements)? That will help determine if the bug is in UIData or specific to dataList (which is probably the case). Maybe it's finally time to dump t:dataList as a separate component and implement it as a special renderer for dataTable. Also, I see similar bugs fixed in MYFACES-716 and MYFACES-561 (is this one really fixed?) -Mike
          Hide
          Mike Youngstrom added a comment -

          Both h:dataTable and t:dataTable appear to work just fine. It appears only t:dataList is broken.

          Show
          Mike Youngstrom added a comment - Both h:dataTable and t:dataTable appear to work just fine. It appears only t:dataList is broken.
          Hide
          Mike Kienenberger added a comment -

          Not that there was really any doubt, but I've verified that this is broken for the dataList.jsf example as well.

          Show
          Mike Kienenberger added a comment - Not that there was really any doubt, but I've verified that this is broken for the dataList.jsf example as well.
          Hide
          Mike Kienenberger added a comment -

          It looks to me like dataList processUpdates is using UIData processUpdates(). UIData only checks facets, columns, and column facets.

          Maybe as a temporary workaround, you can try putting your UIInputs in a column.

          I'm not sure how this got broken – I'm pretty sure I'm using UIInputs inside a dataList myself somewhere.

          Show
          Mike Kienenberger added a comment - It looks to me like dataList processUpdates is using UIData processUpdates(). UIData only checks facets, columns, and column facets. Maybe as a temporary workaround, you can try putting your UIInputs in a column. I'm not sure how this got broken – I'm pretty sure I'm using UIInputs inside a dataList myself somewhere.
          Hide
          Mike Youngstrom added a comment -

          Surrounding my stuff with a column does work.....Thanks for the work around. Regardless I hope you can figure out what went wrong before they release 1.1.2.

          Mike

          Show
          Mike Youngstrom added a comment - Surrounding my stuff with a column does work.....Thanks for the work around. Regardless I hope you can figure out what went wrong before they release 1.1.2. Mike
          Hide
          Mike Kienenberger added a comment -

          I don't have any more time to look at this right now, and probably Dennis Byrne (who wrote the last patch) or Martin Marinschek (who applied it) will need to take a look.

          You might try checking out a Jan 9, 2006 version of the code and see if the error is there. I suspect it was broken on Jan 10th. The patch revision was 367512. The related issue was MYFACES-853

          I can't say for sure that this was the cause, but I don't see any other dataList changes committed since December.

          Show
          Mike Kienenberger added a comment - I don't have any more time to look at this right now, and probably Dennis Byrne (who wrote the last patch) or Martin Marinschek (who applied it) will need to take a look. You might try checking out a Jan 9, 2006 version of the code and see if the error is there. I suspect it was broken on Jan 10th. The patch revision was 367512. The related issue was MYFACES-853 I can't say for sure that this was the cause, but I don't see any other dataList changes committed since December.
          Hide
          Mike Youngstrom added a comment -

          I've got some spare time....perhaps I'll take a look at it next week and see if I can come up with a patch.

          Show
          Mike Youngstrom added a comment - I've got some spare time....perhaps I'll take a look at it next week and see if I can come up with a patch.
          Hide
          Dennis Byrne added a comment -

          The patch for MYFACE-853 was for processDecodes . This bug is the same thing only for processValidators() and processUpdates(). If you look at the patch for MYFACES-853, there are already hooks for both processUpdates() and processValidators() . I once got the validation part working but not the updates.

          Although Youngstroms issue overlaps MYFACES-1009, this should not be marked as a duplicate because now we know validations are a part of the problem as well. I am reopening MYFACES-1009.

          Show
          Dennis Byrne added a comment - The patch for MYFACE-853 was for processDecodes . This bug is the same thing only for processValidators() and processUpdates(). If you look at the patch for MYFACES-853 , there are already hooks for both processUpdates() and processValidators() . I once got the validation part working but not the updates. Although Youngstroms issue overlaps MYFACES-1009 , this should not be marked as a duplicate because now we know validations are a part of the problem as well. I am reopening MYFACES-1009 .
          Hide
          Mike Youngstrom added a comment -

          This appears to be fixed with the patch Martin checked-in on the 25th. My test case above works.

          Show
          Mike Youngstrom added a comment - This appears to be fixed with the patch Martin checked-in on the 25th. My test case above works.

            People

            • Assignee:
              Unassigned
              Reporter:
              Mike Youngstrom
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development