Re: [gwt-contrib] Re: I'm enhancing GWT to provide Java stack traces for clientside exceptions in production

2013-08-21 Thread Alex Epshteyn
Hi Colin, please find my answers inline:

On Tue, Aug 20, 2013 at 11:35 PM, Colin Alworth  wrote:

> I got a tweet from you asking for a donation (or rather a 'partner', which
> apparently means 'money'), but couldn't frame a useful response in 140
> chars, so since this thread is coming back, I thought to do so here
> instead.
>

Yes, I wanted to see if Sencha would be interested in funding this project.
 I agree, 140 chars is not enough :)  Just couldn't find your contact info
other than Twitter.

What license are you offering these code samples under - if it isn't
> something open and available, what is the benefit to an advance copy of the
> jar if I, an author of a library and several open source tools and
> applications, cannot provide it to my customers or other downstream users?
>

That's a good point which I hadn't considered.  I'd be willing to
immediately release the code under the same license as GWT if the project
gets funded.

(For anyone who's just joining this thread now, here's the link to my
project on IndieGoGo: http://igg.me/at/gwt-stack-traces/x/3494291)


> We've found that https://gist.github.com/niloc132/3906501 goes a heck of
> a long ways toward offering optional debug info - if not enabled, the user
> gets the normal-size application with zero size or performance hit, and by
> redirecting to a slightly different url, the full trace info can be pulled
> out (with the quirks you mention of course*), which typically goes a long
> ways toward identifying the real issue.
>

Yes, and you'd still be able to use that same config with my patch, except
the debug permutation will be much smaller, cleaner, and more accurate.  In
fact, the overhead is so insignificant now, that I have that debug
configuration enabled for all users on my site (typeracer.com).


> * How often have you needed to know which line of Impl.java or
> DOMImpl.java a stack trace intersects? To make your case more effectively,
> you might consider using code where it is meaningful to see those lines,
> something other than the equivelent of
> java.lang.reflect.Method.invoke(Method.java:601). Perhaps some real life
> JSNI, or an annoying IE6-9 focus() or setAttribute issue?
>
>
Certainly.  At the time of writing I only had a few artificial examples
available.  But now that I've been gathering real data from my users in
production for a month, I will add an appendix with much better real-world
examples.  I'll update this thread when I finish doing that (most likely
tomorrow).


> You touch briefly on the risk of '[exposing] your application’s
> implementation details', but unless I am mistaken, the extra metadata
> included in the file:line ints should still be enough to take apart an app
> and map it to discrete files and reconstruct methods, even un-inlining (as
> you mention) to pull out clearer details. My understanding was that the
> premise of the sourceMap was to work entirely from the stack to allow the
> actual source to be obfuscated, and avoid any other metadata from being
> left in the compiled output. Combine this with the fact that many of those
> classes are publicly available (GWT itself, etc), and it seems that you
> could reverse out a significant portion of the app - the "secret sauce".
> Can you comment on using this for public applications and any reverse
> engineering attempts you've made?
>

Let me first just clarify how my implementation obfuscates file names (I
think you understood it correctly, but I just want to be sure).  So in my
implementation of stack emulation, the filenames are obfuscated, so you
have strings like '23:234'. The decoding table for this "cipher" is not
published (it's written as a new file in the same directory as the
symbolMap).  So the only thing that you can reconstruct is that the
obfuscated JavaScript expression X is on line '234' of file '23'.  I
understand that you can use this info to separate the JS output into
discrete files, but I'm just not overly concerned with that, because I
don't think it's that much more helpful to have many obfuscated files with
prettier whitespacing instead of just one lump file.  If necessary, I
suppose you could modify the compiler to add some additional obfuscating
"salt" to the output.

Thanks for your questions!
Alex

-- 
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/groups/opt_out.


How do I avoid this issue?

2013-08-21 Thread Joel Cairney
I'm working on a large GWT application, and on chrome for android we're 
running into these issues:

https://code.google.com/p/chromium/issues/detail?id=258044

The HTML and CSS patterns that create this issue are commonly found in GWT 
widgets, or are easily created by combining widgets.  I haven't seen any 
movement on this issue on the Chromium list, and don't have confidence that 
their rendering will get fixed any time soon.  Can anyone recommend a way 
to work around these issues?

-- 
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/groups/opt_out.


Re: issue with tomcat server

2013-08-21 Thread Michael Prentice
http://stackoverflow.com/questions/8446704/memory-allocation-in-tomcat

On Wednesday, August 21, 2013 11:41:02 AM UTC-4, fedex wrote:
>
> how to change it? any idea?
>
> On Wednesday, August 21, 2013 9:10:22 AM UTC-5, Michael Joyner wrote:
>>
>> You need to change how much memory java is allowed to allocate for the 
>> tomcat process. The default is rather small.
>>
>>
>> On Tue, Aug 20, 2013 at 4:56 PM, fedex  wrote:
>>
>>> For my application I am writing 1 million records to the csv file. It 
>>> works fine when I run in dev mode but when I deploy the application on 
>>> tomcat it throws java heap memory issue? why?
>>>
>>
>>

-- 
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/groups/opt_out.


GXT Grid row is not selectable

2013-08-21 Thread SaiP
Hello,

I'm new to GWT. I've a grid which has simple data mapped from a BaseModel. 
When the user selects a row, it is supposed to be selected. I've checked a 
few examples and post, it seems that we are doing it correctly. Code below 
to create the grid. 

Could you please mention the senarios in which this selection will be 
blocked?

List gridData= new ArrayList();
 List config = new ArrayList();
config.add(new ColumnConfig("isPrimary","Primary",70));
config.add(new ColumnConfig("accountName","Account Name",320));
config.add(new ColumnConfig("activeProgram","Active Program",150));
config.add(new ColumnConfig("accountNumber","Account",100));
config.add(new ColumnConfig("accountXref","Account Xref",150));
config.add(new ColumnConfig("status","Status",93));
 ColumnModel cm = new ColumnModel(config);
 PagingModelMemoryProxy proxy = new PagingModelMemoryProxy(gridData);
final PagingLoader> loader = new 
BasePagingLoader>(proxy);
 loader.setRemoteSort(false);
store = new GroupingStore(loader);
final PagingToolBar toolBar = new PagingToolBar(10);
toolBar.bind(loader);
loader.load(0, 10);
 GroupingView view = new GroupingView();
view.setShowGroupedColumn(true);
view.setForceFit(true);
view.setGroupRenderer(new GridGroupRenderer() {
public String render(GroupColumnData data) {
String l = data.models.size() == 1 ? "Item" : "Items";
return data.group.substring(data.group.indexOf("|") + 1, 
data.group.length())
+ " (" + data.models.size() + " " + l + ")";
}
});
 ContentPanel cp = new ContentPanel();
cp.setBodyBorder(false);
 cp.setButtonAlign(HorizontalAlignment.CENTER);
cp.setLayout(new FitLayout());
cp.setFrame(true);
cp.setSize(verticalPanelWidth, "300px");
cp.setBorders(hidden);
cp.setBottomComponent(toolBar);
GWT.log("store size" + store.getCount());
grid = new Grid(store,cm);
final GridSelectionModel sm = grid.getSelectionModel();
sm.setSelectionMode(SelectionMode.SINGLE);
grid.setSelectionModel(sm);
 final CellSelectionModel csm = new CellSelectionModel();
csm.bindGrid(grid);
 grid.setBorders(true);
grid.ensureDebugId("gridDebugId");
//grid.ensureDebugId("gridDebugId");
grid.setTabIndex(5);
cp.add(grid);
return cp;

-- 
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/groups/opt_out.


Re: exception when deployed on tomcat - Please help

2013-08-21 Thread Jens
How often do you want to ask this question again? An OutOfMemoryError is 
nothing GWT specific.

There are basically three ways to deal with it:
1.) increase Tomcat's heap memory
2.) load less stuff into memory before writing the file. E.g. use 
Input/OutputStreams along with fixed sized buffers instead of reading 
everything into a large String and then writing that large String to a File.
3.) If you think 1.) and 2.) are ok in your project then check for memory 
leaks by creating a heap dump and analyzing it

Google search has tons of results for all of the above points.

-- 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/groups/opt_out.


Re: ImageResource question

2013-08-21 Thread Steve C
I haven't sorted out in my mind the best approach for a few of the details, 
in particular making it reusable, but this works.  Consider it more of a 
"proof of concept".

You'd need to create red.png in the war directory, or could try out a data 
url (which per my tests works with this).

For a bundle with more images, the asynchronicity gets to be a bigger 
issue, since you'd need to have something like a "master" callback once all 
of the individual image callbacks have completed.  Also, there's no 
facility for sprites, although I think it could be implemented.


public class DynamicResourcesDemo implements EntryPoint {

private DynamicMenuBarResources resources;
private MenuBar bar;

public void onModuleLoad() {

MenuBar.Resources defaultResources = 
GWT.create(MenuBar.Resources.class);
MyImageResource imgres = new 
MyImageResource(defaultResources.menuBarSubMenuIcon());
resources = new DynamicMenuBarResources(imgres);

imgres.load("red.png", new Callback() {
@Override
public void onSuccess(Void result) {
showUi();
}

@Override
public void onFailure(Throwable reason) {
Window.alert("Error");
}
});
}

private void showUi() {
MenuBar fileMenu = new MenuBar(true);
fileMenu.addItem("Open", new Scheduler.ScheduledCommand() {
@Override
public void execute() {
Window.alert("Open File");
}
});
fileMenu.addItem("Exit", new Scheduler.ScheduledCommand() {
@Override
public void execute() {
Window.alert("So long!");
}
});
MenuBar actionsMenu = new MenuBar(true, resources);
actionsMenu.addItem("File", fileMenu);
bar = new MenuBar();
bar.addItem("Actions", actionsMenu);

RootPanel.get().add(bar);
}
}

//-

public class DynamicMenuBarResources implements Resources {

private static Resources base = GWT.create(Resources.class);
private ImageResource menuBarSubmenuIconResource;

public DynamicMenuBarResources() {
}

public DynamicMenuBarResources(ImageResource 
menuBarSubmenuIconResource) {
this.menuBarSubmenuIconResource = menuBarSubmenuIconResource;
}

@Override
@ImageOptions(flipRtl = true)
public ImageResource menuBarSubMenuIcon() {
if (menuBarSubmenuIconResource != null) {
return menuBarSubmenuIconResource;
} else {
return base.menuBarSubMenuIcon();
}
}

}

//

public class MyImageResource implements ImageResource {

private Image image;
private ImageResource defaultResource;
private boolean imageValid = false;

public MyImageResource(ImageResource defaultResource) {
image = new Image();
this.defaultResource = defaultResource;
}

public void load(String url, final Callback callback) {
image.setUrl(url);
final Panel pnl = new SimplePanel();
pnl.add(image);
Style pnlStyle = pnl.getElement().getStyle();
pnlStyle.setVisibility(Visibility.HIDDEN);
pnlStyle.setPosition(Position.ABSOLUTE);
image.addLoadHandler(new LoadHandler() {
@Override
public void onLoad(LoadEvent event) {
RootPanel.get().remove(pnl);
imageValid = true;
if (callback != null) callback.onSuccess(null);
}
});
image.addErrorHandler(new ErrorHandler() {
@Override
public void onError(ErrorEvent event) {
RootPanel.get().remove(pnl);
// this lets the resource fall back to the default
if (callback != null) callback.onSuccess(null);
// this would instead invoke the error handling for the 
callback
//if (callback != null) callback.onFailure(new 
Exception("Image Resource Load Error"));
}
});
RootPanel.get().add(pnl);
}

@Override
public String getName() {
return imageValid ? "" : defaultResource.getName();  // ???
}

@Override
public int getHeight() {
return imageValid ? image.getHeight() : defaultResource.getHeight();
}

@Override
public int getLeft() {
return imageValid ? 0 : defaultResource.getLeft();
}

@Override
public SafeUri getSafeUri() {
return imageValid ? UriUtils.fromSafeConstant(image.getUrl()) : 
defaultResource.getSafeUri();
}

@Override
public int getTop() {
return imageValid ? 0 : defaultResource.getTop();
}

@Override
@Deprecated
public String getURL() {
return imageValid ? image.getUrl() : defau

Re: issue with tomcat server

2013-08-21 Thread Juan Pablo Gardella
Try a run a test and explore the memory with some tool: (visualvm,
jconsole, yourtoolkit, http://www.eclipse.org/mat/ ). If you are reading
from JDBC remember to use
TYPE_FORWARD_ONLYin
the resultset to reduce the use of memory.

Regards,
Juan


2013/8/21 fedex 

> hey juno
>
> how to check how many records I am putting in the memory?
>
>
> On Wednesday, August 21, 2013 9:14:01 AM UTC-5, Juan Pablo Gardella wrote:
>
>> I've created a file with 6M of records using
>> http://ostermiller.org/utils/**CSV.htmlwithout
>>  java heap memory issue. I think increment the memory it is a
>> workaround and isn't the solution. Check how much records you are putting
>> in memory.
>>
>>
>>
>>
>> 2013/8/21 Michael Joyner 
>>
>>> You need to change how much memory java is allowed to allocate for the
>>> tomcat process. The default is rather small.
>>>
>>>
>>> On Tue, Aug 20, 2013 at 4:56 PM, fedex  wrote:
>>>
 For my application I am writing 1 million records to the csv file. It
 works fine when I run in dev mode but when I deploy the application on
 tomcat it throws java heap memory issue? why?

 --
 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-we...@**googlegroups.com.

 Visit this group at 
 http://groups.google.com/**group/google-web-toolkit
 .
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .

>>>
>>>  --
>>> 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-we...@**googlegroups.com.
>>>
>>> Visit this group at 
>>> http://groups.google.com/**group/google-web-toolkit
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>
>>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: GWT 2.5.1 now available

2013-08-21 Thread SaiP
Thanks a lot for the update, My main concern is the speed of the debugger. 
Hope you guys come up with a better solution for this. Thanks.

On Monday, March 11, 2013 8:11:16 PM UTC-5, Matthew Dempsky wrote:
>
> Hi everyone,
>
> We're excited to announce the GWT 2.5.1 release!  There will be an 
> announcement soon on the GWT Blog , 
> and you can download it 
> here.
>  
>  This release has been uploaded to Maven Central with the version string of 
> "2.5.1".
>
> GWT 2.5.1 contains over 50 new bug fixes, many of which were contributed 
> by the community.  Thanks to everyone who reported issues and/or submitted 
> patches.
>
> -Matthew, on behalf of the GWT team
>

-- 
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/groups/opt_out.


Re: issue with tomcat server

2013-08-21 Thread fedex
hey juno

how to check how many records I am putting in the memory? 

On Wednesday, August 21, 2013 9:14:01 AM UTC-5, Juan Pablo Gardella wrote:
>
> I've created a file with 6M of records using 
> http://ostermiller.org/utils/CSV.html without java heap memory issue. I 
> think increment the memory it is a workaround and isn't the solution. Check 
> how much records you are putting in memory.
>
>
>
>
> 2013/8/21 Michael Joyner >
>
>> You need to change how much memory java is allowed to allocate for the 
>> tomcat process. The default is rather small.
>>
>>
>> On Tue, Aug 20, 2013 at 4:56 PM, fedex 
>> > wrote:
>>
>>> For my application I am writing 1 million records to the csv file. It 
>>> works fine when I run in dev mode but when I deploy the application on 
>>> tomcat it throws java heap memory issue? why?
>>>  
>>> -- 
>>> 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-we...@googlegroups.com
>>> .
>>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>  -- 
>> 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-we...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.


Re: issue with tomcat server

2013-08-21 Thread fedex
how to change it? any idea?

On Wednesday, August 21, 2013 9:10:22 AM UTC-5, Michael Joyner wrote:
>
> You need to change how much memory java is allowed to allocate for the 
> tomcat process. The default is rather small.
>
>
> On Tue, Aug 20, 2013 at 4:56 PM, fedex 
> > wrote:
>
>> For my application I am writing 1 million records to the csv file. It 
>> works fine when I run in dev mode but when I deploy the application on 
>> tomcat it throws java heap memory issue? why?
>>  
>> -- 
>> 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-we...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.


exception when deployed on tomcat - Please help

2013-08-21 Thread fedex
I built an application where I write 1 million row of data to the csv file. 
It works great when I deploy the application on dev mode(jetty server) but 
when I deployed the same application on tomcat I get the below 
exception.Please Can anyone suggest what could be the reason?



Exception in thread "http-bio-8080-exec-5" java.lang.OutOfMemoryError: Java 
heap space
at sun.util.resources.TimeZoneNames.getContents(TimeZoneNames.java:201)
at 
sun.util.resources.OpenListResourceBundle.loadLookup(OpenListResourceBundle.java:125)
at 
sun.util.resources.OpenListResourceBundle.loadLookupTablesIfNecessary(OpenListResourceBundle.java:113)
Exception in thread "http-bio-8080-AsyncTimeout" 
java.lang.OutOfMemoryError: Java heap space
org.apache.catalina.connector.CoyoteOutputStream@18174a0
at 
java.util.concurrent.ConcurrentLinkedQueue.iterator(ConcurrentLinkedQueue.java:667)
at 
org.apache.tomcat.util.net.JIoEndpoint$AsyncTimeout.run(JIoEndpoint.java:153)
at java.lang.Thread.run(Thread.java:722)

-- 
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/groups/opt_out.


Re: EventBus problem

2013-08-21 Thread Michael Prentice
I can't see in the code where you initialize your eventBus. I also can't 
see where you set it on your presenter.

I know that Eric K was saying that he doesn't fire events in his JUnit 
tests, instead he just calls the handler directly on the presenter and 
passes in the event.

On Tuesday, August 20, 2013 5:13:47 PM UTC-4, df wrote:
>
> Hello 
> I want to initialize my widget by data. I sent by eventbus to them event 
> indicating that there is new object. I tried to work with eventbus in 3 
> ways 
>
> 1:
> for(Unit unit : createTestData()){
> eventBus.fireEvent(new ScenarioElementEvent(new 
> UnitStoreElement(unit, null), ScenarioElementEventType.ADDED, 
> ScenarioElementEventObjectType.GEO_OBJECT));
> }
>
> 2:  
> Timer t = new Timer() {
>  @Override
> public void run() {
> List units = createTestData();
> Console.log(Level.INFO,"Test data have " + units.size());
> for(int i = 0; i < units.size(); i ++){
> Unit unit = units.get(i);
> Console.log(Level.INFO,"Fire event " + i + " " + unit.getDescription());
> eventBus.fireEvent(new ScenarioElementEvent(new 
> UnitStoreElement(unit, null), ScenarioElementEventType.ADDED, 
> ScenarioElementEventObjectType.GEO_OBJECT));
> }
> }
> };
> t.schedule(1);
>
>
> 3:
> List units = createTestData();
> for(int i = 0; i < units.size(); i ++){
> final Unit unit = units.get(i);
> Console.log(Level.INFO,"Fire event " + i + " " + unit.getDescription());
> Timer t = new Timer(){
>
> @Override
> public void run() {
> eventBus.fireEvent(new ScenarioElementEvent(new 
> UnitStoreElement(unit, null), ScenarioElementEventType.ADDED, 
> ScenarioElementEventObjectType.GEO_OBJECT)); 
> }
>  };
> t.schedule(1);
> }
> }
>
>
> Only third works. 
> First - no one handler is notified
> Second - only one event is send.
>
> Can anybody say why?
> 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/groups/opt_out.


Re: TypeError: $doc.body.attachEvent is not a function

2013-08-21 Thread SaiP
It was a setting in the *.gwt.xml file. User agent attribute. Which was set 
to only IE. Hope it helps some one. If you comment it out, it will create 
permutations for all the browsers. Or mention gecko1_8 in it for the 
mozilla. 

On Friday, August 9, 2013 9:49:57 AM UTC-5, SaiP wrote:
>
> Any idea on how to fix this type of issue? obviously, i'm trying to re 
> install the GWT plugin into my RAD. Or may be the Ant did not do well. 
>
> On Thursday, August 8, 2013 11:07:47 AM UTC-5, Jens wrote:
>>
>> 'attachEvent' is Internet Explorer specific and is used in 
>> com.google.gwt.user.client.impl.DomImplTrident.java. 
>>
>> If Firefox executes it then GWT thinks your FireFox browser is Internet 
>> Explorer (check the user agent string of your FireFox browser) or you use a 
>> GWT library that has messed up deferred binding rules found in 
>> com.google.gwt.user.DOM.gwt.xml.
>>
>> -- 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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Blaze
This Window resize would be very hard to be done.

You cannot resize window if its not a window opened by your 
application...(just one opend by a opener one can be re-sized, you cannot 
resize a tab)
Why do you need the resize? If its just to force a redraw, relayout because 
you added something in the DOM and this is not sized correct then you can 
try setting a style.display on the "MainFrame" you have by setting it to 
once to style.display.None and then back again to style.display.block...

This also dosent mean that the relayout will work, maybe the css its just 
not correct for what you want to do...

Note: Window class inside has a check if the new size is diff then the 
previous one, just in this case fires the handler...

 Blaze

Am Mittwoch, 21. August 2013 14:01:34 UTC+2 schrieb AgitoM:
>
> In one of my applications I am ResizeHandler to resize the GUI of my app.
> This works fine, but there is one part in my code where I would like to 
> manually trigger a Resize.
> Does anyone know how I can do that?
>

-- 
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/groups/opt_out.


Re: issue with tomcat server

2013-08-21 Thread Juan Pablo Gardella
I've created a file with 6M of records using
http://ostermiller.org/utils/CSV.html without java heap memory issue. I
think increment the memory it is a workaround and isn't the solution. Check
how much records you are putting in memory.




2013/8/21 Michael Joyner 

> You need to change how much memory java is allowed to allocate for the
> tomcat process. The default is rather small.
>
>
> On Tue, Aug 20, 2013 at 4:56 PM, fedex  wrote:
>
>> For my application I am writing 1 million records to the csv file. It
>> works fine when I run in dev mode but when I deploy the application on
>> tomcat it throws java heap memory issue? why?
>>
>> --
>> 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/groups/opt_out.
>>
>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: issue with tomcat server

2013-08-21 Thread Michael Joyner
You need to change how much memory java is allowed to allocate for the
tomcat process. The default is rather small.


On Tue, Aug 20, 2013 at 4:56 PM, fedex  wrote:

> For my application I am writing 1 million records to the csv file. It
> works fine when I run in dev mode but when I deploy the application on
> tomcat it throws java heap memory issue? why?
>
> --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Jens
resizeTo() ?

-- 
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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
Thank your help so far Jens. Any example on which Window method I can use?
I tried looking for it, but couldn't find it.

On Wednesday, August 21, 2013 8:01:34 pm UTC +8, AgitoM wrote:
>
> In one of my applications I am ResizeHandler to resize the GUI of my app.
> This works fine, but is there one part in my code YogyakartaT I would like 
> to manually trigger a resizing.
> Does anyone know how I can do that?
>

-- 
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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Jens
GWT's Window class has methods to modify the browser window size which 
should trigger a global repaint. But I am not sure if that is also true for 
tablets/phones as their apps always run in full screen browsers whose size 
you can not change.

To just repaint a widget / html element you could hide and show it again by 
adding and removing display:none but this could cause some flicker effects.


-- 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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
This is a part of my code:

Window.addResizeHandler(new PageResizeHandler());

and 

private class PageResizeHandler implements ResizeHandler {
@Override
public void onResize(ResizeEvent event) {
mainFrame.handleResize(event.getWidth(), event.getHeight());
}
}

This code does the job fine when the browser resizes. However now I would 
like manually trigger the browser resize event to force a WebKit browser to 
redraw.
simply invoking the handleResize method does not do the job.

On Wednesday, August 21, 2013 8:01:34 PM UTC+8, AgitoM wrote:
>
> In one of my applications I am ResizeHandler to resize the GUI of my app.
> This works fine, but there is one part in my code where I would like to 
> manually trigger a Resize.
> Does anyone know how I can do that?
>

-- 
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/groups/opt_out.


Re: Manually Trigger Browser Resize

2013-08-21 Thread Jens
If you want to resize the browser window then use the Window class. If you 
just want to execute the ResizeHandler code without having a ResizeEvent 
then just create a method for it and let the ResizeHandler call that 
method. Then you can call the method from elsewhere too.

-- 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/groups/opt_out.


Manually Trigger Browser Resize

2013-08-21 Thread AgitoM
In one of my applications I am ResizeHandler to resize the GUI of my app.
This works fine, but there is one part in my code where I would like to 
manually trigger a Resize.
Does anyone know how I can do that?

-- 
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/groups/opt_out.


Re: GWT Button becoming transparent due to CSS?

2013-08-21 Thread AgitoM
Well I further investigated the problem, and it turns out its a bug in 
WebKit browsers.
The widget is not redrawn by the browser, despite the fact it's newly 
created.

Does anyone know how to manually trigger a widget redraw or a browser 
Resize event?

Hope anyone knows.

-- 
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/groups/opt_out.


Re: Internal Compiler Error / Xerces

2013-08-21 Thread Ronan Quillevere
As said by DP,

I had to add the following to my pom.cml to make it work


xerces
xercesImpl
2.11.0


xml-apis
xml-apis
1.4.01


On Friday, April 19, 2013 9:25:19 PM UTC+2, DP wrote:
>
> I had similar problem.  I resolved it by adding xercesImpl artifact to my 
> Maven pom.xml

-- 
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/groups/opt_out.


Re: Deploy GWT application on multiple servers behind load balancer

2013-08-21 Thread cutout33
Hi Jens,

Thanks for your response, I think everything will work fine once we cache 
the sessions and make them available to all running instances :)

thanks again

On Tuesday, August 20, 2013 11:14:31 AM UTC+3, Jens wrote:
>
> I don't now how spring security works, but normally your app server should 
> replicate the user session across your cluster nodes. If that works then 
> spring security should probably work as well in the cluster. If you use 
> Jetty as server you could use 3rd party libraries for implementing session 
> clustering, e.g. Hazelcast, Terracotta, Ehcache, and others.
>
> XsrfTokens will work across servers if you can recreate the token on each 
> server. For example if you choose to generate a token using MD5(session id 
> + user id) or similar. As long as session replication works and you have 
> the user id on each server available (could be stored in the session) you 
> can recreate the token and check it against the one the client provides 
> with its request. The default implementation of GWTs XsrfTokenService just 
> does MD5(session id from session cookie) but you can easily change this if 
> you want.
>
> -- 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/groups/opt_out.


Re: How do I know that a certain RPC callback is the correct one?

2013-08-21 Thread Jens
You need to check inside the callback's onSuccess/onFailure method if the 
callback should still be executed. Something like:

service.callServerMethod(new Callback() {

  final Item selectedItemOnCallback = currentItem; //currentItem is an 
instance variable of the presenter

  void onSuccess() {
if(selectedItemOnCallback.equals(this.currentItem)) {
   // continue work
}
  }
}

If this.currentItem changes after the callback as been created if won't 
execute its onSuccess anymore.

For Activities that are recreated whenever the data changes I use an active 
flag that is set to true in Activity.start() and to false in 
Activity.onStop/onCancel. Callbacks then check this boolean flag.

-- 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/groups/opt_out.


Re: How do I know that a certain RPC callback is the correct one?

2013-08-21 Thread Mohammad Al Quraian
Does it really matter how I am showing the list? I just want to confirm that 
the given list is the correct one and that the old one is ignored.
On 21/08/2013 9:34:13 AM, Fahmi  wrote:
Hai,

how u show the previous thing? is it windows pop up?


On Wed, Aug 21, 2013 at 12:46 PM, Mohammad Al Quraian mailto:m4des...@gmail.com]> wrote:

Hi,

Short story, I am making an RPC call to get a list of things, however, when I 
navigate quickly to another page which would make its own RPC call with 
different things to get. I sometimes get the previous call 'things' on top of 
the new 'things'.I though of appending an identifier to the given callback, but 
is there a better way?

Thansk
--
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 
[mailto:google-web-toolkit%2bunsubscr...@googlegroups.com].
To post to this group, send email to google-web-toolkit@googlegroups.com 
[mailto:google-web-toolkit@googlegroups.com].
Visit this group at http://groups.google.com/group/google-web-toolkit 
[http://groups.google.com/group/google-web-toolkit].
For more options, visit https://groups.google.com/groups/opt_out 
[https://groups.google.com/groups/opt_out].


--
You received this message because you are subscribed to a topic in the Google 
Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-web-toolkit/r-VPdzOYJpA/unsubscribe 
[https://groups.google.com/d/topic/google-web-toolkit/r-VPdzOYJpA/unsubscribe].
To unsubscribe from this group and all its topics, 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 
[http://groups.google.com/group/google-web-toolkit].
For more options, visit https://groups.google.com/groups/opt_out 
[https://groups.google.com/groups/opt_out].

-- 
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/groups/opt_out.


Smartgwt TabSet - Dynamic Form Show / Hide Issue

2013-08-21 Thread Ambika Kumar
Hi
I have a tabset with 3 tabs specified.
On each, I have a list grid and a dynamic form.
Initially. I tried adding the form to the canvas specified one each tab. 
But unable to edit the textbox's specified in the form when tested on ie. 
(Believe it is gwt - smartgwt clash issue).
Later when tried to draw the form (without adding as a child to the 
parent), I'm unable to hide it. 
As the form is drawn independently, it don't have a parent.
So, the same form will get displayed on all tabs.

Thanks
Ambika 



-- 
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/groups/opt_out.


Change css properties of a cssresource at runtime

2013-08-21 Thread amonrays1
Hi EveryBody!
I need some help in a particular situation using GWT CssResource.

I'm working on a project on which a d'ont have the right to change an 
existing CSS file without any gwt tag. This Css file defines *background *for 
some classes to refer an image URL. I'm using GWT CSSResource an 
ClientBundle to load all my image a compilation time. Is there a way to 
change at execution time the *backgroung *property defines in the CSS 
to*gwt-image
*  to set image to my images define in ClientBundle?

Exemple : 

-
 
CSS File
.styleButton {
background: url("image/button.png");
width: 630x;
height: 330px;
margin: 2px;
}

.otherStyle{
background: url("image/other.png");
width: 630px;
height: 360px;
margin: 2px;
}

-
 
CSS Resource
public interface MyCss extends CssResource {

 String styleButton();

 String otherStyle();

}


 
Client Bundle
public static final VoltaireResource INSTANCE = 
GWT.create(VoltaireResource.class);

@Source("myCss.css")
MyCss  myCss();

@Source("button.png")
ImageResource buttonImage();

  @Source("other.png")
ImageResource otherImage();
}

I want to do something like this 
myCss.styleButton().setStyleProperty("gwt-image",  buttonImage().getUrl() )

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/groups/opt_out.