Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 84687 invoked from network); 1 May 2005 12:42:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 May 2005 12:42:22 -0000 Received: (qmail 48320 invoked by uid 500); 1 May 2005 12:43:42 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 47821 invoked by uid 500); 1 May 2005 12:43:38 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 47803 invoked by uid 99); 1 May 2005 12:43:37 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Sun, 01 May 2005 05:43:37 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 69B6829C for ; Sun, 1 May 2005 14:42:08 +0200 (CEST) Message-ID: <112673131.1114951328431.JavaMail.jira@ajax.apache.org> Date: Sun, 1 May 2005 14:42:08 +0200 (CEST) From: "Mathias Broekelmann (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Commented: (MYFACES-222) UIColumns loses rowIndex on renderColumnBody In-Reply-To: <1600281909.1114814180947.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/MYFACES-222?page=comments#action_64203 ] Mathias Broekelmann commented on MYFACES-222: --------------------------------------------- This bug is allready fixed. See http://issues.apache.org/jira/browse/MYFACES-174 The final (beta) 1.0.9 should include the fix but not the 1.0.9rc3 so make sure you are using the final version. > UIColumns loses rowIndex on renderColumnBody > -------------------------------------------- > > Key: MYFACES-222 > URL: http://issues.apache.org/jira/browse/MYFACES-222 > Project: MyFaces > Type: Bug > Versions: 1.0.9 beta > Environment: myfaces-1.0.9 > Reporter: Mike Kienenberger > > I'm using UIColumns (myfaces-1.0.9), and I've hit what appears to be a bug. > I can initialize my page, and then update my page, but I get an > IllegalArgumentException("row is unavailable") exception when the page > is being rendered (but after all of the actions for that page have > been processed). > The problem appears to be in here: > HtmlTableRendererBase.encodeChildren() contains: > columns.setRowIndex(k); > String columnStyle = styles.getColumnStyle(j); > renderColumnBody(facesContext, writer, > uiData, child, columnStyle); > k starts out as 0. renderColumnBody() eventually calls > UIColumns(UIData).isAllChildrenAndFacetsValid() line: 646 > UIColumns(UIData).encodeBegin(FacesContext) line: 594 > RendererUtils.renderChild(FacesContext, UIComponent) line: 482 > HtmlTableRenderer(HtmlTableRendererBase).renderColumnBody(FacesContext, > ResponseWriter, UIData, UIComponent, String) line: 205 > and isAllChildrenAndFacetsValid cycles through the rowIndexes, and > ends up setting it to -1. > And then sometime later my own code gets called via > HtmlSelectBooleanCheckbox(UIOutput).getValue() line: 75 > RendererUtils.getBooleanValue(UIComponent) line: 213 > HtmlCheckboxRenderer(HtmlCheckboxRendererBase).encodeEnd(FacesContext, > UIComponent) line: 94 > HtmlSelectBooleanCheckbox(UIComponentBase).encodeEnd(FacesContext) line: 341 > RendererUtils.renderChild(FacesContext, UIComponent) line: 491 > RendererUtils.renderChildren(FacesContext, UIComponent) line: 468 > RendererUtils.renderChild(FacesContext, UIComponent) line: 489 > HtmlTableRenderer(HtmlTableRendererBase).renderColumnBody(FacesContext, > ResponseWriter, UIData, UIComponent, String) line: 205 > but by this point, the rowIndex is -1 rather than the original 0 value > it should have been. > I "fixed" this in a 2005-04-29 CVS checkout with the following patch. > However, I don't claim to know if this will break something else. > Index: UIColumns.java > =================================================================== > RCS file: /home/cvspublic/incubator-myfaces/src/share/org/apache/myfaces/component/UIColumns.java,v > retrieving revision 1.1 > diff -u -r1.1 UIColumns.java > --- UIColumns.java 29 Mar 2005 11:40:50 -0000 1.1 > +++ UIColumns.java 29 Apr 2005 22:27:45 -0000 > @@ -15,7 +15,10 @@ > */ > package org.apache.myfaces.component; > > +import java.io.IOException; > import javax.faces.component.UIData; > +import javax.faces.context.FacesContext; > > /** > * @author Mathias Broekelmann (latest modification by $Author: matzew $) > @@ -53,4 +56,18 @@ > { > return COMPONENT_FAMILY; > } > + > + public void encodeBegin(FacesContext context) throws IOException > + { > + int savedRowIndex = getRowIndex(); > + super.encodeBegin(context); > + setRowIndex(savedRowIndex); > + } > + > + public void encodeEnd(FacesContext context) throws IOException > + { > + int savedRowIndex = getRowIndex(); > + super.encodeEnd(context); > + setRowIndex(savedRowIndex); > + } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira