Re: More logs on requestfactory ?

2011-05-29 Thread Simon M
Thanks Stefan for your reply, my function sends null so I have to analyse on 
the server.

-- 
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-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.



More logs on requestfactory ?

2011-05-26 Thread Simon M
I am getting an exception sent by a Receiver :

Caused by: java.lang.RuntimeException: Server Error: null
at 
com.google.web.bindery.requestfactory.shared.Receiver.onFailure(Receiver.java:36)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onFail(AbstractRequest.java:113)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:271)
at 
com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$4.onTransportSuccess(AbstractRequestContext.java:951)
at 
com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)

But I have no idea where that comes from, neither do I have any hint from 
the stacktrace. And there is no log on server side as well.

Is it possible to raise the log level of request factory ?

-- 
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-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.



Edit multiple properties of an object

2011-04-12 Thread Simon M
Hello,

I want to edit multiple properties of my object in a second class (it is 
messy otherwise).

I saw the following in the documentation:

class HasBagOfStateEditor implements Editor {
 @Editor.Path("state")
 BagOfStateBiographicalEditor bio;
 
 @Editor.Path("state")
 BagOfStateUserPreferencesEditor prefs;
}


But it looks like it is editing multiple properties of a the sub element 
"state" of the object, not on multiple properties of the object itself.

How can I edit multiple properties of the top object being edited ?

That would be something like that:

@Editor.Path("this")

-- 
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-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.



Re: Editor+RequestFactory: how to get the new saved object ?

2011-03-27 Thread Simon M
When setting the receiver on the same line as the call of the method I get 
the good Receiver type, but with the RequestContext returned by 
editor.flush() the Receiver has a Void parameter ...

Using the to() method resolved that issue thank you.

-- 
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-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.



Editor+RequestFactory: how to get the new saved object ?

2011-03-26 Thread Simon M
I am using the editor framework + RequestFactory, and when creating a new 
object I need to get the new saved object (some fields are populated on the 
server).

The problem is, the request context returned by the editorDriver.flush() 
sends a Receiver<*Void*>, and not a Receiver<*EntityProxy*>.

How can I do that / workaround that ?

-- 
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-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.



Re: Programmatic manipulation of the style elements

2011-03-17 Thread Simon M
I used the # 3 : 

   - arrow.getElement().getStyle().setTop(y, Style.Unit.PCT);

Thank you for your 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 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.



Programmatic manipulation of the style elements

2011-03-16 Thread Simon M
I need to position "absolutely" my div object depending of one field of my 
domain object. 

I mean:

if the field of my object is 2, then top should be 25% ( = 0.5 / 2)

if the field is 3, then top should be 16.6% ( = 0.5 / 3)

etc.

Programmatic update of styles is not allowed right now as specified here:
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#Runtime_substitution

Does someone have a workaround for that issue ?

-- 
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-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.



Re: Load javascript on the fly

2011-03-14 Thread Simon M
For reference a fine solution is here :
http://technowobble.blogspot.com/2010/06/how-to-integrate-facebooks-javascript.html

-- 
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-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.



Re: Load javascript on the fly

2011-03-13 Thread Simon M
Yes that would be easier but I don't want to load the Facebook 
javascript everytime, only when it is needed.

I think the issue happened because the FB object was called before the 
script was loaded.

So I added some code to wait until the code is loaded:

private native void initFacebook(String fbAppId) /*-{
var fbroot = $doc.createElement('div');
fbroot.setAttribute('id', 'fb-root')
$doc.body.appendChild(fbroot);

var script = $doc.createElement("script");
script.src = "http://connect.facebook.net/en_US/all.js";;
script.type = "text/javascript";
$doc.body.appendChild(script);

function callback() {
$wnd.FB.init({
appId : fbAppId,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true
// parse XFBML
});
$wnd.FB.login(function(response) {
  if (response.session) {
$wnd.Alert("Logged in");
  } else {
$wnd.Alert("Cancelled");
  }
});
}
 if (script.readyState) { //IE
script.onreadystatechange = function() {
if (script.readyState == "loaded"
|| script.readyState == "complete") {
script.onreadystatechange = null;
callback();
}
};
} else { //Others
script.onload = function() {
callback();
};
}


}-*/;


I guess I need to add some timeout management here, and cleanup as well ...

If anyone has other advise I would be happy to hear it.

-- 
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-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.



Load javascript on the fly

2011-03-13 Thread Simon M
I try to integrate with Facebook. I want to load the javascript file from 
Facebook dynamically.

I created the following method to load the js file and then initialize FB:

private native void initFacebook(String fbAppId) /*-{
var script = document.createElement("script");
script.src = "http://connect.facebook.net/en_US/all.js";;
script.type = "text/javascript";
$doc.getElementsByTagName("head")[0].appendChild(script);
var fbroot = document.createElement('div');
fbroot.setAttribute('id', 'fb-root')
$doc.getElementsByTagName("body")[0].appendChild(fbroot);

FB.init({
appId  : fbAppId,
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the 
session
xfbml  : true  // parse XFBML
});
}-*/;

But the FB object is not found :

at java.lang.Thread.run(Thread.java:619)
Caused by: com.google.gwt.core.client.JavaScriptException: (ReferenceError): 
FB is not defined

(I tried also with $wnd.FB without success)

Any idea ?

-- 
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-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.



Hyperlink: Why the anchor element is nested into a div ?

2011-03-12 Thread Simon M
I am curious to know.

-- 
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-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.



Re: Can't make @sprite working ...

2011-03-04 Thread Simon M
Yes that's it thank you

-- 
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-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.



Can't make @sprite working ...

2011-03-03 Thread Simon M
Does someone have a hint I am going no where with that thing ...

Here is the LoginPanel.ui.xml:


@sprite .logo {
gwt-image: "googleIcon";
vertical-align: middle;
}


Google



And the code in the associated LoginPanel.java:

public interface LoginStyle extends CssResource {
String logo();
}
@UiField LoginStyle style;
public interface Resources extends ClientBundle {
@Source("images/Google32.png") 
ImageResource googleIcon();
} 
Resources res; 


But I got :
Unable to find ImageResource method value("googleIcon") in 
my.client.LoginPanel_BinderImpl_GenBundle : Could not find no-arg method 
named googleIcon in type my.client.LoginPanel_BinderImpl_GenBundle

-- 
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-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.



Requestfactory server logs

2011-02-15 Thread Simon M
I am trying to use Requestfactory & editors, but when saving a new object I 
get nothing. I mean, the request ends ok, but on server side nothing 
happens, the persist method is not called.

How can I get more logs about what is happening ?

-- 
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-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.



request factory: collections of collections

2011-01-17 Thread Simon M
Hello,

It would be convenient for me that request factory manages collections of 
collections.

Is that planned ?

If it is not planned, it would be nice to have an explicit error instead of 
current strange error.

-- 
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-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.