Re: Adjusting height of GWT Panels based on content dynamically

2012-08-08 Thread Alexandre Ardhuin
Hi,

Have you look at com.google.gwt.user.client.ui.HeaderPanel ?

Alexandre


2012/8/8 Santosh 

> We have many screens where different types of GWT panels are used. One
> common problem across many screens is that, content size is derived at
> runtime. So, if I define a height for a panel(Vertical/Horizontal/
> DockPanel) and when any new components are getting added within panel
> or content is more, panel height remains the same. So we are not able
> to see the contents. UI look and feel becomes worst. How do we handle
> the height problems? Do we have to manually code to adjust every panel/
> widget height when something gets changed in screen. Is it not a very
> bad way of coding?
> Also, now we have datagrids at some places, if no of records are very
> less, we see a huge space left out below datagrid, not sure how do we
> handle these cases?
>
> Somebody please suggest as it is quite urgent.
>
> --
> 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.
>
>

-- 
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: RequestBuilder passes SOP without notice.

2012-07-24 Thread Alexandre Ardhuin
Hi,

The response of the first request contains the header
"access-control-allow-origin: *". This is known as Cross-Origin Resource
Sharing ( see http://www.w3.org/TR/cors/ ) and allows to call other domain
with XHR.
Be careful, not all browser support this feature.

Alexandre


2012/7/24 KutaBeach 

> Greetings!
>
> Gentlemen, please help me to understand one GWT feauture.
>
> I have the following code:
>
>> RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, newsUrl);
>> try {
>> Request response = builder.sendRequest(null, new
>> RequestCallback() {
>> @Override
>> public void onResponseReceived(Request request, Response
>> response) {
>> Window.alert("RESPONSE: " + response.getText() + "
>> STATUS CODE:" + response.getStatusText());
>> }
>> @Override
>> public void onError(Request request, Throwable exception)
>> {
>> Window.alert("ERROR: " + exception.getMessage());
>> }
>> });
>> } catch (RequestException e) {
>> Window.alert("ERROR: " + e.getMessage());
>> }
>
>
> I thought that this code should produce a simple ajax get request to the
> url specified, and if the domain of target url does not coincide with
> domain of my app - it should return error or nothing.
>
> But in fact, it works in the following way:
>  - if target url contains json it returns that json:
> url example:
> http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20csv%20where%20url%3D'http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes.csv%3Fs%3DINFY.BO%2CRELIANCE.NS%2CTCS.BO%26f%3Dsl1d1t1c1ohgv%26e%3D.csv'%20and%20columns%3D'symbol%2Cprice%2Cdate%2Ctime%2Cchange%2Ccol1%2Chigh%2Clow%2Ccol2'&format=json
> MessageBox with json response is shown.
> The request is marked as OK in Chrome -> Developer Tools -> Network.
>
>  - if target url is a simple site url (for example:
> http://edition.cnn.com/) - it returns nothing, no response at all, no
> error.
> Empty Message box in OnSuccess handler is shown.
> The request is marked as Canceled in Chrome.
>
> So whats going on?
> I thought I can reach other sites only if I use JsonRequestBuilder,
> because instead of sending get request directly it will manually create
> script elements on the page.
> Does simple RequestBuilder also create script elements all the time?
> If no, then why first request is working?
> If yes, then why the second request is cancelled?
>
> GWT 2.4, Chrome 19.0 or FF 13, Development Mode.
>
> --
> 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/-/pYY1k2G5fKAJ.
> 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.
>

-- 
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: How to implement loops in render method of new UiRenderer feature

2012-07-23 Thread Alexandre Ardhuin
Hi,

You can use  in your uiRenderer template.


  
  
  


  

Generate your SafeHtml (with SafeHtmlBuilder, SafeHtmlTemplates or
UiRenderer) and give it to renderer. For exemple :

public void render(Context context, EntityProxy e, SafeHtmlBuilder sb) {
  SafeHtmlBuilder itemsShb = new SafeHtmlBuilder();
  for (Item item : e.getItems()) {

itemsShb.appendHtmlConstant("").appendEscaped(item.getName()).appendHtmlConstant("");
  }
  SafeHtml itemsHtml = itemsShb.toSafeHtml();
  renderer.render(sb, e.getName(), itemsHtml);}


Alexandre



2012/7/18 Piotr Janik 

> Hi there,
>  I know that gwt templates don't support loops.
> However, I'd like to have a loop in a render() method.
>
> Let's say I have this simple UiRenderer template:
> 
> 
> 
> 
> 
> 
> 
>
> What I need to do is put some new code into div#HERE from render method.
> Something like:
> public void render(Context context, EntityProxy e, SafeHtmlBuilder sb) {
> renderer.render(sb, e.getName());
> for(Item item : e.getItems()) {
> String s = ""+item.getName()+"";
> //How to put every s from this loop  into div#HERE
> ?
>  }
> }
>
> Obviously, this can be done in traditional way without templates. I'm just
> wondering if it is possible with new UiRenderer.
>
> Thanks,
> Peter
>
> --
> 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/-/fYwMtC7YrCQJ.
> 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.
>

-- 
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: How to change name of Send button in SingleUploader

2012-06-21 Thread Alexandre Ardhuin
You can use SingleUploader#setI18Constants (
http://gwtupload.googlecode.com/svn/trunk/website/javadoc/all/gwtupload/client/SingleUploader.html#setI18Constants%28gwtupload.client.IUploader.UploaderConstants%29)

Alexandre


2012/6/21 dev 

> I'm using SingleUploader in my project :
> *SingleUploader fileUploader** = new SingleUploader();*
>  It gives one text box, browse and send button.
> How can i change the name of send button.
> I tried with :
>
> fileUploader.getForm().getWidget().setStyleName("stylename");
>
> It's not working.
>
> Please suggest.
>
>
> --
> 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/-/v7aJyRwHeW4J.
> 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.
>

-- 
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: JAVA Generics with ValueProxy

2012-06-21 Thread Alexandre Ardhuin
I see an other problem with :

public interface AccountNodeProxy extends ValueProxy{
List> getChildren();
AccountProxy getData();
}

Here, AccountNodeProxy is declared like a generic type with 
as type parameter. It's like you wrote :

public interface AccountNodeProxy extends ValueProxy{
List> getChildren();
T getData();
}

I don't think it's what you want. It should be :

 public interface AccountNodeProxy extends ValueProxy{
List getChildren();
AccountProxy getData();
}

Alexandre


2012/6/21 tzhotmail 

> Thanks Alexandre , but that did not work as well
>
>
> On Tuesday, 19 June 2012 11:56:18 UTC-4, Alexandre Ardhuin wrote:
>>
>> The value attribute in @ProxyForName should be "com.vo.GenericTreeNode"
>> instead of "com.vo.GenericTreeNode<**Account>"
>>
>> Alexandre
>>
>>
>> 2012/6/19 tzhotmail 
>>
>>> Please help on GWT JAVA Generics with ValueProxy
>>>
>>> I have the following Domain class
>>> public class GenericTreeNode implements java.io.Serializable{
>>>
>>>/**
>>> *
>>> */
>>>private static final long serialVersionUID = 1L;
>>>private T
>>> data;
>>>private List>children;
>>>private GenericTreeNode  parent;
>>>
>>>public GenericTreeNode() {
>>>super();
>>>children = new ArrayList>(**);
>>>}
>>>
>>>public GenericTreeNode( T data ) {
>>>this();
>>>setData( data );
>>>}
>>>
>>>public GenericTreeNode getParent() {
>>>return this.parent;
>>>}
>>>
>>>public List> getChildren() {
>>>return this.children;
>>>}
>>>
>>>
>>>
>>>public void removeChildAt( int index ) throws
>>> IndexOutOfBoundsException {
>>>children.remove( index );
>>>}
>>>
>>>public GenericTreeNode getChildAt( int index ) throws
>>> IndexOutOfBoundsException {
>>>return children.get( index );
>>>}
>>>
>>>public T getData() {
>>>return this.data;
>>>}
>>>
>>>public void setData( T data ) {
>>>this.data = data;
>>>}
>>>
>>>public String toString() {
>>>return getData().toString();
>>>}
>>>
>>>@Override
>>>public boolean equals( Object obj ) {
>>>if ( this == obj ) {
>>>return true;
>>>}
>>>if ( obj == null ) {
>>>return false;
>>>}
>>>if ( getClass() != obj.getClass() ) {
>>>return false;
>>>}
>>>GenericTreeNode other = (GenericTreeNode) obj;
>>>if ( data == null ) {
>>>if ( other.data != null ) {
>>>return false;
>>>}
>>>} else if ( !data.equals( other.data ) ) {
>>>return false;
>>>}
>>>return true;
>>>}
>>>
>>>/
>>> }
>>>
>>> then I created the following Client Proxies and Request Factory.
>>>
>>> import com.google.web.bindery.**requestfactory.shared.**ProxyForName;
>>> import com.google.web.bindery.**requestfactory.shared.**ValueProxy;
>>> @ProxyForName( value = "com.vo.Account" )
>>> public interface AccountProxy extends ValueProxy {
>>>public Integer getPfId();
>>>
>>>public void setPfId( Integer pfId );
>>>
>>>public Integer getPfParentId();
>>>
>>>public void setPfParentId( Integer pfParentId );
>>>
>>>public Integer getPfRootId();
>>>
>>>public void setPfRootId( Integer pfRootId );
>>>
>>>public String getName();
>>>
>>>public void setName( String name );
>>> }
>>>
>>> @ProxyForName( value 

Re: JAVA Generics with ValueProxy

2012-06-19 Thread Alexandre Ardhuin
The value attribute in @ProxyForName should be "com.vo.GenericTreeNode"
instead of "com.vo.GenericTreeNode"

Alexandre


2012/6/19 tzhotmail 

> Please help on GWT JAVA Generics with ValueProxy
>
> I have the following Domain class
> public class GenericTreeNode implements java.io.Serializable{
>
>/**
> *
> */
>private static final long serialVersionUID = 1L;
>private T
> data;
>private List>children;
>private GenericTreeNode  parent;
>
>public GenericTreeNode() {
>super();
>children = new ArrayList>();
>}
>
>public GenericTreeNode( T data ) {
>this();
>setData( data );
>}
>
>public GenericTreeNode getParent() {
>return this.parent;
>}
>
>public List> getChildren() {
>return this.children;
>}
>
>
>
>public void removeChildAt( int index ) throws
> IndexOutOfBoundsException {
>children.remove( index );
>}
>
>public GenericTreeNode getChildAt( int index ) throws
> IndexOutOfBoundsException {
>return children.get( index );
>}
>
>public T getData() {
>return this.data;
>}
>
>public void setData( T data ) {
>this.data = data;
>}
>
>public String toString() {
>return getData().toString();
>}
>
>@Override
>public boolean equals( Object obj ) {
>if ( this == obj ) {
>return true;
>}
>if ( obj == null ) {
>return false;
>}
>if ( getClass() != obj.getClass() ) {
>return false;
>}
>GenericTreeNode other = (GenericTreeNode) obj;
>if ( data == null ) {
>if ( other.data != null ) {
>return false;
>}
>} else if ( !data.equals( other.data ) ) {
>return false;
>}
>return true;
>}
>
>/
> }
>
> then I created the following Client Proxies and Request Factory.
>
> import com.google.web.bindery.requestfactory.shared.ProxyForName;
> import com.google.web.bindery.requestfactory.shared.ValueProxy;
> @ProxyForName( value = "com.vo.Account" )
> public interface AccountProxy extends ValueProxy {
>public Integer getPfId();
>
>public void setPfId( Integer pfId );
>
>public Integer getPfParentId();
>
>public void setPfParentId( Integer pfParentId );
>
>public Integer getPfRootId();
>
>public void setPfRootId( Integer pfRootId );
>
>public String getName();
>
>public void setName( String name );
> }
>
> @ProxyForName( value = "com.vo.GenericTreeNode" )
> public interface AccountNodeProxy extends ValueProxy{
>
> List> getChildren();
>
> AccountProxy getData();
>
> }
>
>
> @ServiceName( value = "com.server.DesktopService", locator =
> "com.server.locator.SpringServiceLocator" )
> public interface DesktopRequest extends RequestContext {
>
>abstract Request> getAccounts( Integer realm,
> List relations );
>
>abstract Request>>
> getAccountsNodes( Integer realm, List relations );
>
>abstract Request> getAccounts( String userId,
> List realms );
>
>abstract Request> getApplications();
>
>abstract Request> getAttributeDefs( String
> attributeName );
>
> }
>
>
> But I still get the message below on Compiling , where am I doing
> wrong.
>
> warning: Cannot fully validate proxy since type
> com.vo.GenericTreeNode is not available
>
> Add @SuppressWarnings("requestfactory") to dismiss.
> error: The type AccountProxy cannot be used here
> warning: Cannot validate this method because the domain mapping for
> the return
> type
> (com.client.proxy.AccountNodeProxy)
> could not be resolved to a domain type
>
> Add @SuppressWarnings("requestfactory") to dismiss.
> error: Could not load domain mapping for context DesktopRequest.
> Check that both the shared interfaces and server domain types are on
> the classpa
> th.
> 2 errors
> [INFO]
> 
> [ERROR] BUILD ERROR
> [INFO]
> 
> [INFO] Command execution failed.
>
> --
> 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.
>
>

-- 
You received this message be

Re: 3-tier architecture /gwt

2012-06-01 Thread Alexandre Ardhuin
Hi Juan,

Was you triing with the latest version ?
Could you try to update "gwt-maven-archetypes" ( in gwt-maven-archetypes
folder : git pull ) and reinstall the plugin ( mvn clean install ) ?

The latest version works fine for me.

Alexandre


2012/6/1 Juan Pablo Gardella 

> Hi Thomas,
>
> I try to install the archetype but said that:
>
> [INFO]
> 
> [INFO] Reactor Summary:
> [INFO]
> [INFO] gwt-maven-archetypes .. SUCCESS [0.344s]
> [INFO] modular-webapp  FAILURE [4.469s]
> [INFO] modular-requestfactory  SKIPPED
> [INFO] guice-rf-activities ... SKIPPED
> [INFO]
> 
> [INFO] BUILD FAILURE
> [INFO]
> 
> [INFO] Total time: 5.172s
> [INFO] Finished at: Thu May 31 21:33:24 GFT 2012
> [INFO] Final Memory: 7M/17M
> [INFO]
> 
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-archetype-plugin:2
> .2:integration-test (default-integration-test) on project modular-webapp:
> [ERROR] Archetype IT 'basic-webapp' failed: Some content are not equals
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the
> -e swit
> ch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please rea
> d the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
> xception
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the
> command
>
> [ERROR]   mvn  -rf :modular-webapp
>
>
> Whatt's the problem?
>
>
> 2012/5/3 Thomas Broyer 
>
>>
>>
>> On Thursday, May 3, 2012 4:25:58 PM UTC+2, Joseph Lust wrote:
>>>
>>> This topic has been discussed on 
>>> SOand
>>>  other places.
>>>
>>> I am familiar with the suggested GWT archatype, but we found it limiting
>>> for large projects. Instead, we (40 devs) use the following Maven project
>>> structure to break up our project:
>>>
>>>
>>>- MainProject.pom
>>>   - Client-Interfaces.pom (or POJO's as you put it)
>>>   - Client-GWT.pom (frontend GWT code, uses Interfaces)
>>>   - Server.pom (backend Java code, uses Client-Interfaces)
>>>   - Web.pom (Tomcat settings)
>>>
>>> So just running the main pom will build the interfaces that are then
>>> used by the server side code and the client side GWT. The *Web* project
>>> contains Tomcat specific items and dictates how the *war* is packed up.
>>> *Benefits: *You don't need to rebuild the whole project if changes are
>>> only in your services. Great because services compile in a few seconds, GWT
>>> in several minutes.
>>>
>>
>> Just a quick note: this is exactly what
>> https://github.com/tbroyer/gwt-maven-archetypes does (except for the
>> server vs. web separation; that's something we did in our project too, but
>> I didn't think it was worth putting into the archetypes: people should just
>> split the module if/when they feel the need for it; I might add it to
>> another archetype though); this is *not* the same as the archetype from
>> the gwt-maven-plugin!
>> Announcement:
>> http://tbroyer.posterous.com/announcing-gwt-maven-archetypes-project
>>
>> --
>> 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/-/r-lqZNBrjWUJ.
>>
>> 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.
>>
>
>  --
> 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.
>

-- 
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: 2 RequestFactory with 2 differents Proxy on the same domain class

2012-05-21 Thread Alexandre Ardhuin
2012/5/21 Thomas Broyer 

>
>
> On Wednesday, May 9, 2012 4:47:47 PM UTC+2, Thomas Broyer wrote:
>>
>> Yes, please file a bug for that.
>>
>> If you can contribute the patch to gwt-code-reviews.appspot.com it'd be
>> even better (see https://developers.**google.com/web-toolkit/**
>> makinggwtbetter#**contributingcode
>> )
>> As far as the patch goes, your processing loses the
>> "most-to-least-derived type" ordering of the domainToClientType values that
>> Deobfuscator#getClientProxies mandates.
>> See http://code.google.com/p/**google-web-toolkit/source/**
>> browse/trunk/user/src/com/**google/web/bindery/**requestfactory/apt/**
>> TypeComparator.java
>>  for
>> the ordering, to be ported to Class (see http://code.google.com/p/**
>> google-web-toolkit/source/**browse/trunk/user/src/com/**
>> google/gwt/place/rebind/**MostToLeastDerivedPlaceTypeCom**parator.javafor
>>  an almost-equivalent)
>>
>
> Thinking about it now, it looks like some simple Set processing could
> work, without the need to resolve Classs and compare them, because the
> lists in both deobfuscators are already "complete" wrt inheritance
> hierarchy: using A and B ordered sets as input, the resulting list C =
> (A-B) + (B-A) + intersection(A,B), or more simply: C = (A-B) + B.
> The idea is that everything that's not already in the list wouldn't change
> the result; this assumes however that the deobfuscators have been created
> from the same interface hierarchies (e.g. if in one case the list were
> C,B,A, where C extends B, and B extends A; and in the other case the list
> were C,A, with C extends A, then constructing a "merged list" B,C,A would
> be wrong; that's really an edge-case and I wouldn't bother if that failed).
>
> Something like:
>   LinkedHashSet a_only = new
> LinkedHashSet(d.domainToClientType.get(domain));
>   a_only.removeAll(existing.domainToClientType.get(domain));
>   ArrayList new_list = new ArrayList(a_only);
>   new_list.addAll(existing.domainToClientType.get(domain));
>
> --
> 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/-/-5wv6ELRH7kJ.
>
> 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.
>

Your solution seems to work quick and well in 99% of the cases.
However, thanks to
com.google.web.bindery.requestfactory.server.ServiceLayerCache, the
resolution and comparasion of classes will be done only once (and only on
merges). So I would prefer to cover 100% of the cases and thus skip some
really hard debugging in the edge-cases.

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



2 RequestFactory with 2 differents Proxy on the same domain class

2012-05-09 Thread Alexandre Ardhuin
Hi All,

I have an application with 2 gwt modules. Each module uses its own
RequestFactory and its own Proxy for the same domain object (ie. 2
RequestFactory with 2 differents Proxy on the same domain class).
The first RF call succeeds and following RF of the same type too but when
the other RF is used an exception occurs :
"The domain type Xxx cannot be sent to the client"

After some tests, the problem occurs only for 2 RF. Having only one RF with
2 Proxy on the same domain object works well.

The problem seems to be in
com.google.web.bindery.requestfactory.vm.impl.Deobfuscator.Builder.merge(Deobfuscator).
Doing the following modification resolves it.

public Builder merge(Deobfuscator existing) {
+  Set domains = new HashSet();
+  domains.addAll(d.domainToClientType.keySet());
+  domains.addAll(existing.domainToClientType.keySet());
+  for (String domain : domains) {
+Set clientTypes = new HashSet();
+clientTypes.addAll(d.domainToClientType.get(domain));
+clientTypes.addAll(existing.domainToClientType.get(domain));
+d.domainToClientType.put(domain, Collections.unmodifiableList(new
ArrayList(clientTypes)));
+  }
-  d.domainToClientType.putAll(existing.domainToClientType);
  d.operationData.putAll(existing.operationData);
  // referencedTypes recomputed in build()
  d.typeTokens.putAll(existing.typeTokens);
  return this;
}

Can someone confirms this is a bug ? (I haven't found any issue on that)

Alexandre

-- 
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: CalendarUtil has no hour, minute, seconds options

2012-02-06 Thread Alexandre Ardhuin
Hi,

You can do :

Date now = new Date();
Date date5minutesAgo = new Date(now.getTime() -
TimeUnit.MINUTES.toMillis(5));
Date date5hoursAgo = new Date(now.getTime() - TimeUnit.HOURS.toMillis(5));

Alexandre

2012/2/7 tong123123 

> as gwt has no Calendar class, how to do something like current time
> minus 5 minutes, current time minus 5 hours?
> I see the CalendarUtil class but it has just
> addDaysToDate(java.util.Date date, int days)  and
> addMonthsToDate(java.util.Date date, int months) method?
>
> --
> 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.
>
>

-- 
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: Scroll are not coming while using DockLayoutPanel

2011-12-05 Thread Alexandre Ardhuin
Hi,

You have to explicitly add ScrollPanel in your DockLayoutPanel to make the
area scrollable.

Alexandre

2011/12/5 saurabh saurabh 

> Hi everyone,
> I got the following lines of code here:
>
>
> DockLayoutPanel doc = new DockLayoutPanel(Unit.PX);
> 
>  //some code goes here to add widgets to doc
> 
>
> RootLayoutPanel.get().add(doc);
>
> Now the size of docklayoutpanel here exeeds client window height but I
> am not getting any scroll bars here on browser. I see css property
> 'overflow: hidden' could be a problem but taking out all 'overflow:
> hidden' makes it more ugly.
>   I hope there would be a better solution to handle this problem
>
> Thanks in advance
>
> --
> 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.
>
>

-- 
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: Debugging application on external server

2011-11-30 Thread Alexandre Ardhuin
Hi,

To debug a remote server you have to :
 - start DevMode on your localhost,
 - connect to your remote server with the normal url
 - add "gwt.codesvr=localhost:9997" parameter to the url where 9997 is the
port on witch DevMode is listening

As exemple if you have your app running on
http://remoteServer/MyApp/Mapp.html and DevMode listening on 9997, you have
to use http://remoteServer/MyApp/Mapp.html?gwt.codesvr=localhost:9997

Alexandre

2011/11/28 mariuszym 

> Hi!
>
> I'm new in GWT and I have annoying problem with GWT. I started develop
> existing project (GWT module + EJB module) and I can't begin to debug
> this.
> Application is working on server Glassfish 2.1 (external server - not
> on my localhost). I have ant script which deploying app on this
> server, but I still have to compile and deploy. Application uses some
> resources from server (jdbc connections, ldap realm), so I can't test
> it on my localhost (Jetty or Glassfish).
>
> I tried to change debug configuration in my Eclipse - now when I run
> application in my console I have:
> Could not connect to remote UI listening at localhost:8085. Using
> default UI instead.
>
> In development mode console I have:
> 00:00:25,623  [INFO] Paste
> http://externalServer:8085/MyApp/MyApp.html&gwt.codesvr=externalServer:-1
> into a browser.
> After paste I have error:
> Plugin failed to connect to Development Mode server at
> 10.11.131.124:-1
>
> I know that's wrong, but I have no more ideas how to configure. Is
> there a way to run debug this application - I can't find any similiar
> case on the forum.
>
>
>
> --
> 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.
>
>

-- 
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: How to handle Browser History using UiBinder ?

2011-11-30 Thread Alexandre Ardhuin
Hi,

see
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html

Alexandre

2011/11/30 suresh babu 

> Thank you for your quick reply, so how can I manage history without using
> MVP framework.
>
>
> On Tue, Nov 29, 2011 at 10:01 PM, Thomas Broyer wrote:
>
>> UiBinder is about generating widget/layout code from XML, it has nothing
>> to do with handling navigation within your app; i.e. instead of writing:
>>
>> this.textBox = new TextBox();
>> this.textBox.setText("some text");
>> this.textBox.addStyleName(cssResource.textbox());
>> String textBoxPlaceholderId = HTMLPanel.createUniqueId();
>> HTMLPanel htmlPanel = new HTMLPanel("" + SafeHtmlUtils.htmlEscape(myConstants.label())
>> + " ");
>> htmlPanel.addAndReplaceElement(textBox, textBoxPlaceholderId);
>>
>> initWidget(htmlPanel);
>>
>> you simply write:
>> 
>>
>> some text
>> 
>>
>> It has really nothing to do with "handing token with history".
>>
>> --
>> 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/-/y5fJNj7KvDgJ.
>> 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.
>>
>
>
>
> --
> Regards
> Suresh Babu G
>
>
> 
>
>  --
> 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.
>

-- 
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: Game Development Resources for GWT

2011-11-03 Thread Alexandre Ardhuin
Hi,

You can look at the great tutorial "Building Games With Google
Technologies" http://proppy-playn101.appspot.com/#1

Alexandre


2011/11/2 James Butler 

> If anyone else knows of online tutorials, books, or other game resources
> for GWT, please reply here and list them for me.
> Thanks
>
>  --
> 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/-/vMYEcNZik1kJ.
>
> 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.
>

-- 
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: NPE with RequestFactory (GWT 2.4.0) when returned List contains a null value

2011-09-27 Thread Alexandre Ardhuin
Oups, I had searched on this group but not in issue tracker.

Thanks Thomas

-- 
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: initWidget(uiBinder.createAndBindUi(this));

2011-09-27 Thread Alexandre Ardhuin
Hi,

As javadoc of Composite.initWidget() says :
Sets the widget to be wrapped by the composite. The wrapped widget must be
set before calling any {@link Widget} methods on this object, or adding it
to a panel. This method may only be called once for a given composite.

So, it doesn't matter where you call this sentence. However, you should
write this in constructor instead of onload, thus you will be sure that
initWidget will be call only one time.

Alexandre.

2011/9/27 wahaha 

> "initWidget(uiBinder.createAndBindUi(this));"
>
> does this sentance shoud write in onload() method or in the contrator
> method?
>
> --
> 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.
>
>

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



NPE with RequestFactory (GWT 2.4.0) when returned List contains a null value

2011-09-27 Thread Alexandre Ardhuin
Hi,

After migrate from gwt-2.3.0 to gwt-2.4.0, I face the following NPE when the
requestFactory method returns a List containing a null value :

27 sept. 2011 10:10:39
com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost
GRAVE: Unexpected error
java.lang.NullPointerException
at
com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:618)
at
com.google.web.bindery.requestfactory.server.Resolver.resolveClientValue(Resolver.java:383)
at
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processInvocationMessages(SimpleRequestProcessor.java:483)
at
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:225)
at
com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:127)
at
com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133)

// in myRequest
Request> getStringsWithNull();
Request> getStringsWithoutNull();

// in implementation
public List getStringsWithNull() {
  return Arrays.asList("test", null, "test");
}
public List getStringsWithoutNull() {
  return Arrays.asList("test", "test");
}

Calling getStringsWithoutNull() works as expected but
getStringsWithoutNull() throws the NPE.

Is there a explication for that or is it a bug ?

Alexandre.

-- 
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: Remote Logging

2011-09-22 Thread Alexandre Ardhuin
Hi,

If you use the SimpleRemoteLogHandler, you have to add an URL mapping in
your web.xml


remoteLogging

com.google.gwt.logging.server.RemoteLoggingServiceImpl


remoteLogging
/YOUR_MODULE/remote_logging


Alexandre


2011/9/17 Mike 

> I'm attempting to use remote logging as described in
>
> http://code.google.com/webtoolkit/doc/latest/DevGuideLogging.html#Remote_Logging
>
> I'm using a very simple test app based on the Greeting example.  It
> appears to work in the Eclipse hosted mode, but when I deploy to
> Tomcat6 I see nothing in the logs.  A network trace shows that the
> HTTP flows are working as desired, so this leads me to think that it
> somehow a Tomcat configuration.   The Firebug console shows that
> things appear to be working.
>
> I'm trying to a FINE level message.  Do I need some kind of logging
> config file someplace?  Do I need to sure the common loggings library
> is accessible to Tomcat?
>
> Any suggestions will be greatly appreciated.
>
> Thanks,
>
> Mike
>
> --
> 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.
>
>

-- 
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: onModuleLoad() - what is it in javascript

2011-09-08 Thread Alexandre Ardhuin
Hi,

Although I can not find an up-to-date version of this file in 2.4
documentation, some informations on the bootstrap sequence are available at
http://code.google.com/webtoolkit/doc/1.6/DevGuideOrganizingProjects.html#DevGuideBootstrap

Alexandre.

2011/9/8 dreamer 

> Hi,
>
> I am trying to figureout, what "onModuleLoad()" becomes after gwt
> compilation.
> Basically to figure out the magic behind "onLoadModule".
>
> All is well, java script gets loaded in head. But how on the earth any
> function inside that script got
> executed, are there any events, that Browser fires once script is
> loaded?
>
> I checked compiled code, here there suspects. I am not javascript
> guru, can somebody throw some light on this.
> " schooldistrict.nocache.js" is the main java script name for my GWT
> app.
> = here are three suspects ===
>  schooldistrict.onInjectionDone = function(){
>scriptsDone = true;
>$stats && $stats({moduleName:$intern_1, sessionId:$sessionId,
> subSystem:$intern_2, evtGroup:$intern_51, millis:(new Date).getTime(),
> type:$intern_9});
>maybeStartModule();
>  }
> -
>  schooldistrict.onScriptLoad = function(){
>if (frameInjected) {
>  loadDone = true;
>  maybeStartModule();
>}
>  }
> -
>  var onBodyDoneTimerId = setInterval(function(){
>if (/loaded|complete/.test($doc.readyState)) {
>  maybeInjectFrame();
>  onBodyDone();
>}
>  }
>  , 50);
> --
>
> Global school district
> http://schoolk12.appspot.com/
>
> --
> 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.
>
>

-- 
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: RequestBuilder doesnt work

2011-09-08 Thread Alexandre Ardhuin
Hi,

You can not call an other domain with xmlHttpRequest. This is known as "same
origin policy".

Alexandre.


2011/9/8 wahaha 

> i tested the RequestBuilder class,it does not work.
>
>
>
>final RequestBuilder rb = new
> RequestBuilder(RequestBuilder.POST,
>"
> http://code.google.com/intl/zh-CN/webtoolkit/doc/1.6/tutorial/
> RPC.html");
>rb.setCallback(new RequestCallback() {
>public void onResponseReceived(Request request,
> Response response)
> {
>
>  Window.alert(String.valueOf(response.getStatusCode()));
>if (response.getStatusCode() == 200) {
>Window.alert(response.getText());
>}
>}
>
>@Override
>public void onError(Request request, Throwable
> exception) {
>
>}
>});
>
>Button btn = new Button();
>RootPanel.get().add(btn);
>btn.addClickHandler(new ClickHandler() {
>@Override
>public void onClick(ClickEvent event) {
>try {
>rb.send();
>} catch (RequestException e) {
>e.printStackTrace();
>}
>}
>});
>
> --
> 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.
>
>

-- 
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: JSNI - Managing arrays in native method

2011-09-07 Thread Alexandre Ardhuin
Hi,

You should use Overlays (see
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsOverlay.html
)

In your case :

public class Location extends JavaScriptObject {
  public static final native Location create(double latitude, double
longitude) /*-{ return $wnd.Microsoft.Maps.Location(latitude, longitude);
}-*/;

  // Typically, methods on overlay types are JSNI
  public final native String getLatitude() /*-{ return this.latitude; }-*/;
  public final native void setLatitude(String latitude)  /*-{ this.latitude
= latitude;  }-*/;
}

// push them in an JsArray
Location timbuktu = Location.create(lat1, lng1);
Location kabara = Location.create(lat2, lng2);
JsArray locations = JsArray.createArray().cast();
locations.push(timbuktu);
locations.push(kabara);

// and with JSNI
public native void addPolyline(JsArray locations)/*-{
var line = new $wnd.Microsoft.Maps.Polyline(locations);
var firstLocation = locations[0];
map.setView( {zoom:8, center:firstLocation});
map.entities.push(line);
}-*/;


Alexandre.


2011/9/7 Jésica 

> Thanks for your help Alexandre, I would like to add more context to
> the issue I'm facing:
>
> I have a domain object called Location, with the following structure:
>
> public class Location{
>
>Double latitude;
>Double longitude;
>(...)
> }
>
>
> **
>
> public class Test implements EntryPoint {
>
> MapWrapper map = MapWrapper.getMapWrapper();
> map.getMap();
>
> Collection locations = new ArrayList();
> locations.add(timbuktu);
> locations.add(kabara);
>
> //Routes section - Polyline
> JsArrayString locationsJS = JsArrayString.createArray().cast();
>
> for (Location location : locations) {
>  locationsJS.push("{latitude:"+ location.getLatitude() +",
> longitude:"+location.getLongitude()+"}");
> }
>
> map.addPolyline(locationsJS);
>
> }
>
>
> **
>
> And this is what addPolyline does:
>
>public native void addPolyline(JsArrayString locations)/*-{
>var locationsArray = new Array();
>
>for (var i=0; i var parsedJSON = eval('('+locations[i]+')');
>var latitude=parsedJSON.latitude;
>var longitude=parsedJSON.longitude;
>var locationMS = new $wnd.Microsoft.Maps.Location(latitude,
> longitude);
>locationsArray[i] = locationMS;
>}
>
>var line = new $wnd.Microsoft.Maps.Polyline(locationsArray);
>var firstLocation = locationsArray[0];
>map.setView( {zoom:8, center:firstLocation});
>map.entities.push(line);
>}-*/;
>
>
> **
>
> I would like to know if there is a better way for handling the array
> of Java objects. The thing here is that I wouldn't be working with
> single objects like numbers or strings, but with a custom Java object.
> Do I need to build a wrapper for doing It? -something like
> JsLocationArray-, and add in there the possibility of pushing a
> Location instead of the JSON structure I'm using?
>
> Jésica.
>
> On Sep 7, 5:13 am, Alexandre Ardhuin 
> wrote:
> > Hi,
> >
> > As said inhttp://
> code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI...,
> > Java arrays appear to javascript as "opaque value that can only be passed
> > back into Java code".
> > You have to use JsArray, JsArrayBoolean, JsArrayInteger, JsArrayNumber or
> > JsArrayString to pass javascript arrays.
> >
> > Alexandre.
> >
> > 2011/9/6 Jésica 
> >
> > > Hi, I'm having a JS exception saying "null" when running the following
> > > code:
> >
> > > //Java Code
> > > bingMap.addPolyline(locationsArray);
> >
> > > //JSNI Code
> > > public native void addPolyline(Location[] locations)/*-{
> > >   for (var i = 0; i < locations.length; i++){
> > >alert(locations[i]);
> > >   }
> > > }-*/
> >
> > > Is an extra processing required when managing arrays passed by
> > > parameter to a native method?
> > > Thanks in advance!
> >
> > > --
> > > 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 gro

Re: JSNI - Managing arrays in native method

2011-09-07 Thread Alexandre Ardhuin
Hi,

As said in
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsJSNI.html#passing-java,
Java arrays appear to javascript as "opaque value that can only be passed
back into Java code".
You have to use JsArray, JsArrayBoolean, JsArrayInteger, JsArrayNumber or
JsArrayString to pass javascript arrays.

Alexandre.

2011/9/6 Jésica 

> Hi, I'm having a JS exception saying "null" when running the following
> code:
>
> //Java Code
> bingMap.addPolyline(locationsArray);
>
> //JSNI Code
> public native void addPolyline(Location[] locations)/*-{
>   for (var i = 0; i < locations.length; i++){
>alert(locations[i]);
>   }
> }-*/
>
> Is an extra processing required when managing arrays passed by
> parameter to a native method?
> Thanks in advance!
>
> --
> 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.
>
>

-- 
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: JSNI Unkown callback

2011-09-06 Thread Alexandre Ardhuin
Hi,

You can define an interface like :

package myPackage;
interface GetUrlCallback{
  String getUrl(Bounds bounds);
}

and change the method TMSOptions#setGetURL() to accept a GetUrlCallback
parameter :

public native void setGetURL(GetUrlCallback callback)/*-{
  this.getURL = function(bounds){return callback.@myPackage.GetUrlCallback
::getUrl(LmyPackage/Bounds;)(bounds);};
}-*/

This should work.

Alexandre.

2011/9/6 Fabe 

> Hi,
>
> I want to write JSNI method that can pass a Java function as
> parameter, but that function will not be used by me, but by the
> underlying API (OpenLayers in my case).
>
> "Full" JavaScript example:
> var tms = OpenLayers.Layer.TMS('My TMS Layer', '', {
>  serviceVersion: '.',
>  layername: 'dir1/dir2',
>  type: 'png',
>  getURL: overlay_getTileURL, // This function will be called each
> time the user moves or zooms on the map
>  isBaseLayer: true,
>  visibility:false
> });
> map.addLayer(tms);
>
> function overlay_getTileURL(bounds) {
>  // my code
>  // return URL (string)
> }
>
>
> I have a very complete wrapper for the TMS and Bounds objects, so I
> can write in Java:
> TMSOptions myTmsOptions = new TMSOptions();
> TMS tms = new TMS("My TMS Layer", "", myTmsOptions);
> map.addLayer(tms);
>
> What I want to do now is something like this in Java:
> myTmsOptions.setGetURL("overlayGetTileUrl);
>
> // Can be in any class, in any package
> public String overlayGetTileUrl(Bounds bounds) {
>  String url = "";
>  // build a string url
>  return url;
> }
>
> I've looked in the documentation but only found how to call a Java
> function for which I already know the name (and the package's name).
> I've searched a little in that forum but didn't find something looking
> like this.
>
> Is that possible ? If yes, how ?
>
> --
> 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.
>
>

-- 
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: ResourceBundle an Properties

2011-09-06 Thread Alexandre Ardhuin
Hi,

GWT has a built-in support for internationalization.
If you only want to write translated messages, use
com.google.gwt.i18n.client.Constants (see
http://code.google.com/webtoolkit/doc/latest/DevGuideI18nConstants.html) or
com.google.gwt.i18n.client.Messages if you need to substitute parameters
into the translated messages (see
http://code.google.com/webtoolkit/doc/latest/DevGuideI18nMessages.html ).
This two classes are quite similar to Properties Files.

For more informations, see
http://code.google.com/webtoolkit/doc/latest/DevGuideI18n.html

Alexandre

2011/9/5 Markus Unger 

> Hello!
>
> I am new at GWT and I try to develop an simple login form. So the
> basic is working (RPC, Submit Button and so on). Now i will add a
> properties File to load different languages. In struts there is a
> simple Properties File like this:
>
> title = my title
> version = 0.1
>
> How can I use a Propertie File?
>
> I tried it with da DataResource and a ClientBundle
>
>
> public interface MessageBundle extends DataResource {
>
>String title();
>
> }
>
> public interface ResourceBundle extends ClientBundle {
>
>public static final ResourceBundle INSTANCE =
> GWT.create(ResourceBundle.class);
>
>@Source("messages/Messages.properties")
>MessageBundle messageBundle();
>
> }
>
> I get the following error: "Type mismatch: cannot convert from new
> DataResource(){} to MessageBundle"
>
> Does anybody use Propertie File in GWT?
>
> Thanks for help!
>
> Regards,
>
> Markus
>
> --
> 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.
>
>

-- 
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: custom tabs

2011-09-01 Thread Alexandre Ardhuin
Hi,

You can use CSS to do this

.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab {
background-color: #123456;
}
.gwt-TabLayoutPanel .gwt-TabLayoutPanelTab-selected {
background-color: #654321;
}

Alexandre


2011/9/1 nf...@pevco.com 

> I'm using TabLayoutPanel and would like to customize the tabs on the tab
> bar. Currently the active tab is white and the inactive tabs are gray. I've
> tried setting the background-color for the widget in the tab, but that
> didn't seem to work. I'd like the active tab to be green and the inactive
> tabs to be blue. Any suggestions?
>
> --
> 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/-/E6tOZaH0LQ0J.
> 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.
>

-- 
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: Access static file from onModuleLoad() method

2011-08-30 Thread Alexandre Ardhuin
Hi,

You should have the following :
/MyModule.gwt.xml
/public/config.xml

Then, you can access file with the URL : GWT.getModuleBaseURL() +
"config.xml"

An other way to load content is to use a TextResource with ClientBundle (
see
http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#TextResource)

Alexandre


2011/8/30 AThinerCoin 

> I'd like to access a static file, let's say config.xml from my onModuleLoad
> method.
>
> It says on this webpage, that config.xml should live in the public sibling
> dir of my .gwt.xml file, but I've tried that and onModuleLoad function still
> gives me the error below.
>
> It also suggests that I add a line to the .gwt.xml file likepath='public'/>  but that isn't working for me either.
>
>
> http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html
>
> I've tried searching for an example, but I don't see one.
>
> com.google.gwt.xml.client.impl.DOMParseException: Failed to parse: error on
> line 1 at column 1: Document is empty
>
> at
> com.google.gwt.xml.client.impl.XMLParserImplSafari.throwDOMParseException(XMLParserImplSafari.java:38)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
> at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
> at
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:326)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:207)
> at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:132)
> at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
> at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
> at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
> at
> com.google.gwt.xml.client.impl.XMLParserImplSafari.parseImpl(XMLParserImplSafari.java)
> at
> com.google.gwt.xml.client.impl.XMLParserImpl.parse(XMLParserImpl.java:278)
> at com.google.gwt.xml.client.XMLParser.parse(XMLParser.java:47)
> at com.java2s.gwt.client.client.GWTClient.loadConfig(GWTClient.java:56)
> at
> com.java2s.gwt.client.client.GWTClient.onModuleLoad(GWTClient.java:46)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
> at
> com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:193)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:510)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
> at java.lang.Thread.run(Thread.java:680)
>
> 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/-/hn3FEy1zmZAJ.
> 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.
>

-- 
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: Deferred Binding in gwt

2011-08-30 Thread Alexandre Ardhuin
Hi,

Like property's definition of "user.agent" ( see
http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/UserAgent.gwt.xml?r=4347)
you can define a property ( or extend "user.agent" ) to detect chrome
or
safari.

  
  

Thus, you can use it with  or 

Alexandre.


2011/8/29 Tarnakin Sergey 

> Hi, I have to compile different code for safari and chrome browsers.
> The problem is when I use code like
> this
>  class="org.raccoon.hit.client.ui.balancenew.BalanceViewImplChrome">
> class="org.raccoon.hit.client.ui.balance.BalanceViewImplAll"/>
>
>
>
>   with>
> property "user.agent" is the same for safari and chrome.
>
> --
> 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.
>
>

-- 
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: files generated with very long name

2011-06-24 Thread Alexandre Ardhuin
Thanks Thomas,

As you suggest, I tried to use
${project.build.directory}/gwt-generated.jar but unfortunately it
does not work ( "gwt-generated.jar" is just a folder in the build directory
).
I will wait 2.4 release to use longer names.

Alexandre.


2011/6/24 Thomas Broyer 

> See http://code.google.com/p/google-web-toolkit/issues/detail?id=6015 and
> http://code.google.com/p/google-web-toolkit/source/detail?r=10170
> Will be in GWT 2.4.
>
> Alternatively, you can just remove the "-gen" argument when you launch the
> GWT compiler, and it shouldn't write the files to disk.
> This is unfortunately not possible with the gwt-maven-plugin; I haven't
> tried but maybe using a JAR as the output might allow such long file names:
> ${project.build.directory}/gwt-generated.jar
>
> --
> 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/-/SROdGXbEX8YJ.
> 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.
>

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



files generated with very long name

2011-06-23 Thread Alexandre Ardhuin
Hi all,

I'm on a encypted file system that does not support more than 256 characters
for file names.
My gwt project does not compile because of this restriction. One of
generated files is named :
CxxAxxRequest_NxxxCxxProxyAutoBean_com_google_web_bindery_requestfactory_shared_impl_EntityProxyCategory_com_google_web_bindery_requestfactory_shared_impl_ValueProxyCategory_com_google_web_bindery_requestfactory_shared_impl_BaseProxyCategory.java

I can shorten my Proxy name but is there an other way to deal with this ?

Thanks for help,
Alexandre.

-- 
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: RequestFactory with Collections of ValueProxy in a ValueProxy

2011-06-21 Thread Alexandre Ardhuin
it looks like
http://code.google.com/p/google-web-toolkit/issues/detail?id=6354

Alexandre.


2011/6/20 Alexandre Ardhuin 

> Hi all,
>
> I face a very strange behavior on requestFactory with GWT-2.3.
> Sometimes, java.util.Set collections are not deserialized as expected
> (java.util.List works well). Some elements are missing.
>
> Here's the code that illustrates the problem :
>
> // --
> // --- client side code
> // --
>
> @Service(value = MyService.class, locator = MyLocator.class)
> public interface MyRequest extends RequestContext {
> Request getMyObject(int count);
> }
>
> @ProxyFor(value = MyObject.class)
> public interface MyObjectProxy extends ValueProxy {
> int getExpectedSize();
> Set getStringContainers();
> }
>
> @ProxyFor(value = StringContainer.class)
> public interface StringContainerProxy extends ValueProxy {
> String getString();
> }
>
> // --
> //  server side code
> // --
>
> public class MyLocator implements ServiceLocator {
> @Override
> public Object getInstance(final Class clazz) { return new
> MyService(); }
> }
>
> public class MyService {
> public MyObject getMyObject(int count) {
> final Set stringContainers = new
> HashSet();
> for (int i = 0; i < count; i++) {
> stringContainers.add(new StringContainer(String.valueOf(i)));
> }
> return new MyObject(stringContainers.size(), stringContainers);
> }
> }
>
> public class MyObject {
> private final int expectedSize;
> private final Set stringContainers;
>
> public MyObject(int expectedSize, Set
> stringContainers) { this.expectedSize = expectedSize; this.stringContainers
> = stringContainers; }
> public int getExpectedSize() { return expectedSize; }
> public Set getStringContainers() { return
> stringContainers; }
> }
>
> public class StringContainer {
> private final String string;
>
> public StringContainer(String string) { this.string = string; }
> public String getString() { return string; }
> }
>
>
> // --
> //  entry point that show different sizes
> // --
>
> public class MainPage implements EntryPoint {
> public void onModuleLoad()
> {
> final ClientFactory clientFactory =
> GWT.create(ClientFactory.class);
> clientFactory.init();
> call(clientFactory, 0);
> }
>
> private void call(final ClientFactory clientFactory, final int i)
> {
> if (i > 100) {
> return;
> }
>
> clientFactory.getRequestFactory().myRequest().getMyObject(i).fire(new
> Receiver() {
> @Override
> public void onSuccess(MyObjectProxy response) {
> RootPanel.get().add(new HTML(response.getExpectedSize() + "
> " + response.getStringContainers().size()));
> call(clientFactory, i + 1);
> }
> });
> }
> }
>
> Here's the results for the 30 first requests (left is the expected size,
> right is the real size) :
> 0 0
> 1 1
> 2 2
> 3 3
> 4 4
> 5 5
> 6 6
> 7 7
> 8 8
> 9 9
> 10 10
> 11 11
> 12 4  // problems start here...
> 13 4
> 14 4
> 15 4
> 16 4
> 17 4
> 18 4
> 19 4
> 20 4
> 21 4
> 22 4
> 23 9
> 24 10
> 25 11
> 26 12
> 27 13
> 28 14
> 29 14
> 30 14
>
>
> Using java.util.List instead of java.util.Set resolves the problem.
>
> Did i miss something ?
>
> Alexandre.
>
>

-- 
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 with Collections of ValueProxy in a ValueProxy

2011-06-20 Thread Alexandre Ardhuin
Hi all,

I face a very strange behavior on requestFactory with GWT-2.3.
Sometimes, java.util.Set collections are not deserialized as expected
(java.util.List works well). Some elements are missing.

Here's the code that illustrates the problem :

// --
// --- client side code
// --

@Service(value = MyService.class, locator = MyLocator.class)
public interface MyRequest extends RequestContext {
Request getMyObject(int count);
}

@ProxyFor(value = MyObject.class)
public interface MyObjectProxy extends ValueProxy {
int getExpectedSize();
Set getStringContainers();
}

@ProxyFor(value = StringContainer.class)
public interface StringContainerProxy extends ValueProxy {
String getString();
}

// --
//  server side code
// --

public class MyLocator implements ServiceLocator {
@Override
public Object getInstance(final Class clazz) { return new
MyService(); }
}

public class MyService {
public MyObject getMyObject(int count) {
final Set stringContainers = new
HashSet();
for (int i = 0; i < count; i++) {
stringContainers.add(new StringContainer(String.valueOf(i)));
}
return new MyObject(stringContainers.size(), stringContainers);
}
}

public class MyObject {
private final int expectedSize;
private final Set stringContainers;

public MyObject(int expectedSize, Set stringContainers)
{ this.expectedSize = expectedSize; this.stringContainers =
stringContainers; }
public int getExpectedSize() { return expectedSize; }
public Set getStringContainers() { return
stringContainers; }
}

public class StringContainer {
private final String string;

public StringContainer(String string) { this.string = string; }
public String getString() { return string; }
}


// --
//  entry point that show different sizes
// --

public class MainPage implements EntryPoint {
public void onModuleLoad()
{
final ClientFactory clientFactory = GWT.create(ClientFactory.class);
clientFactory.init();
call(clientFactory, 0);
}

private void call(final ClientFactory clientFactory, final int i)
{
if (i > 100) {
return;
}

clientFactory.getRequestFactory().myRequest().getMyObject(i).fire(new
Receiver() {
@Override
public void onSuccess(MyObjectProxy response) {
RootPanel.get().add(new HTML(response.getExpectedSize() + "
" + response.getStringContainers().size()));
call(clientFactory, i + 1);
}
});
}
}

Here's the results for the 30 first requests (left is the expected size,
right is the real size) :
0 0
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 4  // problems start here...
13 4
14 4
15 4
16 4
17 4
18 4
19 4
20 4
21 4
22 4
23 9
24 10
25 11
26 12
27 13
28 14
29 14
30 14


Using java.util.List instead of java.util.Set resolves the problem.

Did i miss something ?

Alexandre.

-- 
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: GWT remote logging

2011-05-24 Thread Alexandre Ardhuin
Have you add an URL mapping in your web.xml ?


remoteLogging

com.google.gwt.logging.server.RemoteLoggingServiceImpl


remoteLogging
/YOUR_MODULE/remote_logging


Alexandre


2011/5/24 Dave 

> I'm trying to Log a message to a server log.  I found these
> instructions:
>
> http://code.google.com/webtoolkit/doc/latest/DevGuideLogging.html#Remote_Logging
>
> In my GWT XML I have
> 
>  >
>
> my code is:
> SimpleRemoteLogHandler remoteLog = new SimpleRemoteLogHandler();
> remoteLog.publish(new LogRecord(Level.INFO, "test GWT log"));
>
> I'm sure that I'm missing a simple setup step.
>
> I get the error message.
> WireActivityLogger SEVERE: Remote logging failed:
> com.google.gwt.user.client.rpc.StatusCodeException: 0
>   at
>
> com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived(RequestCallbackAdapter.java:
> 192)
>   at
> com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
> 287)
>   at com.google.gwt.http.client.RequestBuilder
> $1.onReadyStateChange(RequestBuilder.java:395)
>   at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
>   at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> 103)
>   at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
>   at
>
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
> 157)
>   at
>
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:
> 326)
>   at
>
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
> 207)
>   at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
> 126)
>   at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
> 561)
>   at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
> 269)
>   at
>
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
> 91)
>   at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
>   at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
>
>
> Thanks for your assistance,
>
> Dave
>
> --
> 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.
>
>

-- 
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: How to select a row on click of any cell in that row - Celltable

2011-05-02 Thread Alexandre Ardhuin
Define a SingleSelectionModel and add it to CellTable :

final SingleSelectionModel ssm = new SingleSelectionModel();
cellTable.setSelectionModel(ssm);
ssm.addSelectionChangeHandler(new Handler() {
@Override
public void onSelectionChange(final SelectionChangeEvent event)
{
final T selectedObject = ssm.getSelectedObject();
// do what you want
}
});

Alexandre

2011/4/28 kalpana anbalagan 

> Hello,
>
> I am using GWT 2.2 CellTable. I want to select a row if i click on
> any cell in that row similar to what is achieved when selecting
> checkbox in the selectionmodel. As per my requirement, we are not
> using Checkboxcell to select a row in celltable.
>
> note: all the cells in the celltable are constructed using
> "TextColumn".
>
> Can anyone help me on this.
>
> Thanks in Advance,
> Kalpana
>
> --
> 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.
>
>

-- 
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: Using native methods in a JavascriptObject class

2011-04-21 Thread Alexandre Ardhuin
This test case shows you how to do :
http://code.google.com/p/gwt-google-apis/source/browse/trunk/ajaxloader/ajaxloader/test/com/google/gwt/ajaxloader/client/ClientLocationTest.java

Alexandre

2011/4/16 muggs 

> I'm currently trying out my first gwt app with gwt-map library. I'm
> having problem accessing getLatitude() and other similar methods in
> ClientLocation class. I'm new to gwt and needless to say
> JavaScriptObject, I have tried asking in StackOverflow.com and experts-
> exchange.com  but unfortunately I have yet to receive any replies..
> Hopefully this will be the right place to get help ...
>
> Below is a snippet of my code
> -
>  public void onModuleLoad() {
>ClientLocation user = getUser();
>LatLng cawkerCity = LatLng.newInstance(user.getLatitude(),
> user.getLongitude());
>  }
>
> private native ClientLocation getUser() /*-{
>  return $wnd.jsonData[0];
> }-*/;
>
> 
>
> I have tried return $wnd.jsonData but it returned null.
>
> How should I get an instance of ClientLocation so that I can use
> getLatitude() and getLonitude() ?
> Any help or examples will be much appreciated...
>
> gwt-map Library:
> http://code.google.com/p/gwt-google-apis/wiki/MapsGettingStarted
> API for ClientLocation:
>
> http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.1/com/google/gwt/ajaxloader/client/ClientLocation.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.
>
>

-- 
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: Implement select all in CellTable

2011-04-18 Thread Alexandre Ardhuin
Hi,

You can use a "com.google.gwt.view.client.MultiSelectionModel" with your
CellTable

MultiSelectionModel msm = new MultiSelectionModel();
cellTable.setSelectionModel(msm);
for (T item : cellTable.getVisibleItems()) {
  msm.setSelected(item, true);
}

Alexandre


2011/4/18 Subhrajyoti Moitra 

> Hello,
>
> Can some one please point me to a "Select All" functionality in a
> CellTable?
>
> The functionality i have to implement, is that some of the CellTable
> headers has a select box which when clicked will select all the rows of
> CellTable being displayed.
> Please give some hints as to how to implement this. Example would be
> awesome!!
>
> Thanks,
> Subhro.
>
> --
> 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.
>

-- 
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: Usage of constants/property files based on arbitrary property rather than locale

2011-04-15 Thread Alexandre Ardhuin
Jeff,

You are right. This code did not work although there was no compilation
error.
I have 2 other solutions ( and this time, I have successfully tested the
first one :) )

1. with a class that switch I18n

public class I18nSwitcher {
public static I18n getI18n()
{
final String profil = getProfil();
if ("profil1".equals(profil)) {
return GWT.create(I18nProfil1.class);
} else if ("profil2".equals(profil)) {
return GWT.create(I18nProfil2.class);
} else {
// default
return GWT.create(I18n.class);
}
}
private static native String getProfil()
/*-{
return $wnd.profil;
 }-*/;
}
public interface I18n extends com.google.gwt.i18n.client.Messages{
  // all your i18n keys
}
public interface I18nProfil1 extends I18n {
  // nothing
}

in .ui.xml :

in .java
@UiField(provided = true)
com.xxx.gwt.i18n.client.I18n i18n = I18nSwitcher.getI18n();

This method has a drawback ; if 10 profils are defined, 10 values of i18n
will be load on browser although only 1 is used. That's why the second
solution is better IMHO.


2. using a generator
Replacing




with:







I will try the second solution in the next days.


Thanks for the bug you found for me,
Alexandre


2011/4/15 Jeff Burnham 

> Alexandre,
>
> I had tried this but ran into the issue that the " class="xxx">" declaration required a class rather than an interface which is
> what is used by i18n when utilizing property files. I've seen other
> approaches where people have used this approach along with a factory but
> that doesn't appear to work with ui binders where the constants interface is
> utilized within the ui.xml file.
>
> Did your project use the approach of the constants being referenced
> directly in the ui.xml file?
>
> Thanks,
> Jeff
>
> On Fri, Apr 15, 2011 at 12:03 AM, Alexandre Ardhuin <
> alexandre.ardh...@gmail.com> wrote:
>
>> I have something similar in my project. I resolved the problem with
>> Deferred Binding.
>>
>> In HTML page, I can set a js variable :
>> var profil = "profil1";
>>
>> This js variable will be re-use in Module.gwt.xml to replace default i18n
>> by a specific one:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> Thus, com.xxx.gwt.i18n.client.I18n and
>> com.xxx.gwt.i18n.client.profil1.I18n can reference differents properties
>> files.
>>
>>
>> Hope this helps,
>> Alexandre
>>
>>
>> 2011/4/14 Jeff 
>>
>>> Does anyone have any experience with how to handle the following
>>> problem?
>>>
>>> My application has multiple user roles, all of which see the same
>>> screen with the same fields but depending on what role the user comes
>>> in with, the labels on the fields may differ. I'd like to use an
>>> approach similar to i18n (constants class backed by various property
>>> files) where in my use case the role is synonomous with a locale. Note
>>> that all labels are assigned in UiBinder ui.xml files so the goal is
>>> something like:
>>>
>>> 
>>>
>>> Where the above declaration should use
>>> "LabelConstants_registered.properties" or
>>> "LabelConstants_anonymous.properties" similarly to how i18n would use
>>> "LabelConstants_en.properties" or "LabelConstants_fr.properties"
>>> depending on the locale.
>>>
>>> Any ideas or experiences?
>>>
>>> Thanks in advance.
>>>
>>> --
>>> 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.
>>>
>>>
>>  --
>> 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.
>>
>
>  --
> You received this message be

Re: Creating a DockLayoutPanel with non-fixed sizes ?

2011-04-15 Thread Alexandre Ardhuin
Suppose that you have :





(... content that can change ...)




 (...)



You can manually resize header after a modification of his content by
calling :

dlp.setWidgetSize(headerContainer, headerContent.getOffsetHeight());
dlp.forceLayout();


Alexandre


2011/4/15 Eric Andresen 

> Does anyone know if it is possible to create a layout panel that behaves
> like a dock layout panel, but allows the outer panels to size to their
> "natural" sizes?
>
> What I'm trying to accomplish is a panel with a north and a center.  I want
> the North panel to size to the natural height of its contents, and the
> center to take up the remaining space.  The top panel can change in size,
> and I would like the bottom panel to automatically resize when that happens.
>
>
> Is there a panel that can do something like "Given two widgets, lay the
> first one out, and then give all remaining space to the second" ?  Kind of
> an auto-adjusting SplitLayoutPanel.
>
> My other thought was to use a standard DockLayoutPanel or LayoutPanel, but
> somehow attach a listener to the scrollHeight property of the north's
> FlowPanel that triggers a resize of the north layer.
> Does anyone know if there is a way to register for an event that a
> FlowPanel's content's height has changed?
>
> Thanks,
> Eric
>
>  --
> 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.
>

-- 
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: Usage of constants/property files based on arbitrary property rather than locale

2011-04-15 Thread Alexandre Ardhuin
I have something similar in my project. I resolved the problem with Deferred
Binding.

In HTML page, I can set a js variable :
var profil = "profil1";

This js variable will be re-use in Module.gwt.xml to replace default i18n by
a specific one:








Thus, com.xxx.gwt.i18n.client.I18n and com.xxx.gwt.i18n.client.profil1.I18n
can reference differents properties files.


Hope this helps,
Alexandre


2011/4/14 Jeff 

> Does anyone have any experience with how to handle the following
> problem?
>
> My application has multiple user roles, all of which see the same
> screen with the same fields but depending on what role the user comes
> in with, the labels on the fields may differ. I'd like to use an
> approach similar to i18n (constants class backed by various property
> files) where in my use case the role is synonomous with a locale. Note
> that all labels are assigned in UiBinder ui.xml files so the goal is
> something like:
>
> 
>
> Where the above declaration should use
> "LabelConstants_registered.properties" or
> "LabelConstants_anonymous.properties" similarly to how i18n would use
> "LabelConstants_en.properties" or "LabelConstants_fr.properties"
> depending on the locale.
>
> Any ideas or experiences?
>
> Thanks in advance.
>
> --
> 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.
>
>

-- 
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: Transfer DataTable object from server to client

2011-04-12 Thread Alexandre Ardhuin
Have you look at ValueProxy with RequestFactory ?
http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html#valueProxies
Your proxyfied object doesn't need to implement Serializable.

Alexandre

2011/4/10 Phalgun Guduthur 

> Can someone tell me which is best pratice to transfer DataTable (data
> for visualization) with GWT RPC. Cause DataTable is not serializable,
> and I have a lot of data. I want to use GWT RPC cause I use Java on
> the server side.
>
> I know that just sending the raw data to the client and formatting
> there can be done, but this is very slow and there should be a better
> way to do this.
>
> Any help would be appreciated.
>
> --
> 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.
>
>

-- 
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: How to hide a Cell in a Cell List (com.google.gwt.user.cellview.client.CellList)

2011-04-12 Thread Alexandre Ardhuin
Hi,

You probably have to "update" data in the cellList (with #setRowData) to
show only items matching your filter.
Moreover, hiding some elements in list could lead to differences between the
number of visible items and result of methods like #getRowCount() .

Alexandre.


2011/4/11 waldo2188 

> Hi !
>
> I try to hide elements who's not matching with a search. And unhide
> all elements when the search's Text Box is empty.
>
> I use Cell List like in the ShowCase
> http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTree
>
> It is possible to hide a cell in a cell list?
> And if it's possible, how?
>
> Thank in advance 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.
>
>

-- 
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: DockLayoutPanel -- Get Width/Height of center panel

2011-04-12 Thread Alexandre Ardhuin
Hi,

You can retrieve the container element of your center and then get height
and width.

Widget centerWidget = ... ; // the widget at center
Element container =
myDockLayoutPanel.getWidgetContainerElement(centerWidget);
int width = container.getOffsetWidth();
int height = container.getOffsetHeight();

Alexandre.


2011/4/12 Matthew Hill 

> Hi.
>
> I need to make a canvas element within the center panel of a
> DockLayoutPanel. However, to make a canvas, I must know the width and height
> which it will occupy.
>
> How can I obtain the width and height of the center area of a
> DockLayoutPanel?
>
> --
> 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.
>

-- 
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: CellTable Row Color

2011-04-11 Thread Alexandre Ardhuin
table.setRowStyles(new RowStyles() {
@Override
public String getStyleNames(Person p, int rowIndex) {
if (p.isWoman()) {
return "woman";
} else {
return "man";
}
}
});

and css rules :
.woman {
  background-color: pink;
}
.man {
  background-color: blue;
}

Alexandre

2011/4/11 Patrick Cailly 

>  Any example showing this ?
>
> thanks anyway
>
> Patrick
>
> - Original Message -
> *From:* Alexandre Ardhuin 
> *To:* google-web-toolkit@googlegroups.com
> *Sent:* Monday, April 11, 2011 9:48 AM
> *Subject:* Re: CellTable Row Color
>
> You can use
> com.google.gwt.user.cellview.client.CellTable.setRowStyles(RowStyles) to
> provide a class name by row.
>
> Alexandre
>
> 2011/4/11 Patrick Cailly 
>
>>  Is it possible to change the bakcround colors of certain rows in a
>> CellTable
>>
>> ie in a table of persons :
>> men should be blue
>> women should be pink
>>
>> Patrick
>>
>>
>>
>> --
>> 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.
>>
>
> --
> 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.
> --
>
> Aucun virus trouvé dans ce message.
> Analyse effectuée par AVG - www.avg.fr
> Version: 10.0.1321 / Base de données virale: 1500/3564 - Date: 10/04/2011
>
>  --
> 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.
>

-- 
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: CellTable Row Color

2011-04-11 Thread Alexandre Ardhuin
You can use
com.google.gwt.user.cellview.client.CellTable.setRowStyles(RowStyles) to
provide a class name by row.

Alexandre

2011/4/11 Patrick Cailly 

>  Is it possible to change the bakcround colors of certain rows in a
> CellTable
>
> ie in a table of persons :
> men should be blue
> women should be pink
>
> Patrick
>
>
>
> --
> 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.
>

-- 
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: Comet and GWT

2011-04-06 Thread Alexandre Ardhuin
You can use the atmosphere framework and his GWT module :
http://code.google.com/p/atmosphere-gwt-comet/

Alexandre.


2011/4/6 Lucas Garcia 

> Is there someone working with Comet in GWT?
>
> I tried to look for it, there are some libraries in which allow you to
> do it, but I couldn't put any of them to work.
> I've tried rocket-gwt and comet-gwt, but always getting errors and the
> tutorials they provide are a little bit poor. Could someone give me
> any tips?
>
> Thanks!
>
> --
> 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.
>
>

-- 
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: StackPanel

2011-04-05 Thread Alexandre Ardhuin
Using le css rule ".gwt-StackLayoutPanel .gwt-StackLayoutPanelHeader", you
can modify le style of your header.

Alexandre

2011/4/5 Issam 

> Sorry but di you know haw to change the background color of
> stackLayoutPanel headers , I tried that with css but I'm not seeing
> any change the standard blue color still unchangeable :(
>
> thanks in advance
>
> On 5 avr, 11:27, Issam  wrote:
> > I am very thankful for your rapid answer
> > thank you very much
> >
> > Issam
> >
> > On 5 avr, 11:13, Alexandre Ardhuin 
> > wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi,
> >
> > > You should use StackLayoutPanel to have integration with uiBinder.
> > > See the exemple athttp://
> google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/g...
> >
> > >  
> > >   
> > > HTML header
> > > able
> > >   
> > >   
> > > 
> > >   Custom header
> > > 
> > > baker
> > >   
> > >  
> >
> > > Alexandre
> >
> > > 2011/4/5 Issam 
> >
> > > > Hi,
> > > > I am searching how to use StackPanel with uibinder since
> unfortunately
> > > > it is not me ntonned on th gwt-javaDoc
> > > > Any one had an idea about this.
> >
> > > > any examples are welcome
> >
> > > > Thanks.
> >
> > > > --
> > > > 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.
>
> --
> 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.
>
>

-- 
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: StackPanel

2011-04-05 Thread Alexandre Ardhuin
Hi,

You should use StackLayoutPanel to have integration with uiBinder.
See the exemple at
http://google-web-toolkit.googlecode.com/svn/javadoc/2.2/com/google/gwt/user/client/ui/StackLayoutPanel.html:

 
  
HTML header
able
  
  

  Custom header

baker
  
 

Alexandre


2011/4/5 Issam 

> Hi,
> I am searching how to use StackPanel with uibinder since unfortunately
> it is not me ntonned on th gwt-javaDoc
> Any one had an idea about this.
>
> any examples are welcome
>
> Thanks.
>
> --
> 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.
>
>

-- 
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: Passing data from Dialog Box

2011-04-05 Thread Alexandre Ardhuin
If you use a com.google.gwt.user.client.ui.DialogBox to collect data. Thus
you are still in the same window.

Alexandre

2011/4/5 Mittal 

> I have following use case,
>
> Master Form - has button called "Add Row" - that shall open Dialog Box
> to collect data, lets say First Name , Last Name etc.
> When Dialog Box is closed or based on some other event how to I send
> this data captured to parent window that opened Dialog Box ? This
> operation of Add Row can be used multiple times.
>
> Any help or pointers shall be appreciated.
>
> Mittal
>
> --
> 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.
>
>

-- 
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: Switching an image by using "OnMouseOverHandler"

2011-04-04 Thread Alexandre Ardhuin
Hi,

You can also use a com.google.gwt.user.client.ui.PushButton that have a
constructor with 2 images as parameter.

Alexandre.

2011/4/5 Zak Linder 

> Hi Arilene-
>
> You need to set the original image with a MouseOutHandler as well.
>
>
> img_p1.addMouseOverHandler(new MouseOverHandler() {
>
> @Override
> public void onMouseOver(MouseOverEvent event) {
> img_p1.setImage("img", "/icons/grafo.png");
> }
> });
>
> img_p1.addMouseOutHandler(new MouseOutHandler() {
>
> @Override
> public void onMouseOut(MouseOutEvent event) {
> img_p1.setImage("img", "/icons/grafo1.png");
> }
> });
>
> Since you might want to do this often, it might make sense to make your own
> "HoverHandler":
>
> public interface HoverHandler extends MouseOverHandler, MouseOutHandler {}
>
>  --
> 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.
>

-- 
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: update html field in JSP from Java (GWT)

2011-04-04 Thread Alexandre Ardhuin
Hi,

Are you sure the textarea contains the good id attribute ?
Are you sure to enter the if statement ?

You don't have to use JSNI to update the textarea. Use instead :

Element element = Document.get().getElementById(fieldId);
if (element != null) {
GWT.log("found element with id:" + fieldId);
TextAreaElement textfield = element.cast();
textfield.setValue(newValue);
}

Alexandre

2011/4/4 pepgrifell 

> hi,
>
> we are migrating our old website (based on JSP) to GWT. The
> application is big and we cannot do all the changes at one, so in the
> application there are some pages in GWT and some pages in JSP.
>
> I have a JSP with some fields. One of them is a textarea. When I click
> in it, a GWT window pops up with a list of values. When I click in one
> of the values, I need to put the selected value in the textarea (JSP).
>
> In GWT window, when selecting the value I call to native method (as
> parameters,I pass the id of textarea field and the text to set to the
> textarea.
>
>  public native void updateOldWebField(String fieldId,String newValue) /
> *-{
>var textfield = $doc.getElementById(fieldId);
>if (textfield!=null) {
>textfield.value = newValue;
>}
>  }-*/;
>
> But nothing is set into the textarea. Does I need to call
> parent.document ? how I do that ?
>
> Thanks,
> pep
>
> --
> 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.
>
>

-- 
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: data-icon

2011-03-27 Thread Alexandre Ardhuin
Not natively, but you can easily set this attribute :

Anchor a = 
a.getElement().setAttribute("data-icon", "delete");

Alexandre.

2011/3/24 mtrebizan 

> Does GWT support data-icon attribute for anchors?
>
> --
> 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.
>
>

-- 
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: expand ListBox as droplist using keyboard

2011-03-23 Thread Alexandre Ardhuin
ListBox use html SELECT element.
Thus, you have natively (without keypresshandler) keys up/down to change
selection and :
 - in Firefox and IE : ALT+DOWN/ALT+UP to expand/collapse select.
 - in chrome : Space/esc to expand/collapse select.

I don't know if you can expand select with javascript.

Alexandre.


2011/3/21 Jonathan Alon 

> Hi,
>
> I have a FlexTable full of ListBoxs set to 1 visible item, when
> clicked on with the mouse the listbox will expand and let me see the
> full list of items, I want to create a keyboard shortcut to mimic the
> same effect.
> I've tried adding keypresshandler to handle specific key and through
> it fire a mouse down NativeEvent, but it does nothing.
> Anyone have a clue? ideas?
>
> Thanks in advance.
>
> --
> 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.
>
>

-- 
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: GWT 2.2 Celltable Paging

2011-03-23 Thread Alexandre Ardhuin
Hi,

I think you should use :
cellTable.setRowCount(result.size());
cellTable.setRowData(0, result);

instead of :
cellTable.setRowData(result);

Javadoc of
com.google.gwt.user.cellview.client.AbstractHasData.setRowData(List) tells : "Set the complete list of values to display on one
page."


Alexandre.


2011/3/22 Dovakhin 

> Hi,
>
> I have the following problem. I have a celltable with 2 columns. These
> columns contain Filenames and their size.
> Due to the fact that i have many files that i want to display I want
> to use Paging. In my last project i used gwt 2.1 and the paging worked
> there. The simplePager in GWT 2.2 does not work in my new project but
> its still the same code that should work.
> Can anyone show me where it goes wrong? Thanks.
>
> Here´s my code reduced to the SimplePager things:
>
> public class CellTableTestClass {
>
>private VerticalPanel applicationPanel = new VerticalPanel();
>private CellTable  cellTable = new CellTable();
>private SingleSelectionModel selectionModel = new
> SingleSelectionModel();
>
>public VerticalPanel createContent() {
>
>LogFileServiceAsync initData = (LogFileServiceAsync)
> GWT.create(LogFileService.class);
>
>initData.getLogs(new AsyncCallback>() {
>
>public void onFailure(Throwable caught) {
>Window.alert(caught.getLocalizedMessage());
>
>}
>
>public void onSuccess(List result) {
>cellTable.setRowData(result);
>}
>
>});
>
> cellTable.setSelectionModel(selectionModel);
>
>{
>cellTable.addColumn(new TextColumn() {
>
>@Override
>public String getValue(LogData object) {
>return object.getLogName();
>}
>
>}, "Log Name");
>
>cellTable.addColumn(new TextColumn() {
>
>@Override
>public String getValue(LogData object) {
>return object.getSize();
>}
>
>}, "Size");
>
>}
>
>// create a pager, giving it a handle to the CellTable
>SimplePager.Resources pagerResources =
> GWT.create(SimplePager.Resources.class);
>SimplePager pager = new SimplePager(TextLocation.CENTER,
> pagerResources, false, 0, true);
>
>pager.setDisplay(cellTable);
>pager.setPageSize(10);
>
>// add the Pager to the dialog
>applicationPanel.add(pager);
>
>applicationPanel.add(new HTML(""));
>
>applicationPanel.add(cellTable);
>
>
>return applicationPanel;
>}
>
> }
>
> --
> 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.
>
>

-- 
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: GWT - Replace of DockLayoutPanel in UiBinder dynamically

2011-03-23 Thread Alexandre Ardhuin
I have something like that in my code. I use a
com.google.gwt.user.client.ui.LayoutPanel

   
 
   

and in java code :

@UiField
LayoutPanel placeholder;

public void setPlaceHolder(IsWidget w)
{
placeholder.clear();
if (w != null) {
placeholder.add(w);
}
}

Hope it will help,
Alexandre.


2011/3/21 HelperMethod 

> I have this simple UiBinder template:
>
> http://dl.google.com/gwt/DTD/xhtml.ent";>
> xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>
>
>  
>
>  Header
>
>
>
>  
>
>
>
>  Footer
>
>  
> 
>
> What I would like to do is dynamically replace content in 
> when application state changes. The problem is, which type of field
> should I use as a placeholder?
>
> --
> 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.
>
>

-- 
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: Questions on image cell showing images, please help

2011-03-23 Thread Alexandre Ardhuin
Hi,

If you have ImageResource, you can use
com.google.gwt.cell.client.ImageResourceCell .
If you have only urls, you can create your own ImageCell like
com.google.gwt.cell.client.ImageCell and change html template used :


public class MyImageCell extends AbstractCell {
  interface Template extends SafeHtmlTemplates {
@Template("")  //
20*20 size
SafeHtml img(String url);
  }

  private static Template template;

  /**
   * Construct a new MyImageCell.
   */
  public MyImageCell() {
if (template == null) {
  template = GWT.create(Template.class);
}
  }

  @Override
  public void render(Context context, String value, SafeHtmlBuilder sb) {
if (value != null) {
  // The template will sanitize the URI.
  sb.append(template.img(value));
}
  }
}


Alexandre.




2011/3/20 Hong 

> Hi, everyone
>
> I tried to put some images in gwt cell table where I used image cells
> to do this. But those images turned out pretty large in the webpage. I
> tried to use "aCellTable.setColumnWidth(column, width)", but it didn't
> help. I know if only to display a single image, I can say "String url
> = anImageResource.getUrl(); Image aImage = new Image(url);
> aImage.setPixelSize(x,y);" things like that. But how can I scale an
> image in a image cell / cell table?
>
> Some of my codes:
>
> CellTable vehicleCellTable = new
> CellTable(1);
>
> .
>
> Column imageColumn = new
> Column(new ImageCell())
>{
>
>@Override
>public String getValue(VehicleInfo object) {
>
>return object.imageUrl;
>}
>
>};
>
> vehicleCellTable.addColumn(imageColumn,"Image");
>
> vehicleCellTable.setColumnWidth(imageColumn, "3em"); //doesn't 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.
>
>

-- 
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: Necessary ORM

2011-03-22 Thread Alexandre Ardhuin
I use RequestFactory without JPA and I have no problem.
You just have to respect some rules listed at
http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideRequestFactory.html#interface

If you only use RequestFactory to retrieve data, you can even use ValueProxy
instead of EntityProxy.

Alexandre.

2011/3/20 Felipe Cordeiro Caetano 

> Hello folks wonder whether to use RequestFactory necessarily I have to
> use JDO or JPA or something. I ask this because I'm using MyBatis and
> am having some problems implementing the server side.
>
> Thank you all.
>
> Felipe Caetano
>
> --
> 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.
>
>

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