Re: Help : Memory Leak Problem

2011-07-06 Thread Alberto Rugnone
In production. I didn't take measurements in development.

On Jul 5, 6:12 pm, Marko Vuksanovic markovuksano...@gmail.com wrote:
 Do you have this problem in development or production mode?

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



strange NPE in datepicker when trying to set a date

2011-07-06 Thread Dennis Haupt
INFO: (TypeError): Cannot call method 'getFullYear' of undefined arguments:
getFullYear, type: non_object_property_call stack: TypeError: Cannot call
method 'getFullYear' of undefined at $setCurrentMonth (
http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html:13130:55http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html)
at $setCurrentMonth_0 (
http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html:13590:3http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html)
at $setValue_5 (
http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html:13373:13http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html)
at $setValue_3 (
http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html:13365:3http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html)
at Object.setSelection_5 [as setSelection] (
http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html:16659:3http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html)
at $setSelection (
http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html:17463:123http://localhost:10080/seven/gwt/gwt/C3D547337958AA4C5B06E9A8A1FB6EE7.cache.html
)

i don't understand what could be wrong here. the date i try to set is not
null - otherwise, i would not reach setCurrentMonth. it seems that jsDate
is null inside the non-null date, but how can that happen?

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



Aw: Re: Entity version checks / optimistic locking

2011-07-06 Thread Jens
You have to store the lock somehow in the database. For example you can 
create a database table called locked objects that has columns like id, 
referenced table name, referenced object id, user id that locked the object, 
date of lock. Then you put a unique constraint on referenced table name, 
referenced object id so that a object can not be locked twice. 

On server side you can then implement methods like 
Lock.create(CommonEntityInterface object), Lock.delete(CommonEntityInterface 
object) and maybe Lock.isLocked(CommonEntityInterface object) where 
CommonEntityInterface is just an interface (or an abstract entity base 
class) implemented by all your entities so you can call getId() on them. The 
table name can be accessed via the @Table annotation (reflection) or has to 
be generated if you use JPA default table names.

-- J.

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



SingleSelectionModel not firing for root node (CellTree)

2011-07-06 Thread ecstasy2
Hi there.
I'm trying to implement the treeCell Widget in my project, but i'm
having an issue since days now...
The SElectionModel is not firing for my root nodes for some reason. It
get fired thougth for leaf nodes.

Here is my node info code.


@Override
public T NodeInfo? getNodeInfo(T value) {
if (value == null) {
// LEVEL 0.
// We passed null as the root value. Return the 
composers.

// Create a data provider that contains the 
list of composers.
rootDataProvider = new 
ListDataProviderPartnerDTO(partners);

// Create a cell to display a composer.
CellPartnerDTO cell = new 
AbstractCellPartnerDTO() {
@Override
public void render(Context context, 
PartnerDTO value,
SafeHtmlBuilder sb) {
if (value != null) {

sb.appendEscaped(value.getCompanyName());
}
}
};

IconCellDecoratorPartnerDTO decorator = new
IconCellDecoratorPartnerDTO(
ICONS.partner_icon(), cell);

// Return a node info that pairs the data 
provider and the cell.
return new 
DefaultNodeInfoPartnerDTO(rootDataProvider,
decorator, selectionModelLeaf, 
null, null);
} else if (value instanceof PartnerDTO) {
PartnerDTO dto = (PartnerDTO) value;
// LEVEL 2 - LEAF.
// We want the children of the playlist. Return 
the songs.
ListDataProviderClientDetailsDTO dataProvider 
=
providerForPartners
.get(dto.getPartnerID());

if (dataProvider == null) {
dataProvider = new 
ListDataProviderClientDetailsDTO();

providerForPartners.put(dto.getPartnerID(), dataProvider);

fetchClients(dto.getPartnerID());
}

// Create a cell to display a composer.
CellClientDetailsDTO cell = new 
AbstractCellClientDetailsDTO()
{
@Override
public void render(Context context, 
ClientDetailsDTO value,
SafeHtmlBuilder sb) {
if (value != null) {

sb.appendEscaped(value.getDisplayName() +  (
+ 
value.getNumberOfApp() + ));
}
}
};

IconCellDecoratorClientDetailsDTO decorator = 
new
IconCellDecoratorClientDetailsDTO(
ICONS.client_icon(), cell);

// Use the shared selection model.
DefaultNodeInfoClientDetailsDTO info = new
DefaultNodeInfoClientDetailsDTO(
dataProvider, decorator, 
selectionModelLeaf, null);
return info;
}

return null;
}

-- 
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: JPA RequestFactory: Persistence of Foreign Keys

2011-07-06 Thread khiem nguyen
i think the problem lies here:

 @ManyToOne(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
   @JoinColumn(nullable = false)
   private User user;


cascadetype.all  means when u create new Booking, persist it will also
persist the user, which leads to id-conflict




On Wed, Jul 6, 2011 at 1:29 AM, Alexander Orlov
alexander.or...@loxal.netwrote:

 On Jul 5, 8:33 pm, Jens jens.nehlme...@gmail.com wrote:
  I think its not a RequestFactory problem but more a JPA problem. For some

 I suppose so.

  reason EclipseLink things it has to insert the User object although it
  already exists and has an id.

 Exactly.

  In your case I think you have to do something like:
 
  User attachedUser = entityManager.merge(booking.getUser());
  booking.setUser(attachedUser); //maybe thats not needed.
  entityManager.persist(booking).

 I've added the following annotation: @OneToOne(fetch = FetchType.LAZY,
 cascade = CascadeType.DETACH/MERGE) which reports the following error
 now:
 com.google.web.bindery.requestfactory.server.UnexpectedException: The
 persisted entity with id 1 has a null version


 
  That way you tell the EntityManager that the user already exists.
 
  A second way would be to fetch the already existing user:
 
  User attachedUser = entityManager.find(User.class,
  booking.getUser().getId());
  booking.setUser(user); //maybe thats not needed
  entityManager.persist(booking);

 Same as above.

 -Alex

 --
 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 updating individual/non-consecutive rows

2011-07-06 Thread Adolfo Panizo Touzon
If I understand you, when you create the CellTable you can add a
setFieldUpdater. With this way you have control to update the rows like you
want (you have a int index).

http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/cellview/client/CellTable.html


See you.


2011/7/5 Rike255 rgro...@gmail.com

 I can't figure out a good way to update a single row of data after
 using setRowData() to populate a CellTable.

 Specifically, I have an ArrayList of objects that represent rows that
 need to be updated, but they are not consecutive.  Is there a way to
 update one (or multiple non-consecutive) rows in a celltable without
 refreshing the whole thing (or from an index to the end)?

 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.




-- 
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

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



Error when compiling GWT 2.4

2011-07-06 Thread zeroconf
Hello,

I'm trying to compile GWT 2.4 (http://google-web-
toolkit.googlecode.com/svn/releases/2.4). I followed the instructions
from http://code.google.com/webtoolkit/makinggwtbetter.html but this
failed with following error messages:

 compile:
 [gwt.javac] Compiling 2839 source files to 
 /home/sba/downloads/gwt/gwt-2.4.0/build/out/user/bin
 [gwt.javac] 
 /home/sba/downloads/gwt/gwt-2.4.0/user/src/com/google/gwt/rpc/server/CommandSerializationUtil.java:36:
  warning: sun.misc.Unsafe is Sun proprietary API and may be removed in a 
 future release
[gwt.javac] import sun.misc.Unsafe;
[gwt.javac]^
[gwt.javac] 
/home/sba/downloads/gwt/gwt-2.4.0/user/src/com/google/gwt/rpc/server/CommandSerializationUtil.java:438:
 warning: sun.misc.Unsafe is Sun proprietary API and may be removed in a 
future release
[gwt.javac]   private static final Unsafe theUnsafe;
[gwt.javac]^
[gwt.javac] 
/home/sba/downloads/gwt/gwt-2.4.0/user/src/com/google/web/bindery/requestfactory/shared/impl/FindRequest.java:34:
 The type com.google.web.bindery.requestfactory.shared.EntityProxyId? cannot 
be used here
[gwt.javac]   RequestEntityProxy find(EntityProxyId? proxy);
[gwt.javac]  ^
[gwt.javac] 1 error

BUILD FAILED
/home/sba/downloads/gwt/gwt-2.4.0/build.xml:104: The following error occurred 
while executing this line:
/home/sba/downloads/gwt/gwt-2.4.0/build.xml:27: The following error occurred 
while executing this line:
/home/sba/downloads/gwt/gwt-2.4.0/build.xml:60: The following error occurred 
while executing this line:
/home/sba/downloads/gwt/gwt-2.4.0/user/build.xml:94: Compile failed; see the 
compiler error output for details.

What did I do wrong?

Thanks in advance!

Best,
Sebastian

-- 
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 updating individual/non-consecutive rows

2011-07-06 Thread Thomas Broyer
You'll call setRowData(int,List) for each set of consecutive rows to update:
table.setRowData(2, Collections.singletonList(thirdRow));
table.setRowData(10, Arrays.asList(eleventhRow, twelfthRow));

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



GWT 2.3.0 + gwt-maven-plugin 2.3.0 tests generate errors

2011-07-06 Thread Eborix13
Hi,

I've installed GWT 2.3.0 and I've implemented the StockWatcher sample
program. All went fine until I got to the testing part. I have a
simple test, one method that does assertTrue(true). When I run it I
get a bunch of errors:
1) if I run the tests using maven I get:
java.lang.NoClassDefFoundError: com/google/gwt/dev/cfg/Condition
at
com.google.gwt.junit.client.GWTTestCase.createStrategy(GWTTestCase.java:
340)
at
com.google.gwt.junit.client.GWTTestCase.getStrategy(GWTTestCase.java:
257)
I see that this class is in the gwt-dev dependency so I add it to the
dependency list
2) if I run the tests with the gwt-dev dependency I get
---
 T E S T S
---
Running de.codebox.mywebapp.client.WebAppTest
[ERROR] Unable to find type 'java.lang.Object'
   [ERROR] Hint: Check that your module inherits
'com.google.gwt.core.Core' either directly or indirectly (most often
by inheriting module 'com.google.gwt.user.User')
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.765
sec  FAILURE!
Results :
Tests in error:
  testStockWatcher(de.codebox.mywebapp.client.WebAppTest)

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

And the error is
com.google.gwt.core.ext.UnableToCompleteException: (see previous log
entries)
at com.google.gwt.dev.cfg.ModuleDef.checkForSeedTypes(ModuleDef.java:
518)
at
com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:
327)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1342)

3) if i run the tests from my developing environment (Intellij Idea) I
get:
Validating newly compiled units
   [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/
florin.haizea/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-
user-2.3.0.jar!/com/google/gwt/editor/client/EditorDriver.java'
  [ERROR] Line 20: The import javax.validation.ConstraintViolation
cannot be resolved
  [ERROR] Line 97: ConstraintViolation cannot be resolved to a
type

which ends up in java.lang.OutOfMemoryError: Java heap space

I've seen other posts with similar errors but no clear solution to the
problem. Can anyone help?
Many 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.



adding filter to file upload in gwt

2011-07-06 Thread aman
I am using the basic FileUpload control in gwt and wanted to add the
filter on the extensions allowed in the browsing window, which
restrict the user to select only specific extensions (like xls,xlsx
etc). Tell me how I can achieve this as I want to restrict on the
browsing window itself and cant wait for the Button submit event.

Thanks

Amandeep

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



Anybody has simple way to get Token when implement XRSF protection.

2011-07-06 Thread Joey
Hi All

I have a big GWT project, there are many services and methods need to
be protected. but I think it a hard work to
change all of code what call methods as the following code from google
document. So just want to know anybody
has any simple way can fix XRSF problem and no need to change so many
code for methods calling.

-
XsrfTokenServiceAsync xsrf =
(XsrfTokenServiceAsync)GWT.create(XsrfTokenService.class);
((ServiceDefTarget)xsrf).setServiceEntryPoint(GWT.getModuleBaseURL() +
xsrf);
xsrf.getNewXsrfToken(new AsyncCallbackXsrfToken() {

  public void onSuccess(XsrfToken token) {
MyServiceAsync rpc = (MyServiceAsync)GWT.create(MyService.class);
((HasRpcToken) rpc).setRpcToken(token);

// make XSRF protected RPC call
rpc.doStuff(new AsyncCallbackVoid() {
  // ...
});
  }

  public void onFailure(Throwable caught) {
try {
  throw caught;
} catch (RpcTokenException e) {
  // Can be thrown for several reasons:
  //   - duplicate session cookie, which may be a sign of a cookie
  // overwrite attack
  //   - XSRF token cannot be generated because session cookie
isn't
  // present
} catch (Throwable e) {
  // unexpected
}
});
-


Thanks

Joey

-- 
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: Google plugin for Eclipse withou WindowBuilder (GWT Designer)

2011-07-06 Thread Sebastian
Hello Vrto,

may I ask which Ubuntu Version do you use? Is it 32 or 64 Bit? I am
using 11.04 with AMD64 and can´t get the Designer running at all
(Eclipse Indigo). I ask beacause it is a clean Installation and I
supposed that the failure was on the Ubuntu side.

2011/6/16 Vrto michal.vrt...@gmail.com

 BTW, I've seen your Google IO 2011 presentation (n1) and I was
 surprised how fast GWT designer worked on your Windows machine (and it
 looked virtualized from Mac OS X if I remember correctly!). Is it
 possible that it's slower on Linux? With Eclipse on Sun's JRE? I guess
 I will try it with fresh install of Indigio, where my Eclipse
 installation will not be huge monster with billion of plugins if
 that's any better.

 On Jun 16, 10:41 pm, Eric Clayberg clayb...@google.com wrote:
  I would be curious as to how the latest GWT Designer build feels to
  you...
 
  http://code.google.com/webtoolkit/tools/download-gwtdesigner-beta.html
 
  On Jun 16, 1:08 pm, Vrto michal.vrt...@gmail.com wrote:
 
 
 
 
 
 
 
   I disabled that of course, but when Eclipse stars it does always stuff
   like updatinggwtdesignerpaletten, building somegwtdesigner
   stuff and I am minimalist I just dont want that heh :)
 
   On Jun 16, 7:02 pm, Renato Beserra renatobese...@gmail.com wrote:
 
I don't like theGWTDesignereither, but how does it cause you
 problems?
 
Is it opening your classes by default or something?
 
2011/6/16 Vrto michal.vrt...@gmail.com
 
 Hello, I like Google Plugin for Eclipse, but I don't likeGWT
Designer. It's slow, buggy, keeps updating itself, loads terribly
 load
 and so on. Is there any chance of releasing google plugin
 withoutGWT
Designer?
 
 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.
 
--
Renato Beserra Sousa

 --
 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: Error when compiling GWT 2.4

2011-07-06 Thread Thomas Broyer
Actually, nothing. The requestfactory-apt.jar from GWT_TOOLS is not 
compatible with the releases/2.4 branch. Try setting -proc:none in your 
JAVA_OPTS to bypass the annotation processors (both RfValidator –which 
generates the error here– and RfApt, which shouldn't be an issue if 
skipped), or -processor org.google.web.bindery.requestfactory.apt.RfApt to 
only bypass the RfValidator (and any other that would have run, but there 
shouldn't be any), or simply revert your GWT_TOOLS to r10417.
See http://code.google.com/p/google-web-toolkit/source/detail?r=10417 (the 
changes applied in trunk, not in releases/2.4.0; not how FindRequest has 
been modified, whcih is the one failing the build in releases/2.4.0) and 
http://code.google.com/p/google-web-toolkit/source/detail?r=10418 (the 
updated requestfactory-apt.jar rebuilt with these changes)

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



Access permutation id inside a generator

2011-07-06 Thread Pierre Coirier
Hi,

In my generator, I need to create a unique implementation class name
for each permutation. I was thinking using the permutation id, is
there a way to access it inside the generator?

If I can't have access to this permutation id, what would be the best
way to generate a unique class name? Using user.agent property won't
work in my case because you can have the same user.agent value for
several permutations (in case you add other binding properties like
mobile.user.agent).

Thanks,
Pierre

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



abc wants to chat - what’s the story behind these posts

2011-07-06 Thread pac
Yesterday I saw a similar post in gwt forum from my account (which I
didn't post)
I thought my account is compromised, I deleted that post and changed
my password.
But nothing else looked suspicious but just one post in gwt forum.
Message itself looks bit promotional from google team.
Today, I searched and saw few other such posts i.e.
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/90eb36971c744756/31d5407614cae4a1?lnk=gstq=wants+to+chat#31d5407614cae4a1
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/fbad184e51a5c45a/71c546c41077d307?lnk=gstq=wants+to+chat#71c546c41077d307
Are accounts been hacked or some other problem?

-- 
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: abc wants to chat - what’s the story behind these posts

2011-07-06 Thread David Chandler
I think a few folks have accidentally typed the group email address in the
Gmail chat box, perhaps with the help of auto-complete. It is definitely not
intentional promo from Google.

/dmc

On Wed, Jul 6, 2011 at 8:54 AM, pac parvez.chau...@gmail.com wrote:

 Yesterday I saw a similar post in gwt forum from my account (which I
 didn't post)
 I thought my account is compromised, I deleted that post and changed
 my password.
 But nothing else looked suspicious but just one post in gwt forum.
 Message itself looks bit promotional from google team.
 Today, I searched and saw few other such posts i.e.

 http://groups.google.com/group/google-web-toolkit/browse_thread/thread/90eb36971c744756/31d5407614cae4a1?lnk=gstq=wants+to+chat#31d5407614cae4a1

 http://groups.google.com/group/google-web-toolkit/browse_thread/thread/fbad184e51a5c45a/71c546c41077d307?lnk=gstq=wants+to+chat#71c546c41077d307
 Are accounts been hacked or some other problem?

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




-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
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: abc wants to chat - what’s the story behind these posts

2011-07-06 Thread pac
I don't remember when last time I used google chat, so chances of
making such typo in my case is bit less.
But anyway, if nothing wrong as such then it is reassuring.
Thanks David.


On Jul 6, 1:57 pm, David Chandler drfibona...@google.com wrote:
 I think a few folks have accidentally typed the group email address in the
 Gmail chat box, perhaps with the help of auto-complete. It is definitely not
 intentional promo from Google.

 /dmc









 On Wed, Jul 6, 2011 at 8:54 AM, pac parvez.chau...@gmail.com wrote:
  Yesterday I saw a similar post in gwt forum from my account (which I
  didn't post)
  I thought my account is compromised, I deleted that post and changed
  my password.
  But nothing else looked suspicious but just one post in gwt forum.
  Message itself looks bit promotional from google team.
  Today, I searched and saw few other such posts i.e.

 http://groups.google.com/group/google-web-toolkit/browse_thread/threa...

 http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
  Are accounts been hacked or some other problem?

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

 --
 David Chandler
 Developer Programs Engineer, GWT+GAE
 w:http://code.google.com/
 b:http://turbomanage.wordpress.com/
 b:http://googlewebtoolkit.blogspot.com/
 t: @googledevtools

-- 
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: Error when compiling GWT 2.4

2011-07-06 Thread zeroconf
Dear Thomas,

On Jul 6, 1:56 pm, Thomas Broyer t.bro...@gmail.com wrote:
 or simply revert your GWT_TOOLS to r10417.
 Seehttp://code.google.com/p/google-web-toolkit/source/detail?r=10417(the
 changes applied in trunk, not in releases/2.4.0; not how FindRequest has
 been modified, whcih is the one failing the build in releases/2.4.0) 
 andhttp://code.google.com/p/google-web-toolkit/source/detail?r=10418(the
 updated requestfactory-apt.jar rebuilt with these changes)

This worked. Thanks a lot.

Best,
Sebastian

-- 
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: New Google theme coming to GWT?

2011-07-06 Thread gadev
I am not referring to the color scheme, but instead if something similar 
such as the shape of buttons and how they get highlighted etc..

GWT has a number of themes, I currently use  inherits name=
'com.google.gwt.user.theme.clean.Clean'/ and I was wondering if something 
similar or other themes will be introduces with 2.4.


-George  
   

-- 
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/-/6YOvUTlO4tAJ.
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: Anybody has simple way to get Token when implement XRSF protection.

2011-07-06 Thread David Chandler
Hi Joey,

The XSRF token is stateless so you only need to call the XsrfTokenService
once per server session to obtain it. You can save it as a static variable
in a service helper class. Thereafter, you just need to call setRpcToken for
each service.

Some projects GWT.create() all services in a helper or factory class like

public class ServiceHelper {

private static SomeServiceAsync someService;

static {
(SomeServiceAsync) someService = GWT.create(SomeService.class);
}

public static getSomeService() {
return someService;
}
}

If you do this, you might initialize each service with the token when you
create it. Thereafter, client code can call ServiceHelper.getSomeService()
in order to make a request. For example, you could put the following in a
static initializer in the ServiceHelper to obtain the XSRF token when the
app loads:

XsrfTokenServiceAsync xsrf =
(XsrfTokenServiceAsync)GWT.create(XsrfTokenService.class);
((ServiceDefTarget)xsrf).setServiceEntryPoint(GWT.getModuleBaseURL() +
xsrf);
xsrf.getNewXsrfToken(new AsyncCallbackXsrfToken() {

 public void onSuccess(XsrfToken token) {
   initSomeService(token);
   initNextService(token);
   ...
   });
 }

As far as handling the XSRF exception centrally, you can wrap AsyncCallback
with your own class like XsrfProtectedCallback in which you implement
onFailure(). This is a good practice anyway in order to provide uniform
error handling for your RPC calls. See HupaCallback in the Apache HupaMail
project for an example of a wrapped callback.

HTH,
/dmc


On Wed, Jul 6, 2011 at 4:33 AM, Joey huazong...@gmail.com wrote:

 Hi All

 I have a big GWT project, there are many services and methods need to
 be protected. but I think it a hard work to
 change all of code what call methods as the following code from google
 document. So just want to know anybody
 has any simple way can fix XRSF problem and no need to change so many
 code for methods calling.

 -
 XsrfTokenServiceAsync xsrf =
 (XsrfTokenServiceAsync)GWT.create(XsrfTokenService.class);
 ((ServiceDefTarget)xsrf).setServiceEntryPoint(GWT.getModuleBaseURL() +
 xsrf);
 xsrf.getNewXsrfToken(new AsyncCallbackXsrfToken() {

  public void onSuccess(XsrfToken token) {
MyServiceAsync rpc = (MyServiceAsync)GWT.create(MyService.class);
((HasRpcToken) rpc).setRpcToken(token);

// make XSRF protected RPC call
rpc.doStuff(new AsyncCallbackVoid() {
  // ...
});
  }

  public void onFailure(Throwable caught) {
try {
  throw caught;
} catch (RpcTokenException e) {
  // Can be thrown for several reasons:
  //   - duplicate session cookie, which may be a sign of a cookie
  // overwrite attack
  //   - XSRF token cannot be generated because session cookie
 isn't
  // present
} catch (Throwable e) {
  // unexpected
}
 });
 -


 Thanks

 Joey

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




-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
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 maven plugin - Google's or Codehause's?

2011-07-06 Thread David Chandler
Use the latest gwt-maven-plugin from codehaus. 1.3.2.google was a temporary
version developed during the GWT 2.1 release, and features from it were
contributed to codehaus and appear in 2.2.0.

/dmc

On Tue, Jul 5, 2011 at 12:09 PM, Marko Vuksanovic markovuksano...@gmail.com
 wrote:

 Which gwt-maven-plugin version do you suggest to use? I have seen that
 Expenses sample in 2.1.0 uses 1.3.2.google while that same sample uses 2.2.0
 in trunk... What is the reason for 1.3.2.google not to be used in trunk as
 well?

 Marko

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




-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
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.3.0 + gwt-maven-plugin 2.3.0 tests generate errors

2011-07-06 Thread David Chandler
To resolve the GWT errors regarding ConstraintValidation, be sure to add
validation-api as a dependency in your POM. This was an oversight in the GWT
2.3 maven push and will be addressed in 2.4.

/dmc

On Wed, Jul 6, 2011 at 5:15 AM, Eborix13 ebori...@gmail.com wrote:

 Hi,

 I've installed GWT 2.3.0 and I've implemented the StockWatcher sample
 program. All went fine until I got to the testing part. I have a
 simple test, one method that does assertTrue(true). When I run it I
 get a bunch of errors:
 1) if I run the tests using maven I get:
 java.lang.NoClassDefFoundError: com/google/gwt/dev/cfg/Condition
at
 com.google.gwt.junit.client.GWTTestCase.createStrategy(GWTTestCase.java:
 340)
at
 com.google.gwt.junit.client.GWTTestCase.getStrategy(GWTTestCase.java:
 257)
 I see that this class is in the gwt-dev dependency so I add it to the
 dependency list
 2) if I run the tests with the gwt-dev dependency I get
 ---
  T E S T S
 ---
 Running de.codebox.mywebapp.client.WebAppTest
 [ERROR] Unable to find type 'java.lang.Object'
   [ERROR] Hint: Check that your module inherits
 'com.google.gwt.core.Core' either directly or indirectly (most often
 by inheriting module 'com.google.gwt.user.User')
 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.765
 sec  FAILURE!
 Results :
 Tests in error:
  testStockWatcher(de.codebox.mywebapp.client.WebAppTest)

 Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

 And the error is
 com.google.gwt.core.ext.UnableToCompleteException: (see previous log
 entries)
at
 com.google.gwt.dev.cfg.ModuleDef.checkForSeedTypes(ModuleDef.java:
 518)
at
 com.google.gwt.dev.cfg.ModuleDef.getCompilationState(ModuleDef.java:
 327)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:1342)

 3) if i run the tests from my developing environment (Intellij Idea) I
 get:
 Validating newly compiled units
   [ERROR] Errors in 'jar:file:/C:/Documents%20and%20Settings/
 florin.haizea/.m2/repository/com/google/gwt/gwt-user/2.3.0/gwt-
 user-2.3.0.jar!/com/google/gwt/editor/client/EditorDriver.java'
  [ERROR] Line 20: The import javax.validation.ConstraintViolation
 cannot be resolved
  [ERROR] Line 97: ConstraintViolation cannot be resolved to a
 type
 
 which ends up in java.lang.OutOfMemoryError: Java heap space

 I've seen other posts with similar errors but no clear solution to the
 problem. Can anyone help?
 Many 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.




-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

-- 
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 permutation id inside a generator

2011-07-06 Thread Thomas Broyer
In most cases, if you generate different things for different permutations, 
you know the deferred binding property you depend on, so you can use them to 
build the class name. If you want, you can still use all of the binding 
properties and their value(s), using a CRC32 or similar (Alder32 is faster, 
it's what ClientBundle uses for CssResources obfuscated names) to make it 
smaller but still unique.
I believe you could also use a static map as a cache of what you already 
generated, using the SelectionProperties as the key and a generated unique 
String as the value; each time the generator is called, look up in the map, 
and you find nothing, generate a new class name and push it in, then 
generate the class.

The question actually is *why* would you want to do this?

(btw, another example where it's very easy to defeat user.agent as a key: 
using several locales)

-- 
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/-/j7bDvzYOrncJ.
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 permutation id inside a generator

2011-07-06 Thread Pierre Coirier
Thanks Thomas.

I'd like to do this because for mvp4g, I'd like developers to be able
to set a gin module thanks to deferred property (http://
groups.google.com/group/mvp4g/browse_thread/thread/87a1cc4a8a683381)
so that a different gin module can be used for different type of
platform. But, because this property can be different for each
permutation, I need to generate one version for each permutation, ie
the tryCreate method of GeneratorContext should never return null. In
order to do this (if I understand it correctly), I need a unique
implementation class name.

Developer could define zero to many properties so using their values
would be difficult.

I was thinking using a simple static counter (and synchronize the
increment method to prevent multi-thread issue).

On Jul 6, 9:51 am, Thomas Broyer t.bro...@gmail.com wrote:
 In most cases, if you generate different things for different permutations,
 you know the deferred binding property you depend on, so you can use them to
 build the class name. If you want, you can still use all of the binding
 properties and their value(s), using a CRC32 or similar (Alder32 is faster,
 it's what ClientBundle uses for CssResources obfuscated names) to make it
 smaller but still unique.
 I believe you could also use a static map as a cache of what you already
 generated, using the SelectionProperties as the key and a generated unique
 String as the value; each time the generator is called, look up in the map,
 and you find nothing, generate a new class name and push it in, then
 generate the class.

 The question actually is *why* would you want to do this?

 (btw, another example where it's very easy to defeat user.agent as a key:
 using several locales)

-- 
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: Aw: Re: Entity version checks / optimistic locking

2011-07-06 Thread Jeffrey Chimene
On 7/6/2011 1:48 AM, Jens wrote:
 You have to store the lock somehow in the database. For example you
 can create a database table called locked objects that has columns
 like id, referenced table name, referenced object id, user id that
 locked the object, date of lock. Then you put a unique constraint on
 referenced table name, referenced object id so that a object can not
 be locked twice. 

 On server side you can then implement methods like
 Lock.create(CommonEntityInterface object),
 Lock.delete(CommonEntityInterface object) and maybe
 Lock.isLocked(CommonEntityInterface object) where
 CommonEntityInterface is just an interface (or an abstract entity base
 class) implemented by all your entities so you can call getId() on
 them. The table name can be accessed via the @Table annotation
 (reflection) or has to be generated if you use JPA default table names.

 -- J.
 --
Why not use a set transaction statement that locks the desired row?
Isn't that why we use a DBMS?

-- 
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 updating individual/non-consecutive rows

2011-07-06 Thread Rike255
Thanks guys both answers look like they'll help, I'll read into both.

On Jul 6, 5:27 am, Adolfo Panizo Touzon adolfo.pan...@gmail.com
wrote:
 If I understand you, when you create the CellTable you can add a
 setFieldUpdater. With this way you have control to update the rows like you
 want (you have a int index).

 http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...

 See you.

 2011/7/5 Rike255 rgro...@gmail.com









  I can't figure out a good way to update a single row of data after
  using setRowData() to populate a CellTable.

  Specifically, I have an ArrayList of objects that represent rows that
  need to be updated, but they are not consecutive.  Is there a way to
  update one (or multiple non-consecutive) rows in a celltable without
  refreshing the whole thing (or from an index to the end)?

  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.

 --
 El precio es lo que pagas. El valor es lo que recibes.
 Warren Buffet

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Can't install Google Web Toolkit Developer Plugin under Chrome

2011-07-06 Thread Chris Conroy
What OS/distro and architecture are you running on? Are you running stock
chrome or chromium, or did you get a repackaging from your distro? (SUSE for
example is known to repackage chromium in an incompatible way\)

On Mon, Jul 4, 2011 at 5:32 AM, Vlad s.mastre...@gmail.com wrote:

 I was starting coding with GWT following the tutorial at


 http://code.google.com/intl/it/webtoolkit/doc/latest/tutorial/create.html

 when the tutorial tells to connect to the 'development mode code
 server' the browser ask to install a plugin.
 With Firefox everything works fine, but with Chrome every time I try
 to connect to the server it asks to install it


 http://code.google.com/intl/it/webtoolkit/doc/latest/tutorial/images/MissingPlugin.png

 even if it is listed under

  chrome://extensions/

 I'd like to know what am I missing.

 TIA

 Something useful
 GWT developer pulgin version: 1.0.9738
 Chrome versione  :  12.0.742.112

 --
 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: Google Products using GWT

2011-07-06 Thread David Chandler
Fundamentally, it's because engineering teams at Google are free to choose
their own tools. The Architecture Police don't work here. There are many
instances where Google tools or products compete with each other like GWT
and Closure. In Google culture, that's generally viewed as healthy as it
allows freedom of choice and provides incentive for competing frameworks to
continually improve.

As for Google+, I don't know any specifics, but lots of factors typically
come into play as with any company: the team's skillset and preferences,
whether the app is in framework X's sweet spot, etc. I don't understand it
personally, but some people really like JS, and Google has a lot of (very
good) JS developers.

/dmc

On Sat, Jul 2, 2011 at 4:45 AM, Yannis BRES yaya.at.w...@gmail.com wrote:

 Hi David !

 Would you (or Thomas ? ;-) ) have any shareable insights as to why Google+
 seems to be coded in pure Java / closure instead of GWT ?

 Best regards,
  Yannis

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

 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.




-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://turbomanage.wordpress.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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



XML data binding into GWT serializable types

2011-07-06 Thread laolaoyu
Hi,

I have some XML data on my web server side (which is received from
some web service). At the moment I used Axis2 DataBinding (ADB)
framework to generated all the data types in Java.

However when I tried to forward these Java objects to the web client
side thru GWT-RPC, it failed because all the library dependencies are
not available on the client-side. I have read thru some posts in this
group and on google and it seems that it is the same problem also for
other data binding framework like Jaxb, Xmlbeans, JiBX, etc.

For what I have seen, one way to solve it is to include the dependent
libraries as super-source on the client-side so GWT compiler to find
them during Java to JavaScript compilation. This doesn't sound like an
elegant solution to me?

Is there a better to solve the problem?

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.



Re: How to redirect HTML inside a dialogbox

2011-07-06 Thread jhulford
I think you're on a bit of a fools errand here and doing something
that's going to greatly annoy the users of your site - especially now
that tabbed browsing is ubiquitous.  I'd definitely not use your site
if you broke links to external pages like that for me.

On Jul 4, 9:50 pm, Oscar o.bar...@gmail.com wrote:
 Hi again!

 Thanks for your reply.

 If I am understanding it right, I should use the anchor for the links
 contained inside the iframe, right?

 The thing is that I don't have access to the embedded content. I want to
 show an external website inside the iframe but I don't want it to send users
 away from my site.

 Is it possible?

-- 
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: Google Products using GWT

2011-07-06 Thread Bala Sankar
*Market for GWT Apps.*

Android and iPhone apps have market. Developers build applications and sell
their apps.
Chrome and other tablets will extensively rely on GWT apps.
How do GWT developers get rewards?

Regards,
Bala

On Wed, Jul 6, 2011 at 8:26 AM, David Chandler drfibona...@google.comwrote:

 Fundamentally, it's because engineering teams at Google are free to choose
 their own tools. The Architecture Police don't work here. There are many
 instances where Google tools or products compete with each other like GWT
 and Closure. In Google culture, that's generally viewed as healthy as it
 allows freedom of choice and provides incentive for competing frameworks to
 continually improve.

 As for Google+, I don't know any specifics, but lots of factors typically
 come into play as with any company: the team's skillset and preferences,
 whether the app is in framework X's sweet spot, etc. I don't understand it
 personally, but some people really like JS, and Google has a lot of (very
 good) JS developers.

 /dmc



-- 
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: XML data binding into GWT serializable types

2011-07-06 Thread Deepak Singh
You will use these data binding frameworks only on server side. They dont
have any role to play on client side.

On Wed, Jul 6, 2011 at 9:04 PM, laolaoyu laola...@gmail.com wrote:

 Hi,

 I have some XML data on my web server side (which is received from
 some web service). At the moment I used Axis2 DataBinding (ADB)
 framework to generated all the data types in Java.

 However when I tried to forward these Java objects to the web client
 side thru GWT-RPC, it failed because all the library dependencies are
 not available on the client-side. I have read thru some posts in this
 group and on google and it seems that it is the same problem also for
 other data binding framework like Jaxb, Xmlbeans, JiBX, etc.

 For what I have seen, one way to solve it is to include the dependent
 libraries as super-source on the client-side so GWT compiler to find
 them during Java to JavaScript compilation. This doesn't sound like an
 elegant solution to me?

 Is there a better to solve the problem?

 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: Entity version checks / optimistic locking

2011-07-06 Thread J.Ganesan
No. Aldo Neto wants to preclude Edit function being made available
to more than one at any point of time. Whereas, a transaction is a
postmortem action, still allowing the Edit function to more than one
( though only one will eventually succeed ).

J.Ganesan
www.DataStoreGwt.com

On Jul 6, 8:05 pm, Jeffrey Chimene jchim...@gmail.com wrote:
 On 7/6/2011 1:48 AM, Jens wrote:







  You have to store the lock somehow in the database. For example you
  can create a database table called locked objects that has columns
  like id, referenced table name, referenced object id, user id that
  locked the object, date of lock. Then you put a unique constraint on
  referenced table name, referenced object id so that a object can not
  be locked twice.

  On server side you can then implement methods like
  Lock.create(CommonEntityInterface object),
  Lock.delete(CommonEntityInterface object) and maybe
  Lock.isLocked(CommonEntityInterface object) where
  CommonEntityInterface is just an interface (or an abstract entity base
  class) implemented by all your entities so you can call getId() on
  them. The table name can be accessed via the @Table annotation
  (reflection) or has to be generated if you use JPA default table names.

  -- J.
  --

 Why not use a set transaction statement that locks the desired row?
 Isn't that why we use a DBMS?

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



Application will not run outside dev mode (gwt 2.3)

2011-07-06 Thread Jens
Hi

I have an application that i have been working on for a while, but now
suddenly the application will not run outside dev mode.

If i remove the gwt.codesvr=127.0.0.1:9997 from my url, the
application stops working (it will not bootstrap).

After digging a bit around i found the following javascript stacktrace
in chrome:

Uncaught TypeError: Cannot read property
'com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializer' of
undefined
(anonymous function) FDA307FC33B43DADD6B98D9EE42A955C.cache.html:976
gwtOnLoad FDA307FC33B43DADD6B98D9EE42A955C.cache.html:22850
maybeStartModule myapp.nocache.js:40
allocationrule.onScriptLoad myapp.nocache.js:273
(anonymous function)FDA307FC33B43DADD6B98D9EE42A955C.cache.html:22858

Any clues on what going on here?

Best regards Jens

-- 
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 updating individual/non-consecutive rows

2011-07-06 Thread Jeff Larsen
Also, rendering the whole table is generally really fast. I would test it 
out to see if it is worth the effort to selectively update rows. 

-- 
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/-/8JbBFJKzx7kJ.
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 redirect HTML inside a dialogbox

2011-07-06 Thread Oscar
Hi jhulford,

Thanks again for your time,

I agree that the embedded site should be able to open a new tab/window. What 
I don't want is the iframe to have access to the parent.

I guess that what I'm trying to do is something like a sandboxed iframe. 
Nonetheless, when I try to use sandboxed iframe with Firefox (5.0) it just 
ignores the sandbox  attribute.

Would there be a way to make it work?

-- 
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/-/4CaiS6oTQisJ.
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: Entity version checks / optimistic locking

2011-07-06 Thread Jeff Chimene
On 07/06/2011 09:09 AM, J.Ganesan wrote:
 No. Aldo Neto wants to preclude Edit function being made available
 to more than one at any point of time. Whereas, a transaction is a
 postmortem action, still allowing the Edit function to more than one
 ( though only one will eventually succeed ).
 
 J.Ganesan
 www.DataStoreGwt.com

Sorry, but I must disagree with the assertion that a database
transaction unconditionally provides ... the Edit function to more
than one... A transaction is not a postmortem action; although I have
to admit that I'm unclear on the definition of that term.

An exclusive write lock on a row helps implement the behavior desired by
the OP. Given two cooperating processes, A and B, if A holds an
exclusive write lock on one or more rows, then the DBMS will refuse any
request by B for a proper subset of those rows in an incompatible lock
mode. Such refusals provide information to the the client so that it can
then ... preclude Edit function being made available to more than one
at any point of time.

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



Aw: Re: Entity version checks / optimistic locking

2011-07-06 Thread Jens
That would imply that a transaction has to live longer than one request (if 
you use JPA you can only lock an entity inside a transaction and the entity 
will be unlocked once you commit or rollback). But I think in most common 
ajax web applications you do one transaction per request and that way you 
can not hold a lock for a longer period of time if you use DBMS read/write 
locks.

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



TabLayoutPanel autosize

2011-07-06 Thread gwtomni gwtomni
Hello,


   Is there any way to make the TabLayoutPanel auto-sizable relative to its
content ?

thx

-- 
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: Aw: Re: Entity version checks / optimistic locking

2011-07-06 Thread Jeff Chimene
On 07/06/2011 09:39 AM, Jens wrote:
 That would imply that a transaction has to live longer than one request
 (if you use JPA you can only lock an entity inside a transaction and the
 entity will be unlocked once you commit or rollback). 

OK

 But I think in
 most common ajax web applications you do one transaction per request and
 that way you can not hold a lock for a longer period of time if you use
 DBMS read/write locks.

I disagree with that assertion of the linkage between transaction count
on the client and transaction count on the server. However, this is a
GWT forum, not a DBMS forum, and I'll end the discussion here.

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



GWT File Save

2011-07-06 Thread Thomas Holmes
I know this question has been asked before, and have researched this
group and done a more wide Google search on this question.

I have a working GWT Application which works great.   From the client
I can call a GWT-RPC service to get data which I can bring back to the
UI, and all that works great.   Now what I want to do is take that
data, that complex object that is returned, do some data-massage, and
write out the data to a CSV file.

From what I have researched so far is that I can create a normal
Servlet with the doGet or doPost which will write out data to my CSV
file.   Meaning I get the browser to open it's Save File As dialog
to save the file with my string text.

So, the question I pose is this:

1) Should I return the data to my client, and then from the client
post that string data to my working servlet?
Since this function is returning an array-list of data, and there's a
lot of data massaging to do, I'd be doing it on the client-side ... or
I guess I could do the data-massaging on the GWT-RPC side and return a
String, or different ArrayList.   So ... how would I push a string or
list of data to my Servlet to output the file.

Or

2) Within the GWT-RPC call, after I get the data I want, then I could
massage the data to a list or string.
From within the GWT-RPC Servlet, I could post to my servlet the list
or string.
Or within the GWT-RPC, can I output the data here like I did in my
other servlet?

If you need any more information, or any other clarification, please
let me know.

Thanks!
  Tom

-- 
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: In-place edit (like Google AdWords)

2011-07-06 Thread d95sld95

A college and I created an example of what we are looking for. The
sample is a Contacts application that allow you to CREATE and view
DETAILS of a person. In DETAIL mode you can edit each property (or
group of properties) clicking the edit command.

Project:
http://code.google.com/p/gwt-inplace-edit/

Demo:
http://1.inplaceedit.appspot.com/inplaceedit.html

Please have a look at the implementation. Any comments or suggestions
for improvements are most welcome. We made this code available for
that reason.

-- 
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 updating individual/non-consecutive rows

2011-07-06 Thread Thomas Broyer
Well, actually, I'm not even sure Cell widgets currently re-renders only 
selected rows. It might very well render the whole thing whatever you do, 
selective rendering coming in a future release as a performance enhancement.

-- 
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/-/v36k9HVG2KQJ.
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: Properties emulation

2011-07-06 Thread Ryan
Thanks for the suggestions, guys.  That really helps.

Ryan

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



How do I align a GWT application to the center?

2011-07-06 Thread Xavier
I have an html5 canvas element within a flextable and that flextable
is in the root panel. I would like to align the application so it is
displayed in the center of the page both vertically and horizontally.
Currently it is displayed in the upper left hand corner.

code:
Document document = Document.get();
Canvas canvasElement = (Canvas) document.getElementById(canvas);
final MyFocusWidget webGLCanvas = new MyFocusWidget((Element)
canvasElement);
flexT.setWidget(0, 0, webGLCanvas);
RootPanel.get(flexTable).add(flexT);


Any help is 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.



Re: Application will not run outside dev mode (gwt 2.3)

2011-07-06 Thread Magno Machado
Did you ran GWT Compiler and are the compiled files (the *.cache.html,
module.nocache.js and etc) updated? Or are you simply running devmode and
removing the ?gwt.codesvr from the url?

On Wed, Jul 6, 2011 at 1:13 PM, Jens djar...@gmail.com wrote:

 Hi

 I have an application that i have been working on for a while, but now
 suddenly the application will not run outside dev mode.

 If i remove the gwt.codesvr=127.0.0.1:9997 from my url, the
 application stops working (it will not bootstrap).

 After digging a bit around i found the following javascript stacktrace
 in chrome:

 Uncaught TypeError: Cannot read property
 'com_google_gwt_user_client_rpc_impl_RemoteServiceProxy_serializer' of
 undefined
 (anonymous function) FDA307FC33B43DADD6B98D9EE42A955C.cache.html:976
 gwtOnLoad FDA307FC33B43DADD6B98D9EE42A955C.cache.html:22850
 maybeStartModule myapp.nocache.js:40
 allocationrule.onScriptLoad myapp.nocache.js:273
 (anonymous function)FDA307FC33B43DADD6B98D9EE42A955C.cache.html:22858

 Any clues on what going on here?

 Best regards Jens

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




-- 
Magno Machado Paulo
http://blog.magnomachado.com.br
http://code.google.com/p/emballo/

-- 
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 File Save

2011-07-06 Thread Alain Ekambi
what exactly  r u trying to do ?
Dont really understand the question

2011/7/6 Thomas Holmes thomas.j.hol...@gmail.com

 I know this question has been asked before, and have researched this
 group and done a more wide Google search on this question.

 I have a working GWT Application which works great.   From the client
 I can call a GWT-RPC service to get data which I can bring back to the
 UI, and all that works great.   Now what I want to do is take that
 data, that complex object that is returned, do some data-massage, and
 write out the data to a CSV file

 From what I have researched so far is that I can create a normal
 Servlet with the doGet or doPost which will write out data to my CSV
 file.   Meaning I get the browser to open it's Save File As dialog
 to save the file with my string text.

 So, the question I pose is this:

 1) Should I return the data to my client, and then from the client
 post that string data to my working servlet?
 Since this function is returning an array-list of data, and there's a
 lot of data massaging to do, I'd be doing it on the client-side ... or
 I guess I could do the data-massaging on the GWT-RPC side and return a
 String, or different ArrayList.   So ... how would I push a string or
 list of data to my Servlet to output the file.

 Or

 2) Within the GWT-RPC call, after I get the data I want, then I could
 massage the data to a list or string.
 From within the GWT-RPC Servlet, I could post to my servlet the list
 or string.
 Or within the GWT-RPC, can I output the data here like I did in my
 other servlet?

 If you need any more information, or any other clarification, please
 let me know.

 Thanks!
  Tom

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




-- 

GWT API for  non Java based platforms
http://code.google.com/p/gwt4air/
http://www.gwt4air.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.



Re: In-place edit (like Google AdWords)

2011-07-06 Thread d95sld95
A colleague and I created an example of what we are looking for. The
sample is a Contacts application that allow you to CREATE and view
DETAILS of a person. In DETAIL mode you can edit each property (or
group of properties) clicking the edit command.

Project:
http://code.google.com/p/gwt-inplace-edit/

Demo:
http://1.inplaceedit.appspot.com/inplaceedit.html

Please have a look at the implementation. Any comments or suggestions
for improvements are most welcome. We made this code available for
that reason.

-- 
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 updating individual/non-consecutive rows

2011-07-06 Thread Jeff Larsen
There are hooks in HasDataPresenter for rendering a specific subset of 
rows,but I haven't actually tested it. 

-- 
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/-/HDGfNamptmIJ.
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: In-place edit (like Google AdWords)

2011-07-06 Thread d95sld95
A colleague and I created an example of what we are looking for. The
sample is a Contacts application that allow you to CREATE and view
DETAILS of a person. In DETAIL mode you can edit each property (or
group of properties) clicking the edit command.

Project:
http://code.google.com/p/gwt-inplace-edit/

Demo:
http://1.inplaceedit.appspot.com/inplaceedit.html

Please have a look at the implementation. Any comments or suggestions
for improvements are most welcome. We made this code available for
that reason.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Can't set styles with GWT Designer / UiBinder

2011-07-06 Thread cri
Using GWT Designer 2.4 beta. When editing a UiBinder file with GWT
Designer, there is no styleName property in the property panel for
setting the style of a GUI element. Is this intentional or does this
indicate a problem, e.g. with GWT Designer, my configuration, etc?
Thanks, Chuck

-- 
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: Composite Primary Keys (Many-to-Many relationship)

2011-07-06 Thread Greg Naidu
Aldo Neto tumolin@... writes:

 
 
 Hi,
 
 Thanks you all for your help. My problem was that I was mapping my Client side
incorrectly - I now understand how to use the ValueProxy. In case someone else
is having similar problems, I suggest reading Thomas'
post: http://tbroyer.posterous.com/gwt-211-requestfactory 
 
 It helped me a lot.
 
 Cheers 
 

Hi Aldo,

I'm not using GWT but I am trying to implement a many-to-many relationship using
the same article you stated earlier with exactly the same results.

I'd really appreciate your help regarding the mapping changes that resolved the
error.

Cheers,
Greg

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



java.lang.Comparable implemented to a inner class but GWT gives compile time error

2011-07-06 Thread saurabh saurabh
Hi all,
I have a plugin raphaelgwt and I have made some modification
over it to suit my application. I am getting a strange behavior here,
these are the inner classes of plugin with modificaton

public class Raphael{

  public class Set implements MyInterface, ComparableSet{
  
  public int compareTo(Set o) { ..}
  }

 public class Shape extends Widget implements MyInterface,
ComparableSet {
   
  public int compareTo(Set o) { ..}
 }
}

now when I try to call like
Shape s = raphael.new Shape();
-
| s.compareTo(.---); |
-

it is giving me compile time error like there no such method.
(Actually eclipse is not assisting code and showing
error).

Although MyInterface mi = raphael.new Shape()  is doing fine here.

Anybody know whats going wrong here.

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.



Re: adding filter to file upload in gwt

2011-07-06 Thread Jim Douglas
Untested, and no guarantees, but try something like this:

String mimeList = application/vnd.ms-excel,application/
msexcel,application/x-msexcel,application/x-ms-excel,application/
vnd.ms-excel,application/x-excel,application/x-
dos_ms_excel,application/xls,application/vnd.openxmlformats-
officedocument.spreadsheetml.sheet;

myFileUploadWidget.getElement().setPropertyString(accept, mimeList);

Reference:

http://www.w3.org/TR/html-markup/input.file.html

On Jul 5, 11:18 pm, aman bhatia.ama...@gmail.com wrote:
 I am using the basic FileUpload control in gwt and wanted to add the
 filter on the extensions allowed in the browsing window, which
 restrict the user to select only specific extensions (like xls,xlsx
 etc). Tell me how I can achieve this as I want to restrict on the
 browsing window itself and cant wait for the Button submit event.

 Thanks

 Amandeep

-- 
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.lang.Comparable implemented to a inner class but GWT gives compile time error

2011-07-06 Thread saurabh saurabh
One more thing I have made jar file of modified plugin by using
command line standard JDK jar tool. I tried using eclipse but it make
jar of WEB-INF.

-- 
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: Google plugin for Eclipse withou WindowBuilder (GWT Designer)

2011-07-06 Thread Eric Clayberg
For the Google I/O presentation I was indeed running Windows 7 via
VMWare on my Mac. It was fast because I was using the latest build
(basically GPE v2.3.1 at the time) and not because of the OS
configuration. If you try the latest release (v2.3.2), I think you
will find it to be significantly faster.

On Jun 16, 5:36 pm, Vrto michal.vrt...@gmail.com wrote:
 BTW, I've seen your Google IO 2011 presentation (n1) and I was
 surprised how fastGWTdesignerworked on your Windows machine (and it
 looked virtualized from Mac OS X if I remember correctly!). Is it
 possible that it's slower on Linux? With Eclipse on Sun's JRE? I guess
 I will try it with fresh install of Indigio, where my Eclipse
 installation will not be huge monster with billion of plugins if
 that's any better.

 On Jun 16, 10:41 pm, Eric Clayberg clayb...@google.com wrote:







  I would be curious as to how the latestGWTDesignerbuild feels to
  you...

 http://code.google.com/webtoolkit/tools/download-gwtdesigner-beta.html

  On Jun 16, 1:08 pm, Vrto michal.vrt...@gmail.com wrote:

   I disabled that of course, but when Eclipse stars it does always stuff
   like updatinggwtdesignerpaletten, building somegwtdesigner
   stuff and I am minimalist I just dont want that heh :)

   On Jun 16, 7:02 pm, Renato Beserra renatobese...@gmail.com wrote:

I don't like theGWTDesignereither, but how does it cause you problems?

Is it opening your classes by default or something?

2011/6/16 Vrto michal.vrt...@gmail.com

 Hello, I like Google Plugin for Eclipse, but I don't likeGWT
Designer. It's slow, buggy, keeps updating itself, loads terribly load
 and so on. Is there any chance of releasing google plugin withoutGWT
Designer?

 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.

--
Renato Beserra Sousa

-- 
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.lang.Comparable implemented to a inner class but GWT gives compile time error

2011-07-06 Thread saurabh saurabh
Oh sorry folks it was silly mistake while using eclipse , too dumb too
silly. Anyway I resolved on my own. Sorry for bothering anyone.

-- 
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: XML data binding into GWT serializable types

2011-07-06 Thread laolaoyu
I need to forward the data to the client. If not using the data types
generated by these frameworks, what else can I use?

On Jul 7, 12:06 am, Deepak Singh deepaksingh...@gmail.com wrote:
 You will use these data binding frameworks only on server side. They dont
 have any role to play on client side.







 On Wed, Jul 6, 2011 at 9:04 PM, laolaoyu laola...@gmail.com wrote:
  Hi,

  I have some XML data on my web server side (which is received from
  some web service). At the moment I used Axis2 DataBinding (ADB)
  framework to generated all the data types in Java.

  However when I tried to forward these Java objects to the web client
  side thru GWT-RPC, it failed because all the library dependencies are
  not available on the client-side. I have read thru some posts in this
  group and on google and it seems that it is the same problem also for
  other data binding framework like Jaxb, Xmlbeans, JiBX, etc.

  For what I have seen, one way to solve it is to include the dependent
  libraries as super-source on the client-side so GWT compiler to find
  them during Java to JavaScript compilation. This doesn't sound like an
  elegant solution to me?

  Is there a better to solve the problem?

  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.



Yes or No: Will Singleton-izing my Resources offer tangible performance gains??

2011-07-06 Thread karthik reddy
I use my Resources.java (it extends ClientBundle and holds references to 
images etc) in multiple classes and in each class I would create an instance 
of  it class using GWT.create(Resources.class) 
Would making this class a singleton offer me tangible performance gains or 
is it not worth the engineering effort ??  I am not looking for a quantified 
answer necessarily but even something of a gut check would suffice.


-- 
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/-/WRE3Jx1rph0J.
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: Yes or No: Will Singleton-izing my Resources offer tangible performance gains??

2011-07-06 Thread Chris McBrien
I believe that GWT.create will by default give you back a shared single 
instance.  

karthik reddy karthik.ele...@gmail.com wrote:

I use my Resources.java (it extends ClientBundle and holds references to 
images etc) in multiple classes and in each class I would create an instance 
of  it class using GWT.create(Resources.class) 
Would making this class a singleton offer me tangible performance gains or 
is it not worth the engineering effort ??  I am not looking for a quantified 
answer necessarily but even something of a gut check would suffice.


-- 
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/-/WRE3Jx1rph0J.
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: XML data binding into GWT serializable types

2011-07-06 Thread Chris McBrien
I have seen Apache beanutils used to copy from an encumbered object graph 
such as that provided by Hibernate and JAXB into simple POJOs.

Though this DTO use should be carefully managed as it can quickly become an 
anti-pattern. 

laolaoyu laola...@gmail.com wrote:

I need to forward the data to the client. If not using the data types
generated by these frameworks, what else can I use?

On Jul 7, 12:06 am, Deepak Singh deepaksingh...@gmail.com wrote:
 You will use these data binding frameworks only on server side. They dont
 have any role to play on client side.







 On Wed, Jul 6, 2011 at 9:04 PM, laolaoyu laola...@gmail.com wrote:
  Hi,

  I have some XML data on my web server side (which is received from
  some web service). At the moment I used Axis2 DataBinding (ADB)
  framework to generated all the data types in Java.

  However when I tried to forward these Java objects to the web client
  side thru GWT-RPC, it failed because all the library dependencies are
  not available on the client-side. I have read thru some posts in this
  group and on google and it seems that it is the same problem also for
  other data binding framework like Jaxb, Xmlbeans, JiBX, etc.

  For what I have seen, one way to solve it is to include the dependent
  libraries as super-source on the client-side so GWT compiler to find
  them during Java to JavaScript compilation. This doesn't sound like an
  elegant solution to me?

  Is there a better to solve the problem?

  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: JQuery like animation

2011-07-06 Thread dindeman
Yes this progress bar looks really neat indeed, nice.

What about gwt-fx ? I have used it in the past and found it pretty good 
then.
I remember that I had to switch to it (coming from using GQuery) because I 
needed a way to intercept the process of a fading effect in the middle and 
reverse it. And, at the time, that wasn't possible with GQuery.

-- 
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/-/SR7nPNIXu9IJ.
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: XML data binding into GWT serializable types

2011-07-06 Thread laolaoyu
Hi Chris,

One thing I don't understand in the method you mentioned is that:

During this java object conversion/mapping process,
1. I need to have the simple POJOs defined first?
2. Or I only need to have the encumbered objects and define the
mapping rules using BeanUtils, and simple POJOs are generated
automatically?

Thanks,

On Jul 7, 11:42 am, Chris McBrien chris.mcbr...@sjrb.ca wrote:
 I have seen Apache beanutils used to copy from an encumbered object graph 
 such as that provided by Hibernate and JAXB into simple POJOs.

 Though this DTO use should be carefully managed as it can quickly become an 
 anti-pattern.

 laolaoyu laola...@gmail.com wrote:

 I need to forward the data to the client. If not using the data types
 generated by these frameworks, what else can I use?

 On Jul 7, 12:06 am, Deepak Singh deepaksingh...@gmail.com wrote:









  You will use these data binding frameworks only on server side. They dont
  have any role to play on client side.

  On Wed, Jul 6, 2011 at 9:04 PM, laolaoyu laola...@gmail.com wrote:
   Hi,

   I have some XML data on my web server side (which is received from
   some web service). At the moment I used Axis2 DataBinding (ADB)
   framework to generated all the data types in Java.

   However when I tried to forward these Java objects to the web client
   side thru GWT-RPC, it failed because all the library dependencies are
   not available on the client-side. I have read thru some posts in this
   group and on google and it seems that it is the same problem also for
   other data binding framework like Jaxb, Xmlbeans, JiBX, etc.

   For what I have seen, one way to solve it is to include the dependent
   libraries as super-source on the client-side so GWT compiler to find
   them during Java to JavaScript compilation. This doesn't sound like an
   elegant solution to me?

   Is there a better to solve the problem?

   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 
 athttp://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: adding filter to file upload in gwt

2011-07-06 Thread aman
Hi,
Thanks for your help it really worked,but it is also giving me the
option in the browsing window to select All files can I remove this
option?


Thanks,
Amandeep

On Jul 7, 4:40 am, Jim Douglas jdou...@basis.com wrote:
 Untested, and no guarantees, but try something like this:

 String mimeList = application/vnd.ms-excel,application/
 msexcel,application/x-msexcel,application/x-ms-excel,application/
 vnd.ms-excel,application/x-excel,application/x-
 dos_ms_excel,application/xls,application/vnd.openxmlformats-
 officedocument.spreadsheetml.sheet;

 myFileUploadWidget.getElement().setPropertyString(accept, mimeList);

 Reference:

 http://www.w3.org/TR/html-markup/input.file.html

 On Jul 5, 11:18 pm, aman bhatia.ama...@gmail.com wrote:







  I am using the basic FileUpload control ingwtand wanted to add the
 filteron the extensions allowed in the browsing window, which
  restrict the user to select only specific extensions (like xls,xlsx
  etc). Tell me how I can achieve this as I want to restrict on the
  browsing window itself and cant wait for the Button submit event.

  Thanks

  Amandeep

-- 
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-servlet.jar size 200KB to 4MB?

2011-07-06 Thread Craig Mitchell
After a lot of trial and error.  I have now built a new jar file so my RPCs 
work (without needing gwt-servlet.jar).  If anyone wants to do the same, 
these are the directories I included to get it to work (all directories were 
sourced from gwt-servlet.jar):

├───com
│   └───google
│   └───gwt
│   ├───core
│   │   └───client
│   │   ├───impl
│   │   └───prefetch
│   └───user
│   ├───client
│   │   └───rpc
│   │   ├───core
│   │   │   └───java
│   │   │   ├───lang
│   │   │   ├───math
│   │   │   ├───sql
│   │   │   └───util
│   │   │   └───logging
│   │   └───impl
│   └───server
│   └───rpc
│   └───impl
└───META-INF

*phew* ...and the final signed jar is only 272KB!

*** Disclaimer *** It worked for my RPC stuff, but I have no clue if it is 
all the RPC stuff, and on the flip side, there is probably more I could cut 
out.

-- 
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/-/tPn1-fWX2nAJ.
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: adding filter to file upload in gwt

2011-07-06 Thread Jim Douglas
I'm actually surprised that it worked; what browser, and how did it
represent that setting to the user?

Keep in mind that there's no guarantee that this will work in all
browsers; the W3C spec says only that this provides the user agent
with a hint of file types to accept.  How it does that is up to the
browser, and the browser is free to give the user the option to select
any file, notwithstanding your list of acceptable MIME types.  So
you're still going to want to validate the file when the user clicks
the submit button.

http://www.w3.org/TR/html-markup/input.file.html

ⓘ accept = list of MIME types
Provides the UA with a hint of what file types the server is able to
accept.
A set of comma-separated strings, each of which is a valid MIME type,
with no parameters.

On Jul 6, 10:06 pm, aman bhatia.ama...@gmail.com wrote:
 Hi,
 Thanks for your help it really worked,but it is also giving me the
 option in the browsing window to select All files can I remove this
 option?

 Thanks,
 Amandeep

 On Jul 7, 4:40 am, Jim Douglas jdou...@basis.com wrote:



  Untested, and no guarantees, but try something like this:

  String mimeList = application/vnd.ms-excel,application/
  msexcel,application/x-msexcel,application/x-ms-excel,application/
  vnd.ms-excel,application/x-excel,application/x-
  dos_ms_excel,application/xls,application/vnd.openxmlformats-
  officedocument.spreadsheetml.sheet;

  myFileUploadWidget.getElement().setPropertyString(accept, mimeList);

  Reference:

 http://www.w3.org/TR/html-markup/input.file.html

  On Jul 5, 11:18 pm, aman bhatia.ama...@gmail.com wrote:

   I am using the basic FileUpload control ingwtand wanted to add the
  filteron the extensions allowed in the browsing window, which
   restrict the user to select only specific extensions (like xls,xlsx
   etc). Tell me how I can achieve this as I want to restrict on the
   browsing window itself and cant wait for the Button submit event.

   Thanks

   Amandeep

-- 
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: Yes or No: Will Singleton-izing my Resources offer tangible performance gains??

2011-07-06 Thread Elhanan Maayan
can i use it with my normal classes i'm looking for a way to have a
singleton class and obtain it from a shared location, said class will
contain, eventsbus,ActivityManager,ActivityMapper etc..

i also rely in many cases on static variable which are androgynous clases, i
failed to to see that pressing F5 does not in fact re-initilzes them .

On Thu, Jul 7, 2011 at 6:39 AM, Chris McBrien chris.mcbr...@sjrb.ca wrote:

 I believe that GWT.create will by default give you back a shared single
 instance.

 karthik reddy karthik.ele...@gmail.com wrote:

 I use my Resources.java (it extends ClientBundle and holds references to
 images etc) in multiple classes and in each class I would create an
 instance
 of  it class using GWT.create(Resources.class)
 Would making this class a singleton offer me tangible performance gains or
 is it not worth the engineering effort ??  I am not looking for a
 quantified
 answer necessarily but even something of a gut check would suffice.


 --
 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/-/WRE3Jx1rph0J.
 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: adding filter to file upload in gwt

2011-07-06 Thread aman
I did not tested it on other browsers initially, now when I am running
it on IE it is not working it works well with google chrome with the
option of Custom files and All files in the browsing window.I
wanted to remove the All files option but now it seems that it is
browser dependent so I am looking for some other options.Please
suggest me some other way which do not bring browser dependency in
picture.

On Jul 7, 10:39 am, Jim Douglas jdou...@basis.com wrote:
 I'm actually surprised that it worked; what browser, and how did it
 represent that setting to the user?

 Keep in mind that there's no guarantee that this will work in all
 browsers; the W3C spec says only that this provides the user agent
 with a hint offiletypes to accept.  How it does that is up to the
 browser, and the browser is free to give the user the option to select
 anyfile, notwithstanding your list of acceptable MIME types.  So
 you're still going to want to validate thefilewhen the user clicks
 the submit button.

 http://www.w3.org/TR/html-markup/input.file.html

 ⓘ accept = list of MIME types
 Provides the UA with a hint of whatfiletypes the server is able to
 accept.
 A set of comma-separated strings, each of which is a valid MIME type,
 with no parameters.

 On Jul 6, 10:06 pm, aman bhatia.ama...@gmail.com wrote:







  Hi,
  Thanks for your help it really worked,but it is also giving me the
  option in the browsing window to select All files can I remove this
  option?

  Thanks,
  Amandeep

  On Jul 7, 4:40 am, Jim Douglas jdou...@basis.com wrote:

   Untested, and no guarantees, but try something like this:

   String mimeList = application/vnd.ms-excel,application/
   msexcel,application/x-msexcel,application/x-ms-excel,application/
   vnd.ms-excel,application/x-excel,application/x-
   dos_ms_excel,application/xls,application/vnd.openxmlformats-
   officedocument.spreadsheetml.sheet;

   myFileUploadWidget.getElement().setPropertyString(accept, mimeList);

   Reference:

  http://www.w3.org/TR/html-markup/input.file.html

   On Jul 5, 11:18 pm, aman bhatia.ama...@gmail.com wrote:

I am using the basic FileUpload control ingwtand wanted to add the
   filteron the extensions allowed in the browsing window, which
restrict the user to select only specific extensions (like xls,xlsx
etc). Tell me how I can achieve this as I want to restrict on the
browsing window itself and cant wait for the Button submit event.

Thanks

Amandeep

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



[gwt-contrib] Re: Serialization of Final Fields in RPC (issue1380807)

2011-07-06 Thread stephen . haberman



According to the current code structure, if we want to make the
variable non-static, we may need to pass the propertyOracle parameter

to many

methods


I downloaded the patch and was able to kill the flaky static variable
by changing various methods to take GeneratorContextExt (which has both
TypeOracle and PropertyOracle) instead of just TypeOracle.

Changing existing method params from TypeOracle - GeneratorContextExt
seemed like a nicer change than adding PropertyOracle as yet another
method parameter, which, as you said, could get tedious.

I was just seeing if it would work, so I didn't do any formatting/method
ordering/etc., i.e. it's not perfect. But I can upload the patch if
you'd like to see it.


http://gwt-code-reviews.appspot.com/1380807/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Issue 6338

2011-07-06 Thread Jens
Hi,

is it a big deal to include a fix for issue 6338 
(http://code.google.com/p/google-web-toolkit/issues/detail?id=6338 , 
complete list with duplicates: 
http://code.google.com/p/google-web-toolkit/issues/list?can=2q=new+html+page+wizardcolspec=ID+Type+Status+Owner+Milestone+Summary+Starscells=tiles)
 
in the next GWT release? It is really annoying if you can not create a new 
host html page via the Google Plugin. I think people that are new to GWT are 
maybe a bit lost when they run into this issue and do not have a nice 
experience with the Google Plugin. The only way to get that html page is to 
create a new project with sample code and then copy and edit it.

Also if I remember correctly back in the days the wizard works, it has 
created a html page that does not contain a correct src attribute in the 
script tag. Instead of module name/module name.nocache.js it just puts 
in .nocache.js... so you had to add the module name and path manually. I 
don't know if thats intended or also a bug.

-- J.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread jlabanca


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java
File user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java#newcode28
user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java:28:
RENDERABLE_STAMPER(2),
Should this have the same precedence as DOM_ID_HOLDER?

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java
File user/src/com/google/gwt/user/client/ui/Composite.java (right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java#newcode111
user/src/com/google/gwt/user/client/ui/Composite.java:111:
builder.append(TEMPLATE.renderWithId(stamper.getToken()));
getToken() is deprecated, use:
builder.append(stamper.stamp(TEMPLATE.render()));

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java
File user/src/com/google/gwt/user/client/ui/RenderablePanel.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java#newcode198
user/src/com/google/gwt/user/client/ui/RenderablePanel.java:198: String
id = stamper.getToken();
Can you stamp the SafeHtml returned from the TEMPLATE instead of using
the ID directly?  Removing getToken() from our code will help confirm
that its safe to hide the implementation.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode25
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:25: *
overly minimalistic javadoc

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode40
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:40: public
String getToken() {
Add @Deprecated annotation, and @deprecated javadoc tag

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode48
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:48: return
Document.get().getElementById(token).cast();
The .cast() call will trigger an NPE if the token is not found. Can you
add a check, and add a javadoc comment that describes the expected
behavior if the element is not attached?

Also, this would be a good place for a dev mode only runtime check to
verify that the element is attached.  A TODO would be fine for now.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode58
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:58: int
endOfFirstTag = html.indexOf('');
This doesn't handle all forms of SafeHtml.  For example, a simple string
hello world is considered safe html, as is a self closing tag div
style='color:red;' /

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode62
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:62:
.append(token)
Are we sure that the token is always safe?  We should escape in
RenderableStamper's constructor, or at least add a comment explaining
that we assume it is safe.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r10419 committed - Remove JSNI paths from RPC deserialization. AKA: Make RPC screaming fa...

2011-07-06 Thread codesite-noreply

Revision: 10419
Author:   gwt.mirror...@gmail.com
Date: Wed Jul  6 06:50:15 2011
Log:  Remove JSNI paths from RPC deserialization. AKA: Make RPC  
screaming fast in DevMode.


Review at http://gwt-code-reviews.appspot.com/1470802

http://code.google.com/p/google-web-toolkit/source/detail?r=10419

Added:
  
/trunk/user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/shell/CompilingClassLoader.java
  
/trunk/user/src/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java


===
--- /dev/null
+++  
/trunk/user/super/com/google/gwt/user/translatable/com/google/gwt/user/client/rpc/impl/ClientSerializationStreamReader.java	 
Wed Jul  6 06:50:15 2011

@@ -0,0 +1,131 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.user.client.rpc.impl;
+
+import com.google.gwt.core.client.GwtScriptOnly;
+import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.core.client.UnsafeNativeLong;
+import com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException;
+import com.google.gwt.user.client.rpc.SerializationException;
+
+/**
+ * The web-mode only version of ClientSerializationStreamReader. Any  
changes to this class to deal

+ * with protocol changes must also be applied to the devmode version of
+ * ClientSerializationStreamReader.
+ */
+@GwtScriptOnly
+public final class ClientSerializationStreamReader extends
+AbstractSerializationStreamReader {
+
+  private static native JavaScriptObject eval(String encoded) /*-{
+return eval(encoded);
+  }-*/;
+
+  private static native int getLength(JavaScriptObject array) /*-{
+return array.length;
+  }-*/;
+
+  int index;
+
+  JavaScriptObject results;
+
+  JavaScriptObject stringTable;
+
+  private Serializer serializer;
+
+  public ClientSerializationStreamReader(Serializer serializer) {
+this.serializer = serializer;
+  }
+
+  @Override
+  public void prepareToRead(String encoded) throws SerializationException {
+results = eval(encoded);
+index = getLength(results);
+super.prepareToRead(encoded);
+
+if (getVersion() != SERIALIZATION_STREAM_VERSION) {
+  throw new IncompatibleRemoteServiceException(Expecting version 
+  + SERIALIZATION_STREAM_VERSION +  from server, got  +  
getVersion()

+  + .);
+}
+
+if (!areFlagsValid()) {
+  throw new IncompatibleRemoteServiceException(Got an unknown flag  
from 

+  + server:  + getFlags());
+}
+
+stringTable = readJavaScriptObject();
+  }
+
+  public native boolean readBoolean() /*-{
+ 
return !!th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index];

+  }-*/;
+
+  public native byte readByte() /*-{
+return  
th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index];

+  }-*/;
+
+  public native char readChar() /*-{
+return  
th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index];

+  }-*/;
+
+  public native double readDouble() /*-{
+return  
th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index];

+  }-*/;
+
+  public native float readFloat() /*-{
+return  
th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index];

+  }-*/;
+
+  public native int readInt() /*-{
+return  
th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index];

+  }-*/;
+
+  @UnsafeNativeLong
+  public native long readLong() /*-{
+var s =  
th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::results[--th...@com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader::index];
+return  
@com.google.gwt.lang.LongLib::longFromBase64(Ljava/lang/String;)(s);

+  }-*/;
+
+  public native short readShort() /*-{
+ 

[gwt-contrib] Re: Serialization of Final Fields in RPC (issue1380807)

2011-07-06 Thread zhuyi

On 2011/07/06 06:22:38, stephenh wrote:

 According to the current code structure, if we want to make the
 variable non-static, we may need to pass the propertyOracle

parameter to many

 methods



I downloaded the patch and was able to kill the flaky static

variable by

changing various methods to take GeneratorContextExt (which has both

TypeOracle

and PropertyOracle) instead of just TypeOracle.



Changing existing method params from TypeOracle - GeneratorContextExt

seemed

like a nicer change than adding PropertyOracle as yet another method

parameter,

which, as you said, could get tedious.



I was just seeing if it would work, so I didn't do any

formatting/method

ordering/etc., i.e. it's not perfect. But I can upload the patch if

you'd like

to see it.


That would be great. Could you please upload the patch? Thanks!

http://gwt-code-reviews.appspot.com/1380807/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro

Thanks for the review, John. I have some questions for you below.


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java
File user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java#newcode28
user/src/com/google/gwt/uibinder/rebind/FieldWriterType.java:28:
RENDERABLE_STAMPER(2),
On 2011/07/06 13:29:23, jlabanca wrote:

Should this have the same precedence as DOM_ID_HOLDER?


In principle that's ok, but you're right, it's best to be more explicit
on these things.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java
File user/src/com/google/gwt/user/client/ui/Composite.java (right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java#newcode111
user/src/com/google/gwt/user/client/ui/Composite.java:111:
builder.append(TEMPLATE.renderWithId(stamper.getToken()));
On 2011/07/06 13:29:23, jlabanca wrote:

getToken() is deprecated, use:
builder.append(stamper.stamp(TEMPLATE.render()));


Explained on other comment.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java
File user/src/com/google/gwt/user/client/ui/RenderablePanel.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java#newcode198
user/src/com/google/gwt/user/client/ui/RenderablePanel.java:198: String
id = stamper.getToken();
On 2011/07/06 13:29:23, jlabanca wrote:

Can you stamp the SafeHtml returned from the TEMPLATE instead of using

the ID

directly?  Removing getToken() from our code will help confirm that

its safe to

hide the implementation.


I can, but I didn't want to do that in this CL because I know there'll
be _some_ performance regression, but I don't if it'll be measurable.
I'd like to get this checked in and then I can work separately on orkut
measuring and comparing both approaches and decide which works best (and
if the difference is actually noticeable). I think I'll end up
converting everything to ElementBuilder, which will be a biggish CL, but
centered on orkut code.

In any case, I'll have a follow-up to this CL that hides the getToken
method at most within a week.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode25
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:25: *
On 2011/07/06 13:29:23, jlabanca wrote:

overly minimalistic javadoc


Oops, forgot to go back and fix this. Done.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode40
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:40: public
String getToken() {
On 2011/07/06 13:29:23, jlabanca wrote:

Add @Deprecated annotation, and @deprecated javadoc tag


Done.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode48
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:48: return
Document.get().getElementById(token).cast();
On 2011/07/06 13:29:23, jlabanca wrote:

The .cast() call will trigger an NPE if the token is not found. Can

you add a

check, and add a javadoc comment that describes the expected behavior

if the

element is not attached?



Also, this would be a good place for a dev mode only runtime check to

verify

that the element is attached.  A TODO would be fine for now.


Done.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode58
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:58: int
endOfFirstTag = html.indexOf('');
On 2011/07/06 13:29:23, jlabanca wrote:

This doesn't handle all forms of SafeHtml.  For example, a simple

string hello

world is considered safe html, as is a self closing tag div
style='color:red;' /


Good point. I'm inclined to change this to:

1-) Find the first occurrence of ''; if none is found, return;
2-) Find the first occurrence of either ' ' or ''; if none is found,
return (this can't happen, I think, because then the SafeHtml would be
malformed)
3-) Inject the ID

how does that sound?

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode62
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:62:
.append(token)
On 2011/07/06 13:29:23, jlabanca wrote:

Are we sure that the token is always safe?  We should escape in
RenderableStamper's constructor, or at least add a comment explaining

that we

assume it is safe.


Escaping sounds like 

[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode25
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:25: *
On 2011/07/06 13:53:47, rdcastro wrote:

On 2011/07/06 13:29:23, jlabanca wrote:
 overly minimalistic javadoc



Oops, forgot to go back and fix this. Done.


Not done. I'll fix soon and upload a new patch.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode25
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:25: *
On 2011/07/06 13:56:04, rdcastro wrote:

On 2011/07/06 13:53:47, rdcastro wrote:
 On 2011/07/06 13:29:23, jlabanca wrote:
  overly minimalistic javadoc

 Oops, forgot to go back and fix this. Done.



Not done. I'll fix soon and upload a new patch.


Now it's done.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Serialization of Final Fields in RPC (issue1380807)

2011-07-06 Thread stephen . haberman



That would be great. Could you please upload the patch? Thanks!


Sure--I can't upload a new patchset to this issue because I'm not the
owner. Is it possible to add me? Or would you prefer for me to create a
new issue?


http://gwt-code-reviews.appspot.com/1380807/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread jlabanca


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java
File user/src/com/google/gwt/user/client/ui/Composite.java (right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java#newcode111
user/src/com/google/gwt/user/client/ui/Composite.java:111:
builder.append(TEMPLATE.renderWithId(stamper.getToken()));
On 2011/07/06 13:53:47, rdcastro wrote:

On 2011/07/06 13:29:23, jlabanca wrote:
 getToken() is deprecated, use:
 builder.append(stamper.stamp(TEMPLATE.render()));



Explained on other comment.


@SuppressWarning(deprecation)

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java
File user/src/com/google/gwt/user/client/ui/RenderablePanel.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java#newcode198
user/src/com/google/gwt/user/client/ui/RenderablePanel.java:198: String
id = stamper.getToken();
On 2011/07/06 13:53:47, rdcastro wrote:

On 2011/07/06 13:29:23, jlabanca wrote:
 Can you stamp the SafeHtml returned from the TEMPLATE instead of

using the ID

 directly?  Removing getToken() from our code will help confirm that

its safe

to
 hide the implementation.



I can, but I didn't want to do that in this CL because I know there'll

be _some_

performance regression, but I don't if it'll be measurable. I'd like

to get this

checked in and then I can work separately on orkut measuring and

comparing both

approaches and decide which works best (and if the difference is

actually

noticeable). I think I'll end up converting everything to

ElementBuilder, which

will be a biggish CL, but centered on orkut code.



In any case, I'll have a follow-up to this CL that hides the getToken

method at

most within a week.


SGTM - but can you add a TODO explaining that you are going to test
performance so the next person doesn't try to fix it.

Also, you'll have to add a @SuppressWarning(deprecation) annotation
now that getToken() is deprecated.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode58
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:58: int
endOfFirstTag = html.indexOf('');
It would still break with div/.

1-) trim() and verify that the first character is a ''.  If not,
return.
2-) Find the first occurrence of either ' ' or '/' or ''; if none is
found, return
(this can't happen, I think, because then the SafeHtml would be
malformed)
3-) Inject the ID


On 2011/07/06 13:53:47, rdcastro wrote:

On 2011/07/06 13:29:23, jlabanca wrote:
 This doesn't handle all forms of SafeHtml.  For example, a simple

string

hello
 world is considered safe html, as is a self closing tag div
 style='color:red;' /



Good point. I'm inclined to change this to:



1-) Find the first occurrence of ''; if none is found, return;
2-) Find the first occurrence of either ' ' or ''; if none is found,

return

(this can't happen, I think, because then the SafeHtml would be

malformed)

3-) Inject the ID



how does that sound?


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode62
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:62:
.append(token)
On 2011/07/06 13:53:47, rdcastro wrote:

On 2011/07/06 13:29:23, jlabanca wrote:
 Are we sure that the token is always safe?  We should escape in
 RenderableStamper's constructor, or at least add a comment

explaining that we

 assume it is safe.



Escaping sounds like the right solution. What do you guys usually use

for

escaping?


SafeHtmlUtils.htmlEscape(String)

By default, you generate the ID using alphanumeric characters, so it
will be unchanged.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Serialization of Final Fields in RPC (issue1380807)

2011-07-06 Thread zhuyi

On 2011/07/06 13:51:57, zhuyi wrote:

On 2011/07/06 06:22:38, stephenh wrote:
  According to the current code structure, if we want to make the
  variable non-static, we may need to pass the propertyOracle

parameter to

many
  methods

 I downloaded the patch and was able to kill the flaky static

variable by

 changing various methods to take GeneratorContextExt (which has both
TypeOracle
 and PropertyOracle) instead of just TypeOracle.

 Changing existing method params from TypeOracle -

GeneratorContextExt seemed

 like a nicer change than adding PropertyOracle as yet another method
parameter,
 which, as you said, could get tedious.

 I was just seeing if it would work, so I didn't do any

formatting/method

 ordering/etc., i.e. it's not perfect. But I can upload the patch if

you'd like

 to see it.



That would be great. Could you please upload the patch? Thanks!


Ray and Bob: which way do you prefer?

http://gwt-code-reviews.appspot.com/1380807/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java
File user/src/com/google/gwt/user/client/ui/Composite.java (right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/Composite.java#newcode111
user/src/com/google/gwt/user/client/ui/Composite.java:111:
builder.append(TEMPLATE.renderWithId(stamper.getToken()));
On 2011/07/06 14:09:08, jlabanca wrote:

On 2011/07/06 13:53:47, rdcastro wrote:
 On 2011/07/06 13:29:23, jlabanca wrote:
  getToken() is deprecated, use:
  builder.append(stamper.stamp(TEMPLATE.render()));

 Explained on other comment.



@SuppressWarning(deprecation)


Done.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java
File user/src/com/google/gwt/user/client/ui/RenderablePanel.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderablePanel.java#newcode198
user/src/com/google/gwt/user/client/ui/RenderablePanel.java:198: String
id = stamper.getToken();
On 2011/07/06 14:09:08, jlabanca wrote:

On 2011/07/06 13:53:47, rdcastro wrote:
 On 2011/07/06 13:29:23, jlabanca wrote:
  Can you stamp the SafeHtml returned from the TEMPLATE instead of

using the

ID
  directly?  Removing getToken() from our code will help confirm

that its safe

 to
  hide the implementation.

 I can, but I didn't want to do that in this CL because I know

there'll be

_some_
 performance regression, but I don't if it'll be measurable. I'd like

to get

this
 checked in and then I can work separately on orkut measuring and

comparing

both
 approaches and decide which works best (and if the difference is

actually

 noticeable). I think I'll end up converting everything to

ElementBuilder,

which
 will be a biggish CL, but centered on orkut code.

 In any case, I'll have a follow-up to this CL that hides the

getToken method

at
 most within a week.



SGTM - but can you add a TODO explaining that you are going to test

performance

so the next person doesn't try to fix it.



Also, you'll have to add a @SuppressWarning(deprecation) annotation

now that

getToken() is deprecated.


Done.

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode58
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:58: int
endOfFirstTag = html.indexOf('');
On 2011/07/06 14:09:08, jlabanca wrote:

It would still break with div/.



1-) trim() and verify that the first character is a ''.  If not,

return.

2-) Find the first occurrence of either ' ' or '/' or ''; if none is

found,

return
(this can't happen, I think, because then the SafeHtml would be

malformed)

3-) Inject the ID




On 2011/07/06 13:53:47, rdcastro wrote:
 On 2011/07/06 13:29:23, jlabanca wrote:
  This doesn't handle all forms of SafeHtml.  For example, a simple

string

 hello
  world is considered safe html, as is a self closing tag div
  style='color:red;' /

 Good point. I'm inclined to change this to:

 1-) Find the first occurrence of ''; if none is found, return;
 2-) Find the first occurrence of either ' ' or ''; if none is

found, return

 (this can't happen, I think, because then the SafeHtml would be

malformed)

 3-) Inject the ID

 how does that sound?



Actually, come to think of it, the ID doesn't really have to  be the
first attribute, so we can do something slightly simpler. How does this
look?

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode62
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:62:
.append(token)
On 2011/07/06 14:09:08, jlabanca wrote:

On 2011/07/06 13:53:47, rdcastro wrote:
 On 2011/07/06 13:29:23, jlabanca wrote:
  Are we sure that the token is always safe?  We should escape in
  RenderableStamper's constructor, or at least add a comment

explaining that

we
  assume it is safe.

 Escaping sounds like the right solution. What do you guys usually

use for

 escaping?



SafeHtmlUtils.htmlEscape(String)



By default, you generate the ID using alphanumeric characters, so it

will be

unchanged.


Done.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread jbrosenberg

Hey Scott, not sure, did you mean to link to a different issue for the
backend issue?  The link above points back to this fix for the
front-end issue.

http://gwt-code-reviews.appspot.com/1470803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread jlabanca

LGTM


http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/1/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode58
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:58: int
endOfFirstTag = html.indexOf('');
On 2011/07/06 14:32:56, rdcastro wrote:

On 2011/07/06 14:09:08, jlabanca wrote:
 It would still break with div/.

 1-) trim() and verify that the first character is a ''.  If not,

return.

 2-) Find the first occurrence of either ' ' or '/' or ''; if none

is found,

 return
 (this can't happen, I think, because then the SafeHtml would be

malformed)

 3-) Inject the ID


 On 2011/07/06 13:53:47, rdcastro wrote:
  On 2011/07/06 13:29:23, jlabanca wrote:
   This doesn't handle all forms of SafeHtml.  For example, a

simple string

  hello
   world is considered safe html, as is a self closing tag div
   style='color:red;' /
 
  Good point. I'm inclined to change this to:
 
  1-) Find the first occurrence of ''; if none is found, return;
  2-) Find the first occurrence of either ' ' or ''; if none is

found, return

  (this can't happen, I think, because then the SafeHtml would be

malformed)

  3-) Inject the ID
 
  how does that sound?




Actually, come to think of it, the ID doesn't really have to  be the

first

attribute, so we can do something slightly simpler. How does this

look?

I like it.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rchandia

LGTM


http://gwt-code-reviews.appspot.com/1472801/diff/4004/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/4004/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode69
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:69: * the
element to be stamped is the first found in the given {@link SafeHtml}.
Document it returns safeHtml untouched if it does not begin with a tag.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread scottb

Sorry, the back-end issue is here:
http://gwt-code-reviews.appspot.com/1469804/

http://gwt-code-reviews.appspot.com/1470803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Fixing IsRenderable API step 2: pass in a stamper instead of the actual ID. (issue1472801)

2011-07-06 Thread rdcastro


http://gwt-code-reviews.appspot.com/1472801/diff/4004/user/src/com/google/gwt/user/client/ui/RenderableStamper.java
File user/src/com/google/gwt/user/client/ui/RenderableStamper.java
(right):

http://gwt-code-reviews.appspot.com/1472801/diff/4004/user/src/com/google/gwt/user/client/ui/RenderableStamper.java#newcode69
user/src/com/google/gwt/user/client/ui/RenderableStamper.java:69: * the
element to be stamped is the first found in the given {@link SafeHtml}.
On 2011/07/06 14:54:08, rchandia wrote:

Document it returns safeHtml untouched if it does not begin with a

tag.

Done.

http://gwt-code-reviews.appspot.com/1472801/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread Eric Ayers
So, the tests in the back-end issue are valid, but the GwtAstBuilder patch
is superceded.  Could you roll the tests into issue 1470803?

On Wed, Jul 6, 2011 at 10:54 AM, sco...@google.com wrote:

 Sorry, the back-end issue is here:
 http://gwt-code-reviews.**appspot.com/1469804/http://gwt-code-reviews.appspot.com/1469804/


 http://gwt-code-reviews.**appspot.com/1470803/http://gwt-code-reviews.appspot.com/1470803/




-- 
Eric Ayers | Software Engineer | zun...@google.com | +1 404 487 9229

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread Scott Blum
On Wed, Jul 6, 2011 at 12:07 PM, Eric Ayers zun...@google.com wrote:

 So, the tests in the back-end issue are valid, but the GwtAstBuilder patch
 is superceded.  Could you roll the tests into issue 1470803?


Lemme clarify.

The tests in the back-end are valid tests, which fail both with
GwtAstBuilder and without it.  It's a latent, existing bug in our back end
which 1470803 doesn't fix.  1469804 was my initial attempt to fix it, but
doesn't work.  We cannot commit the tests right now as we have no fix for
them.

1470803 merely brings GwtAstBuilder up to parity with the old compiler to
solve the front end issue.  This solves SOME currently broken cases, but not
all possible cases as the tests in 1469804 demonstrate.

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread zundel


http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java
File dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java
(right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java#newcode21
dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java:21: public
enum AccessModifiers {
Note, using value.ordinal() means that any changing in order is going
to screw up the serialized tree.  I suggest we either do something to
protect against that in JMethod, or add a dire warning here against
reordring the values (e.g. sorting them alphabetcially)

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
File dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java (right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java#newcode140
dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java:140: this.access =
access.ordinal();
danger! could lead to invalid serialized data if something seemingly
trivial is changed in AccessModifiers (change sort order of members or
add a new enum value).  There will be no SerializationException either.

Due to the potential for I'd prefer an explicit constant value/method
declared for the enumerated type over relying on ordinal, which could
change.

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
File dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
(right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java#newcode2824
dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java:2824: static
AccessModifiers getAccessModifier(MethodBinding b) {
Make this  method AccessModifiers.fromMethodBinding()?

http://gwt-code-reviews.appspot.com/1470803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread jbrosenberg


http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java
File dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java
(right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java#newcode21
dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java:21: public
enum AccessModifiers {
I'll second Eric's concern here.  But that not-withstanding, I'd suggest
the name of this enum should be singular, e.g., AccessModifier.  Since
you can't compose multiple modifiers in a single instance, it appears
misleading when you declare it as a param to a method, e.g.
myFunc(AccessModifiers access)

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java
File dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java (right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java#newcode53
dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java:53: // Access
only matters for virtual methods, just use public.
Maybe make a different enum constant for this case, for clarity?  Or if
the AccessModifier is only relevant for virtual methods, maybe change
that to VirtualMethodAccessModifier, and allow it to be null, or maybe
NON_VIRTUAL for non-virtual methods.
I suppose the only place it matters currently is when output is
generated with ToStringGenerationVisitor (just for debugging clarity).

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java
File dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java (right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java#newcode728
dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java:728: for (JMethod
upref : collected.get(method.getSignature())) {
debug cruft?

http://gwt-code-reviews.appspot.com/1470803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Simplify the use of TckCompileTestCase by always using the module named (issue1467811)

2011-07-06 Thread rchandia


http://gwt-code-reviews.appspot.com/1467811/diff/1/user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java
File user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java
(right):

http://gwt-code-reviews.appspot.com/1467811/diff/1/user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java#newcode59
user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java:59:
public static void assertGwtSpecificValidatorGenerator(
Would it be possible to factor out common code between this and the next
method? Perhaps, with a boolean determine whether to expect an exception
when calling generator#generate()

http://gwt-code-reviews.appspot.com/1467811/diff/1/user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java#newcode107
user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java:107:
context.finish(logger);
Is the exception expected in generator#generate() or in
context#finish()?

http://gwt-code-reviews.appspot.com/1467811/diff/1/user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java#newcode123
user/test/org/hibernate/jsr303/tck/util/TckGeneratorTestUtils.java:123:
public static String getFullyQaulifiedModuleName(Class? clazz,
Qualified

http://gwt-code-reviews.appspot.com/1467811/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Updating npapi plugin to remove gwtId from Jso objects (idenity fix), (issue1469803)

2011-07-06 Thread jat

LGTM

http://gwt-code-reviews.appspot.com/1469803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Updating npapi plugin to remove gwtId from Jso objects (idenity fix), (issue1469803)

2011-07-06 Thread conroy

supporting older chrome versions seems like a blocker issue to
committing this to me.

http://gwt-code-reviews.appspot.com/1469803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Enhancement to JsDuplicateFunctionRemover to remove duplicate virtual methods as well. That is, ... (issue1454806)

2011-07-06 Thread jbrosenberg

How about some tests?


http://gwt-code-reviews.appspot.com/1454806/diff/5001/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java
File dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java
(right):

http://gwt-code-reviews.appspot.com/1454806/diff/5001/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode53
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:53:
shouldn't the name of the map reflect the comments there?  e.g.
uniqueStaticOrGlobalBodies and uniqueVirtualMethodBodies

http://gwt-code-reviews.appspot.com/1454806/diff/5001/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode102
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:102:
/*
s/function/functions

http://gwt-code-reviews.appspot.com/1454806/diff/5001/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode186
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:186:
dfbr.accept(fragment);
maybe put this new code in a separate method, like prepareHoistMap

http://gwt-code-reviews.appspot.com/1454806/diff/5001/dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java#newcode192
dev/core/src/com/google/gwt/dev/js/JsDuplicateFunctionRemover.java:192:
if (!hoistMap.containsKey(x)) {
s/re-declaring/redeclare

http://gwt-code-reviews.appspot.com/1454806/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread scottb


http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java
File dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java
(right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java#newcode21
dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java:21: public
enum AccessModifiers {
On 2011/07/06 17:00:29, zundel wrote:

Note, using value.ordinal() means that any changing in order is

going to screw

up the serialized tree.  I suggest we either do something to protect

against

that in JMethod, or add a dire warning here against reordring the

values (e.g.

sorting them alphabetcially)


Done.

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java#newcode21
dev/core/src/com/google/gwt/dev/jjs/ast/AccessModifiers.java:21: public
enum AccessModifiers {
On 2011/07/06 17:31:33, jbrosenberg wrote:

I'll second Eric's concern here.  But that not-withstanding, I'd

suggest the

name of this enum should be singular, e.g., AccessModifier.  Since

you can't

compose multiple modifiers in a single instance, it appears misleading

when you

declare it as a param to a method, e.g. myFunc(AccessModifiers

access)

Done.

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java
File dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java (right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java#newcode53
dev/core/src/com/google/gwt/dev/jjs/ast/JConstructor.java:53: // Access
only matters for virtual methods, just use public.
I wanted to leave open the possibility of extending it to track other
methods eventually, which makes adding additional access modifiers kind
of sour tasting.

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java
File dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java (right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java#newcode140
dev/core/src/com/google/gwt/dev/jjs/ast/JMethod.java:140: this.access =
access.ordinal();
What I ended up doing is asserting explicit ordinal values in
AccessModifier to guarantee stable values.  See updated patch.  Added
additional API seemed more dangerous, as it would be very easy to mix up
use of ordinal() and the new api accidentially.

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
File dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java
(right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java#newcode2824
dev/core/src/com/google/gwt/dev/jjs/impl/GwtAstBuilder.java:2824: static
AccessModifiers getAccessModifier(MethodBinding b) {
On 2011/07/06 17:00:29, zundel wrote:

Make this  method AccessModifiers.fromMethodBinding()?


Done.

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java
File dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java (right):

http://gwt-code-reviews.appspot.com/1470803/diff/19/dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java#newcode728
dev/core/src/com/google/gwt/dev/jjs/impl/UnifyAst.java:728: for (JMethod
upref : collected.get(method.getSignature())) {
On 2011/07/06 17:31:33, jbrosenberg wrote:

debug cruft?


Done.

http://gwt-code-reviews.appspot.com/1470803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread zundel

LGTM

http://gwt-code-reviews.appspot.com/1470803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: UnifyAst correctly handles polymorphic overrides with mixed default/public access. (issue1470803)

2011-07-06 Thread jbrosenberg

LGTM

http://gwt-code-reviews.appspot.com/1470803/

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


  1   2   >