Textbox wraps in FocusPanel, the focuspanel lost focus when the textbox is clicked

2014-12-12 Thread 'Leung' via Google Web Toolkit
Hi,
I intend to build a focus panel wrapped with a few textbox. When the user 
clicks somewhere other than the focus panel, blur event will be triggered and 
the focus panel will be hided. However, when I try to click and place the 
cursor on the textbox to type, the focus panel lost focus. What is the problem? 
Where should I check?
FocusPanel focusPanel = new FocusPanel();
VerticalPanel verticalPanel = new VerticalPanel();
focusPanel.setWidget(verticalPanel);
verticalPanel.add(new TextBox());
verticalPanel.add(new TextBox());
RootPanel.get().add(focusPanel);Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: webidl, jsinterop and overloaded methods

2014-12-12 Thread rhmoller
fyi: this is with GWT build from master.

/Rene

Den fredag den 12. december 2014 23.00.15 UTC+1 skrev rhmoller:
>
> Hi
>
> I am toying around with generating Java interfaces annotated with @JsType 
> and @JsProperty from webidl. But I have a problem with overloaded methods.
>
> For example: The idl for CanvasRenderingContext2 has several overloaded 
> methods
>
> fx
>
>   void stroke();
>   void stroke(Path2D path);
>
> and
>
>   ImageData createImageData(double sw, double sh);
>   ImageData createImageData(ImageData imagedata);
>
> I can generate a corresponding Java interface with the overloaded methods, 
> but the GWT compiler fails with this
>
> Error:(75, 0) GWT Compiler: JsType methods cannot overload another method.
>
> I know JS does not support function overloading as such, but on the other 
> hand, you can pass anything to a js function regardless of the specified 
> parameters.
>
> Do you have any ideas for how I can resolve these issues?
>
> /Rene
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Is it possible for onModuleLoad to be called before DOMContentLoad?

2014-12-12 Thread Andrei Korzhevskii
Override CrossSiteIframeLinker's getJsWaitForBodyLoaded() method to return 
waitForBodyLoadedNull.js 

On Friday, December 12, 2014 11:20:17 PM UTC+3, pgi...@gmail.com wrote:
>
> The use case is when a GWT module is only exporting javascript functions.
>
> On a complex page, I have noticed a several second delay in the triggering 
> of onModuleLoad from when the selection script is actually downloaded.  My 
> understanding
> is that this seems to be a consequence of waiting for DOMContentLoad to 
> trigger.
>
> However, since this particular module is not going to be interacting with 
> the page at all, I would rather not pay the price of waiting if possible.
>
> Is there a way that onModuleLoad can be triggered earlier?
>
> If there are other things I should be considering in order to make this 
> use case performant, I would be interested in hearing about those as well.
>
> Thanks,
> Pete Gieser
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


webidl, jsinterop and overloaded methods

2014-12-12 Thread rhmoller
Hi

I am toying around with generating Java interfaces annotated with @JsType 
and @JsProperty from webidl. But I have a problem with overloaded methods.

For example: The idl for CanvasRenderingContext2 has several overloaded 
methods

fx

  void stroke();
  void stroke(Path2D path);

and

  ImageData createImageData(double sw, double sh);
  ImageData createImageData(ImageData imagedata);

I can generate a corresponding Java interface with the overloaded methods, 
but the GWT compiler fails with this

Error:(75, 0) GWT Compiler: JsType methods cannot overload another method.

I know JS does not support function overloading as such, but on the other 
hand, you can pass anything to a js function regardless of the specified 
parameters.

Do you have any ideas for how I can resolve these issues?

/Rene

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Is it possible for onModuleLoad to be called before DOMContentLoad?

2014-12-12 Thread pgieser
The use case is when a GWT module is only exporting javascript functions.

On a complex page, I have noticed a several second delay in the triggering 
of onModuleLoad from when the selection script is actually downloaded.  My 
understanding
is that this seems to be a consequence of waiting for DOMContentLoad to 
trigger.

However, since this particular module is not going to be interacting with 
the page at all, I would rather not pay the price of waiting if possible.

Is there a way that onModuleLoad can be triggered earlier?

If there are other things I should be considering in order to make this use 
case performant, I would be interested in hearing about those as well.

Thanks,
Pete Gieser

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why Table Layout in GWT?

2014-12-12 Thread Gilberto
Ok, I won't start another "table vs. tableless layout" war. There are a lot 
of resources about it on the web.

My point here is simple: if the developer wants to use table layout, for 
whatever reason, at least the table should behave as expected according to 
the W3C recomendations, which states:

If a table is to be used for layout it must be marked with the attribute 
> role="presentation" for a user agent to properly represent the table to an 
> assistive technology and to properly convey the intent of the author to 
> tools that wish to extract tabular data from the document.


Source: http://www.w3.org/TR/html5/tabular-data.html#the-table-element

In other words, tables for layout should be marked as such. Table layout 
widgets should consider this.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT: Decoupling Client code dependency in Server Code

2014-12-12 Thread jonl
I do something similar, but I decided that three jars were pointless.  I 
have a -user jar, which contains everything and a -server jar that I use 
for deployment which contains everything, except source, in shared/server.

So your hotfix, then would be for the -server.jar instead of the -user.jar. 
 The -user jar is only needed during client side and GWT compile.

To enforce the separation and reduce the possibility of unneeded 
serializers, I also have a common extensive rpc.blacklist that blacklists 
everything in a .client. package.  There are a few exceptions to this list 
though, because GWT does not enforce its own client/shared/server 
convention in some of the older code for RPC And Servlets so there is some 
serializable RPC things and exceptions in the client packages that are 
needed if you want to do remote logging or RPC.

On Friday, December 12, 2014 3:23:24 AM UTC-7, Sachin Gupta wrote:
>
> --
>
> *My requirement is to modularize existing GWT application so that whenever 
> required Client code can be updated and just hot fix for Client jar can be 
> done rather than complete application war deployment. *
>
> To achieve above requirement I modularize my existing Smart GWT code into 
> Parent-Child modules where Child modules will be Server, Client and Shared 
> Modules. Client, Server, Shared package of application will be present in 
> Client, Server, Shared modules respectively.
>
> I am packaging:-
> Server Module in war.
> Client Module in Jar,
> Shared Module in jar as well as jar containing Source code.
>
> I put dependencies relative to Shared package in Client and Server Module 
> code as both will be accessing Shared Module codebase.
>
> But when i am introducing Server Module's dependency in Client Module I am 
> getting compilation errors in Server Module as this is *against GWT 
> convention* wherein Client interface is extended in Server 
> implementation. 
>
> Can you please help me out how can i introduce server dependency in client 
> module to achieve my requirement.
>
> Do let me know if you need my POC code for reference.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Displaying a GWT DataGrid that has many columns

2014-12-12 Thread Jens
If you give your columns explicit sizes in pixel then DataGrid will show a 
horizontal scroll bar if the sum is larger than the available space.


-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: PopupImpl class in GWT 2.7.0

2014-12-12 Thread Thomas Broyer


On Thursday, December 11, 2014 1:00:27 PM UTC+1, KARAN DANI wrote:
>
> my application  must needs this methods
>

No.
You have needs, but they're definitely not "these methods".
I suspect that your needs are more about knowing when a popup panel (or 
dialog box, or menu), and any such popup panel, is shown/hidden.
Let's face the truth: hacking into PopupImpl wasn't a good idea; internals 
can change, and in this case they did.
What you need is to make sure that you attach an AttachHandler and maybe a 
CloseHandler to each popup that you need to "monitor" that way; or maybe 
make sure every popup panel uses your own subclass that overrides the 
show() and hide() methods.

Put differently: GWT does not support "aspect oriented programming" of any 
form; things have to be explicit, and abstraction layers built upon it if 
you want to hide them from your code.
It has worked for you hacking into the popup panel internals; but "Impl" 
classes (and "impl" packages) are implementation details where things exist 
for a purpose (which is not that you use them as hooks to plug your own 
logic), and can change at any time without notice; and it happened in 2.7.
 

>
> On Wednesday, December 10, 2014 4:47:39 PM UTC+5:30, KARAN DANI wrote:
>>
>> i use PopupImpl  class in GWT 2.6.1 now i moved on gwt 2.7.0..
>> so its give me an error in onHide,onShow and setVisible methods.. this 
>> method is not available in PopupImpl class... 
>> so i create CustomPopupPanel.java as below
>> package com.shipco.phoenix.client.common.widgets;
>>
>> import com.google.gwt.dom.client.Document;
>> import com.google.gwt.dom.client.Element;
>>
>> public class CustomPopupPanel {
>>
>> public Element createElement() {
>> return Document.get().createDivElement();
>> }
>>
>> public Element getContainerElement(Element popup) {
>> return popup;
>> }
>>
>> public Element getStyleElement(Element popup) {
>> return popup.getParentElement();
>> }
>>
>> /**
>>  * @param popup
>>  *the popup
>>  */
>> public void onHide(Element popup) {
>> }
>>
>> /**
>>  * @param popup
>>  *the popup
>>  */
>> public void onShow(Element popup) {
>> }
>>
>> /**
>>  * @param popup
>>  *the popup
>>  * @param rect
>>  *the clip rect
>>  */
>> public void setClip(Element popup, String rect) {
>> popup.getStyle().setProperty("clip", rect);
>> }
>>
>> /**
>>  * @param popup
>>  *the popup
>>  * @param visible
>>  *true if visible
>>  */
>> public void setVisible(Element popup, boolean visible) {
>> }
>> }
>>
>>
>> still i am not getting the output.. how can i use onShow,onHide and 
>> setVisible method in GWT 2.7.0
>> Please help asap
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Old fashioned debugging

2014-12-12 Thread Thomas Broyer
GWT.log() prints to the browser console (using console.log()) in SDM, and 
is compiled-out in prod mode.
And java.util.logging can be used otherwise (the default in prod mode is to 
compile out everything below SEVERE –the default value of 
gwt.logging.enabled– and to respect gwt.logging.logLevel in SDM). I have 
never tried it but if you you could possibly set gwt.logging.logLevel to 
DEBUG or similar and setup remote logging, and then adjust the 
configuration of java.util.logging on the server-side through JMX, without 
restarting neither the SDM CodeServer nor your servlet container.

On Thursday, December 11, 2014 5:40:31 AM UTC+1, Blake wrote:
>
> Greetings,
>
> Before real debuggers were available, we used to just use print 
> statements.  After that we had libraries that would allow us to control 
> what debugging prints got activated based on a config file or command line 
> arguments.  At that point we didn't have to get rid of our debug statements 
> on the production system.  All we had to do was not enable them with the 
> config file or command line arguments.  Log4j works a lot like this.  
> Although it took more time to debug because you sometimes had to add more 
> print statement to see something new and then re-build, it did work.
>
> With all the trouble setting up SDM and the subsequent limitations, I 
> wonder if an API exists or can be easily built so that arbitrary debug 
> print statements can be added to front-end code (in Java) that would 
> magically appear on the backend console or somewhere where the IDE can 
> display them without affecting the display or execution of anything on the 
> front-end?  Of course this would work with some sort of backend config file 
> to enable/disable particular groups of debug print statements ala-Log4j.  
> All debug prints would be disabled by default.
>
> I am in no way suggesting we abandon SDM in any way.  I am just wondering 
> if something simple-minded like this is available or can be easily added.  
> Of course the trick is to do the print on the front-end code but have it 
> appear in the backend IDE output.
>
> Another cool enhancement, if possible, would be to allow the addition of 
> debugging print code on the front end without restarting the system.
>
> Just some ideas.
>
> Thanks.
>
> Blake McBride
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Displaying a GWT DataGrid that has many columns

2014-12-12 Thread Larry L

Hello,

I need to display a table (DataGrid) which has 40~50 columns. 
The table is too wide to fit in the browser.
Is there a way to put DataGrid in a fix-sized panel or something with a 
horizontal scrollbar?
DataGrid has an automatic vertical scrollbar, but no horizontal one?
Any suggestion?

Thanks,
Larry

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Catch value of ListGrid - SmartGWT

2014-12-12 Thread Raphael Rocha
Good Morning,

I need to take a value in the row of Listgrid with action on Click or 
selected Row.

I look in SmartGWT showcase but I didn't understand so much how do this.

Someone can help :D

Thx!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Cannot bind css classes with Java CssResource interface - GWT 2.7.0 - GSS - UiBinder

2014-12-12 Thread Freddy Boucher
Thx it works!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT: Decoupling Client code dependency in Server Code

2014-12-12 Thread Jens
The client and server module should not know them each other at all.

If you have client interfaces that are implemented on the server (like the 
GWT-RPC service interface) then these interfaces belong into the shared 
module. For RequestFactory there are annotations that reference server 
classes by name instead via class literals, e.g. 
@ProxyForName("com.example.app.server.entities.Person") instead of 
@ProxyFor(Person.class).

If the above does not solve your issue you need to be more specific with 
your question.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT: Decoupling Client code dependency in Server Code

2014-12-12 Thread Sachin Gupta

--

*My requirement is to modularize existing GWT application so that whenever 
required Client code can be updated and just hot fix for Client jar can be 
done rather than complete application war deployment. *

To achieve above requirement I modularize my existing Smart GWT code into 
Parent-Child modules where Child modules will be Server, Client and Shared 
Modules. Client, Server, Shared package of application will be present in 
Client, Server, Shared modules respectively.

I am packaging:-
Server Module in war.
Client Module in Jar,
Shared Module in jar as well as jar containing Source code.

I put dependencies relative to Shared package in Client and Server Module 
code as both will be accessing Shared Module codebase.

But when i am introducing Server Module's dependency in Client Module I am 
getting compilation errors in Server Module as this is *against GWT 
convention* wherein Client interface is extended in Server implementation. 

Can you please help me out how can i introduce server dependency in client 
module to achieve my requirement.

Do let me know if you need my POC code for reference.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT CELLTABLE How to restore old value in cell if validation fails

2014-12-12 Thread Nagarajan


Hi Vaibhav,


public void update(int index, RecordInfo object, Stringvalue) {
  // Called when the user changes thevalue.
  if(value.matches("(-)?(\\d){1,8}")){
   object.setColumnInRecordEdited(true);
   object.setValue(value);
   RecordData.get().refreshDisplays();
   }else{
  Window.alert("Specify valid integervaluefor parameter");
  // How to restoldvaluehere? currently updatevalue

 }
   }
});

I guess you have got ur answer for this question.

I didnt get exactly identify what u did to solve this problem.

Can you provide your code snippet wat u used to clear the values,

Thank you in advance.

Regards,
Nagarajan



-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Why Table Layout in GWT?

2014-12-12 Thread Joel Handwell
Is deprecation considered to be scheduled on those table layout widgets?

On Tuesday, December 9, 2014 4:35:59 AM UTC-5, Thomas Broyer wrote:
>
>
>
> On Tuesday, December 9, 2014 8:20:41 AM UTC+1, Mohammed Sameen wrote:
>>
>> Hi,
>>  Why *table *layout is used in GWT?Why not *div *layout?
>>
>
> Only old widgets use "table layout", and they do so because at the time 
> they were written (years ago) it was the only reliable way of laying out 
> things cross-browser.
> Newer widgets don't use "table layout".
> I'd go as far as saying that if you use a widget that relies on "table 
> layout" today, You're Doing It Wrong™. Modern GWT apps should rely mostly 
> on FlowPanel and HTMLPanel (and the various "layout panels" for complex 
> layouts), you shouldn't need HorizontalPanel, VerticalPanel and the like.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.