From jira-events at lists.jboss.org Tue Sep 10 09:06:03 2013 Content-Type: multipart/mixed; boundary="===============7577485780450603835==" MIME-Version: 1.0 From: =?utf-8?q?Ji=C5=99=C3=AD_=C5=A0tefek_=28JIRA=29_=3Cjira-events_at_lists?= =?utf-8?q?=2Ejboss=2Eorg=3E?= To: richfaces-issues at lists.jboss.org Subject: [richfaces-issues] [JBoss JIRA] (RF-13127) onvalid and oninvalide pass wrong element when using rich:element with String field Date: Tue, 10 Sep 2013 09:06:03 -0400 Message-ID: In-Reply-To: JIRA.12498378.1376265889000@jira02.app.mwc.hst.phx2.redhat.com --===============7577485780450603835== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable [ https://issues.jboss.org/browse/RF-13127?page=3Dcom.atlassian.jira.pl= ugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D12803105#com= ment-12803105 ] = Ji=C5=99=C3=AD =C5=A0tefek edited comment on RF-13127 at 9/10/13 9:04 AM: ----------------------------------------------------------- I can confirm, that rich:validator behaves incorrectly, when placed in iter= ation component, validates a String value and uses onvalid/oninvalid functi= ons with parameters. It seems that the parameters for these function are not forwarded correctly= when using some string validations. I've attached another sample (RF-13127.zip), using rich:repeat instead of d= ataTable, and only with one set of string validated and one set of number v= alidated inputs. In this sample, all string validated inputs (vin) forwards the same paramet= ers (id of first vin input) to the onvalid/oninvalid function. = was (Author: jstefek): I can confirm, that rich:validator behaves incorrectly, when placed in = iteration component, validates a String value and uses onvalid/oninvalid fu= nctions with parameters. It seems that the parameters for these function are not forwarded correctly= when using some string validations. I've attached another sample, using rich:repeat instead of dataTable, and o= nly with one set of string validated and one set of number validated inputs. In this sample, all string validated inputs (vin) forwards the same paramet= ers (id of first vin input) to the onvalid/oninvalid function. = > onvalid and oninvalide pass wrong element when using rich:element with St= ring field > -------------------------------------------------------------------------= ---------- > > Key: RF-13127 > URL: https://issues.jboss.org/browse/RF-13127 > Project: RichFaces > Issue Type: Bug > Security Level: Public(Everyone can see) = > Components: component-validators > Affects Versions: 4.3.3 > Reporter: Louis Parisi > Assignee: Ji=C5=99=C3=AD =C5=A0tefek > Attachments: JSFTemplate.zip, RF-13127.zip, richfaces.zip > > > I have a bean iterated in a datatable. Using the rich:validator on field= s in the bean I am executing javascript when a field is validated and apply= styling based on valid or invalid state. The code below returns the corre= ct element when the underlying field is a BigDecimal but intermittently ret= urns the element from row zero and sometimes another rown when the field is= a String. If I just reference a String vs. BigDecimal and display the ele= ment passed to the javascript I get form:myTable:4:myField for a BigDecimal= field and always form:myTable:0:myField no matter the row for a String fie= ld. > {code} > > onvalid=3D"valueModified(#{rich:element('vendor')}, t= rue)"/> > > {code} > {code} > > {code} > Some other tests I did while trying to debug are: > * I passed the rowKeyVar to a javascript method in the onvalid event and = it passed the correct row for a BigDecimal and always zero for a String fie= ld. > * The oncomplete event of the validator does not seem to fire for a Strin= g field but does for a BigDecimal field. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs For more information on JIRA, see: http://www.atlassian.com/software/jira --===============7577485780450603835==--