You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Am...@jhc.co.uk on 2008/10/21 11:25:15 UTC
Returning XML to JS
Hi,
What's the nice / correct way to do this in Wicket:
I have a client side bit of JS that looks something like
getData(URL);
It expects to get back an XML document like
<data>
<entry>foo</entry>
<entry>bar</entry>
</data>
On the wicket side, I want the Java object that spits back the XML to be
part of a component. This parent component will have supplied the URL in
question.
Any ideas how I should do this?
Thanks,
Ambrose Wheatcroft
Analyst / Programmer, JHC PLC
+44 (0)20 7367 6500
Re: How to submit form to external page sending parameters by post, please Help
Posted by Pablo Scagno <ps...@hotmail.com>.
Thanks for your response, I've used the second choice...it was very helpful
Bye
Pablo
--------------------------------------------------
From: "Jeremy Thomerson" <je...@wickettraining.com>
Sent: Tuesday, October 21, 2008 10:51 PM
To: <us...@wicket.apache.org>
Subject: Re: How to submit form to external page sending parameters by post,
please Help
> Perhaps one of the following:
>
> 1. Don't use wicket "Form" - use web markup containers of some sort and
> attribute modifiers to output a form that actually posts directly to the
> paypal site. (In other words - generate a real form with action=
> https://www.sandbox.paypal.com.....)
> 2. OR - if you need to post back into Wicket and then submit the
> information to Paypal - use an HTTP client like Commons to post
> programmatically. (See
> http://www.java2s.com/Code/Java/Apache-Common/HttppostmethodExample.htm
> for
> example)
>
> If you want your user to actually end up at the posted paypal page, as I
> suspect you do from your details below, I definitely think number one is
> what you need.
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
> On Tue, Oct 21, 2008 at 4:49 PM, Pablo Scagno <ps...@hotmail.com> wrote:
>
>> Hi, I'm trying to submit a form to Paypal but I don't know how I can do
>> this.
>> I have a wicket form with all the fields that I need to submit but when I
>> redirect the page to paypal I can't send the form fields. I can't put the
>> parameters in the querystring, I must send them by post.
>> This is my code to redirect in the button onSubmit() event
>> ....
>> RedirectPage redirectPage = new RedirectPage("
>> https://www.sandbox.paypal.com/cgi-bin/webscr");
>> setResponsePage(redirectPage);
>> ...
>>
>> Is there any way to send the values?
>>
>> My form must be wicket because It depends on a model...
>>
>> Thanks
>> Pablo
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: How to submit form to external page sending parameters by post, please Help
Posted by Jeremy Thomerson <je...@wickettraining.com>.
Perhaps one of the following:
1. Don't use wicket "Form" - use web markup containers of some sort and
attribute modifiers to output a form that actually posts directly to the
paypal site. (In other words - generate a real form with action=
https://www.sandbox.paypal.com.....)
2. OR - if you need to post back into Wicket and then submit the
information to Paypal - use an HTTP client like Commons to post
programmatically. (See
http://www.java2s.com/Code/Java/Apache-Common/HttppostmethodExample.htm for
example)
If you want your user to actually end up at the posted paypal page, as I
suspect you do from your details below, I definitely think number one is
what you need.
--
Jeremy Thomerson
http://www.wickettraining.com
On Tue, Oct 21, 2008 at 4:49 PM, Pablo Scagno <ps...@hotmail.com> wrote:
> Hi, I'm trying to submit a form to Paypal but I don't know how I can do
> this.
> I have a wicket form with all the fields that I need to submit but when I
> redirect the page to paypal I can't send the form fields. I can't put the
> parameters in the querystring, I must send them by post.
> This is my code to redirect in the button onSubmit() event
> ....
> RedirectPage redirectPage = new RedirectPage("
> https://www.sandbox.paypal.com/cgi-bin/webscr");
> setResponsePage(redirectPage);
> ...
>
> Is there any way to send the values?
>
> My form must be wicket because It depends on a model...
>
> Thanks
> Pablo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
How to submit form to external page sending parameters by post, please Help
Posted by Pablo Scagno <ps...@hotmail.com>.
Hi, I'm trying to submit a form to Paypal but I don't know how I can do
this.
I have a wicket form with all the fields that I need to submit but when I
redirect the page to paypal I can't send the form fields. I can't put the
parameters in the querystring, I must send them by post.
This is my code to redirect in the button onSubmit() event
....
RedirectPage redirectPage = new
RedirectPage("https://www.sandbox.paypal.com/cgi-bin/webscr");
setResponsePage(redirectPage);
...
Is there any way to send the values?
My form must be wicket because It depends on a model...
Thanks
Pablo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Returning XML to JS
Posted by Maarten Bosteels <mb...@gmail.com>.
for an example, see
http://www.nabble.com/linking-to-a-text-ResourceReference-td19753402.html
Maarten
On Tue, Oct 21, 2008 at 12:07 PM, Peter Ertl <pe...@gmx.net> wrote:
> have a look at XStream :-)
>
>
> Am 21.10.2008 um 11:25 schrieb Ambrose.Wheatcroft@jhc.co.uk:
>
>
> Hi,
>>
>> What's the nice / correct way to do this in Wicket:
>>
>> I have a client side bit of JS that looks something like
>>
>> getData(URL);
>>
>> It expects to get back an XML document like
>>
>> <data>
>> <entry>foo</entry>
>> <entry>bar</entry>
>> </data>
>>
>> On the wicket side, I want the Java object that spits back the XML to be
>> part of a component. This parent component will have supplied the URL in
>> question.
>>
>> Any ideas how I should do this?
>>
>> Thanks,
>>
>> Ambrose Wheatcroft
>> Analyst / Programmer, JHC PLC
>>
>> +44 (0)20 7367 6500
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Returning XML to JS
Posted by Peter Ertl <pe...@gmx.net>.
have a look at XStream :-)
Am 21.10.2008 um 11:25 schrieb Ambrose.Wheatcroft@jhc.co.uk:
> Hi,
>
> What's the nice / correct way to do this in Wicket:
>
> I have a client side bit of JS that looks something like
>
> getData(URL);
>
> It expects to get back an XML document like
>
> <data>
> <entry>foo</entry>
> <entry>bar</entry>
> </data>
>
> On the wicket side, I want the Java object that spits back the XML
> to be
> part of a component. This parent component will have supplied the
> URL in
> question.
>
> Any ideas how I should do this?
>
> Thanks,
>
> Ambrose Wheatcroft
> Analyst / Programmer, JHC PLC
>
> +44 (0)20 7367 6500
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org