Usando GWT - Framework Google Web Toolkit

2 respostas
luizfelipetx

Galera...

Estou com um problema ...
De forma alguma meu script Window.alert("oi"); quer funcionar usando o GWT...

Queria saber se alguem pode me ajudar...

Segue ocodigo...

.java

package com.teste.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;

public class OiMundo implements EntryPoint {


	public void onModuleLoad() {
	    
		Window.alert("Oi Mundo");
		
		
	}

}

xml

<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='banana'>
  <!-- Inherit the core Web Toolkit stuff.                        -->
  <inherits name='com.google.gwt.user.User'/>

  <!-- Inherit the default GWT style sheet.  You can change       -->
  <!-- the theme of your GWT application by uncommenting          -->
  <!-- any one of the following lines.                            -->
  <inherits name='com.google.gwt.user.theme.standard.Standard'/>
  <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
  <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->

  <!-- Other module inherits                                      -->

  <!-- Specify the app entry point class.                         -->
  <entry-point class='com.teste.client.OiMundo'/>

  <!-- Specify the paths for translatable code                    -->
  <source path='client'/>
  <source path='shared'/>

</module>

meu html

<!doctype html>

<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

    <title>Web </title>
    
                  
  <script src="com.teste.client.OiMundo.nocache.js" 
                type="text/javascript"></script>
  </head>

  
  </body>
</html>
Queria saber tambem se alguem sabe me dizer se pra toda Classe , que implementa a entry point eu tenho que ter um XML ?

Abraços

2 Respostas

L

Não precisa

luizfelipetx

Na verdade precisa…

Pra cada modulo Carregado voce tem que tem um pacote do skeleton

que carraga esse modulo e modulo tem que estar apontado no xml

do pacote setado para ele…

=D

Criado 27 de novembro de 2010
Ultima resposta 9 de jun. de 2011
Respostas 2
Participantes 2