call radiogroup.setlabel() -igor
On Mon, Oct 19, 2009 at 10:55 AM, Tomás Rossi <[email protected]> wrote: > Hi, > > We are building a simple survey with Wicket. > > Essentially, we have a lot of RadioGroup components repeated all over the > main survey page. Those components are in fact the same thing (to score some > item), but obviously, they reffer to different subjects/groups. For example: > > Are you happy with X? > > In doing job A: ( ) very happy > ( ) not so much > ( ) sucks > > In doing job B: ( ) very happy > ( ) not so much > ( ) sucks > > Are you happy with Y? > > In doing job A: ( ) very happy > ( ) not so much > ( ) sucks > .... > > So we decided to make a reusable component (a panel) for the score input, > and repeat it as much as we needed. > > We also have our survey page with a feedback panel and a form. Inside that > form we include the panel many times, one for each item. But the > required-field-feedback shows the same wicket:id for a bunch of fields, > which isn't what we want. We need a unique wicket:id for each instance of > the score input. > > E.G. > > Our Panel is like this: > > ... > <tr> > <wicket:container wicket:id="score"> > <td><input type="radio" wicket:id="optGood"/></td> > <td><input type="radio" wicket:id="optNotSoMuch"/></td> > <td><input type="radio" wicket:id="optSucks"/></td> > </wicket:container> > </tr> > ... > > And our feedback is like this: > > * Field 'score' is required. > * Field 'score' is required. > * Field 'score' is required. > * Field 'score' is required. > > How can I solve this? > > Thanks > Tom; > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
