Re: TreeViewModel and AsyncDataProvider

2010-12-26 Thread Y2i
I use a custom TreeViewModel instead of handling selection events.

When a user clicks on a level 1 node, TreeViewModel.getNodeInfo(...)
method is called

The method creates a data provider that corresponds to the type of
value parameter.

The data provider initiates an RPC call in its constructor.

When the data provider receives results back from the server it
populates itself with the data received by calling updateRowCount()
and updateRowData()

This works well when the number of children under parent node is
small.  If it is large AbstractDataProviderT.onRangeChanged() can be
used to query only currently visible children.

Is this something you are looking for?

On Dec 25, 9:27 pm, Sydney sydney.henr...@gmail.com wrote:
 I have a 3 level CellBrowser. Everything is working fine using a
 ListDataProvider except that it's too long to grab the data from the server.
 So I want to use the AsyncDataProvider to fetch only the data that the user
 actually needs. Basically what I want to do is when the user selects the
 level1 value, the level2 provider executes a RPC call to get the level2 data
 based on the selected level1 parent. The problem is that the onRangeChanged
 method is called before the onSelectionChange, so when the RPC call is done
 the level1 value is still null. What is the proper way to use
 AsyncDataProvider to grab the level2 data depending on the level1 selected
 value?

 public class SportTreeModel implements TreeViewModel, Handler {
   private AsyncDataProviderLevel1Node level1Provider;
   private AsyncDataProviderLevel2Node level2Provider;
   private final SingleSelectionModelLevel1Node level1SelectionModel;
   // In the construtor I create these objets
   // In getNodeInfo I link a cell with the data provider and the selection
 model

     @Override
     public void onSelectionChange(SelectionChangeEvent event) {
         Object src = event.getSource();
         if (src == level1SelectionModel) {
             Level1Node level1 = level1SelectionModel.getSelectedObject();
             ((MyAsyncLevel2Provider)
 level2Provider).setLevel1(level1.getValue());
         }
     }

 }

 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-tool...@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: Maven repository for GWT 2.1.1

2010-12-26 Thread ailinykh
I did, no difference.

On Dec 26, 1:25 am, Mike Guo gsun...@gmail.com wrote:
 you need compile first before you run  http://127.0.0.1:/Expenses.html 

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@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.



Display an Image from JPA entity.

2010-12-26 Thread Eric
Hello.
I'm trying to figure out how to display Images using the
requestFactory.
I have an entity that represents an Image and I want to have a simple
list of all images.
I'm wondering what data type should I use for holding the image data.
The RequestFactory docs mention that primitives are not allowed
however
if  I create an entity like this one:
@Entity
public class Picture {
  ...

@Lob
@Basic(fetch=javax.persistence.FetchType.LAZY)
private Byte[] data;
 ...
}

I'm getting runtime exception saying Byte is not a primitive type.

What would be the best way to put JPA entities. requestFactory and
UiBinder together?

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



writing chrome extensions with GWT- need documentation or simple example

2010-12-26 Thread George Armhold
The Chrome extensions site (http://code.google.com/chrome/extensions/
index.html) has some great documentation and examples of writing
Chrome Extensions in Javascript, but surprisingly, there's not a hint
as to how one might implement one using GWT.

So I downloaded the source to SpeedTracer, and extracted the relevant
pieces of code from com.google.chrome.crx.client. After lots of
guesswork, I was able to get a linker configured that generated a
manifest.json for me, and at least put an icon into the browser.

But I can't seem to figure out how to actually access the UI from GWT-
every time my Extension EntryPoint attempts to do anything useful I
get \$wnd is undefined.

Is there a Hello World level example project somewhere that shows
how to correctly integrate GWT with the Chrome Extension wrapper found
in SpeedTracer?

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-tool...@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: Display an Image from JPA entity.

2010-12-26 Thread Tobias
Hello,

I think it would be easiest not to transfer the actual image data with 
RequestFactory. Just provide the Image-URI within the entities transferred 
by RequestFactory and have it point to a special servlet that serves the 
actual images. This way you can also use the AppEngine Bloblstore (if you're 
running on AppEngine). I'm not sure you can do anything useful with byte[] 
data on the client anyway, the only way to directly transmit the image using 
RequestFactory would imho be to convert it to a Base64 string (which you use 
as a CSS background-image to display it).

Regards,
Tobias

-- 
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-tool...@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: ClassNotFoundException: org.slf4j.LoggerFactory

2010-12-26 Thread branni
I use this on serverside, in the client side I use the gwt-log.

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



Demo of Google Buzz button integration into GWT.

2010-12-26 Thread Brandon Donnelson
I thought I would share my Google Buzz button integration into GWT. I added 
facebook button too. I really liked how easy it was to add google buzz 
button into my GWT application.


http://demogwtshare.appspot.com/ - demo
http://code.google.com/p/gwt-examples/wiki/demogwtshare - wiki

-- 
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-tool...@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: Display an Image from JPA entity.

2010-12-26 Thread Matthew Hill
You could either store the URL of the uploaded image or store the base-64 
encoded data of the image in your database.

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



MenuBar-smartgwt

2010-12-26 Thread Victor Costa Santiago
Good morning everyone!

I work with smartgwt. Could someone help me on how to create a dynamic menu
bar in GWT.
I researched a lot about using the Internet but not the MenuItem.enableIf
encountered examples.When trying to to use setEnabled ( true /false )
presents
problems with the dynamism of css, is only updated if placing the cursor
mouse over the item. And it only works if the initial status being css
enabled to true and then I set a false otherwise not working (in the case
placing the cursor over the item in question). In my research in
internet forums said that the GWT has this same problem and should be used
MenuItem.enableIf for the dynamic, but found no examples.
Can anyone help me?

Can someone help me with a simple code using a menubar like this:
In the case menuitem1 already enabled, and is the only one, when clicked
enables
menuitem2 and disables the menuitem1. Clicking the menuitem2, enables
menuitem1 and menuitem3, and disables menuitem2. In the case in the drawing
below
menuitem3 is part of menu2.


|menu1   |   menu2 |
---
menuitem1 | menuitem3

menuitem2 |


Thanks!

Victor

-- 
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-tool...@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: TreeViewModel and AsyncDataProvider

2010-12-26 Thread Sydney
Perfect I overlooked the fact that when the level1 node is selected, the 
call to getNodeInfo provides the current seleced level1 node.
Thanks for the help

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



Re: RequestFactory don't play nice with guice?

2010-12-26 Thread Henrik Schmidt
Since GWT 2.1.1 is here:

Another way of doing it would be to just use a normal ServletModule as
per the Guice user guide: 
http://code.google.com/docreader/#p=google-guices=google-guicet=ServletModule

Then bind the RequestFactoryServlet;

bind(RequestFactoryServlet.class).in(Singleton.class);
serve(/gwtRequest).with(RequestFactoryServlet.class);

Otherwise following the RequestFactory documentation you can use:

requestStaticInjection(MyDomainClass.class)

in your module to inject the PersistenceManager (or EntityManager)
statically.

-- 
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-tool...@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: MenuBar-smartgwt

2010-12-26 Thread Y2i
In GWT 2.1.1 MenuItem implements HasEnabled interface which helps
enabling/disabling menus dynamically:

public interface HasEnabled {
  boolean isEnabled();
  void setEnabled(boolean enabled);
}

But I'm not sure if SmartGWT is compatible with GWT 2.1.1

On Dec 26, 1:37 pm, Victor Costa Santiago
victor.costa.santi...@gmail.com wrote:
 Good morning everyone!

 I work with smartgwt. Could someone help me on how to create a dynamic menu
 bar in GWT.
 I researched a lot about using the Internet but not the MenuItem.enableIf
 encountered examples.When trying to to use setEnabled ( true /false )
 presents
 problems with the dynamism of css, is only updated if placing the cursor
 mouse over the item. And it only works if the initial status being css
 enabled to true and then I set a false otherwise not working (in the case
 placing the cursor over the item in question). In my research in
 internet forums said that the GWT has this same problem and should be used
 MenuItem.enableIf for the dynamic, but found no examples.
 Can anyone help me?

 Can someone help me with a simple code using a menubar like this:
 In the case menuitem1 already enabled, and is the only one, when clicked
 enables
 menuitem2 and disables the menuitem1. Clicking the menuitem2, enables
 menuitem1 and menuitem3, and disables menuitem2. In the case in the drawing
 below
 menuitem3 is part of menu2.

 
 |menu1       |       menu2 |
 ---
 menuitem1 |     menuitem3

 menuitem2 |
 

 Thanks!

 Victor

-- 
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-tool...@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.1.1 RequestFactory Strange Exception

2010-12-26 Thread giannisdag
I cannot understand how I could persist a domain object, using the new
service layer. Because when I call
 pm.makePersistent(arg);
I need to have access to the instance of the domain object that is
going to be stored. Before, I could just write
 pm.makePersistent(this);
according to the example, referring to the domain object. But know,
where I call the same method through a service, how can I have access
to the domain object. Should I call Locator, and how exactly could I
do that?

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@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: Maven repository for GWT 2.1.1

2010-12-26 Thread Andrew Hughes
Andrey,

The ?gwt.codesvr=127.0.0.1:9997 is very important and must be used when
running in dev mode. Production/compiled javascript (i.e. outside of dev
mode) will not need this.

--AH

p.s. this is identical for maven or eclipse.


On Mon, Dec 27, 2010 at 12:29 AM, ailinykh ailin...@gmail.com wrote:

 I did, no difference.

 On Dec 26, 1:25 am, Mike Guo gsun...@gmail.com wrote:
  you need compile first before you run
 http://127.0.0.1:/Expenses.html

 --
 You received this message because you are subscribed to the Google Groups
 Google Web Toolkit group.
 To post to this group, send email to google-web-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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-tool...@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,testing

2010-12-26 Thread Ignat Alexeyenko
HI!

At GWT side you can access to client classes only.
i.e.
com.etmen.simplewebapp.SimpleSampleProject.server.app.PersistencyManager
should be in client package if you want to use it in GWT side (even if you
want to use it for testing).

You can test you client and server code separatly - write server-side unit
tests without using GWTTestCase.

--
Kind regards,
Ignat Alexeyenko.


On Tue, Dec 14, 2010 at 1:56 PM, Çağdaş olgun.cag...@gmail.com wrote:

 I'm trying to run a custom test that extends GWTTestCase in my gwt
 project with maven. And i have custom classes in server pack. and i
 need to use them in my test. I'm trying to run test with mvn
 gwt:test and

 [ERROR] Line 52: No source code is available for type
 com.etmen.simplewebapp.SimpleSampleProject.server.app.PersistencyManager;
 did you forget to inherit a required module?

 PersistencyManager is one of my custom class in server pack.

 How can i fix this?

 Any help will be valuable.

 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-tool...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@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-tool...@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: Exposing my GWT API via web/RESTful service - can it be done (easilyish)?

2010-12-26 Thread Richard Berger
Thanks to all for the feedback - just wanted to share some
reactions
1. I was surprised by the lack of responses re: restlets - that seemed
to be a promising technology
2. Some of the suggestions/links seemed a little bit over my head -
but that is probably just because my head is at a pretty low place :).

But, pondering this a little more, I thought of a different approach
that might make a lot more sense.  The bottom line is that my
application will need an API that can be called by many clients,
including the GWT UI that we would like to build.  I was thinking of
trying to expose the Service API that is in the GWT application.  But
wouldn't another approach be to build a RESTful interface to my data
as the API and then use that API from my GWT application (as there
seem to be standard ways of accessing REST APIs from the GWT server
side).  Other apps could get to the REST API using whatever method
they chose and I don't have to end up implementing the API twice.

Thoughts and comments are definitely appreciated!  Esp those using
short words :).

RB

On Dec 21, 9:40 pm, zixzigma zixzi...@gmail.com wrote:
 Two great open-source projects I came across today are:

 RestyGWThttp://restygwt.fusesource.org/documentation/index.html

 GWT-JSON-CommandPatternhttp://code.google.com/p/gwt-json-commandpattern/

 they are pretty straight forward with clean API.

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



Dropping support for ie6?

2010-12-26 Thread marius.andreiana
Hi,

GWT 2.1.1 dropped support for firefox 1.0.

What do you think about next GWT release dropping support for ie6?
(while introducing support for ie9 would be great)

-- 
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-tool...@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: Comment on Editors in google-web-toolkit

2010-12-26 Thread codesite-noreply

Comment by silva73:

The documentation of the Editor framework is very poor. A little more  
details and working examples would be good. The javadoc documentation  
should be improved as well. I found working with this framework very  
frustrating, to say the least. For instance: is there a way to  
internationalize the error messages of ValueBoxEditorDecorator?


For more information:
http://code.google.com/p/google-web-toolkit/wiki/Editors

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


[gwt-contrib] Re: Comment on RequestFactory_2_1_1 in google-web-toolkit

2010-12-26 Thread codesite-noreply

Comment by matt2224:

http://code.google.com/p/google-web-toolkit/issues/detail?id=5394

Make type references in JSON payloads compact

For more information:
http://code.google.com/p/google-web-toolkit/wiki/RequestFactory_2_1_1

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


[gwt-contrib] Re: Mark test as Failing or NotSupported (issue1245801)

2010-12-26 Thread nchalko


http://gwt-code-reviews.appspot.com/1245801/diff/1/2
File samples/validationtck/build.xml (right):

http://gwt-code-reviews.appspot.com/1245801/diff/1/2#newcode140
samples/validationtck/build.xml:140:
executable=${basedir}/countMarkedTests.sh
On 2010/12/23 15:13:32, rchandia wrote:

I think this breaks support for non-unix users.


It does,  let me think for a while on how to support this.

http://gwt-code-reviews.appspot.com/1245801/diff/1/3
File samples/validationtck/countMarkedTests.sh (right):

http://gwt-code-reviews.appspot.com/1245801/diff/1/3#newcode1
samples/validationtck/countMarkedTests.sh:1: #!/bin/bash
On 2010/12/23 15:13:32, rchandia wrote:

Use /bin/sh


Done.

http://gwt-code-reviews.appspot.com/1245801/diff/1/20
File
samples/validationtck/test/com/google/gwt/sample/validationtck/util/Failing.java
(right):

http://gwt-code-reviews.appspot.com/1245801/diff/1/20#newcode35
samples/validationtck/test/com/google/gwt/sample/validationtck/util/Failing.java:35:
* .
On 2010/12/23 15:13:32, rchandia wrote:

Hard to understand. Trailing dot.


Done.

http://gwt-code-reviews.appspot.com/1245801/diff/1/21
File
samples/validationtck/test/com/google/gwt/sample/validationtck/util/NonTckTest.java
(right):

http://gwt-code-reviews.appspot.com/1245801/diff/1/21#newcode35
samples/validationtck/test/com/google/gwt/sample/validationtck/util/NonTckTest.java:35:
* {...@link NonTckTest}.
On 2010/12/23 15:13:32, rchandia wrote:

Rephrase


Done.

http://gwt-code-reviews.appspot.com/1245801/show

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


[gwt-contrib] Re: Mark test as Failing or NotSupported (issue1245801)

2010-12-26 Thread nchalko

http://gwt-code-reviews.appspot.com/1245801/show

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


[gwt-contrib] Re: Comment on Editors in google-web-toolkit

2010-12-26 Thread codesite-noreply

Comment by javaheqiang:

ok

For more information:
http://code.google.com/p/google-web-toolkit/wiki/Editors

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