On Wed, 09 Mar 2005 20:06:31 -0800, Jonathan Locke wrote:
>does this really have anything to do with wicket? isn't this a
>completely generic utility class for working with markup? if so, it
>belongs in wicket.util.markup or something...
>
>what exactly do you want this class to do?
All I want it to do is allow the user to construct a Unit
type+value (in one object) and pass it into my component. For example,
for my border, users get to specify the padding or background color. In
both cases, I would prefer to only accept strong-typed objects that
validate that the value is legal. Validation should occur within the
constructor of the unit class, not within every component that accepts
said units. For size units (size as pixels, percentange) validation
occurs automatically simply by the fact that you force users to
initialize the class with an integer and a unit-type. For things like
HTML color codes, you'd do some sort of validation to make sure the
specified color is valid or allow users to initialize them using red,
green, blue integers instead of the hex syntax used by HTML...
You are right these probably belong in wicket.util, but to a
certain degree I feel that they are HTML-specific and if Wicket does
other types of markups in the future we would be polluting the
wicket.util namespace.
Gili
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop