Re: [Wicket-user] Ajax Problem with form submit

2007-07-06 Thread Conglun Yao

Thanks

form wicket:id=confirmForm
 spaninput id=submit type=submit value=Confirm/span
 spaninput wicket:id=cancel type=submit value=Cancel/span
 /form

public class RequestConfirm extends WebPage {
   private ConfirmForm confirmForm;

   public RequestConfirm(final PageParameters pps) {
   Border border = new RMABorder(rmaBorder);
   add(border);
   confirmForm = new ConfirmForm(confirmForm);
   border.add(confirmForm);
   }

   class ConfirmForm extends Form {
   public ConfirmForm(String id) {
   super(id);
   Button cancel = new Button(cancel){
   protected void onSubmit() {
   ((RMASession) getSession()).setRequest(null);

setResponsePage(Cancel.class);
   }
   };
   cancel.setDefaultFormProcessing(false);
   add(cancel);
   }

   public final void onSubmit() {
   String email = SecurityContextHolder.getContext()
   .getAuthentication().getName();

   Request r = ((RMAApplication)
getApplication()).getRMAService().addRequest(
   email, getRMARequest());

   ((RMASession) getSession()).setRequest(null);

   PageParameters pps = new PageParameters();
   pps.add(msg, RMA with ID (+ r.getId() +) Submit success!);

   setResponsePage(Success.class, pps);

   }

   }

   public List getItems() {
   List list = new ArrayList(((RMASession) getSession()).getRequest()
   .getItems());
   return list;
   }

   public Request getRMARequest() {
   return ((RMASession) getSession()).getRequest();
   }
}
On 7/6/07, Timo Rantalaiho [EMAIL PROTECTED] wrote:


On Fri, 06 Jul 2007, Conglun Yao wrote:
 'Object expected' in html code happens when

 I first submit a form (no matther it is submitted from ajax button or
 normal button),

 then click the page link ( there are ajax components in this page)

 finally I click the ajax component,   error happens.

Please show us the code and the error (stack trace if any,
and the full error message).

- Timo

--
Timo Rantalaiho
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Ajax Problem with form submit

2007-07-05 Thread Conglun Yao

Dear all,

I have met such a headache problem, when trying to use wicket's ajax in my
project.

I'm using wicket 1.2.6.

'Object expected' in html code happens when

I first submit a form (no matther it is submitted from ajax button or
normal button),

then click the page link ( there are ajax components in this page)

finally I click the ajax component,   error happens.

Thanks for any help.


Regards,

conglun
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Ajax Problem with form submit

2007-07-05 Thread Timo Rantalaiho
On Fri, 06 Jul 2007, Conglun Yao wrote:
 'Object expected' in html code happens when
 
 I first submit a form (no matther it is submitted from ajax button or
 normal button),
 
 then click the page link ( there are ajax components in this page)
 
 finally I click the ajax component,   error happens.

Please show us the code and the error (stack trace if any,
and the full error message).

- Timo

-- 
Timo Rantalaiho   
Reaktor Innovations OyURL: http://www.ri.fi/ 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user