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 Meier (JIRA)" <ji...@apache.org> on 2012/09/05 19:28:07 UTC
[jira] [Assigned] (WICKET-4749) TabbedPanel - IModel> initModel()
[ https://issues.apache.org/jira/browse/WICKET-4749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sven Meier reassigned WICKET-4749:
----------------------------------
Assignee: Sven Meier
> TabbedPanel - IModel<?> initModel()
> -----------------------------------
>
> Key: WICKET-4749
> URL: https://issues.apache.org/jira/browse/WICKET-4749
> Project: Wicket
> Issue Type: Bug
> Components: wicket-extensions
> Affects Versions: 6.0.0
> Reporter: Jakub Rinkes
> Assignee: Sven Meier
> Priority: Minor
>
> TabbedPanel added on panel which have CompoundPropertyPanel get Exception.
> Problem is in TabbedPanel method IModel<?> initModel().
> @Override
> protected IModel<?> initModel()
> {
> IModel<?> model = super.initModel();
> if (model == null)
> {
> model = new Model<Integer>(-1);
> }
> return model;
> }
> I think problem is the line with IModel<?> model = super.initModel();
> When the tabbed panel is trying to get a model but found null then the model is trying to create. Call the initModel () and the calling super.initModel () executes initialization model ancestors. Which is the problem. Method for initModel () in the Component starts to look at his parents and returns CompoundPropertyModel from the panel where TabbedPanel added. And then isnt created new Model<Integer>(-1) which tabbed panel really need.
> When I override method initModel() from TabbedPanel again and delete line with super.initModel(), everything works fine.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira