[
https://issues.apache.org/jira/browse/WICKET-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884262#action_12884262
]
Sven Ludwig edited comment on WICKET-2929 at 7/1/10 8:30 AM:
-------------------------------------------------------------
For our central Wizard framework classes we have the following requirement: The
actual model objects may only be changed in a request resulting from a click of
the "next"-button and only if the functional actions (service calls etc.) that
are defined to be executed in such a request are successful.
These required semantics are different from the standard validation scheme of
wicket. Any successful ajax-request for example may usually alter the model
objects.
To implement the required semantics without having each functional developer in
the project to take care of this aspect, I am implementing (right now) a
special PropertyModel that works on a copy of the model object (i.e. a copy of
the object returned by getTarget). On this special model I expose an additional
method called something like "commit" that will replace the original model
object by the altered version.
Note: I have not thought of all scenarios, yet, where problems with this
approach may arise. It is still ongoing work. However, a non-final getTarget
Method would have made it somewhat easier.
was (Author: sludwig):
For our central Wizard framework classes we have the following requirement:
The actual model objects may only be changed in a request resulting from a
click of the "next"-button and only if the functional actions (service calls
etc.) that are defined to be executed in such a request are successful.
These required semantics are different from the standard validation scheme of
wicket. Any successful ajax-request for example may usually alter the model
objects.
To implement the required semantics without having each functional developer in
the project to take care of this aspect, I am implementing (right now) a
special PropertyModel that works on a copy of the model object (i.e. the object
returned by getTarget). On this special model I expose an additional method
called something like "commit" that will replace the original model object by
the altered version.
Note: I have not thought of all scenarios, yet, where problems with this
approach may arise. It is still ongoing work. However, a non-final getTarget
Method would have made it somewhat easier.
> Method getTarget in PropertyModel should not be final
> -----------------------------------------------------
>
> Key: WICKET-2929
> URL: https://issues.apache.org/jira/browse/WICKET-2929
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4.9
> Reporter: Sven Ludwig
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> I need to implement a specialization of the class
> org.apache.wicket.model.PropertyModel and I am having great Problems doing so
> due to the method getTarget() being final. I request the modifier to be
> removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.