Alternatively:
1) Components are POJOs. Users can define whatever constructor they want.2) Users always use add() to associate a parent with a component but you move the component wiring out of the constructor and into a onWire() method. Now, whenever the hierarchy/parent changes onWire() gets invoked. So components with dynamic hierarchies get onWire() once per rendering whereas components with static hierarchies only have this method invoked once. Users can then remove isInitialized() so long as they invoke their methods from inside onWire(). Gili Eelco Hillenius wrote: >> How about a hybrid system? >> >> Is there a clear-cut way to know up-front which components have an >> immutable parent versus others that might require it to change during >> rendering time? If so, couldn't you require the use of constructors that >> take a parent for components whose parents are immutable and then for >> all other components use the add() paradigm? > > The largest problem with that would be that it would be inconsistent > for users. So apart from whether this is achievable, I wouldn't like > it as it would be too confusing. > > Eelco > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
