You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Massimo Lusetti (JIRA)" <ji...@apache.org> on 2011/08/11 23:48:27 UTC
[jira] [Closed] (TAP5-94) Add a "hidden fields" parameter to
BeanEditor and BeanEditForm
[ https://issues.apache.org/jira/browse/TAP5-94?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Massimo Lusetti closed TAP5-94.
-------------------------------
Resolution: Won't Fix
Fix Version/s: 5.3
Please open a new one for 5.3 if this still applicable
> Add a "hidden fields" parameter to BeanEditor and BeanEditForm
> --------------------------------------------------------------
>
> Key: TAP5-94
> URL: https://issues.apache.org/jira/browse/TAP5-94
> Project: Tapestry 5
> Issue Type: New Feature
> Affects Versions: 5.0.15
> Reporter: Geoff Callender
> Priority: Minor
> Fix For: 5.3
>
>
> A "hidden fields" parameter would allow code like this:
> <t:beaneditform t:id="form" object="person" submitLabel="Save" hidden="version"/>
> instead of this:
> <t:beaneditform t:id="form" object="person" submitLabel="Save">
> <!-- Include version in the form to prevent it being updated/refreshed in onActivate(), which would defeat optimistic locking. -->
> <t:parameter name="version">
> <t:hidden t:id="version" value="person.version"/>
> </t:parameter>
> </t:beaneditform>
> Please note this is not the same as using remove, eg:
> <t:beaneditform t:id="form" object="person" submitLabel="Save" remove="version"/>
> which in this example would defeat optimistic locking because version's value would no longer make the round-trip to the client.
> In case it helps, here's what onActivate() might looks like in this example:
> private Long _personId;
> @Persist("flash")
> private Person _person;
> void onActivate(Long id) throws Exception {
> _personId = id;
> if (_person == null) {
> _person = getPersonService().findPerson(_personId);
> if (_person == null) {
> throw new Exception("Person " + _personId + " does not exist.");
> }
> }
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira