Wednesday, October 2, 2013

Re: Passing Object Literal to Javascript method ?

I think you have to write

public final native CssHolder  perform(Element element, int duration, String args) /*-{
  return $wnd.CssMod.perform(element, eval('obj = ' + args + ';'));
}-*/;

perform(element, "{ \"opacity\":2}");




Maybe the following also works: 

public final native CssHolder  perform(Element element, int duration, JavaScriptObject params) /*-{
  return $wnd.CssMod.perform(element, params);
}-*/;

perform(element, JsonUtils.safeEval("{ \"opacity\":2}"));

With the above you could probably also create a Params.Builder that creates the JSO and then use that JSO directly as parameter.


-- J.

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

Re: Client code depends on http://www.google.com/jsapi?callback=__gwt_AjaxLoader_onLoad

Hello.

> I have a GWT application that I'm trying to deploy in an environment where
> we have no internet connection. The application uses the gwt charts and it
> is unable to draw the charts unless internet connection is available, as it
> tries to fetch the following:
>
> http://www.google.com/jsapi?callback=__gwt_AjaxLoader_onLoad
>
> Is there any way to make this not depended on an Internet connection?

I can't find again the term of service or such, but I do remember reading the
Google Charts would only work from Google's servers, you had to grab the JS
from there

So you can't use them without an Internet connection.



Hope this helps



Nicolas

Passing Object Literal to Javascript method ?

Please some help on the following.
How to pass an Object literal to a javascript function

I have a javascript function that looks like:
public final native CssHolder perform(Element element, int duration) /*-{
return $wnd.CssMod.perform(element, {opacity: 0.2}); 
}-*/;

This works if I call it from java code.
How can I pass in the Object literal "{opacity: 0.2}" as argument in the above?

So I want something like:
public final native CssHolder  perform(Element element, int duration, Object args) /*-{
return $wnd.CssMod.perform(element, args); 
}-*/;

But what should "args" be ?
I tried to pass in a json data string and eval() it, like 
return $wnd.CssMod.perform(element, eval(args)); 
Or pass in a json string like:
perform(button, 3, "[ \"opacity\" : \"0.2\" ]"
etc...
But it all results in some strange Javascript error :(..
- Ed



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

Re: Verificar dados existentes no bando de dados

Oi, seu problema não é com o GWT, validação de usuário existente não é feito no lado do cliente, se não o lado do servidor, por exemplo, se você usar JPA para persistência, ou de hibernação, ou mesmo JDBC pode fazer uma consulta com as credenciais do usuário, se você retornar os resultados da consulta é que se o usuário existe, e GWT mostrarías apenas uma mensagem de aviso, e da mesma forma, para enviar um e-mail, é igualmente o lado do servidor, o ponto é que esse tipo de coisa, válido no lado do servidor, e não o cliente.
Eu estou traduzindo este texto para Português, por isso peço desculpas por qualquer erros ortográficos ou sintáticos.


2013/10/2 Tata <thais.o.moura@gmail.com>
Olá galera, estou desenvolvendo meu primeiro projeito usando GWT, é o seguinte .. 
Já estou com a tela de login e senha criadas, e a tela para cadastro de novos cliente, mas eu preciso que o banco de dados avise se houver um outro usuário com uma informação igual(no meu caso eu quero que seja o email) já dei uma procurada mas ainda não consegui :/
Se algum de vocês puderem me ajudar ficarei muito grata :D
Valeu ^^

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



--



Atte:
Natanael Maldonado

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

Re: Verificar dados existentes no bando de dados

If you are just starting out, you will probably want to use a GWT-RPC to the backend to create the new account. It should return an error message or code that indicates that a user with that email address already exists. Then in the onFailure() method of your AsyncCallback handler, call a method that updates the display with the error message. 

Much of this is already in place in the initial GWT starter application. You just need to write the database pieces and the error handling.


On Wednesday, October 2, 2013 9:54:36 AM UTC-4, Tata wrote:
Olá galera, estou desenvolvendo meu primeiro projeito usando GWT, é o seguinte .. 
Já estou com a tela de login e senha criadas, e a tela para cadastro de novos cliente, mas eu preciso que o banco de dados avise se houver um outro usuário com uma informação igual(no meu caso eu quero que seja o email) já dei uma procurada mas ainda não consegui :/
Se algum de vocês puderem me ajudar ficarei muito grata :D
Valeu ^^

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

Verificar dados existentes no bando de dados

Olá galera, estou desenvolvendo meu primeiro projeito usando GWT, é o seguinte .. 
Já estou com a tela de login e senha criadas, e a tela para cadastro de novos cliente, mas eu preciso que o banco de dados avise se houver um outro usuário com uma informação igual(no meu caso eu quero que seja o email) já dei uma procurada mas ainda não consegui :/
Se algum de vocês puderem me ajudar ficarei muito grata :D
Valeu ^^

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

Re: Problem with GWT+Hibernate

Change

<source path="com.mySampleApplication.client"/>

to

<source path="client"/>

Then please google for some GWT + Hibernate tutorials as your code also has some other flaws. First you wan to share a hibernate entity which is not that easy because hibernate rewrites your entity class which causes GWT to throw serialization exceptions and second if you use lazy loading then you can not close the hibernate session before GWT has serialized the entity. While serializing the lazy relationships will be fetched but if you have closed the session before you will get Hibernate exceptions. You should follow the OpenSessionInView Pattern to solve this.

-- J.

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