[
https://issues.apache.org/jira/browse/WICKET-237?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Johan Compagner closed WICKET-237.
----------------------------------
Resolution: Won't Fix
Assignee: Johan Compagner
Re usability of code doesn't mean you can reuse instances..
No it does mean that you can use the same code over and over again. Thats what
the component based model brings you.
In wicket 2.0 you can't add a component to a parent, you can reattach it.
You can't add it because it is always added for you by giving the parent in the
constructor. Thats the 'add' method
You can then remove and reattach it if you want but you can never give a
component a different parent.
Because many internal things depend on that, from the construction on you have
a fixed hierarchy for that instance.
This is the way most UI toolkits work except Swing and AWT ( which fakes it by
using peers)
> Constructor change, Component#add
> ---------------------------------
>
> Key: WICKET-237
> URL: https://issues.apache.org/jira/browse/WICKET-237
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 2.0
> Reporter: Flavius Burca
> Assigned To: Johan Compagner
> Priority: Blocker
>
> By removing the Component#add function, the component-based architecture of
> Wicket is compromised.
> A component-based architecture relies on component reuse and with this
> Constructor change you cannot have reusability of components.
> - How could you create a dynamic component hierarchy without a Component#add
> method ?
> - How could you allow later binding of components without a Component#add
> method ?
> - What if you want to reuse a previously created component ?
> - What if you want to create the child component before the parent component
> and link them at a later time ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.