Hi, I need pass a list from server to client, but I don´t know make it I am using gwt 2.4 and java-sdk-1.7.1 some site I had seen use this annotation: @gwt.typeArgs(type object), but It doesn´t work me I have put in the server this: /** * @gwt.typeArgs <server.ConceptoFormal> */ public List<ConceptoFormal> getReticulo() { return reticulo; }
I have put in the client this: Async: void getReticulo(AsyncCallback<List<ConceptoFormal>> callback) throws IllegalArgumentException; Other: List<ConceptoFormal> getReticulo() throws IllegalArgumentException; I have put in the onModuleLoad this: greetingService.getReticulo(new AsyncCallback <List<ConceptoFormal>>() { public void onFailure(Throwable caught) { muestraDatosBox.setText("getReticulo - Failure"); respuestaXML .addStyleName("serverResponseLabelError"); respuestaXML.setHTML(SERVER_ERROR); muestraDatosBox.center(); cerrarButton.setFocus(true); } public void onSuccess(List<ConceptoFormal> result) { muestraDatosBox.setText("Vuelta de la llamada"); respuestaXML .addStyleName("respuestaServidorCorrecta"); respuestaXML.setHTML("<br>el número de objetos que tiene la lista es: " + result.size()); muestraDatosBox.center(); cerrarButton.setFocus(true); } }); And also I have included in web.xml this: ... <servlet> <servlet-name>getReticulo</servlet-name> <servlet-class>com.alberto.server.GreetingServiceImpl</servlet-class> </servlet> ... <servlet-mapping> <servlet-name>getReticulo</servlet-name> <url-pattern>/pruebacanvas/greet</url-pattern> </servlet-mapping> ... thank you for your help -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/H8d1iuc8LG4J. 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.