Re: Ajax Form Submit via jquery plugin / javascript

2014-07-07 Thread vp143
I wasnt able to get anything working... I tried adding wicket:id via jquery
to the plugin button but wicket did not recognise it.

However, I had been using wicket 6.7.0 up until then. 
I see that AjaxWizardButtonBar within the Wizard functionality has been
added in a latter wicket version which I had not found when researching.
This solved my problems perfectly!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Form-Submit-via-jquery-plugin-javascript-tp4666170p4666457.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax Form Submit via jquery plugin / javascript

2014-06-17 Thread Paul Bors
Instead of calling form.submit() from your jQuery, call 
${‘#someButtonID’}.click() or whatever, then register your event under the 
button’s onClick in Wicket.
You can have that button shared, or you can write your own Behavior to submit 
the form via a hidden button (i.e.: X and Y coordinates set to negative so it’s 
way off the page as well as its display property set to hidden).

Those are just couple of ideas.

On Jun 13, 2014, at 11:45 AM, vp143 vishal.po...@cipriati.co.uk wrote:

 Paul Bors wrote
 http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.html
 
 Ajax event behavior that submits a form via ajax when the event it is
 attached to, is invoked.”
 
 You’re attaching the submit event so who fires that?
 
 You are right, I missed that but I am still a little stumped on what to do.
 
 I am assuming the form gets submitted when calling 
 jQuery(#selectionForm).submit()
 
 I was assuming this part
 add(new AjaxFormSubmitBehavior(this, onsubmit) { 
 would be waiting for the submit of the form and then get executed.
 
 Have I understood correctly?
 What am I missing?
 
 Regards
 Vishal
 
 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/Ajax-Form-Submit-via-jquery-plugin-javascript-tp4666170p4666257.html
 Sent from the Users forum mailing list archive at Nabble.com.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax Form Submit via jquery plugin / javascript

2014-06-13 Thread vp143
Paul Bors wrote
 http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.html
 
 Ajax event behavior that submits a form via ajax when the event it is
 attached to, is invoked.”
 
 You’re attaching the submit event so who fires that?

You are right, I missed that but I am still a little stumped on what to do.

I am assuming the form gets submitted when calling 
jQuery(#selectionForm).submit()

I was assuming this part
add(new AjaxFormSubmitBehavior(this, onsubmit) { 
would be waiting for the submit of the form and then get executed.

Have I understood correctly?
What am I missing?

Regards
Vishal

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Form-Submit-via-jquery-plugin-javascript-tp4666170p4666257.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax Form Submit via jquery plugin / javascript

2014-06-11 Thread Martin Grigorov
Hi,



On Tue, Jun 10, 2014 at 11:28 AM, Vishal Popat vishal.po...@cipriati.co.uk
wrote:

 Hi,

 I am using a jquery steps plugin which has the ability to change options.
 One of the options I have is:
 onFinished: function (event, currentIndex) {
 var form = document.forms[selectionForm];
 form.submit();


Try with:
jQuery(#selectionForm).trigger(submit); // or
jQuery(#selectionForm).submit() which is a shortcut


 },

 The javascript above submits the associated form. However I would like to
 submit the form via ajax. Normally I would use an AjaxButton for ajax
 processing but in this case I need something else. I have tried

 selectionForm.add(new AjaxFormSubmitBehavior(selectionForm, onsubmit) {
 @Override
 protected void onSubmit(AjaxRequestTarget target) {
 log.debug(*** ajax form submit);
 }
 }

 but this does not seem to work as the debug does not get outputted.
 Additionally, the onSubmit Form version is called. Is there a way to stop
 this?

 Let me know if should be using something else instead.

 Regards
 Vishal
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Ajax Form Submit via jquery plugin / javascript

2014-06-10 Thread Vishal Popat
Hi,

I am using a jquery steps plugin which has the ability to change options.
One of the options I have is:
onFinished: function (event, currentIndex) {
var form = document.forms[selectionForm];
form.submit();
},

The javascript above submits the associated form. However I would like to 
submit the form via ajax. Normally I would use an AjaxButton for ajax 
processing but in this case I need something else. I have tried

selectionForm.add(new AjaxFormSubmitBehavior(selectionForm, onsubmit) {
@Override
protected void onSubmit(AjaxRequestTarget target) {
log.debug(*** ajax form submit);
}
}

but this does not seem to work as the debug does not get outputted.
Additionally, the onSubmit Form version is called. Is there a way to stop this?

Let me know if should be using something else instead.

Regards
Vishal
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Ajax Form Submit via jquery plugin / javascript

2014-06-10 Thread Paul Bors
http://ci.apache.org/projects/wicket/apidocs/6.0.x/org/apache/wicket/ajax/form/AjaxFormSubmitBehavior.html

Ajax event behavior that submits a form via ajax when the event it is attached 
to, is invoked.”

You’re attaching the submit event so who fires that?

On Jun 10, 2014, at 5:28 AM, Vishal Popat vishal.po...@cipriati.co.uk wrote:

 Hi,
 
 I am using a jquery steps plugin which has the ability to change options.
 One of the options I have is:
   onFinished: function (event, currentIndex) {
var form = document.forms[selectionForm];
form.submit();
},
 
 The javascript above submits the associated form. However I would like to 
 submit the form via ajax. Normally I would use an AjaxButton for ajax 
 processing but in this case I need something else. I have tried
 
 selectionForm.add(new AjaxFormSubmitBehavior(selectionForm, onsubmit) {
   @Override
   protected void onSubmit(AjaxRequestTarget target) {
   log.debug(*** ajax form submit);
   }
 }
 
 but this does not seem to work as the debug does not get outputted.
 Additionally, the onSubmit Form version is called. Is there a way to stop 
 this?
 
 Let me know if should be using something else instead.
 
 Regards
 Vishal
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org