Return-Path: Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: (qmail 85435 invoked from network); 4 May 2005 17:13:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 May 2005 17:13:06 -0000 Received: (qmail 571 invoked by uid 500); 4 May 2005 17:12:54 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 429 invoked by uid 500); 4 May 2005 17:12:53 -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 386 invoked by uid 99); 4 May 2005 17:12:51 -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; Wed, 04 May 2005 10:12:50 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 8D62232A for ; Wed, 4 May 2005 18:53:07 +0200 (CEST) Message-ID: <1382833540.1115225587560.JavaMail.jira@ajax.apache.org> Date: Wed, 4 May 2005 18:53:07 +0200 (CEST) From: "Martin Marinschek (JIRA)" To: dev@myfaces.apache.org Subject: [jira] Closed: (MYFACES-229) DataList does not work correctly like a DataTable with input components In-Reply-To: <1864583161.1115216368823.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-229?page=all ] Martin Marinschek closed MYFACES-229: ------------------------------------- Resolution: Fixed Fix Version: Nightly Build patch by Mathias Werlitz > DataList does not work correctly like a DataTable with input components > ----------------------------------------------------------------------- > > Key: MYFACES-229 > URL: http://issues.apache.org/jira/browse/MYFACES-229 > Project: MyFaces > Type: Bug > Versions: 1.0.9 beta > Reporter: Mathias Werlitz > Fix For: Nightly Build > > I have a problem using the DataList component. I would like to use input components within it, but the model isn't updated at all. I use a List a the DataList value. > If I use a DataTable instead everything works fine. > here an example - does NOT work: > > value="#{myBean.items}" > > > > > > > but this works: > > value="#{myBean.items}" > > > > > > > I'm not very familia with svn and the patch generation so i will submit my solution here. Some of the developers only has to c&p the code ;) > PROBLEM: Unimplemented methods in org.apache.myfaces.custom.datalist.HtmlDataList > public void processUpdates(FacesContext context); > public void processValidators(FacesContext context) > SOLUTION: > public void processUpdates(FacesContext context) { > int first = getFirst(); > int rows = getRows(); > int last; > if (rows == 0) > { > last = getRowCount(); > } > else > { > last = first + rows; > } > for (int rowIndex = first; rowIndex < last; rowIndex++) > { > setRowIndex(rowIndex); > if (isRowAvailable()) > { > for (Iterator it = getChildren().iterator(); it.hasNext();) > { > UIComponent child = (UIComponent)it.next(); > if (!child.isRendered()) > { > continue; > } > child.processUpdates(context); > } > } > } > setRowIndex(-1); > } > > public void processValidators(FacesContext context) { > int first = getFirst(); > int rows = getRows(); > int last; > if (rows == 0) > { > last = getRowCount(); > } > else > { > last = first + rows; > } > for (int rowIndex = first; rowIndex < last; rowIndex++) > { > setRowIndex(rowIndex); > if (isRowAvailable()) > { > for (Iterator it = getChildren().iterator(); it.hasNext();) > { > UIComponent child = (UIComponent)it.next(); > if (!child.isRendered()) > { > continue; > } > child.processValidators(context); > } > } > } > setRowIndex(-1); > } -- 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