in your case (appending star to the label) i would do the following:
// html
<label wicket:id="inputLabel">[label]</label><span
wicket:id="inputIndicator">*</span><input type="text" wicket:id="input"/>

// java
TextField input = new TextField("input", new Model(""));
FormComponentFeedbackIndicator inputIndicator = new
FormComponentFeedbackIndicator("inputIndicator");
inputIndicator.setIndicatorFor(input);

notice:
the "*" between the span tags is not used as the actual output but rather
for a preview if you open the .html file in a browser

hth,
  gerolf

On 9/25/07, Clay Lehman <[EMAIL PROTECTED]> wrote:
>
> Hey everyone,
>
>
>
> I am pretty new to Wicket, and I am having a hard time figuring out the
> best way to provide feedback if a form's validation fails.
>
>
>
> I want 2 things to be visible if there is a validation error:
>
> 1)      list the validation error messages at the top of the form
>
> 2)      red stars by the Label of each input item that caused an error.
>
>
>
> I have found examples using a FormComponentFeedbackBorder, but that just
> appends a red start to the end of the input field (rather than the
> label.  It looks like FormComponentFeedbackIndicator might do what I
> need based on the javadocs, but I have not been able to find an example
> using this, and I am having trouble getting it to work.
>
>
>
> Does anybody have some advice on the best way to achieve this type of
> form feedback?
>
>
>
> Thanks!!
>
> -Clay
>
>
>
>

Reply via email to