Hi all,
I have just found an annoying design flaw that prevents me from creating
components that need exactly say 2 child components (no more no less).  I
understand why the Components add() method is final, but the framework gives
me  no other option of enforcing exact number of children components leaving
the code wide open for misuse on certain components.

For example, I am creating my own FeedbackBorder that displays component
error messages directly under the component.  Each of these Feedbackborder
objects can only contain 1 component and 1 component only (dont want the
developer callling add() multiple times.  I cannot even wrap the Border
object because the FeedbackBorder object itself needs to extend from
Component in order to be added to a form.  This seems like a bad design not
being able to easily enforce rules around how many child components can be
part of a particular component. 

Please let me know your thoughts.

-- 
View this message in context: 
http://www.nabble.com/Components-final-add%28%29-method-a-flaw-by-design--tf3352685.html#a9323530
Sent from the Wicket - User mailing list archive at Nabble.com.


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

Reply via email to