You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Edi <ed...@yahoo.com> on 2007/12/03 15:54:55 UTC
Wicket Modal Window
I have displayed a Wicket modal window(pop-up).
it contains one text box with button.
I have done date validation, if i give wrong date in text box, I have set
the message in label.
But label have not displayed.
Please explain...
--
View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14131480
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket Modal Window
Posted by michalb_cz <mb...@atlas.cz>.
could you attach your code?
--
View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14151291
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket Modal Window
Posted by Edi <ed...@yahoo.com>.
I am using
AjaxSubmitLink saveButton = new AjaxSubmitLink("saveButton", this)
{
and I have set
setOutputMarkupId(true); and
setEscapeModelStrings(false);
But I am not able to display the message.
Could you tell me the reasons for not displaying the message in script?
michalb_cz wrote:
>
>
> I had similar problem. I changed Button to AjaxButton and override
> onError()
> and everything was alright. Note that you must call
> setOutputMarkupId(true) on
> components which use in another ajax-enabled component (like AjaxButton
> is..).
> In case below I must call feedback.setOutputMarkupId(true) where feedback
> =
> new Feedback("<feedback's wicket id>").
>
> like this:
>
>
> Button btnOk = new AjaxButton("btnOk", form) {
>
> @Override
> protected void onSubmit(AjaxRequestTarget target, Form form) {
> // something to do, when everything is ok and valid...
> }
>
> @Override
> protected void onError(AjaxRequestTarget target, Form form) {
> target.addComponent(feedback); // show feedback message in feedback
> component
> }
> };
>
> This works ok.
>
>
> Edi wrote:
>>
>>
>> I have displayed a Wicket modal window(pop-up).
>>
>> it contains one text box with button.
>>
>> I have done date validation, if i give wrong date in text box, I have set
>> the message in label.
>>
>> But label have not displayed.
>>
>> Please explain...
>>
>
>
--
View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14148748
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket Modal Window
Posted by michalb_cz <mb...@atlas.cz>.
I had similar problem. I changed Button to AjaxButton and override onError()
and everything was alright. Note that you must call setOutputMarkupId(true)
on
components which use in another ajax-enabled component (like AjaxButton
is..).
In case below I must call feedback.setOutputMarkupId(true) where feedback =
new Feedback("<feedback's wicket id>").
like this:
Button btnOk = new AjaxButton("btnOk", form) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form form) {
// something to do, when everything is ok and valid...
}
@Override
protected void onError(AjaxRequestTarget target, Form form) {
target.addComponent(feedback); // show feedback message in feedback
component
}
};
This works ok.
Edi wrote:
>
>
> I have displayed a Wicket modal window(pop-up).
>
> it contains one text box with button.
>
> I have done date validation, if i give wrong date in text box, I have set
> the message in label.
>
> But label have not displayed.
>
> Please explain...
>
--
View this message in context: http://www.nabble.com/Wicket-Modal-Window-tf4937030.html#a14147964
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org