This is so crap People don't see links as containers.. they could be but for 99% of the cases they are not used like this Yes we let them do that because we say that you have to make a label for that. But again it is completely component oriented what i say... I see the label as a property of the link!! How much more component oriented can that be????? It is and will always be in my eyes the display value of a link.
I dislike a complete separate stack of links for that just label. That just sucks big time. Just one simple method getLabel() on the base link. Then i and loads of others can override that and return the link. If we still notice child components in it we throw an error. And adding an extra label for every link is maybe cheap but not that cheap as you want it to be i have seen sessions dumps of pages with 700KB now and if you see what components take the most then it is almost always labels. Because those are used all over the place. Maybe i just should change this: public abstract class AbstractLink<T> extends WebMarkupContainer<T> into this: public abstract class AbstractLink<T> extends WebComponent<T> :) johan On 10/26/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
On 10/25/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > > > we have a link component - it serves as a container for other > components. > > if you want to display something inside that component you have to add > > another component to do that - eg a label. > > Sometimes little things make a big difference. I only have to get back > to SimpleAttributeModifier vs AttributeModifier to 'prove' that, as > that only saved what, the creation of a model. and i will take the fall for that one. in retrospect i shouldve put it in extensions. maybe i should fix that mistake in 2.0? but SimpleAM is a bit different story. another thing that bugged me about AttributeModifier was that boolean in the constructor which i could never remember which way it worked - in 2.0 we can make it an enum. so SimpleAM was a bit more then just convinience - it really was a simpler version of the full attributemodifier. it also lacks a lot of the methods that the full version has. its like dataview - you can argue that is a convinience because you can do the same with a listview - but its just not the case. > i am for adding convinience subclasses for this. yes not as pretty but it > is > > how component oriented frameworks work. > > Yeah, that's probably the best option then. this would be my vote. -Igor Eelco >
