You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Dilger (JIRA)" <ji...@apache.org> on 2011/04/28 16:59:03 UTC
[jira] [Created] (WICKET-3654) Using AjaxSubmitLink in a Form with
CompoundPropertyModel fails if link-id does not match model value
Using AjaxSubmitLink in a Form with CompoundPropertyModel fails if link-id does not match model value
-----------------------------------------------------------------------------------------------------
Key: WICKET-3654
URL: https://issues.apache.org/jira/browse/WICKET-3654
Project: Wicket
Issue Type: Bug
Components: wicket-core
Affects Versions: 1.4.17
Reporter: Martin Dilger
If I use an AjaxSubmitLink in a Form, that has a CompoundPropertyModel set, there is no way to attach this Link to the Form, if
the link-id does not match an attribute in the underlying model.
Problem is, AjaxSubmitLink does not provide a Constructor, that I can pass an empty model reference to.
In case of an SubmitLink, this might not be as unusual as one might first think, so please consider to provide a Constructor
which accepts a Model-Reference.
public AjaxSubmitLink(String id, IModel<?> model){
super(id, model);
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3654) Using AjaxSubmitLink in a Form
with CompoundPropertyModel fails if link-id does not match model value
Posted by "Martin Dilger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027360#comment-13027360 ]
Martin Dilger commented on WICKET-3654:
---------------------------------------
I reinspected the problem, and you are right, its my fault, I used getDefaultModelObject inside onSubmit, where I should have used form.getDefaultModelObject().
So you can safely close this one as this is no Bug.
Sorry for the noise.
> Using AjaxSubmitLink in a Form with CompoundPropertyModel fails if link-id does not match model value
> -----------------------------------------------------------------------------------------------------
>
> Key: WICKET-3654
> URL: https://issues.apache.org/jira/browse/WICKET-3654
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: Martin Dilger
>
> If I use an AjaxSubmitLink in a Form, that has a CompoundPropertyModel set, there is no way to attach this Link to the Form, if
> the link-id does not match an attribute in the underlying model.
> Problem is, AjaxSubmitLink does not provide a Constructor, that I can pass an empty model reference to.
> In case of an SubmitLink, this might not be as unusual as one might first think, so please consider to provide a Constructor
> which accepts a Model-Reference.
> public AjaxSubmitLink(String id, IModel<?> model){
> super(id, model);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3654) Using AjaxSubmitLink in a Form
with CompoundPropertyModel fails if link-id does not match model value
Posted by "Attila Király (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027011#comment-13027011 ]
Attila Király commented on WICKET-3654:
---------------------------------------
I tried to reproduce this but it worked for me. However, if really needed, you could define the model after construction: ajaxSubmitLink.setDefaultModel(Model.of());
> Using AjaxSubmitLink in a Form with CompoundPropertyModel fails if link-id does not match model value
> -----------------------------------------------------------------------------------------------------
>
> Key: WICKET-3654
> URL: https://issues.apache.org/jira/browse/WICKET-3654
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: Martin Dilger
>
> If I use an AjaxSubmitLink in a Form, that has a CompoundPropertyModel set, there is no way to attach this Link to the Form, if
> the link-id does not match an attribute in the underlying model.
> Problem is, AjaxSubmitLink does not provide a Constructor, that I can pass an empty model reference to.
> In case of an SubmitLink, this might not be as unusual as one might first think, so please consider to provide a Constructor
> which accepts a Model-Reference.
> public AjaxSubmitLink(String id, IModel<?> model){
> super(id, model);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3654) Using AjaxSubmitLink in a Form
with CompoundPropertyModel fails if link-id does not match model value
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026337#comment-13026337 ]
Martin Grigorov commented on WICKET-3654:
-----------------------------------------
Please attach a quickstart.
> Using AjaxSubmitLink in a Form with CompoundPropertyModel fails if link-id does not match model value
> -----------------------------------------------------------------------------------------------------
>
> Key: WICKET-3654
> URL: https://issues.apache.org/jira/browse/WICKET-3654
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: Martin Dilger
>
> If I use an AjaxSubmitLink in a Form, that has a CompoundPropertyModel set, there is no way to attach this Link to the Form, if
> the link-id does not match an attribute in the underlying model.
> Problem is, AjaxSubmitLink does not provide a Constructor, that I can pass an empty model reference to.
> In case of an SubmitLink, this might not be as unusual as one might first think, so please consider to provide a Constructor
> which accepts a Model-Reference.
> public AjaxSubmitLink(String id, IModel<?> model){
> super(id, model);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (WICKET-3654) Using AjaxSubmitLink in a Form
with CompoundPropertyModel fails if link-id does not match model value
Posted by "Martin Dilger (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13026334#comment-13026334 ]
Martin Dilger commented on WICKET-3654:
---------------------------------------
I forgot, the Exception that occurs is for example:
No get method defined for class: class de.pentasys.wicket.advanced.domain.checkout.ProductBundle expression: order
> Using AjaxSubmitLink in a Form with CompoundPropertyModel fails if link-id does not match model value
> -----------------------------------------------------------------------------------------------------
>
> Key: WICKET-3654
> URL: https://issues.apache.org/jira/browse/WICKET-3654
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: Martin Dilger
>
> If I use an AjaxSubmitLink in a Form, that has a CompoundPropertyModel set, there is no way to attach this Link to the Form, if
> the link-id does not match an attribute in the underlying model.
> Problem is, AjaxSubmitLink does not provide a Constructor, that I can pass an empty model reference to.
> In case of an SubmitLink, this might not be as unusual as one might first think, so please consider to provide a Constructor
> which accepts a Model-Reference.
> public AjaxSubmitLink(String id, IModel<?> model){
> super(id, model);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3654) Using AjaxSubmitLink in a Form with
CompoundPropertyModel fails if link-id does not match model value
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov resolved WICKET-3654.
-------------------------------------
Resolution: Not A Problem
> Using AjaxSubmitLink in a Form with CompoundPropertyModel fails if link-id does not match model value
> -----------------------------------------------------------------------------------------------------
>
> Key: WICKET-3654
> URL: https://issues.apache.org/jira/browse/WICKET-3654
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: Martin Dilger
>
> If I use an AjaxSubmitLink in a Form, that has a CompoundPropertyModel set, there is no way to attach this Link to the Form, if
> the link-id does not match an attribute in the underlying model.
> Problem is, AjaxSubmitLink does not provide a Constructor, that I can pass an empty model reference to.
> In case of an SubmitLink, this might not be as unusual as one might first think, so please consider to provide a Constructor
> which accepts a Model-Reference.
> public AjaxSubmitLink(String id, IModel<?> model){
> super(id, model);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (WICKET-3654) Using AjaxSubmitLink in a Form with
CompoundPropertyModel fails if link-id does not match model value
Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3654?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov updated WICKET-3654:
------------------------------------
Comment: was deleted
(was: Please attach a quickstart.)
> Using AjaxSubmitLink in a Form with CompoundPropertyModel fails if link-id does not match model value
> -----------------------------------------------------------------------------------------------------
>
> Key: WICKET-3654
> URL: https://issues.apache.org/jira/browse/WICKET-3654
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.4.17
> Reporter: Martin Dilger
>
> If I use an AjaxSubmitLink in a Form, that has a CompoundPropertyModel set, there is no way to attach this Link to the Form, if
> the link-id does not match an attribute in the underlying model.
> Problem is, AjaxSubmitLink does not provide a Constructor, that I can pass an empty model reference to.
> In case of an SubmitLink, this might not be as unusual as one might first think, so please consider to provide a Constructor
> which accepts a Model-Reference.
> public AjaxSubmitLink(String id, IModel<?> model){
> super(id, model);
> }
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira