You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Don Ngo (Created) (JIRA)" <ji...@apache.org> on 2012/03/19 18:51:38 UTC

[jira] [Created] (WICKET-4462) Update AbstractPropertyModel and PropertyModel constructor to include parameter for IModel

Update AbstractPropertyModel and PropertyModel constructor to include parameter  for IModel<?>
----------------------------------------------------------------------------------------------

                 Key: WICKET-4462
                 URL: https://issues.apache.org/jira/browse/WICKET-4462
             Project: Wicket
          Issue Type: Improvement
    Affects Versions: 1.5.5
            Reporter: Don Ngo
            Priority: Minor


Please consider adding another constructor to AbstractPropertyModel and PropertyModel class to include a parameter for IModel<?>.  Since both of these classes implement the IChainingModel interface, I think it makes sense to include a parameter for IModel<?> in the constructor for these classes, as in the case of CompoundPropertyModel class.

For what's it worth, below is my custom class to enhance the PropertyModel class:

public class CustomPropertyModel<T> extends PropertyModel<T> {
	private static final long serialVersionUID = 1L;

	public CustomPropertyModel(IModel<T> model, String expression) {
		super(model.getObject(), expression);
		setChainedModel(model);
	}
}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4462) Update AbstractPropertyModel and PropertyModel constructor to include parameter for IModel

Posted by "Don Ngo (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232868#comment-13232868 ] 

Don Ngo commented on WICKET-4462:
---------------------------------

What I'm suggesting is to add another constructor with the following signature:

public PropertyModel(IModel<T> model, String expression)
                
> Update AbstractPropertyModel and PropertyModel constructor to include parameter  for IModel<?>
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4462
>                 URL: https://issues.apache.org/jira/browse/WICKET-4462
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.5.5
>            Reporter: Don Ngo
>            Priority: Minor
>
> Please consider adding another constructor to AbstractPropertyModel and PropertyModel class to include a parameter for IModel<?>.  Since both of these classes implement the IChainingModel interface, I think it makes sense to include a parameter for IModel<?> in the constructor for these classes, as in the case of CompoundPropertyModel class.
> For what's it worth, below is my custom class to enhance the PropertyModel class:
> public class CustomPropertyModel<T> extends PropertyModel<T> {
> 	private static final long serialVersionUID = 1L;
> 	public CustomPropertyModel(IModel<T> model, String expression) {
> 		super(model.getObject(), expression);
> 		setChainedModel(model);
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4462) Update AbstractPropertyModel and PropertyModel constructor to include parameter for IModel

Posted by "Don Ngo (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232907#comment-13232907 ] 

Don Ngo commented on WICKET-4462:
---------------------------------

You're right.  My bad for not reading the documentation carefully.  I didn't know the modelObject argument can be an instance of IModel<T>.  Thanks for pointing that out to me.
                
> Update AbstractPropertyModel and PropertyModel constructor to include parameter  for IModel<?>
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4462
>                 URL: https://issues.apache.org/jira/browse/WICKET-4462
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.5.5
>            Reporter: Don Ngo
>            Priority: Minor
>
> Please consider adding another constructor to AbstractPropertyModel and PropertyModel class to include a parameter for IModel<?>.  Since both of these classes implement the IChainingModel interface, I think it makes sense to include a parameter for IModel<?> in the constructor for these classes, as in the case of CompoundPropertyModel class.
> For what's it worth, below is my custom class to enhance the PropertyModel class:
> public class CustomPropertyModel<T> extends PropertyModel<T> {
> 	private static final long serialVersionUID = 1L;
> 	public CustomPropertyModel(IModel<T> model, String expression) {
> 		super(model.getObject(), expression);
> 		setChainedModel(model);
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4462) Update AbstractPropertyModel and PropertyModel constructor to include parameter for IModel

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

Sven Meier commented on WICKET-4462:
------------------------------------

You can already pass a model as argument to PropertyModel's constructor. What is missing here?
                
> Update AbstractPropertyModel and PropertyModel constructor to include parameter  for IModel<?>
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4462
>                 URL: https://issues.apache.org/jira/browse/WICKET-4462
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.5.5
>            Reporter: Don Ngo
>            Priority: Minor
>
> Please consider adding another constructor to AbstractPropertyModel and PropertyModel class to include a parameter for IModel<?>.  Since both of these classes implement the IChainingModel interface, I think it makes sense to include a parameter for IModel<?> in the constructor for these classes, as in the case of CompoundPropertyModel class.
> For what's it worth, below is my custom class to enhance the PropertyModel class:
> public class CustomPropertyModel<T> extends PropertyModel<T> {
> 	private static final long serialVersionUID = 1L;
> 	public CustomPropertyModel(IModel<T> model, String expression) {
> 		super(model.getObject(), expression);
> 		setChainedModel(model);
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (WICKET-4462) Update AbstractPropertyModel and PropertyModel constructor to include parameter for IModel

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

Sven Meier closed WICKET-4462.
------------------------------

    Resolution: Invalid

Already working as suggested.
                
> Update AbstractPropertyModel and PropertyModel constructor to include parameter  for IModel<?>
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4462
>                 URL: https://issues.apache.org/jira/browse/WICKET-4462
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.5.5
>            Reporter: Don Ngo
>            Priority: Minor
>
> Please consider adding another constructor to AbstractPropertyModel and PropertyModel class to include a parameter for IModel<?>.  Since both of these classes implement the IChainingModel interface, I think it makes sense to include a parameter for IModel<?> in the constructor for these classes, as in the case of CompoundPropertyModel class.
> For what's it worth, below is my custom class to enhance the PropertyModel class:
> public class CustomPropertyModel<T> extends PropertyModel<T> {
> 	private static final long serialVersionUID = 1L;
> 	public CustomPropertyModel(IModel<T> model, String expression) {
> 		super(model.getObject(), expression);
> 		setChainedModel(model);
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4462) Update AbstractPropertyModel and PropertyModel constructor to include parameter for IModel

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

Sven Meier commented on WICKET-4462:
------------------------------------

The current constructor takes any object, including models - the javadoc even states it. I don't see an advantage adding another one, do you?
                
> Update AbstractPropertyModel and PropertyModel constructor to include parameter  for IModel<?>
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4462
>                 URL: https://issues.apache.org/jira/browse/WICKET-4462
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.5.5
>            Reporter: Don Ngo
>            Priority: Minor
>
> Please consider adding another constructor to AbstractPropertyModel and PropertyModel class to include a parameter for IModel<?>.  Since both of these classes implement the IChainingModel interface, I think it makes sense to include a parameter for IModel<?> in the constructor for these classes, as in the case of CompoundPropertyModel class.
> For what's it worth, below is my custom class to enhance the PropertyModel class:
> public class CustomPropertyModel<T> extends PropertyModel<T> {
> 	private static final long serialVersionUID = 1L;
> 	public CustomPropertyModel(IModel<T> model, String expression) {
> 		super(model.getObject(), expression);
> 		setChainedModel(model);
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (WICKET-4462) Update AbstractPropertyModel and PropertyModel constructor to include parameter for IModel

Posted by "Don Ngo (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-4462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232865#comment-13232865 ] 

Don Ngo commented on WICKET-4462:
---------------------------------

>From what I can tell, there's only one PropertyModel constructor, and it doesn't have a argument for IModel.  Below is the signature for that constructor taken from the 1.5.5. api doc:

public PropertyModel(java.lang.Object modelObject,
                     java.lang.String expression) Construct with a wrapped (IModel) or unwrapped (non-IModel) object and a property expression that works on the given model.
 
Parameters:modelObject - The model object, which may or may not implement IModelexpression - Property expression for property access
                
> Update AbstractPropertyModel and PropertyModel constructor to include parameter  for IModel<?>
> ----------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4462
>                 URL: https://issues.apache.org/jira/browse/WICKET-4462
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 1.5.5
>            Reporter: Don Ngo
>            Priority: Minor
>
> Please consider adding another constructor to AbstractPropertyModel and PropertyModel class to include a parameter for IModel<?>.  Since both of these classes implement the IChainingModel interface, I think it makes sense to include a parameter for IModel<?> in the constructor for these classes, as in the case of CompoundPropertyModel class.
> For what's it worth, below is my custom class to enhance the PropertyModel class:
> public class CustomPropertyModel<T> extends PropertyModel<T> {
> 	private static final long serialVersionUID = 1L;
> 	public CustomPropertyModel(IModel<T> model, String expression) {
> 		super(model.getObject(), expression);
> 		setChainedModel(model);
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira