Oh yes!!! That was the problem! thank you so much! You can't imagine how many hours I've lost ! :)))))
Now I have to pass all the other fields of the form... is it normal to have a method with a lot of input parameter? Maybe there's a better way to do it... but at least it should work :) I also have to use a token to generate an email and then interact with some struts2 action (and I think this will be the hardest part), so I hope someone is used to these things because I could come back here soon. thank you again!!! lou On 14 Gen, 15:55, Chris Ramsdale <cramsd...@google.com> wrote: > You shouldn't have to do the following: > > ServiceDefTarget target = (ServiceDefTarget) prenotaService; > target.setServiceEntryPoint(GWT.getModuleBaseURL() + > "/provatesina/prenota"); > > Your RPC->URL mapping is defined within your war/WEB-INF/web.xml and the > RemoteServiceRelativePath annotations within your client side code. > > On Thu, Jan 14, 2010 at 6:24 AM, loucat <lou...@gmail.com> wrote: > > Hi all ! > > > I'm having some problems with the communication client-server, i just > > have to submit a form but I read it's better to use RPC so I've > > deleted all the reference of FormPanel and trying to do it calling a > > server, but it doesn't work :( > > > Am I supposed to pass all the fields of the form through the method of > > the ServiceInterfaceAsync? > > Up to now I'm trying to pass tha "name" field as a String parameter in > > that method, but I always get back the "onFailure" result. > > > I think I configured everything properly but obviously I'm not sure > > about it. > > what url shoud I put here? -> target.setServiceEntryPoint > > (GWT.getModuleBaseURL() + "/provatesina/prenota"); > > > This is the code I have in the main GWT class, it's inside the method > > "onModuleLoad": > > > final PrenotaServiceAsync prenotaService = (PrenotaServiceAsync) > > GWT.create(PrenotaService.class); > > ServiceDefTarget target = (ServiceDefTarget) prenotaService; > > > target.setServiceEntryPoint(GWT.getModuleBaseURL() + "/ > > provatesina/prenota"); > > > submit.addClickHandler(new ClickHandler() { > > public void onClick(ClickEvent event) { > > > Window.alert("submitting the form"); > > > prenotaService.prenota(nome.getText(), new > > AsyncCallback <String>() { > > public void onFailure(Throwable caught) { > > Window.alert("RPC to prenota() failed."); > > } > > public void onSuccess(String result) { > > lab.setText(result); > > } > > > }); > > }; > > > }); > > > -- > > 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<google-web-toolkit%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en.
-- 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.