Re: Submit POST data with no callback

2018-04-11 Thread Matthew McLarty
The thing was that I actually needed to actually navigate to the target URL 
of the form post so a fetch/ajax/xmlhttprequest wouldn't have worked for me 
:\

On Wednesday, April 11, 2018 at 4:03:03 AM UTC-4, Kirill Prazdnikov wrote:
>
> What about JsInterop ?
> Use the new fetch or old school XMLHttpRequest  
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Submit POST data with no callback

2018-04-11 Thread Kirill Prazdnikov
What about JsInterop ?
Use the new fetch or old school XMLHttpRequest  

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Submit POST data with no callback

2018-04-04 Thread Matthew McLarty
Sorry it's taken me awhile to respond. I wanted to say thank you because 
this was the exact information I needed. Very much appreciated :)


On Friday, March 23, 2018 at 6:01:07 PM UTC-4, Slava Pankov wrote:
>
> For redirect you need: form.getElement(). 
> cast().setTarget("");
>
> On Thursday, March 22, 2018 at 7:26:54 AM UTC-7, Matthew McLarty wrote:
>>
>> Okay, for the record, this does not redirect the current page to the URL 
>> that is set to the action of the FormPanel. Any idea what I'm doing wrong?
>>
>> FormPanel form = new FormPanel();
>> form.setAction("
>> https://www.FAKEDOMAIN.com/my-account/order-complete.html;);
>> form.setHeight("1px");
>> form.setWidth("1px");
>> form.addStyleName(AppController.HIDDEN_CLASS);
>> 
>> Hidden transactionId = new Hidden();
>> transactionId.getElement().setAttribute("name", 
>> "transactionId");
>> transactionId.setValue(order.getOrder().getQuoteNumber
>> ());
>> 
>> Hidden transactionTotal = new Hidden();
>> transactionTotal.getElement().setAttribute("name", 
>> "transactionTotal");
>> transactionTotal.setValue(order.getTotalAmount().toString
>> ());
>> 
>> Hidden printURL = new Hidden();
>> printURL.getElement().setAttribute("name", "printURL");
>> printURL.setValue(order.getPrintURL());
>> 
>> FlowPanel formStuffer = new FlowPanel();
>> formStuffer.add(transactionId);
>> formStuffer.add(transactionTotal);
>> formStuffer.add(printURL);
>> 
>> form.add(formStuffer);
>> view.getPnlTrackingSubmitter().add(form);
>> form.submit();
>>
>>
>>
>> On Wednesday, March 21, 2018 at 4:19:39 PM UTC-4, Matthew McLarty wrote:
>>>
>>> Darn, I was really hoping there'd be an cleaner way but if it works, it 
>>> works, I guess. Thank you, Slava. :)
>>>
>>> On Wednesday, March 21, 2018 at 4:16:41 PM UTC-4, Slava Pankov wrote:

 You can have hidden (display: none) FormPanel with method="post". Then:
 form.getElement(). cast().setTarget("");
 form.setAction(url);
 form.submit();

 That will redirect to specified url with POST.

 On Wednesday, March 21, 2018 at 11:48:46 AM UTC-7, Matthew McLarty 
 wrote:
>
> I feel a little silly asking this since it feels like something that 
> should be obvious.
>
> How do I submit data to another URL, via POST (or GET if need be) 
> without it being an ajax request? Do I need to construct a fake FormPanel 
> and make it 1px big to submit the data to a URL? Can I use request 
> builder 
> and set the content-type header? The problem is that I need to browser to 
> advance to that URL where the submission is processed but the GWT methods 
> all seem to expect that to be an asynchronous event.
>
> Please help?
>


-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Submit POST data with no callback

2018-03-23 Thread Slava Pankov
For redirect you need: form.getElement(). cast().setTarget("");

On Thursday, March 22, 2018 at 7:26:54 AM UTC-7, Matthew McLarty wrote:
>
> Okay, for the record, this does not redirect the current page to the URL 
> that is set to the action of the FormPanel. Any idea what I'm doing wrong?
>
> FormPanel form = new FormPanel();
> form.setAction("
> https://www.FAKEDOMAIN.com/my-account/order-complete.html;);
> form.setHeight("1px");
> form.setWidth("1px");
> form.addStyleName(AppController.HIDDEN_CLASS);
> 
> Hidden transactionId = new Hidden();
> transactionId.getElement().setAttribute("name", 
> "transactionId");
> transactionId.setValue(order.getOrder().getQuoteNumber());
> 
> Hidden transactionTotal = new Hidden();
> transactionTotal.getElement().setAttribute("name", 
> "transactionTotal");
> transactionTotal.setValue(order.getTotalAmount().toString
> ());
> 
> Hidden printURL = new Hidden();
> printURL.getElement().setAttribute("name", "printURL");
> printURL.setValue(order.getPrintURL());
> 
> FlowPanel formStuffer = new FlowPanel();
> formStuffer.add(transactionId);
> formStuffer.add(transactionTotal);
> formStuffer.add(printURL);
> 
> form.add(formStuffer);
> view.getPnlTrackingSubmitter().add(form);
> form.submit();
>
>
>
> On Wednesday, March 21, 2018 at 4:19:39 PM UTC-4, Matthew McLarty wrote:
>>
>> Darn, I was really hoping there'd be an cleaner way but if it works, it 
>> works, I guess. Thank you, Slava. :)
>>
>> On Wednesday, March 21, 2018 at 4:16:41 PM UTC-4, Slava Pankov wrote:
>>>
>>> You can have hidden (display: none) FormPanel with method="post". Then:
>>> form.getElement(). cast().setTarget("");
>>> form.setAction(url);
>>> form.submit();
>>>
>>> That will redirect to specified url with POST.
>>>
>>> On Wednesday, March 21, 2018 at 11:48:46 AM UTC-7, Matthew McLarty wrote:

 I feel a little silly asking this since it feels like something that 
 should be obvious.

 How do I submit data to another URL, via POST (or GET if need be) 
 without it being an ajax request? Do I need to construct a fake FormPanel 
 and make it 1px big to submit the data to a URL? Can I use request builder 
 and set the content-type header? The problem is that I need to browser to 
 advance to that URL where the submission is processed but the GWT methods 
 all seem to expect that to be an asynchronous event.

 Please help?

>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Submit POST data with no callback

2018-03-22 Thread Matthew McLarty
Okay, for the record, this does not redirect the current page to the URL 
that is set to the action of the FormPanel. Any idea what I'm doing wrong?

FormPanel form = new FormPanel();
form.setAction(
"https://www.FAKEDOMAIN.com/my-account/order-complete.html;);
form.setHeight("1px");
form.setWidth("1px");
form.addStyleName(AppController.HIDDEN_CLASS);

Hidden transactionId = new Hidden();
transactionId.getElement().setAttribute("name", 
"transactionId");
transactionId.setValue(order.getOrder().getQuoteNumber());

Hidden transactionTotal = new Hidden();
transactionTotal.getElement().setAttribute("name", 
"transactionTotal");
transactionTotal.setValue(order.getTotalAmount().toString
());

Hidden printURL = new Hidden();
printURL.getElement().setAttribute("name", "printURL");
printURL.setValue(order.getPrintURL());

FlowPanel formStuffer = new FlowPanel();
formStuffer.add(transactionId);
formStuffer.add(transactionTotal);
formStuffer.add(printURL);

form.add(formStuffer);
view.getPnlTrackingSubmitter().add(form);
form.submit();



On Wednesday, March 21, 2018 at 4:19:39 PM UTC-4, Matthew McLarty wrote:
>
> Darn, I was really hoping there'd be an cleaner way but if it works, it 
> works, I guess. Thank you, Slava. :)
>
> On Wednesday, March 21, 2018 at 4:16:41 PM UTC-4, Slava Pankov wrote:
>>
>> You can have hidden (display: none) FormPanel with method="post". Then:
>> form.getElement(). cast().setTarget("");
>> form.setAction(url);
>> form.submit();
>>
>> That will redirect to specified url with POST.
>>
>> On Wednesday, March 21, 2018 at 11:48:46 AM UTC-7, Matthew McLarty wrote:
>>>
>>> I feel a little silly asking this since it feels like something that 
>>> should be obvious.
>>>
>>> How do I submit data to another URL, via POST (or GET if need be) 
>>> without it being an ajax request? Do I need to construct a fake FormPanel 
>>> and make it 1px big to submit the data to a URL? Can I use request builder 
>>> and set the content-type header? The problem is that I need to browser to 
>>> advance to that URL where the submission is processed but the GWT methods 
>>> all seem to expect that to be an asynchronous event.
>>>
>>> Please help?
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Submit POST data with no callback

2018-03-21 Thread Matthew McLarty
Darn, I was really hoping there'd be an cleaner way but if it works, it 
works, I guess. Thank you, Slava. :)

On Wednesday, March 21, 2018 at 4:16:41 PM UTC-4, Slava Pankov wrote:
>
> You can have hidden (display: none) FormPanel with method="post". Then:
> form.getElement(). cast().setTarget("");
> form.setAction(url);
> form.submit();
>
> That will redirect to specified url with POST.
>
> On Wednesday, March 21, 2018 at 11:48:46 AM UTC-7, Matthew McLarty wrote:
>>
>> I feel a little silly asking this since it feels like something that 
>> should be obvious.
>>
>> How do I submit data to another URL, via POST (or GET if need be) without 
>> it being an ajax request? Do I need to construct a fake FormPanel and make 
>> it 1px big to submit the data to a URL? Can I use request builder and set 
>> the content-type header? The problem is that I need to browser to advance 
>> to that URL where the submission is processed but the GWT methods all seem 
>> to expect that to be an asynchronous event.
>>
>> Please help?
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Submit POST data with no callback

2018-03-21 Thread Slava Pankov
You can have hidden (display: none) FormPanel with method="post". Then:
form.getElement(). cast().setTarget("");
form.setAction(url);
form.submit();

That will redirect to specified url with POST.

On Wednesday, March 21, 2018 at 11:48:46 AM UTC-7, Matthew McLarty wrote:
>
> I feel a little silly asking this since it feels like something that 
> should be obvious.
>
> How do I submit data to another URL, via POST (or GET if need be) without 
> it being an ajax request? Do I need to construct a fake FormPanel and make 
> it 1px big to submit the data to a URL? Can I use request builder and set 
> the content-type header? The problem is that I need to browser to advance 
> to that URL where the submission is processed but the GWT methods all seem 
> to expect that to be an asynchronous event.
>
> Please help?
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Submit POST data with no callback

2018-03-21 Thread Matthew McLarty
I feel a little silly asking this since it feels like something that should 
be obvious.

How do I submit data to another URL, via POST (or GET if need be) without 
it being an ajax request? Do I need to construct a fake FormPanel and make 
it 1px big to submit the data to a URL? Can I use request builder and set 
the content-type header? The problem is that I need to browser to advance 
to that URL where the submission is processed but the GWT methods all seem 
to expect that to be an asynchronous event.

Please help?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.