From jira-events at lists.jboss.org Sat Oct 8 06:48:16 2011 Content-Type: multipart/mixed; boundary="===============9179297045368449120==" MIME-Version: 1.0 From: Florian Schoedel (Updated) (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] (RF-11410) CommandButton in ExtendedDataTable; Action for commandButton is executed twice. Date: Sat, 08 Oct 2011 06:48:16 -0400 Message-ID: <1848294008.14625.1318070896187.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1315788748.53845.1316291726294.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============9179297045368449120== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/RF-11410?page=3Dcom.atlassian.jira.p= lugin.system.issuetabpanels:all-tabpanel ] Florian Schoedel updated RF-11410: ---------------------------------- Attachment: rfExtDatatableBug.zip netbeans / maven / web /cdi project with demonstration of the described pro= blem. = the demonstration page is http://localhost:8080/rfExtDatatableBug/faces/dem= onstration.xhtml = you have to view your server console to see the effect = = > CommandButton in ExtendedDataTable; Action for commandButton is executed = twice. > -------------------------------------------------------------------------= ------ > > Key: RF-11410 > URL: https://issues.jboss.org/browse/RF-11410 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) = > Components: component-tables > Affects Versions: 4.1.0.Milestone1 > Environment: java 1.6.0_26 > glassfish 3.1 > Mojarra 2.1.0 (FCS 2.1.0-b11) > Seam Faces 3.0.1.Final > Reporter: Florian Schoedel > Attachments: rfExtDatatableBug.zip > > > I've created a composite component which contains two richfaces extented = data tables. Each Datatable contains a column for a button to perform an ac= tion. (in the left datatable there is an 'add' button, on the right datatab= le a 'remove' button). Everything works fine until I try to attach a client= behavior to the add / remove btns. I want to monitor my component for sele= ction and removal of any value from the calling page. > The client behavior is triggered as expected, but the method behind the a= dd and remove btns is executed twice! This also happens which actionListene= r attribute instead of action attribute. = > I've replaced richfaces ext. DataTable by h:dataTable and everything work= s fine. = > Here is the xml of my composite component: > ----- > {code} > > > xmlns:r=3D"http://richfaces.org/rich" > xmlns:a=3D"http://richfaces.org/a4j" > xmlns:h=3D"http://java.sun.com/jsf/html" > xmlns:f=3D"http://java.sun.com/jsf/core" > xmlns:fn=3D"http://java.sun.com/jsp/jstl/functions" > xmlns:o=3D"http://java.sun.com/jsf/composite/ezcomp" > xmlns:cc=3D"http://java.sun.com/jsf/composite" > > > > > > > > > > > >
> > > value=3D"#{cc.attrs.all}" > var=3D"p" > id=3D"allPersonTable" = > selectionMode=3D"none" > rows=3D"10" > > > > > > > > > filterExpression=3D"#{fn:containsIgnoreCase(p= .firstName,cc.allFirstName)}" > sortBy=3D"#{p.firstName}" > sortOrder=3D"#{cc.allFirstNameSortOrder}" > > > > > > > > > id=3D"firstnameFilter" > style=3D"width: 75px;" > > > render=3D"allPersonTable(= a)body " > execute=3D"@this" > /> > render=3D"dataScrollerTop= dataScrollerBottom" > execute=3D"@this" > /> > > > > > > filterExpression=3D"#{fn:containsIgnoreCase(p= .lastName,cc.allLastName)}" > sortBy=3D"#{p.lastName}" > sortOrder=3D"#{cc.allLastNameSortOrder}" > > > > style=3D"width: 100%;" > columnClasses=3D"colTop"> > > > > > id=3D"lastnameFilter" > style=3D"width:75px;" > > > render=3D"allPersonTable(= a)body " > execute=3D"@this" > /> > > > > > > > > > > > action=3D"#{cc.add(p)}" > disabled=3D"#{cc.attrs.s= election.contains(p)}" > id=3D"addBtn" > > > > > > > > > value=3D"#{cc.attrs.selection}" > var=3D"p" id=3D"selectedPersonTable" > rows=3D"10" style=3D"width: 100%" > selectionMode=3D"none" > > > > > > > > > filterExpression=3D"#{fn:containsIgnoreCase(p= .firstName,cc.selectedFirstName)}" > sortBy=3D"#{p.firstName}" > sortOrder=3D"#{cc.selectedFirstNameSortOrder}" > > > > > > > > > id=3D"firstnameFilter" > style=3D"width: 75px;" > > > render=3D"selectedPersonT= able(a)body " > execute=3D"@this" > /> > render=3D"selectedDataScr= ollerTop selectedDataScrollerBottom" > execute=3D"@this" > /> > > > > > > filterExpression=3D"#{fn:containsIgnoreCase(p= .lastName,cc.selectedLastName)}" > sortBy=3D"#{p.lastName}" > sortOrder=3D"#{cc.selectedLastNameSortOrder}"> > > style=3D"width: 100%;" > columnClasses=3D"colTop"> > > > > > id=3D"lastnameFilter" > style=3D"width:75px;" > > > render=3D"selectedPersonT= able(a)body " > execute=3D"@this" > /> > > > > > > > > > > > action=3D"#{cc.remove(= p)}" > id=3D"removeBtn" > > render=3D":#{cc.clientId}:all= PersonTable :#{cc.clientId}:selectedPersonTable #{cc.attrs.refresh}" > /> > > > > > > >
>
> > {code} > ----- > And there's the place I use it: = > ----- > {code} > > > > > > > #{p.firstName} > #{p.lastName} > > > {code} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.jboss.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============9179297045368449120==--