You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Ludwig (JIRA)" <ji...@apache.org> on 2010/07/01 13:01:58 UTC

[jira] Created: (WICKET-2929) Method getTarget in PropertyModel should not be final

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


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.


[jira] Issue Comment Edited: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Sven Ludwig (JIRA)" <ji...@apache.org>.
    [ 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:32 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 PropertyModel.getTarget). On this special PropertyModel class 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. a copy of the object returned by getTarget). On this special PropertyModel class 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.


[jira] Commented: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884251#action_12884251 ] 

Martin Grigorov commented on WICKET-2929:
-----------------------------------------

This method is actually in org.apache.wicket.model.AbstractPropertyModel<T>.
Can you describe your use case more detailed?
Looking at the current implementation I can say it is quite flexible if you pass a Model instead of plain Pojo as first parameter in the constructor.

> 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.


[jira] Resolved: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Sven Ludwig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Ludwig resolved WICKET-2929.
---------------------------------

    Resolution: Not A Problem

The approach to implement a plain chaining model that only cares about the transactional semantics described below and use it in combination with PropertyModel's and such worked. I no longer see a need for the method to be non-final.

> 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.


[jira] Issue Comment Edited: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Sven Ludwig (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Commented: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Sven Ludwig (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12884262#action_12884262 ] 

Sven Ludwig commented on WICKET-2929:
-------------------------------------

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.


[jira] Issue Comment Edited: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Sven Ludwig (JIRA)" <ji...@apache.org>.
    [ 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 PropertyModel class 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. 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.
  
> 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.


[jira] Updated: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Sven Ludwig (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-2929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Ludwig updated WICKET-2929:
--------------------------------

    Priority: Minor  (was: Major)

> 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
>            Priority: Minor
>   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.


[jira] Issue Comment Edited: (WICKET-2929) Method getTarget in PropertyModel should not be final

Posted by "Sven Ludwig (JIRA)" <ji...@apache.org>.
    [ 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 9:23 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 AbstractPropertyModel.getTarget()). On this special PropertyModel class 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. a copy of the object returned by PropertyModel.getTarget). On this special PropertyModel class 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.