Re: 5.3 Bug AjaxFormLoop nested within Zone
I filed a JIRA bug and reverted back to version 5.3.0 until someone gets a chance to look at it. -- View this message in context: http://tapestry.1045711.n5.nabble.com/5-3-Bug-AjaxFormLoop-nested-within-Zone-tp5029977p5032840.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.3 Bug AjaxFormLoop nested within Zone
I have found you can add a new row, but if you try modifying an existing row, the changes don't seem to take effect. I'm posting my code below to be reviewed. .tml Current State test remove .class @Property private FormValidation formValidation; @Property @Persist private List formValidations; @Inject private Session session; @Property @Persist private SelectModel stateModel; @Inject private SelectModelFactory selectModelFactory; @InjectComponent private Zone testZone, formZone; Object onActionFromTest() { return testZone.getBody(); } void onPrepareForRender() { formValidations = session.createCriteria(FormValidation.class).list(); List prStates = session.createCriteria(PrState.class).list(); stateModel = selectModelFactory.create(prStates, "Label"); } @CommitAfter Object onSuccess() { for(FormValidation _formValidation : formValidations) { session.saveOrUpdate(_formValidation); } return formZone.getBody(); } Object onAddRow() { formValidation = new FormValidation(); formValidations.add(formValidation); return formValidation; } public ValueEncoder getEncoder() { return new ValueEncoder() { public String toClient(FormValidation formValidation) { return String.valueOf(formValidation.getTempId()); } public FormValidation toValue(String clientValue) { Long key = new Long(clientValue); for (FormValidation holder : formValidations) { if (holder.getTempId() == key) { return holder; } } return null; } }; } @CommitAfter void onRemoveRow(FormValidation formValidation) { formValidations.remove(formValidation); session.delete(formValidation); } -- View this message in context: http://tapestry.1045711.n5.nabble.com/5-3-Bug-AjaxFormLoop-nested-within-Zone-tp5029977p5032526.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
5.3 Bug AjaxFormLoop nested within Zone
When nesting an AjaxFormLoop within a Zone while giving the zone the following parameters update="fade" visible="false", on submit, the value encoder doesn't seem to getting reached resulting in unsaved values. This does seemed to work without issue in version 5.3.0 and prior. After doing some more test, I have found if the zone is set to visible true, the values are submitted without issue. I'm not sure if I'm doing something wrong, or a new bug has been produced and needs to be filed. Any advise will be greatly appreciated. -- View this message in context: http://tapestry.1045711.n5.nabble.com/5-3-Bug-AjaxFormLoop-nested-within-Zone-tp5029977p5029977.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org