You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Matthias Keller (Created) (JIRA)" <ji...@apache.org> on 2011/11/08 18:21:51 UTC

[jira] [Created] (WICKET-4207) Use the correct cast in WizardButtonBar

Use the correct cast in WizardButtonBar
---------------------------------------

                 Key: WICKET-4207
                 URL: https://issues.apache.org/jira/browse/WICKET-4207
             Project: Wicket
          Issue Type: Improvement
          Components: wicket-extensions
    Affects Versions: 1.5.2
            Reporter: Matthias Keller


WizardButtonBar.getDefaultButton() uses a cast to Button before returning the found component.
However, the interface only expects a IFormSubmittingComponent being returned.
This makes it hard to subclass this button bar to add our own logic using SubmitLinks instead of Buttons. Those casts should be changed to IFormSubmittingComponent.

--
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] [Resolved] (WICKET-4207) Use the correct cast in WizardButtonBar

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

Martin Grigorov resolved WICKET-4207.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 1.6.0)
                   1.5.3
         Assignee: Martin Grigorov
    
> Use the correct cast in WizardButtonBar
> ---------------------------------------
>
>                 Key: WICKET-4207
>                 URL: https://issues.apache.org/jira/browse/WICKET-4207
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.5.2
>            Reporter: Matthias Keller
>            Assignee: Martin Grigorov
>             Fix For: 1.5.3
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> WizardButtonBar.getDefaultButton() uses a cast to Button before returning the found component.
> However, the interface only expects a IFormSubmittingComponent being returned.
> This makes it hard to subclass this button bar to add our own logic using SubmitLinks instead of Buttons. Those casts should be changed to IFormSubmittingComponent.

--
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] [Updated] (WICKET-4207) Use the correct cast in WizardButtonBar

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

Martin Grigorov updated WICKET-4207:
------------------------------------

    Fix Version/s: 1.6.0

API changes go in Wicket.next
                
> Use the correct cast in WizardButtonBar
> ---------------------------------------
>
>                 Key: WICKET-4207
>                 URL: https://issues.apache.org/jira/browse/WICKET-4207
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.5.2
>            Reporter: Matthias Keller
>             Fix For: 1.6.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> WizardButtonBar.getDefaultButton() uses a cast to Button before returning the found component.
> However, the interface only expects a IFormSubmittingComponent being returned.
> This makes it hard to subclass this button bar to add our own logic using SubmitLinks instead of Buttons. Those casts should be changed to IFormSubmittingComponent.

--
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-4207) Use the correct cast in WizardButtonBar

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

Matthias Keller closed WICKET-4207.
-----------------------------------


Thanks
                
> Use the correct cast in WizardButtonBar
> ---------------------------------------
>
>                 Key: WICKET-4207
>                 URL: https://issues.apache.org/jira/browse/WICKET-4207
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.5.2
>            Reporter: Matthias Keller
>            Assignee: Martin Grigorov
>             Fix For: 1.5.3
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> WizardButtonBar.getDefaultButton() uses a cast to Button before returning the found component.
> However, the interface only expects a IFormSubmittingComponent being returned.
> This makes it hard to subclass this button bar to add our own logic using SubmitLinks instead of Buttons. Those casts should be changed to IFormSubmittingComponent.

--
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-4207) Use the correct cast in WizardButtonBar

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

Matthias Keller commented on WICKET-4207:
-----------------------------------------

Well this is no API change, the method signature doesn't have to change at all:
public IFormSubmittingComponent getDefaultButton(final IWizardModel model) {}
Stays as-is.
Only the imlementation does the following:
...
return (Button)get("next")
...
This cast is unnecessarily narrow as the method signature only dictates returning an IFormSubmittingComponent. So the cast should be to IFormSubmittingComponent instead.
This doesn't change any existing behavior (since Button implements that interface anyway) but allows subclasses to reuse this method but use SubmitLinks (or alike) instead.

So no API has to be amended and no existing applications have to be modified.
                
> Use the correct cast in WizardButtonBar
> ---------------------------------------
>
>                 Key: WICKET-4207
>                 URL: https://issues.apache.org/jira/browse/WICKET-4207
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 1.5.2
>            Reporter: Matthias Keller
>             Fix For: 1.6.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> WizardButtonBar.getDefaultButton() uses a cast to Button before returning the found component.
> However, the interface only expects a IFormSubmittingComponent being returned.
> This makes it hard to subclass this button bar to add our own logic using SubmitLinks instead of Buttons. Those casts should be changed to IFormSubmittingComponent.

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