From jira-events at lists.jboss.org Wed Sep 21 03:31:26 2011 Content-Type: multipart/mixed; boundary="===============4345893688396582902==" MIME-Version: 1.0 From: Florian Schoedel (JIRA) To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] Commented: (RF-11410) CommandButton in ExtendedDataTable; Action for commandButton is executed twice. Date: Wed, 21 Sep 2011 03:31:26 -0400 Message-ID: <1680725801.61231.1316590286232.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com> In-Reply-To: 1315788748.53845.1316291726294.JavaMail.tomcat@jira02.app.mwc.hst.phx2.redhat.com --===============4345893688396582902== 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.pl= ugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D12629548#com= ment-12629548 ] = Florian Schoedel commented on RF-11410: --------------------------------------- the same thing also happens, if there is only one ext. datatable within an = own component > 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: compatibility > 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 > Labels: new_and_noteworthy > > 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" > > render=3D":#{cc.clientId}:sel= ectedPersonTable @this #{cc.attrs.refresh}" > /> > > > > > > > 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} > refresh=3D""> > > > = > > > > > #{p.firstName} > > > #{p.lastName} > > > > {code} > ---- -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira =20 --===============4345893688396582902==--