[Wicket-user] Changing bgcolor for field+error component

2007-03-30 Thread Carlos Pita
Hi all, I need to show errors for form fields next to the fields themselves. I have tried with FormComponentFeedbackIndicator/Border, which just worked fine, but the fact is that I need to affect the background of both the field and its error message (for example, turning it to red) while these

Re: [Wicket-user] Changing bgcolor for field+error component

2007-03-30 Thread Eelco Hillenius
If you use borders, you can wrap the form components with elements for which you set the class or style attribute, and you can do this with CSS, right? Eelco On 3/30/07, Carlos Pita [EMAIL PROTECTED] wrote: Hi all, I need to show errors for form fields next to the fields themselves. I have

Re: [Wicket-user] Changing bgcolor for field+error component

2007-03-30 Thread Carlos Pita
Not sure if I understand you. Precisely what I want to do is to wrap the components (field+feedback... even the label) as you say, but depending on the feedback status I would need to: (i) show/hide the wrapper border or (ii) change its style attribute. I would like to do this programmatically,

Re: [Wicket-user] Changing bgcolor for field+error component

2007-03-30 Thread Igor Vaynberg
pseudocode class myfeedbackborder extends formcomponentfeedbackborder { public void onComponentTag(tag) { if (!getfeedbackmessages().isempty()) { tag.put(class,error); } } } div.error input { background-color:red;} -igor On 3/30/07, Carlos Pita [EMAIL PROTECTED] wrote: Not

Re: [Wicket-user] Changing bgcolor for field+error component

2007-03-30 Thread Carlos Pita
Thanks :). Every time I think I really catch up with how powerful wicket is, you show me I'm wrong. On 3/30/07, Igor Vaynberg [EMAIL PROTECTED] wrote: pseudocode class myfeedbackborder extends formcomponentfeedbackborder { public void onComponentTag(tag) { if