Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread Martijn Dashorst
On 5/22/07, severian <[EMAIL PROTECTED]> wrote: > specifically not by IE6 (I'd be delighted if I was wrong about this). Not having touched IE in over a year I am of no use in this regard :). > Which is why I've been trying to find a maintainable Java solution... In the very least I would make it

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread severian
Martijn In principle, I agree. In practise, however, I understand that the css selector that lets you append text is not supported by all browsers, and specifically not by IE6 (I'd be delighted if I was wrong about this). Which is why I've been trying to find a maintainable Java solution... Se

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread Martijn Dashorst
This seems more like a stylesheet problem than a text generation problem. Do /you/ need to change the way things are presented or your designer? In stylesheets you can add a * before or after some markup tag, or make the border red, or have a line under it, or make the text larger. Martijn On 5/

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread Johan Compagner
in 1.3 you could if you want use a IComponentBorder for that. johan On 5/22/07, severian <[EMAIL PROTECTED]> wrote: OK Erik, it seems like the following works: class MyContainer extends WebMarkupContainer { public MyContainer(String id) { super(id); } @Ov

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread Erik van Oosten
Well, actually, I like that solution. Erik. severian wrote: > > OK Erik, it seems like the following works: > > class MyContainer extends WebMarkupContainer { > public MyContainer(String id) { > super(id); > } > > @Override > protected void on

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread severian
OK Erik, it seems like the following works: class MyContainer extends WebMarkupContainer { public MyContainer(String id) { super(id); } @Override protected void onComponentTagBody(final MarkupStream markupStream, final ComponentTag openTag) {

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread severian
Thanks again Erik. Using WebMarkupContainer rather than Label certainly seems to help in terms of retaining the template text. Butusing your specified markup: Default Label Is there a way (without further altering the markup) to end up with output which looks like: Default Label* I'd be ha

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread Erik van Oosten
That should have been: template: default value Result: default value Erik. Erik van Oosten wrote: > > Ah! Well, that's easy. Don't add a label, but a AtributeBehavior (or one > of its subclasses): > > template: > default val

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread Erik van Oosten
Ah! Well, that's easy. Don't add a label, but a AtributeBehavior (or one of its subclasses): template: default value Java: add(new WebMarkupContainer("text").add(new AttributeAppender("class", new Model("red_border"), " "))); Result: default value I have no knowledge of a way to access the tex

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread severian
Thanks for that Erik, I may well have to go with that if there are no other suggestions. But I'm still keen to learn if I can keep the Label text once I add a "wicket:id" attribute to the label markup. I may, for example, have to change (later in development) the label-marking mechanism. So, in

Re: [Wicket-user] Accessing Template Value of a Label

2007-05-22 Thread Erik van Oosten
You can change the template to: DefaultValue * In the java code you do something like: add(new WebMarkupContainer("marked").setVisible(condition)); Regards, Erik. severian wrote: > > I'm not sure that what I describe here is possible, but if it is, I'd be > grateful if someone could po