You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by wch2001 <wc...@hotmail.com> on 2008/06/30 09:15:22 UTC
Help me with FormComponentFeedbackIndicator
Hi all,
I am new for wicket, hopefully can get some help from you. thanks in
advance.
Now i have some problems about FormComponentFeedbackIndicator.
in Java,
TextField usernameText = (TextField) new
TextField("username").setPersistent(disableAutoLogin).setOutputMarkupId(false);
usernameText.setRequired(true);
add(usernameText);
FormComponentFeedbackIndicator fd = new
FormComponentFeedbackIndicator("usernameTextFeedback");
fd.setVisible(true);
fd.setIndicatorFor(usernameText);
add(fd);
And in its html:
<tr>
<td> </td>
<td>Login name</td>
<td><input name="textfield" type="text" class="input"
id="textfield" wicket:id="username" /></td>
</tr>
However, when the username is empty. it only show the "*", but not the error
msg.
HOw can i solve the problem?
thanks,
WCh
--
View this message in context: http://www.nabble.com/Help-me-with-FormComponentFeedbackIndicator-tp18189925p18189925.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.
Re: Help me with FormComponentFeedbackIndicator
Posted by Igor Vaynberg <ig...@gmail.com>.
see ComponentFeedbackPanel
-igor
On Mon, Jun 30, 2008 at 12:15 AM, wch2001 <wc...@hotmail.com> wrote:
>
> Hi all,
>
> I am new for wicket, hopefully can get some help from you. thanks in
> advance.
>
> Now i have some problems about FormComponentFeedbackIndicator.
> in Java,
>
> TextField usernameText = (TextField) new
> TextField("username").setPersistent(disableAutoLogin).setOutputMarkupId(false);
> usernameText.setRequired(true);
> add(usernameText);
> FormComponentFeedbackIndicator fd = new
> FormComponentFeedbackIndicator("usernameTextFeedback");
> fd.setVisible(true);
> fd.setIndicatorFor(usernameText);
> add(fd);
>
>
> And in its html:
>
> <tr>
> <td> </td>
> <td>Login name</td>
> <td><input name="textfield" type="text" class="input"
> id="textfield" wicket:id="username" /></td>
> </tr>
>
>
> However, when the username is empty. it only show the "*", but not the error
> msg.
>
> HOw can i solve the problem?
>
> thanks,
>
> WCh
> --
> View this message in context: http://www.nabble.com/Help-me-with-FormComponentFeedbackIndicator-tp18189925p18189925.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>
>