You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martijn Dashorst (JIRA)" <ji...@apache.org> on 2011/04/26 17:57:03 UTC
[jira] [Created] (WICKET-3647) Component#getMarkupId() throws
exceptions when not added to page yet
Component#getMarkupId() throws exceptions when not added to page yet
--------------------------------------------------------------------
Key: WICKET-3647
URL: https://issues.apache.org/jira/browse/WICKET-3647
Project: Wicket
Issue Type: Bug
Components: wicket-core
Affects Versions: 1.5-RC3
Reporter: Martijn Dashorst
When retrieving the markup ID for a component that has not yet been added to a page, Wicket currently throws an exception telling that the markup could not be found, or that the markup type (in case the component was added to a Panel) could not be determined. In 1.4, Wicket would generate a markup ID in these cases.
Proposed solution: to first see if a markup ID has been either generated or set (using setOutputMarkupId), and then returning that, or if no ID was yet available *and* the component has been added to a Page: use the ID from the markup, or if the component has not been added to a Page nor a markup ID: generate the ID.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (WICKET-3647) Component#getMarkupId() throws
exceptions when not added to page yet
Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3647?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martijn Dashorst resolved WICKET-3647.
--------------------------------------
Resolution: Fixed
Fix Version/s: 1.5-RC4
Assignee: Juergen Donnerstag
I've fixed this issue with a good solution that doesn't break any unit tests. Juergen, could you verify I didn't break any promises about markup ID's? See the unit tests I've committed with this issue for the assumed contract.
> Component#getMarkupId() throws exceptions when not added to page yet
> --------------------------------------------------------------------
>
> Key: WICKET-3647
> URL: https://issues.apache.org/jira/browse/WICKET-3647
> Project: Wicket
> Issue Type: Bug
> Components: wicket-core
> Affects Versions: 1.5-RC3
> Reporter: Martijn Dashorst
> Assignee: Juergen Donnerstag
> Fix For: 1.5-RC4
>
>
> When retrieving the markup ID for a component that has not yet been added to a page, Wicket currently throws an exception telling that the markup could not be found, or that the markup type (in case the component was added to a Panel) could not be determined. In 1.4, Wicket would generate a markup ID in these cases.
> Proposed solution: to first see if a markup ID has been either generated or set (using setOutputMarkupId), and then returning that, or if no ID was yet available *and* the component has been added to a Page: use the ID from the markup, or if the component has not been added to a Page nor a markup ID: generate the ID.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira