hi Thiago:)
I don't know if that is the solution to the problem, but I will do the
save process different way.
I see you are using two different RequestConext's to *create* and
*save* the entity..
UserServiceRequestContext context = requestFactoryInclude
.userSerivceRequestContext();
mainForm.saveData();
userProxy = requestFactoryInclude.userSerivceRequestContext()
.create(UserProxy.class);
imho you should do it like this:
...
userProxy = context.create(UserProxy.class);
...
cheers and hth,
agi
On Sep 5, 8:30 pm, thiago borges martins <[email protected]>
wrote:
> Hi
>
> I am facing a problem with the RequestFactory not found solution yet.
>
> In my project I have the EJB module that has the services that are
> called by the interface on the client side, as described in the
> documentation of RF, the searches are working properly, but when I
> call the persist method it is not even making the request on the
> server , does anyone have any idea what might be?
>
> Below is the code snippet:
>
> final EventBus eventBusInclude = new
> SimpleEventBus();
>
> ConsultRequestFactory requestFactoryInclude =
> GWT
>
> .create(ConsultRequestFactory.class);
>
>
> requestFactoryInclude.initialize(eventBusInclude);
>
> UserServiceRequestContext context =
> requestFactoryInclude
> .userSerivceRequestContext();
>
> mainForm.saveData();
>
> userProxy =
> requestFactoryInclude.userSerivceRequestContext()
> .create(UserProxy.class);
>
> userProxy.setId(new Long(0));
>
> userProxy.setNmUser(mainForm.getValueAsString("userName"));
>
> userProxy.setNmLogin(mainForm.getValueAsString("userLogin"));
> userProxy.setDtBirth((Date)
> mainForm.getValue("userBirth"));
> userProxy.setPassword("123456");
> userProxy.setDocumentUser(null);
>
> userProxy.setStatus(mainForm.getValueAsString("userStatus"));
> userProxy.setDataInclude(new Date());
> userProxy.setVersion(0);
>
> context.persist(userProxy).using(userProxy)
> .to(new Receiver<Boolean>() {
> @Override
> public void
> onViolation(Set<Violation> errors) {
>
> SC.say("FUCKED !!!!!");
> }
>
> @Override
> public void
> onFailure(ServerFailure error) {
>
> SC.say("ERROR: " + error.getMessage());
> }
>
> @Override
> public void
> onSuccess(Boolean response) {
>
> UserWindow.selectedTabSearch();
>
> UserWindow.removeTabInclude();
> }
> });
>
> I thank the attention and help!!!!!
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.