Re: Posting A Form To NonWicket

2009-11-21 Thread bht
Balaji,

If I understand you correctly, you want that the browser is redirected
to the response of a post request to site B after the user only sent a
post request to site A.

This is really not a Wicket question.

Web browsers cannot be directed to respond like this unless you send a
page with your form with the action URL of site B, AND let JavaScript
post it, started from the body onload() event or similar. But the
users might not universally accept to post to another site without
having clicket a button. So you might as well include a button for
them to click.

If you don't feel comfortable with this solution, then as others
pointed out, you need to let the server app post to the other site.

But that may be messy again, because the response is not necessarily
suited to be read by a computer.

If nothing of the above appeals to you, and I wouldn't be surprised
about that, then you might want to reconsider how to exchange data
with the other site.

In any case, Wicket seems to support everything that can possibly be
asked for in this scenario. The details of it have been written in
previous responses.

Bernard

On Sat, 21 Nov 2009 14:15:08 -0800 (PST), you wrote:

>
>Thanks Igor. I'll give it a try. But the api doc says redirectrequesttarget
>will only redirect to an external url, but I would like to post the form,
>not just redirect.
>


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



Re: Posting A Form To NonWicket

2009-11-21 Thread Alex Objelean

You can use HttpClient for this.

Alex Objelean


chocba wrote:
> 
> Thanks Igor. I'll give it a try. But the api doc says
> redirectrequesttarget will only redirect to an external url, but I would
> like to post the form, not just redirect.
> 
> 
> igor.vaynberg wrote:
>> 
>> class myform extends form {
>>   protected void onsubmit() {
>>// do something
>>string url=
>> getrequestcycle().setrequesttarget(new
>> redirectrequesttarget(url));
>> }
>> }
>> 
>> -igor
>> 
>> On Sat, Nov 21, 2009 at 8:23 AM, chocba  wrote:
>>>
>>> No. Right now, I tried exactly the way you mentioned. I created a form
>>> element in javascript and add hidden fields to post the form. THe hidden
>>> fields are populated after extracting the values from wicket input
>>> elements.
>>> I'm concerned about the security since anyone could view source and  see
>>> the
>>> action url and try to post the form. Please let me know if any other
>>> alternative. Thanks.
>>>
>>>
>>> Edward Zarecor-2 wrote:

 Is there a requirement to process the data in any way before
 submitting to the remote application?  Why wouldn't you just use an
 HTML form with the appropriate action pointing to the remote host?
 Wicket may not need to know about this form.

 Ed.


 On Fri, Nov 20, 2009 at 12:14 PM, Balaji C  wrote:
> I've a wicket form with input elements. I would like to post this form
> to
> a
> non-wicket url. Is it possible to post this form from submit event of
> wicket
> button? I google and couldn't find any clear solution. Any help is
> appreciated. If any other alternative, please let me know. Thanks.
>

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



>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26458059.html
>>> Sent from the Wicket - User 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
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26460913.html
Sent from the Wicket - User 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: Posting A Form To NonWicket

2009-11-21 Thread chocba

Thanks Igor. I'll give it a try. But the api doc says redirectrequesttarget
will only redirect to an external url, but I would like to post the form,
not just redirect.


igor.vaynberg wrote:
> 
> class myform extends form {
>   protected void onsubmit() {
>// do something
>string url=
> getrequestcycle().setrequesttarget(new
> redirectrequesttarget(url));
> }
> }
> 
> -igor
> 
> On Sat, Nov 21, 2009 at 8:23 AM, chocba  wrote:
>>
>> No. Right now, I tried exactly the way you mentioned. I created a form
>> element in javascript and add hidden fields to post the form. THe hidden
>> fields are populated after extracting the values from wicket input
>> elements.
>> I'm concerned about the security since anyone could view source and  see
>> the
>> action url and try to post the form. Please let me know if any other
>> alternative. Thanks.
>>
>>
>> Edward Zarecor-2 wrote:
>>>
>>> Is there a requirement to process the data in any way before
>>> submitting to the remote application?  Why wouldn't you just use an
>>> HTML form with the appropriate action pointing to the remote host?
>>> Wicket may not need to know about this form.
>>>
>>> Ed.
>>>
>>>
>>> On Fri, Nov 20, 2009 at 12:14 PM, Balaji C  wrote:
 I've a wicket form with input elements. I would like to post this form
 to
 a
 non-wicket url. Is it possible to post this form from submit event of
 wicket
 button? I google and couldn't find any clear solution. Any help is
 appreciated. If any other alternative, please let me know. Thanks.

>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26458059.html
>> Sent from the Wicket - User 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
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26460884.html
Sent from the Wicket - User 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: Posting A Form To NonWicket

2009-11-21 Thread Igor Vaynberg
class myform extends form {
  protected void onsubmit() {
   // do something
   string url=
getrequestcycle().setrequesttarget(new redirectrequesttarget(url));
}
}

-igor

On Sat, Nov 21, 2009 at 8:23 AM, chocba  wrote:
>
> No. Right now, I tried exactly the way you mentioned. I created a form
> element in javascript and add hidden fields to post the form. THe hidden
> fields are populated after extracting the values from wicket input elements.
> I'm concerned about the security since anyone could view source and  see the
> action url and try to post the form. Please let me know if any other
> alternative. Thanks.
>
>
> Edward Zarecor-2 wrote:
>>
>> Is there a requirement to process the data in any way before
>> submitting to the remote application?  Why wouldn't you just use an
>> HTML form with the appropriate action pointing to the remote host?
>> Wicket may not need to know about this form.
>>
>> Ed.
>>
>>
>> On Fri, Nov 20, 2009 at 12:14 PM, Balaji C  wrote:
>>> I've a wicket form with input elements. I would like to post this form to
>>> a
>>> non-wicket url. Is it possible to post this form from submit event of
>>> wicket
>>> button? I google and couldn't find any clear solution. Any help is
>>> appreciated. If any other alternative, please let me know. Thanks.
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>>
>
> --
> View this message in context: 
> http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26458059.html
> Sent from the Wicket - User 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: Posting A Form To NonWicket

2009-11-21 Thread Alex Rass
> I'm concerned about the security since anyone could view source and  see
the action url and try to post the form. Please let me know if any other
alternative. Thanks.

Well, if you do it on backend (through code) - no one knows what's going on
- they are just submitting a form to YOUR server.

Not sure what BIRT is. Hope it's not important.
Well, timeline looks like this:
Client hits Submit on WicketForm1
WicketForm1.onSumbit() is launched (or action you associated with the
WicketForm1.formbutton).
In onSumbit, you take all your values, and you take apache-http-commons and
you use it to POST data to your TargetServer's form. Then read the reply
(it's a 1-shot deal. You post - it replies back with a page), parse it up,
extract whatever stuff you need (hope it d/n change often on you).
Then you can populate a WicketForm1.label or something with results from
what you parsed out (you can tell label to not change html). And screen is
returned to a Client with results.  You can also redirect to appropriate
page instead (bunch of redirect options available in wicket)

Hope this helps.

-Original Message-
From: chocba [mailto:cho...@gmail.com] 
Sent: Saturday, November 21, 2009 11:16 AM
To: users@wicket.apache.org
Subject: RE: Posting A Form To NonWicket


Basically, my form will post to an action url pointing to BIRT viewer, a web
appplication of BIRT. If I use httpcommons, how will I get the web content
in to the same window from where I'm posting the form. Please let me know.
Thanks for the response.


Alex Rass wrote:
> 
> You could write something on the server end (or your wicket app) that
> would
> do it for you.
> Just use apache http commons or write your own post code. Easy stuff (open
> socket, couple commands, dump input, close socket).
> 
> It can even get back to the user with error codes from the other server
> etc
> if you wanna be spiffy.
> 
> 
> -Original Message-
> From: Balaji C [mailto:cho...@gmail.com] 
> Sent: Friday, November 20, 2009 12:15 PM
> To: users@wicket.apache.org
> Subject: Posting A Form To NonWicket
> 
> I've a wicket form with input elements. I would like to post this form to
> a
> non-wicket url. Is it possible to post this form from submit event of
> wicket
> button? I google and couldn't find any clear solution. Any help is
> appreciated. If any other alternative, please let me know. Thanks.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context:
http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26457990.html
Sent from the Wicket - User 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: Posting A Form To NonWicket

2009-11-21 Thread chocba

No. Right now, I tried exactly the way you mentioned. I created a form
element in javascript and add hidden fields to post the form. THe hidden
fields are populated after extracting the values from wicket input elements.
I'm concerned about the security since anyone could view source and  see the
action url and try to post the form. Please let me know if any other
alternative. Thanks.


Edward Zarecor-2 wrote:
> 
> Is there a requirement to process the data in any way before
> submitting to the remote application?  Why wouldn't you just use an
> HTML form with the appropriate action pointing to the remote host?
> Wicket may not need to know about this form.
> 
> Ed.
> 
> 
> On Fri, Nov 20, 2009 at 12:14 PM, Balaji C  wrote:
>> I've a wicket form with input elements. I would like to post this form to
>> a
>> non-wicket url. Is it possible to post this form from submit event of
>> wicket
>> button? I google and couldn't find any clear solution. Any help is
>> appreciated. If any other alternative, please let me know. Thanks.
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26458059.html
Sent from the Wicket - User 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: Posting A Form To NonWicket

2009-11-21 Thread chocba

Basically, my form will post to an action url pointing to BIRT viewer, a web
appplication of BIRT. If I use httpcommons, how will I get the web content
in to the same window from where I'm posting the form. Please let me know.
Thanks for the response.


Alex Rass wrote:
> 
> You could write something on the server end (or your wicket app) that
> would
> do it for you.
> Just use apache http commons or write your own post code. Easy stuff (open
> socket, couple commands, dump input, close socket).
> 
> It can even get back to the user with error codes from the other server
> etc
> if you wanna be spiffy.
> 
> 
> -Original Message-
> From: Balaji C [mailto:cho...@gmail.com] 
> Sent: Friday, November 20, 2009 12:15 PM
> To: users@wicket.apache.org
> Subject: Posting A Form To NonWicket
> 
> I've a wicket form with input elements. I would like to post this form to
> a
> non-wicket url. Is it possible to post this form from submit event of
> wicket
> button? I google and couldn't find any clear solution. Any help is
> appreciated. If any other alternative, please let me know. Thanks.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Posting-A-Form-To-NonWicket-tp26447615p26457990.html
Sent from the Wicket - User 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: Posting A Form To NonWicket

2009-11-20 Thread Jeremy Thomerson
http://www.google.co.uk/search?q=nabble+wicket+posting+form+external+site
http://old.nabble.com/post-a-form-to-external-website-td25506726.html

--
Jeremy Thomerson
http://www.wickettraining.com



On Fri, Nov 20, 2009 at 11:14 AM, Balaji C  wrote:

> I've a wicket form with input elements. I would like to post this form to a
> non-wicket url. Is it possible to post this form from submit event of
> wicket
> button? I google and couldn't find any clear solution. Any help is
> appreciated. If any other alternative, please let me know. Thanks.
>


RE: Posting A Form To NonWicket

2009-11-20 Thread Alex Rass
You could write something on the server end (or your wicket app) that would
do it for you.
Just use apache http commons or write your own post code. Easy stuff (open
socket, couple commands, dump input, close socket).

It can even get back to the user with error codes from the other server etc
if you wanna be spiffy.


-Original Message-
From: Balaji C [mailto:cho...@gmail.com] 
Sent: Friday, November 20, 2009 12:15 PM
To: users@wicket.apache.org
Subject: Posting A Form To NonWicket

I've a wicket form with input elements. I would like to post this form to a
non-wicket url. Is it possible to post this form from submit event of wicket
button? I google and couldn't find any clear solution. Any help is
appreciated. If any other alternative, please let me know. Thanks.


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



Re: Posting A Form To NonWicket

2009-11-20 Thread Edward Zarecor
Is there a requirement to process the data in any way before
submitting to the remote application?  Why wouldn't you just use an
HTML form with the appropriate action pointing to the remote host?
Wicket may not need to know about this form.

Ed.


On Fri, Nov 20, 2009 at 12:14 PM, Balaji C  wrote:
> I've a wicket form with input elements. I would like to post this form to a
> non-wicket url. Is it possible to post this form from submit event of wicket
> button? I google and couldn't find any clear solution. Any help is
> appreciated. If any other alternative, please let me know. Thanks.
>

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