how to add a server ssl from the sourcecode

2011-04-18 Thread mightymightyblues
Hi,

I'm trying to access a https with GWT or with JSNI, and accept the ssl
certificated. I have all control of CORS so this is not a problem. Is
there an easy way to make it from the source code? I don't want that
the user are bored with this task, I control the server and the
client, so I can trusth both of them.

Any good idea?

Thanks for the support.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: access a from a JSNI function in GWT

2011-04-13 Thread mightymightyblues
Ok, I do that, and it's work perfect. Thanks ;)
Now my problem is that I can't send a good POST method with chrome ...
this has no end lol

On 31 mar, 15:46, Thomas Broyer  wrote:
> On Thursday, March 31, 2011 1:08:26 PM UTC+2, mightymightyblues wrote:
>
> > So, I create a :
> >  > name="fileinfo" ui:field="fileinfo">
> >    
> > 
>
> Why a FormPanel?
> 
> and
> @UiField com.google.gwt.dom.client.FormElement fileinfo;
> (you can also just use a com.google.gwt.dom.client.Element)
>
> I'd then give it as an argument to the JSNI method rather than accessing the
> field from JSNI, but that's just a matter of personal taste (just that the
> JSNI is more readable IMO)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



RequestBuilder don't store coockies?

2011-03-31 Thread mightymightyblues
Hi,

I'm making some test about CORS and trying to make a POST to a server,
to make login, and the server send me a message with a 200 state ( the
login was correct ) , but the browser don't save the coockies. this is
my code:

RequestBuilder rb = new
RequestBuilder(RequestBuilder.POST, Url);
rb.setHeader("Content-type", "application/x-www-form-
urlencoded");

try {
Request response = rb.sendRequest(postData, new 
RequestCallback()
{

public void onError(Request request, Throwable 
exception) {
}
public void onResponseReceived(Request request, Response
response) {
Window.alert(response.getText());
}
});
}
catch (RequestException epa) {
Window.alert("Failed to send the request: " + epa.getMessage());
}


The response.getText() show me the "ok, you are login" but there are
no coockies en my browser with this ... If I use XMLHttpRequest() with
JSNI, the browser save it the coockies.

Any Idea... I'm getting tired about this task jeje, when I find a
way ... I will upload the code and made some guide! Lol

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: access a from a JSNI function in GWT

2011-03-31 Thread mightymightyblues
Now I have this in JSNI:

var formData = new
FormData(this.@com.libregeosocial.backend.client.tools.RequestJson::fileinfo);

And fileinfo is a FormPanel. But this crash ... any Idea? is not the
same a FormData javascript and a FormPanel Java ?!

On 31 mar, 13:08, mightymightyblues 
wrote:
> So, I create a :
>  name="fileinfo" ui:field="fileinfo">
>    
> 
>
> use the uiBinde to take te FormPanel, and after that I can to use that
> "FormPanel" like a FormData in jsni? Is compatible?
>
> On 31 mar, 12:01, Thomas Broyer  wrote:
>
>
>
>
>
>
>
> > If the form is in a ui.xml, why don't you put a ui:field on it (instead of
> > id) and have uiBinder inject the FormElement into an @UiField of your Java
> > class? (and then pass the FormElement ro your JSNI method instead of the
> > getElementById)
>
> > But back to your actual issue with JSNI: use '$doc' instead of 'document'.
> > GWT by default loads in a hidden iframe, so the 'document' is the iframe's
> > doc, not the host page's one.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: access a from a JSNI function in GWT

2011-03-31 Thread mightymightyblues
So, I create a :

   


use the uiBinde to take te FormPanel, and after that I can to use that
"FormPanel" like a FormData in jsni? Is compatible?

On 31 mar, 12:01, Thomas Broyer  wrote:
> If the form is in a ui.xml, why don't you put a ui:field on it (instead of
> id) and have uiBinder inject the FormElement into an @UiField of your Java
> class? (and then pass the FormElement ro your JSNI method instead of the
> getElementById)
>
> But back to your actual issue with JSNI: use '$doc' instead of 'document'.
> GWT by default loads in a hidden iframe, so the 'document' is the iframe's
> doc, not the host page's one.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



access a from a JSNI function in GWT

2011-03-30 Thread mightymightyblues
wohhh what an ugle stage!
Hi all, I have a .ui.xml with html code, like this:

...

   

...

Then, I have a realy good code in gwt and one of the functions are a
JSNI that try to make the next thing:

var data = new FormData(document.getElementById("fileinfo"));
data.append("CustomField", "This is some extra data");
var xhr = new XMLHttpRequest();
xhr.open("POST", url, false)
xhr.send(data);

This is not work at all. And I don't know why, I'm tryng to send data
and a file to a server, and I have to make some test about CORS. I
think that I can make it like this, like the people on mozilla ... but
I can't access the Form...

Any Idea how to access a  from a JSNI ?!

Thanks for all.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



a simple POST with formData

2011-03-29 Thread mightymightyblues
Hi, I have this code:

public native void callServer() /*-{
var fd = new FormData();
fd.append("fileField", "hola");
var xhr = new XMLHttpRequest();
xhr.open("POST", "file_handler.php");
xhr.send(fd);
}-*/;

But the debug say:
:FormData is not defined

I can't do this with GWT ??!! I really don't understand why not found
a javascript funcion ...

thanks for all.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



can you make POST with JsonpRequestBuilder ??

2010-12-20 Thread mightymightyblues
Hi all,

I'm making use of this class to make some request with GET, but I need
to make "log in" in a remote server, and I need to make a POST call
with the password and user. How can I do such a think?

Regards!!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.