Hello,

How can I add a SimpleFormComponentLabel for an
org.apache.wicket.extensions.yui.calendar.DateField ?

The problem is that the SimpleFormComponentLabel uses the markupid of
the DateField itself
instead of the markupid of the nested DateTextField.

This code

    DateField departure = new DateField("departureDate");
    departure.setLabel(new Model<String>("Departure"));
    form.add(departure);
    form.add(new SimpleFormComponentLabel("departureLabel", departure));

results in the following html:

    <label for="departureDatee">Departure</label>
    <span id="departureDatee" name="departureDate">
      <span style="white-space: nowrap;">
      <input id="dateb" name="departureDate:date" size="8" type="text"
value=""/>
      <span class="yui-skin-sam">...

while the first line should be

    <label for="dateb">Departure</label>

But DateField doesn't give me access to the markupid of it's nested
DateTextField.

Any ideas how to solve this elegantly ?

Maarten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to