I have to add that its all done inside a modal window.

<div class="addicon"> <img src="images/add-ico.gif" border="0">&nbsp;<a
href="#"><a
href="#TB_inline?height=605&amp;width=820&amp;inlineId=CreateContactContent&amp;modal=true"
title="" class="thickbox">Create Contact</a></a></div>

On Tue, Jan 26, 2010 at 2:26 PM, Anna Simbirtsev <asimbirt...@gmail.com>wrote:

> I changed it to use AjaxButton instead of AjaxFormSubmitBehavior and it
> still does not see the values.
>
> <div class="submitarea"><input type="button"
> wicket:id="contact_submitbutton" class="button"/>SUBMIT</div>
>
> FeedbackPanel contact_feedback = new FeedbackPanel("popup_feedback", new
> ContainerFeedbackMessageFilter(contact_form));
>
> contact_feedback.setOutputMarkupId(true);
>
> contact_form.add(new RequiredTextField<String>("contact_id"));
>
> contact_form.add(new AjaxButton("contact_submitbutton") {
>
>             private static final long serialVersionUID =
> 4192112499051970470L;
>
>             @Override
>             protected void onSubmit(AjaxRequestTarget target, Form form)
>             {
>                 System.out.println("Inside contact link's onSubmit is
> called:" + contact_data.getContactId());
>
>             }
>
>             @SuppressWarnings("unchecked")
>             @Override
>             protected void onError(AjaxRequestTarget target, Form form)
>             {
>                 System.out.println("Inside contact link's onError is
> called.");
>                 target.addComponent(contact_feedback);
>             }
>         });
>
>
> On Tue, Jan 26, 2010 at 2:05 PM, Pedro Santos <pedros...@gmail.com> wrote:
>
>> Even using AjaxButton? Can you send the code?
>>
>> On Tue, Jan 26, 2010 at 4:55 PM, Anna Simbirtsev <asimbirt...@gmail.com
>> >wrote:
>>
>> > Thanks, now in my feedback it displays errors that all required fields
>> are
>> > empty. But the problem is, that even if I put the values in those fields
>> it
>> > still does not see them and gives the same errors in the feedback panel.
>> >
>> > On Tue, Jan 26, 2010 at 1:41 PM, Pedro Santos <pedros...@gmail.com>
>> wrote:
>> >
>> > > Take a look at the AjaxButton if you need an asynchronous submit, and
>> > > implement your onError handlers with:
>> > >
>> > > target.addComponent(
>> > myFeedbackPanelThatMabyWillShowSomeMessageIfGetUpdated
>> > > );
>> > >
>> > > On Tue, Jan 26, 2010 at 4:34 PM, Anna Simbirtsev <
>> asimbirt...@gmail.com
>> > > >wrote:
>> > >
>> > > > I have, but maybe its incorrect.
>> > > >
>> > > > <div wicket:id="popup_feedback" id="popup_feedback"></div>
>> > > >
>> > > > contact_form.add(new FeedbackPanel("popup_feedback", new
>> > > > ContainerFeedbackMessageFilter(contact_form) ));
>> > > >
>> > > > On Tue, Jan 26, 2010 at 1:32 PM, Pedro Santos <pedros...@gmail.com>
>> > > wrote:
>> > > >
>> > > > > Do you have an feedback panel on the model?  If don't, add one and
>> > see
>> > > if
>> > > > > your form don't pass in some validation like on required field.
>> > > > >
>> > > > > On Tue, Jan 26, 2010 at 4:07 PM, Anna Simbirtsev <
>> > > asimbirt...@gmail.com
>> > > > > >wrote:
>> > > > >
>> > > > > > Hello,
>> > > > > >
>> > > > > > I have a modal window that is used to create a contact and needs
>> to
>> > > > > submit
>> > > > > > data to the server once submit button is called.
>> > > > > >
>> > > > > > The submit button is defined as follows:
>> > > > > >
>> > > > > > <button wicket:id="contact_submitbutton"
>> > > type="submit">SUBMIT</button>
>> > > > > >
>> > > > > >
>> > > > > > contact_form.add(new Button("contact_submitbutton").add(new
>> > > > > > AjaxFormSubmitBehavior(contact_form, "onclick") {
>> > > > > >
>> > > > > >            private static final long serialVersionUID =
>> > > > > > 4192112499051970470L;
>> > > > > >
>> > > > > >            protected void onSubmit(AjaxRequestTarget target)
>> > > > > >            {
>> > > > > >                System.out.println("Inside contact link's
>> onSubmit
>> > is
>> > > > > > called" );
>> > > > > >
>> > > > > >            }
>> > > > > >
>> > > > > >            @Override
>> > > > > >            protected void onError(AjaxRequestTarget target)
>> > > > > >            {
>> > > > > >            }
>> > > > > >        }));
>> > > > > >
>> > > > > >
>> > > > > > But nothing happens when I click on the button.
>> > > > > >
>> > > > > > Thanks,
>> > > > > >
>> > > > > > Anna
>> > > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > --
>> > > > > Pedro Henrique Oliveira dos Santos
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > Anna Simbirtsev
>> > > > (416) 729-7331
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Pedro Henrique Oliveira dos Santos
>> > >
>> >
>> >
>> >
>> > --
>> > Anna Simbirtsev
>> > (416) 729-7331
>> >
>>
>>
>>
>> --
>> Pedro Henrique Oliveira dos Santos
>>
>
>
>
> --
> Anna Simbirtsev
> (416) 729-7331
>



-- 
Anna Simbirtsev
(416) 729-7331

Reply via email to