Showing facebook like button using GWT code

2010-11-03 Thread Aditya
hello,
i m trying to embed facbook's like button on page.
it works completely fine in Firefox but it is not shown in Google
chrome and IE 6 and above.
In chrome i tried to dig using inspect element feature so there i
found exactly same set statement from firefox.

i am embedding it in FlextTable,setting html of one cell using
fxtMainTbl.setHTML("http://connect.facebook.net/en_US/
all.js#xfbml=1\">" +

"http://www.demositeurl.com/\"; width=
\"328\">");

how i should make it work in chrome and IE too.

regards,
Aditya

-- 
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: Performance issues with large number of divs

2010-11-03 Thread Daniel Kurka
Hi Chris,

I would suggest to go down another path, based on what ive found to be fast
in GWT and whats not:

Your performance issue seems to derive from two problems: first GWT RPC and
second single DOM manipulations.

To get your datastructures faster into the client I would suggest reading up
on GWT Javascript Overlays and JSON. I recently replaced GWT RPC in a large
project with lots of hased structures and we could drop the average
serialization time in the client from 2 secs to 20 ms. (but be aware of the
Javascript overlay restrictions)

The second thing is DOM operations in general are very expensive and widgets
are event more expensive. I would suggest to go the same way like CellTable
did. Render your content as html inside only one widget. THis will handle
all events. I did this by giving each element inside the markup an id,
events bubbled up to the widget where id figured out which element was
clicked, changed or whatever

You should also take a look at the Cells introduced with celltable and their
Templates...

Hope i could give you some pointers.

-Daniel Kurka





2010/11/2 Jeff Schwartz 

> I believe it would be trivial in that you would only need to add OnClick
> event handlers for each of your divs. You would also have to refactor the
> divs to be actual widgets such as Labels. If you are using UiBinder this
> will be a piece of cake though if you aren't it is only slightly more
> complex.
>
> However, with that said, when you render the view which contains the text
> elements that the user can click on then why don't you also call back to
> your server with a list of those elements and using that list, return
> whatever information pertains to each item in the list. If you return a
> HashMap, for instance, then your OnClick handlers would just need to do a
> get("someKey") on the HashMap to retrieve what ever information is tied to
> the element that the user clicked on. If I were designing this that is how I
> would do it. It is a very "ajaxian" way of doing things like this.
>
> If the list of clickable elements is extremely large (in the thousands) or
> if the data tied to those elements is large then you can defer calling back
> to the server until each item is clicked. In this case you would only return
> the data pertaining to the clicked item from the server back to the client.
> Depending on your server's response time (start up latency, for example)
> this may also be a good solution.
>
> Both of the 2 above  aren't difficult to achieve. GWT actually makes it
> very easy, in fact (GWT is absolutely fantastic!!!). Just one word of
> caution, mark all you data structures as serializable otherwise you will get
> weird errors when you call back to your server or worse, you will get no
> errors but the data transported back to the client will not be right.
>
> Jeff
>
>
> On Tue, Nov 2, 2010 at 9:45 AM, Chris wrote:
>
>> Thanks Jeff. I had thought of that idea, but then I'd somehow need to
>> tie in to the GWT event model so that I could capture when people
>> click on this text, firing through all my presenters and event bus. (I
>> just realised that I missed that bit off the first message).
>>
>> Perhaps though that is fairly trivial?
>> Chris
>>
>>
>> On Oct 30, 1:42 pm, Jeff Schwartz  wrote:
>> > BTW, if the process to generate the content on the server were very
>> > intensive and you wanted to minimize the impact of generating your
>> content
>> > on other users you could break the process up into smaller chunks or
>> work by
>> > making repetitive calls back to the server. How you'd coordinate these
>> calls
>> > with your client would be use-case dependent of course.
>> >
>> > For example, if you are deploying to App Engine you could use tasks &
>> the
>> > datastore to do this:
>> > 1) 1st call back to the server asks to start the process of generating
>> your
>> > content which kicks off a task to do it and when it completes it stores
>> the
>> > generated content as a string in a datastore entity. This could actually
>> use
>> > more than one task but again is  use-case dependent.
>> > 2) onSuccess method of the step 1 above loops call backs to the server
>> to
>> > check if the entity in the table exists. If it does the server returns
>> the
>> > string in the payload otherwise it returns null.
>> > 3)onSuccess method of step 2 above checks for a valid string having been
>> > returned and if true appends it to the dom. If null was returned it
>> would
>> > just continue looping until a valid string were returned.
>> >
>> > While this process is ongoing you could put up an activity ajax
>> indicator so
>> > the user knows that there is something 'cooking'.
>> >
>> > This is a very 'ajaxian' way of doing things.
>> >
>> > Jeff
>> >
>> > On Sat, Oct 30, 2010 at 9:28 AM, Jeff Schwartz > >wrote:
>> >
>> >
>> >
>> >
>> >
>> > > Setting inner text or html for each item will be very, very slow if
>> done on
>> > > the client.
>> >
>> > > I'd generate all the items inside a p

Re: Image Update Memory Leak

2010-11-03 Thread Daniel Kurka
Hi there,

from first glance there seems to be nothing wrong with your code. I think
with IE7/8 there was an issue with the cache control that properly, does the
leak still exists when removing the cache controls?

response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-cache");

- Daniel Kurka

2010/11/1 hermis 

> Hello,
>
> I have written a simple application which fills a FlexTable with a set
> of images. There is a timer which updates the URL of each image every
> second. The URL points to a Servlet which in turn generates a random
> PNG image on its doGet() method and writes it to the response output
> stream. The servlet sets the "Cache-Control" header to "No-Cache".
>
> When I run the webapp in IE7 / 8 the memory gradually increases.
> Leaving it overnight can get it close to 1Gb.
>
> Here is the client code:
>
> #
>
> public class LeakyApp implements EntryPoint
> {
>public static final String IMAGE_SERVLET_NAME = "imageServlet";
>
>public void onModuleLoad()
>{
>leak();
>}
>
>private void leak()
>{
>UrlBuilder urlBuilder = createUrlBuilder();
>
>final FlexTable table = new FlexTable();
>
>final List lstImages = createAndAddImages(5,10 ,table
> );
>
>final String strURL = urlBuilder.buildString();
>
>final Timer timer = new Timer(){
>
>int nCounter = 0;
>
>@Override
>public void run()
>{
>for (Image img : lstImages)
>{
>img.setUrl( strURL + "?" +
> nCounter++) ;
>}
>}
>};
>
>final Button btnStartLeak = new Button("Leak");
>btnStartLeak.addClickHandler( new ClickHandler()
>{
>@Override
>public void onClick(ClickEvent event)
>{
>RootPanel.get().remove( btnStartLeak );
>RootPanel.get().add( table );
>timer.scheduleRepeating( 1000 );
>}
>});
>
>RootPanel.get().add( btnStartLeak );
>}
>
>private List createAndAddImages(int rowCount, int colCount,
> FlexTable table)
>{
>List lstImages = new ArrayList();
>
>for(int row = 0; row{
>for(int col = 0; col{
>Image image = new Image();
>lstImages.add( image );
>table.setWidget(row, col, image);
>}
>}
>
>return lstImages;
>}
>
>private UrlBuilder createUrlBuilder()
>{
>UrlBuilder urlBuilder = null;
>
>if( GWT.isScript() )
>{
>urlBuilder = new UrlBuilder();
>urlBuilder.setHost( Window.Location.getHost() );
>urlBuilder.setPath( Window.Location.getPath() +
> IMAGE_SERVLET_NAME );
>}
>else
>{
>urlBuilder = Window.Location.createUrlBuilder();
>urlBuilder.setPath( IMAGE_SERVLET_NAME );
>}
>
>return urlBuilder;
>}
> }
>
> 
>
> Here is the servlet code:
>
> 
>
> public class ImageServlet extends HttpServlet
> {
>private int nCounter = 0;
>private Font font = new Font("Tahoma", Font.BOLD, 10);
>
>private static Color getRandomColor()
>{
>int r = (int)(Math.random()* 255);
>int g = (int)(Math.random()* 255);
>int b = (int)(Math.random()* 255);
>
>return new Color(r,g,b);
>}
>
>@Override
>protected void doGet ( HttpServletRequest request,
> HttpServletResponse response ) throws IOException
>{
>
>OutputStream out = response.getOutputStream();
>
>response.setContentType("image/png");
>response.addHeader("Pragma", "no-cache");
>response.addHeader("Cache-Control", "no-cache");
>
>ImageIO.write( generateRandomImage(), "png", out );
>
>out.close();
>}
>
>private BufferedImage generateRandomImage()
>{
>return generateRandomImage(80, 80);
>}
>
>private BufferedImage generateRandomImage(int width, int height)
>{
>BufferedImage image = new BufferedImage(width, height,
> BufferedImage.TYPE_INT_ARGB);
>
>Graphics2D g2d = image.createGraphics();
>g2d.setFont(

Re: CellTable as a replacement for incubator ?

2010-11-03 Thread stuckagain
Hi John,

On Nov 2, 6:50 pm, John LaBanca  wrote:
> CellTable isn't a complete replacement of PagingScrollTable, but we put a
> lot of work into the API to make it more clear and extensible.  We'd like to
> create a full featured enterprise CellTable, but we also have a lot of other
> projects going on and don't have the dev time to do it right now.

And what would be the right time ? I agree that the design looks
sound, but scrolling a table is really something that should be
standard in a table. People working on applications don't want to
spend time writing their own table implementation. And currently there
is still no table available that really uses GWT the way it should.
I've seen multiple enterprise projects that went for GXT mostly
because of the mature set of widgets that just look good without much
effort. This is very nice for prototypes and having a short time to
market ... but for bigger applications these widget sets have a lot of
limitations and can not be easily combined with other widget sets. So
after the prototype phase many realize that they need something else.

> in IE8 I see 3-4 seconds 100% CPU just to let the browser calculate
>
> mouse over row highlighting, when showing a lot of rows.
>
> Have you tried looking at it with SpeedTracer?  We tested with large tables
> (100 rows), and the hover code is pretty straight forward.  In past
> applications, we've seen performance problems when hovering due
> to descendent style selectors because of the way they are implemented in
> browser.

I was using the standard google user theme
(com.google.gwt.user.theme.standard.Standard) with no custom styling
at all.

As far as I know speedtracer can not be used in IE ... or did that
change in this release ? I checked with DynaTrace and that one is
telling me that IE is stuck in reflow calculations.

I posted a few messages in GWT contributors a few weeks ago because I
had similar issues on our custom build scrolling table. I was using
decendent styles in their, but after removing them I did not see any
improvement. One thing that did improve the performance by a factor of
10, is to stop using addStyleName or setStyleName in the mouseover and
using the getStyle().setBackgroundColor directly. So maybe it would
already be a big improvement if we could somehow override that way
mouseover and selection styles are applied. Most people only want to
change the background color in mouseover.

Alternatively their could be some changes in CssResource that would
allow us to put some styling code in the CssResource instead, which
would keep a better separation between the presentation and view.

Or we could just wait for IE9 to become the standard browser on
Windows... but in the banking sector many of our clients are reluctant
to move away from IE6 since they still have a lot of sites that only
work in that browser and they don't want to spend money on migrating
these applications.

> And you have a CellTable that is NOT myRandomWidget, then changing the hover
> style of the row will cause IE to walk up from every TD in the CellTable
> trying to match the style definition.  In the degenerate case, where
> CellTable is not myRandomWidget, this means walking up to the body element.
>  This is a native browser implementation, and the only solution is to avoid
> descendent style selectors.

I know, I never use descendant styles only really simple styles, with
the expense that I need to have a large set of stylenames, but with
CssResource all this is very easy to manage and group. So that is
really a very good feature of GWT.

David

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



Spring Roo and GWT

2010-11-03 Thread Stefan Bachert
Hi,

does anyone have the luck, to get a non trivial case to run with
Spring Roo 1.1.0?

I tried the modified clinic sample, but it results in a loading screen
doing NOTHING.
(Remove Calendar, change boolean to type java.lang.Boolean)

At the moment it seems that Spring Roo with GWT is (still) a waste of
time.

Stefan Bachert
http://gwtworld.de

-- 
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: Reload CellTable data

2010-11-03 Thread Geoffrey De Smet


  
  
I use AsyncDataProvider, but that one doesn't have a refresh()
method. I made an issue:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5533

Op 02-11-10 18:42, John LaBanca schreef:

  Thomas
is correct on both accounts.  cellTable.setVisibleRangeAndClearData(cellTable.getVisibleRange(), true);
  will force a RangeChangeEvent to fire to the backend, but
  really your backend should be pushing the new data into the
  CellTable.  For example, if you use ListDataProvider you can
  call ListDataProvider#refresh() to push the data back into the
  views.
  

  Thanks,
  John LaBanca
  jlaba...@google.com
  
  
  On Tue, Nov 2, 2010 at 12:49 PM, Thomas
Broyer 
wrote:

  

On 2 nov, 17:07, Geoffrey De Smet 
wrote:
> I 'd like to add a button to reload the CellTable when
it's pushed,
> but I can only find:
> - cellTable.redraw(); // Doesn't reload the data from
the backend
> - simplePager.firstPage(); // I don't want it to change
the page
>
> Is there an easy way to do something like
cellTable.reload() or
> cellTable.refresh() ?

  
  Maybe:
cellTable.setVisibleRangeAndClearData(cellTable.getVisibleRange(),
  true);
  
  http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/cellview/client/AbstractHasData.html#setVisibleRangeAndClearData(com.google.gwt.view.client.Range,
  boolean)
  
  But I think the expected use is to do it in your "model"
  rather than
  the "view" (CellTable), where the "model" (or presenter, or
  whatever)
  will fetch the data from the backend (maybe using
  getVisibleRange() to
  filter it) and call setRowData() on the CellTable to update
  it.
  

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


-- 
With kind regards,
Geoffrey De Smet
  




-- 
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: CellTable as a replacement for incubator ?

2010-11-03 Thread Geoffrey De Smet



Op 03-11-10 08:58, stuckagain schreef:

Hi John,

On Nov 2, 6:50 pm, John LaBanca  wrote:

CellTable isn't a complete replacement of PagingScrollTable, but we put a
lot of work into the API to make it more clear and extensible.  We'd like to
create a full featured enterprise CellTable, but we also have a lot of other
projects going on and don't have the dev time to do it right now.

And what would be the right time ? I agree that the design looks
sound, but scrolling a table is really something that should be
standard in a table. People working on applications don't want to
spend time writing their own table implementation. And currently there
is still no table available that really uses GWT the way it should.
I've seen multiple enterprise projects that went for GXT mostly
because of the mature set of widgets that just look good without much
effort. This is very nice for prototypes and having a short time to
market ... but for bigger applications these widget sets have a lot of
limitations and can not be easily combined with other widget sets. So
after the prototype phase many realize that they need something else.

I also get the feeling that CellTable is the only scalable implementation,
but it lacks a couple of important features to surpass the other and 
draw all development to itself,

such as:
- header sorting
- column resizing
- column picker

Extracting those extra features from bikeshed works clunky: there's no 
decent integration.

Here's my implementation (ASL license):
  
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-guvnor/src/main/java/org/drools/guvnor/client/table/
As you can see I had to create a ColumnMeta class (in the ColumnPicker) 
to wrap Column because the Column class doesn't have a "visible" property.


--
With kind regards,
Geoffrey De Smet


--
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: Spring Roo and GWT

2010-11-03 Thread Kasper Hansen
I agree. I used around 5 hours on it yesterday.

Even though I like the idea of a developer-helper-application like Roo, I
wish Google would make their own specialized for GAE+Datastore (possibility
for Objectify)+GWT+Maven.

It seems more relevant for pre-ajax web apps.


On Wed, Nov 3, 2010 at 9:33 AM, Stefan Bachert wrote:

> Hi,
>
> does anyone have the luck, to get a non trivial case to run with
> Spring Roo 1.1.0?
>
> I tried the modified clinic sample, but it results in a loading screen
> doing NOTHING.
> (Remove Calendar, change boolean to type java.lang.Boolean)
>
> At the moment it seems that Spring Roo with GWT is (still) a waste of
> time.
>
> Stefan Bachert
> http://gwtworld.de
>
> --
> 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.
>
>

-- 
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: Can't compile in eclipe - unhandled event loop exception

2010-11-03 Thread Stephan T
Yes, it's the "Unhandled event loop exception" that shows up in the
Error log.

In my plugin folder:
com.google.gdt.eclipse.core_1.4.0.v201010280047.jar
com.google.gdt.eclipse.maven_1.4.0.v201010280047.jar
com.google.gdt.eclipse.platform.e35_1.4.0.v201010280047.jar
com.google.gdt.eclipse.platform.shared_1.4.0.v201010280047.jar
com.google.gdt.eclipse.platform_1.4.0.v201010280047.jar
com.google.gdt.eclipse.suite_1.4.0.v201010280047.jar


On 2 Nov, 16:24, Rajeev Dayal  wrote:
> Can you drop into your Eclipse installation's plugin directory and tell me
> the names of all of the plugins in there that start with com.google.gdt.*?
>
> Also, do you see any errors in your Error Log (Window -> Show View -> Error
> Log)?
>
> On Tue, Nov 2, 2010 at 11:12 AM, Stephan T wrote:
>
> > I can't compile my gwt application in Eclipse. Works in Maven outside
> > Eclipse though. I'm getting an error related to IPixelConverter (see
> > below for full stacktrace). The version of Eclipse is 3.5.1
> > (SpringSource Tool Suite2.3.0) and version 2.1.0 of GWT Plugin
> > installed from the 3.5 update site.
>
> > Any ideas why it doesn't work?
>
> > eclipse.buildId=2.3.0.200912171331-RELEASE
> > java.version=1.6.0_22
> > java.vendor=Sun Microsystems Inc.
> > BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=sv_SE
> > Framework arguments:  -product com.springsource.sts.ide
> > Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product
> > com.springsource.sts.ide
>
> > java.lang.NoClassDefFoundError: com/google/gdt/eclipse/platform/shared/
> > ui/IPixelConverter
> >        at
>
> > com.google.gwt.eclipse.core.compile.ui.GWTCompileDialog.createAdvancedOptions(GWTCompileDialog.java:
> > 337)
> >        at
>
> > com.google.gwt.eclipse.core.compile.ui.GWTCompileDialog.createDialogArea(GWTCompileDialog.java:
> > 250)
> >        at
>
> > org.eclipse.jface.dialogs.TitleAreaDialog.createContents(TitleAreaDialog.java:
> > 147)
> >        at
>
> > com.google.gwt.eclipse.core.compile.ui.GWTCompileDialog.createContents(GWTCompileDialog.java:
> > 215)
> >        at org.eclipse.jface.window.Window.create(Window.java:431)
> >        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
> >        at org.eclipse.jface.window.Window.open(Window.java:790)
> >        at
>
> > com.google.gwt.eclipse.core.actions.GWTCompileToolbarAction.run(GWTCompileToolbarAction.java:
> > 64)
> >        at
> > org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:
> > 251)
> >        at
>
> > org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:
> > 229)
> >        at
>
> > org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:
> > 584)
> >        at org.eclipse.jface.action.ActionContributionItem.access
> > $2(ActionContributionItem.java:501)
> >        at org.eclipse.jface.action.ActionContributionItem
> > $6.handleEvent(ActionContributionItem.java:452)
> >        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> >        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
> >        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:
> > 3880)
> >        at
> > org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
> >        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
> > 2405)
> >        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
> >        at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
> >        at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
> >        at
> > org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:
> > 332)
> >        at
> > org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:
> > 493)
> >        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
> > 149)
> >        at
>
> > org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:
> > 113)
> >        at
>
> > org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:
> > 194)
> >        at
>
> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:
> > 110)
> >        at
>
> > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:
> > 79)
> >        at
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
> > 368)
> >        at
> > org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:
> > 179)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> >        at
>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> > 25)
> >        at java.lang.reflect.Method.invoke(Method.java:597)
> >        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
> >        at org.eclipse.equinox.

DecoratedPopupPanel VS DialogBox

2010-11-03 Thread alexoffspring
1) What's the difference?

2) Which are the PROs and CONs of each one?

3) Is it possible to extend them in order to add the three icons
'minimize'/'maximize'/'close' like a normal desktop window?

-- 
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: AsyncDataProvider's updateRowCount(int, boolean) method doesn't behave correctly on the last page

2010-11-03 Thread Geoffrey De Smet

Yes, I am using SimplePager.

If it's the SimplePager's fault of going to 14-23 instead of 21-23 
(which is indeed non intuitively),
then there's still a bug, because going back one page from that point 
causes all kinds of wierdness:

the range becomes 4-13, but the data is incorrect.

Thanks for looking at it for GWT 2.2.1 :)

Op 02-11-10 18:54, John LaBanca schreef:
Are you using a SimplePager?  The pager isn't setting the page range 
intuitively, and a lot of users have been complaining.  We'll take 
another look for GWT 2.1.1.


Thanks,
John LaBanca
jlaba...@google.com 




On Tue, Nov 2, 2010 at 6:17 AM, Geoffrey De Smet 
> wrote:


Hi,

I am using AsyncDataProvider and in my testcase I have 3 pages:

* First page: 1 to 10, renders correctly as 1-10 of 23
* Second page: 11 to 20, renders correctly as 11-20 of 23
* Last page: 21 to 23, *renders wrong as 14-23 of 23 instead
  of 21-23 of 23*
  o The data is messed up
  o Going back to the second page messes up the second
page too

I checked the start and pageSizes being send to the server for the
last page: they are correct.
I do 2 things in my server callback:

* updateRowCount((int) result.getTotal(), true);
  o Removing that line fixes the problem, but then it
reports 21-23 of /above/ 23
+ The tutorials recommend of setting the row count
* updateRowData(start, result.getRowList());

Here's the full code:

AsyncDataProvider dataProvider = new
AsyncDataProvider() {
protected void onRangeChanged(HasData display) {
final int start = pager.getPage() * pageSize;
server.loadData(start, pageSize,
 new GenericCallback() {
 public void onSuccess(TableDataResult result) {
*updateRowCount((int) result.getTotal(), true);* // Without this
line it works perfect, with it it doesn't on the last page
 updateRowData(start, result.getRowList());
 }
 });
}
};

-- 
With kind regards,

Geoffrey De Smet

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


--
With kind regards,
Geoffrey De Smet

--
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: Can't compile in eclipe - unhandled event loop exception

2010-11-03 Thread Stephan T
Sometimes I also get this error in the Error log:

Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".

java.lang.NoClassDefFoundError: com/google/gdt/eclipse/platform/jdt/
model/PlatformJavaModelUtilities$IAnnotationNotAvailableException
at
com.google.gwt.eclipse.core.uibinder.UiBinderXmlModelUtilities.computeQualifiedWidgetTypeName(UiBinderXmlModelUtilities.java:
70)
at
com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.tryParseWidgetFromElement(UiBinderXmlParser.java:
632)
at
com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.parseElement(UiBinderXmlParser.java:
301)
at
com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.parse(UiBinderXmlParser.java:
285)
at
com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.access
$0(UiBinderXmlParser.java:282)
at
com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser
$1.visitNode(UiBinderXmlParser.java:170)
at
com.google.gdt.eclipse.core.XmlUtilities.visitNodes(XmlUtilities.java:
410)
at
com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.parse(UiBinderXmlParser.java:
226)
at
com.google.gwt.eclipse.core.uibinder.validators.UiBinderJavaValidator
$UiBinderSubtypeVisitor.parseAndValidateUiXml(UiBinderJavaValidator.java:
319)
at
com.google.gwt.eclipse.core.uibinder.validators.UiBinderJavaValidator
$UiBinderSubtypeVisitor.visit(UiBinderJavaValidator.java:276)
at
org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:
467)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2551)
at
org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:
484)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2551)
at
org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:
219)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
at
com.google.gwt.eclipse.core.uibinder.validators.UiBinderJavaValidator.validate(UiBinderJavaValidator.java:
538)
at
com.google.gwt.eclipse.core.validators.java.JavaCompilationParticipant.buildStarting(JavaCompilationParticipant.java:
223)
at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.notifyParticipants(AbstractImageBuilder.java:
565)
at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:
287)
at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:
60)
at
org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:
254)
at
org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:
178)
at org.eclipse.core.internal.events.BuildManager
$2.run(BuildManager.java:627)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
170)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
201)
at org.eclipse.core.internal.events.BuildManager
$1.run(BuildManager.java:253)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
256)
at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
309)
at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
341)
at
org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
140)
at
org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
238)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: java.lang.ClassNotFoundException:
com.google.gdt.eclipse.platform.jdt.model.PlatformJavaModelUtilities
$IAnnotationNotAvailableException
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
494)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
410)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
398)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:
105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 37 more


On 3 Nov, 09:52, Stephan T  wrote:
> Yes, it's the "Unhandledeventloopexception" that shows up in the
> Error log.
>
> In my plugin folder:
> com.google.gdt.eclipse.core_1.4.0.v201010280047.jar
> com.google.gdt.eclipse.maven_1.4.0.v201010280047.jar
> com.google.gdt.eclipse.platform.e35_1.4.0.v201010280047.jar
> com.google.gdt.eclipse.platform.shared_1.4.0.v201010280047.jar
> com.google.gdt.eclipse.platform_1.4.0.v2010

Re: Image Update Memory Leak

2010-11-03 Thread Didier DURAND
Hi,
IE8 is known for memory leaks with images (resizing, etc.)
example: 
http://stackoverflow.com/questions/803150/can-someone-verify-that-this-is-an-ie8-memory-leak

didier

On Nov 1, 7:06 pm, hermis  wrote:
> Hello,
>
> I have written a simple application which fills a FlexTable with a set
> of images. There is a timer which updates the URL of each image every
> second. The URL points to a Servlet which in turn generates a random
> PNG image on its doGet() method and writes it to the response output
> stream. The servlet sets the "Cache-Control" header to "No-Cache".
>
> When I run the webapp in IE7 / 8 the memory gradually increases.
> Leaving it overnight can get it close to 1Gb.
>
> Here is the client code:
>
> #
>
> public class LeakyApp implements EntryPoint
> {
>         public static final String IMAGE_SERVLET_NAME = "imageServlet";
>
>         public void onModuleLoad()
>         {
>                 leak();
>         }
>
>         private void leak()
>         {
>                 UrlBuilder urlBuilder = createUrlBuilder();
>
>                 final FlexTable table = new FlexTable();
>
>                 final List lstImages = createAndAddImages(5,10 ,table 
> );
>
>                 final String strURL = urlBuilder.buildString();
>
>                 final Timer timer = new Timer(){
>
>                         int nCounter = 0;
>
>                         @Override
>                         public void run()
>                         {
>                                 for (Image img : lstImages)
>                                 {
>                                         img.setUrl( strURL + "?" + 
> nCounter++) ;
>                                 }
>                         }
>                 };
>
>                 final Button btnStartLeak = new Button("Leak");
>                 btnStartLeak.addClickHandler( new ClickHandler()
>                 {
>                         @Override
>                         public void onClick(ClickEvent event)
>                         {
>                                 RootPanel.get().remove( btnStartLeak );
>                                 RootPanel.get().add( table );
>                                 timer.scheduleRepeating( 1000 );
>                         }
>                 });
>
>                 RootPanel.get().add( btnStartLeak );
>         }
>
>         private List createAndAddImages(int rowCount, int colCount,
> FlexTable table)
>         {
>                 List lstImages = new ArrayList();
>
>                 for(int row = 0; row                 {
>                         for(int col = 0; col                         {
>                                 Image image = new Image();
>                                 lstImages.add( image );
>                                 table.setWidget(row, col, image);
>                         }
>                 }
>
>                 return lstImages;
>         }
>
>         private UrlBuilder createUrlBuilder()
>         {
>                 UrlBuilder urlBuilder = null;
>
>                 if( GWT.isScript() )
>         {
>                 urlBuilder = new UrlBuilder();
>             urlBuilder.setHost( Window.Location.getHost() );
>             urlBuilder.setPath( Window.Location.getPath() +
> IMAGE_SERVLET_NAME );
>         }
>         else
>         {
>                 urlBuilder = Window.Location.createUrlBuilder();
>             urlBuilder.setPath( IMAGE_SERVLET_NAME );
>         }
>
>                 return urlBuilder;
>         }
>
> }
>
> 
>
> Here is the servlet code:
>
> 
>
> public class ImageServlet extends HttpServlet
> {
>         private int nCounter = 0;
>         private Font font = new Font("Tahoma", Font.BOLD, 10);
>
>         private static Color getRandomColor()
>         {
>                 int r = (int)(Math.random()* 255);
>         int g = (int)(Math.random()* 255);
>         int b = (int)(Math.random()* 255);
>
>         return new Color(r,g,b);
>         }
>
>     @Override
>         protected void doGet ( HttpServletRequest request,
> HttpServletResponse response ) throws IOException
>     {
>
>         OutputStream out = response.getOutputStream();
>
>         response.setContentType("image/png");
>         response.addHeader("Pragma", "no-cache");
>         response.addHeader("Cache-Control", "no-cache");
>
>         ImageIO.write( generateRandomImage(), "png", out );
>
>         out.close();
>     }
>
>     private BufferedImage generateRandomImage()
>     {
>         return generateRandomImage(80, 80);
>     }
>
>     private BufferedImage generateRandomImage(int width, int height)
>     {
>         BufferedImage image = new BufferedImage(width, height,
> BufferedImage.TYPE_INT_ARGB);
>
>         Graphics2D g2d = image.createGraphics();
>         g2d.setFont( font );
>         g2d.setColor( get

Re: Nested Views in MVP

2010-11-03 Thread Nicolas ANTONIAZZI
Hello,

I migrated all my code to GWT 2.1. I was a bit surprised to not find any
NestedPresenter helper. I created my "own" with an interface called
NestedPresenter that provides a "start(HasWidgets.ForIsWidget container);"
method.

I prefered doing it this way instead of using multiple ActivityManager
because it is a real hell to predict all the different place that elements
can have.
In my application, I have 2 different "pages".

- One with a list of items (each item is quite complex and has to be tested
: View + Presenter for each one).
- One with 5 sub presenter/view.

Those two pages have a completly different layout, and I do not know exactly
what will be the layout of new pages, so it is quite impossible for me to
rely on several ActivityManager. Moreover, if I use nested presenter, in
these pages, I only want to "render" them once when the page load, so I do
not need any kind of place management.

Would not be easier to create a Presenter interface that provides a start()
method, that would be extended by Activity ?
Thus, it would clarify the concept : Activity interface is an overlayer of
Presenter for Place management, and Presenter is just a core part of the MVP
pattern (that could be used for nested presenter too)

Nicolas.

2010/10/30 zixzigma 

>
> Hello David,
>
> I am very excited about the GWT 2.1 release, and planning to use it
> for a new upcoming project.
> I have been following and studying the MVP for quite a while now and
> experimenting with milestone releases.
>
> Just wanted to share some of my thoughts:
>
> I personally find the name "Activity" a bit confusing.
> I've heard it is more popular in Android community.
> to me,  it is MVP, P referring to Presenter (not Activity!)
> looking at the comments in source code, and tutorials, one can see
> Presenter and Activity are used interchangeably.
> eg: "An activity in GWT 2.1 is analogous to a presenter in MVP
> terminology." from MVP tutorial.
>
> now for the first time in your comment i read:
>
> > 2) There is not necessarily a 1:1 correspondence between Activities
> > and presenters. Your Activity might instantiate multiple presenters
> > and corresponding views.
>
> I did not know that, as it was not explicitly stated anywhere.
> so some clarification on that would really help.
> btw where does the name "Activity" come from ?
>
> about nested views,
> I was hoping that the new MVP framework address this,
> as I was planning to use that extensively.
> your solutions are interesting, I will try to implement them.
> any basic tutorial on composite views would be great.
>
> thank you for GWT 2.1 !
>
> --
> 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.
>
>

-- 
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: Nested Views in MVP

2010-11-03 Thread Thomas Broyer

On 3 nov, 11:16, Nicolas ANTONIAZZI 
wrote:
>
> Would not be easier to create a Presenter interface that provides a start()
> method, that would be extended by Activity ?
> Thus, it would clarify the concept : Activity interface is an overlayer of
> Presenter for Place management, and Presenter is just a core part of the MVP
> pattern (that could be used for nested presenter too)

Ray Ryan already clarified (several times IIRC) that not every
presenter has to be an Activity:
http://www.google.com/buzz/t.broyer/471GGi9Jmkb/GWT-2-1-Activities-nesting-YAGNI

and I'd add that Activities do not necessarily imply MVP either:
http://tbroyer.posterous.com/gwt-21-activities
(see section titled "Hey, where's the MVP framework you talked
about?")

Maybe the doc needs to be improved, but many people were expecting
Google to release something about MVP in GWT proper, and so did they,
and it *had* to be prominent in the doc.

-- 
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: Nested Views in MVP

2010-11-03 Thread Nicolas ANTONIAZZI
Ok that's more clear now.

I totally agree that not all presenters have to be an activity.
Thus, there is something missing in the "MVP" class provided by GWT 2.1
since it does not allow us to fully use MVP in this case. It would be great
to get at least a tiny interface for this in future release of GWT.

I discovered with your great post that Activity were not necesserely
Presenters. I think that I will have to think again about the concept behind
activity because altough it seems simple, I think that I do not really get
the advantages of using all those layers and what are the real different
between Activity and Presenter (excepts name).

Thanks Tomas.

Nicolas.

2010/11/3 Thomas Broyer 

>
> On 3 nov, 11:16, Nicolas ANTONIAZZI 
> wrote:
> >
> > Would not be easier to create a Presenter interface that provides a
> start()
> > method, that would be extended by Activity ?
> > Thus, it would clarify the concept : Activity interface is an overlayer
> of
> > Presenter for Place management, and Presenter is just a core part of the
> MVP
> > pattern (that could be used for nested presenter too)
>
> Ray Ryan already clarified (several times IIRC) that not every
> presenter has to be an Activity:
>
> http://www.google.com/buzz/t.broyer/471GGi9Jmkb/GWT-2-1-Activities-nesting-YAGNI
>
> and I'd add that Activities do not necessarily imply MVP either:
> http://tbroyer.posterous.com/gwt-21-activities
> (see section titled "Hey, where's the MVP framework you talked
> about?")
>
> Maybe the doc needs to be improved, but many people were expecting
> Google to release something about MVP in GWT proper, and so did they,
> and it *had* to be prominent in the doc.
>
> --
> 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.
>
>

-- 
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: Problem with Window.ClosingHandler

2010-11-03 Thread Bruno Santos
I'm trying to use your code in version 2.1, but this showing the
following errors:

ProxyCreator -> line 652 -> 'The constructor TypeSerializerCreator
(TreeLogger, SerializableTypeOracle, SerializableTypeOracle,
GeneratorContext, String) is undefined'

RemoteServiceProxy -> line 237 -> 'The constructor
RequestCallbackAdapter  (RemoteServiceProxy, String, int,
AsyncCallback  RequestCallbackAdapter.ResponseReader) is
 undefined '

-- 
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: communication between two frames

2010-11-03 Thread pratik
Hi Aditya,
Can you please share your implementation of communicating between
iframe and main window ?

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



How to create new locale?

2010-11-03 Thread kanle
Hi,

I want to localize the date and format constants for my country,
unfortunately i couldn't find a way to do it. After searching the
trunk for i18 folder, i found out that there are
DateTimeConstantsImpl_**_**.properties files under i18n/client/
constants, in which **_** is the locale ( like en_GB, fr_BE).  These
files contain the localizations. Now regarding my question, should i
create a DateTimeConstantsImpl_**_**.properties file for my country
and recompile gwt to be able to use my locale, or is there any other
obvious way that i can't see?

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



Images in buttons

2010-11-03 Thread David Cox
Hi everyone

I thought I would pick up gwt and play around with trying to make some
pretty standard stuff. But, I have been bashing my head on this one
for a bit.

I have a horizontal layout with [button - image - button] and have
managed to make the buttons cycle through a number of images.
Now I want to pretty up the buttons by making them into images of
arrows. This is fine using code like:

private PushButton LeftButton = new PushButton(new Image("images/gui/
left.png"));
or
LeftButton.setStyleName("mainleftbutton"); and then doing it in CSS.

However, my arrow pictures are huge and (while i could make many
copies with photoshop) what I would really like to do is be able to
code it so that the button (and image) is scaled to a specific width.
ie: like 100px high.

I guess the end goal here, would eventually have the buttons floating
over the image, but i suppose that is a long way off for me.

Any suggestions?
David

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



how to create a new field "username" in spring roo generated entities

2010-11-03 Thread A K
I'm trying to store the authenticated username of the person who adds
a record to the datastore.

Can this be done using spring roo? Can it be done without modifying
the roo generated aspectj files manually?

In either case, if someone could give a detailed explanation of how
this can be done, it'll be very useful since this is a very common
requirement.

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



Composite widget with HasText / HasHTML ?

2010-11-03 Thread Andrei Gheorghe
Hello, I'm learning GWT and I stumbled on a situation I can't get
around. I'm trying to implement a Composite widget, similar in
behavior to an HTMLPanel, with an icon on the left side and whatever
content is inside the widget, on the right. The ui.xml would look
like:


label text here
And some other text here


My current implementation looks like this:

public class IconItem extends Composite implements HasWidgets, HasText
{
private FlowPanel container;
private HTMLPanel content;
private String icon;

public IconItem(String icon) {
this.icon = icon;

container = new FlowPanel();
container.setStylePrimaryName("iconItem");
// TODO: add the icon image somewhere in this container

content = new HTMLPanel("Test");
content.setStylePrimaryName("iconItemContent");

container.add(content);;

initWidget(container);
}

public IconItem() {
this("");
}

public void setIcon(String icon) {
this.icon = icon;
}

@Override
public void add(Widget w) {
this.content.add(w);
}

@Override
public void clear() {
this.content.clear();
}

@Override
public Iterator iterator() {
return this.content.iterator();
}

@Override
public boolean remove(Widget w) {
return this.content.remove(w);
}

@Override
public String getText() {
// TODO Auto-generated method stub
return null;
}

@Override
public void setText(String text) {
this.content.add(new HTMLPanel(text));
// TODO Auto-generated method stub
}
}

However, when I run the project, I get this error:
> Unexpected text in element: "asdf" Element 

Can anyone please tell me what I am doing wrong?

Thank you

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



My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
Hi everyone,

When I make a simple CellTable, the responsiveness of the table in the
browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
fast as the table in the Showcase (http://gwt.google.com/samples/
Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?

My code is below. Best,

~Owen

// Data object class.

package tabletest.client;

import java.util.ArrayList;

public class InterestingThing {

public ArrayList values = new ArrayList();

public InterestingThing(int n) {
for (int i=0; i {

public MyCellTable() {
super();

int NUM_COLUMNS = 4;
int NUM_ROWS = 25;

// Create table.
for (int i=0; i data = new
ArrayList();
for (int i=0; i newColumn = new
TextColumn() {

public String getValue(InterestingThing m) {
return m.values.get(i);
}
};
addColumn(newColumn, "Field " + i);
}

}

// Entrypoint.

package tabletest.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.ui.RootPanel;

public class TableTest implements EntryPoint {

public void onModuleLoad() {

MyCellTable table = new MyCellTable();
RootPanel.get().add(table);
}
}

-- 
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: My CellTable is slow and I don't know why

2010-11-03 Thread Lukas Herman
My CellTable is slow under Firefox 3.6 only.

On 3 lis, 14:07, Owen Powell  wrote:
> Hi everyone,
>
> When I make a simple CellTable, the responsiveness of the table in the
> browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
> fast as the table in the Showcase (http://gwt.google.com/samples/
> Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?
>
> My code is below. Best,
>
> ~Owen
>
> // Data object class.
>
> package tabletest.client;
>
> import java.util.ArrayList;
>
> public class InterestingThing {
>
>         public ArrayList values = new ArrayList();
>
>         public InterestingThing(int n) {
>                 for (int i=0; i                         values.add("Value " + i);
>                 }
>         }
>
> }
>
> // Custom CellTable class.
>
> package tabletest.client;
>
> import java.util.ArrayList;
>
> import com.google.gwt.user.cellview.client.CellTable;
> import com.google.gwt.user.cellview.client.TextColumn;
>
> public class MyCellTable extends CellTable {
>
>         public MyCellTable() {
>                 super();
>
>                 int NUM_COLUMNS = 4;
>                 int NUM_ROWS = 25;
>
>                 // Create table.
>                 for (int i=0; i                         addTextColumn(i);
>                 }
>
>                 // Create data.
>                 ArrayList data = new
> ArrayList();
>                 for (int i=0; i                         data.add(new InterestingThing(NUM_COLUMNS));
>                 }
>
>                 // Put data into table.
>                 setRowData(0, data);
>         }
>
>         private void addTextColumn(final int i) {
>                 TextColumn newColumn = new
> TextColumn() {
>
>                         public String getValue(InterestingThing m) {
>                                 return m.values.get(i);
>                         }
>                 };
>                 addColumn(newColumn, "Field " + i);
>         }
>
> }
>
> // Entrypoint.
>
> package tabletest.client;
>
> import com.google.gwt.core.client.EntryPoint;
> import com.google.gwt.user.client.ui.RootPanel;
>
> public class TableTest implements EntryPoint {
>
>         public void onModuleLoad() {
>
>                 MyCellTable table = new MyCellTable();
>                 RootPanel.get().add(table);
>         }
>
>
>
>
>
>
>
> }

-- 
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: Window 7 IE8 Drop Down List Boxes open problem

2010-11-03 Thread skippy
  @UiField ListBox groupListBox;

  loadGroupListBox(workingLists, groupListBox);



private void loadGroupListBox(ArrayList itemList,
ListBox listBox)
{
for (int i = 0; i < itemList.size(); ++i)
{
ListBoxItem item = itemList.get(i);
listBox.addItem(item.getDesc(), item.getCode());
}
}



On Nov 1, 6:27 am, Nathan Wells  wrote:
> Do you have a snippet of code that can reproduce this problem? this
> sounds like a browser issue to me.
>
> On Oct 28, 6:20 am, skippy  wrote:
>
>
>
> > In this configuration, the drop down list boxes open with the top out
> > of the top of the browser and no scrollBar.
>
> > GWT 2.0.4
>
> > Has anyone else seen this?
> > Any chanse for a 2.0.5 fix?
>
> > Thanks- Hide quoted text -
>
> - Show quoted text -

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



gRaphael integration

2010-11-03 Thread trippledes
Hi,
I want to use some charting on my app, ive found raphaelGWT but im not
sure if that does charting. From what i can tell gRaphael is the
charting bit of the raphael project and raphaelGWT does not include
gRaphael javascript files like bar.js and line.js.

Will i need to use JSNI to use gRaphael with GWT or can i somehow
combine the integration of raphaelGWT with gRaphael js files and get
the seamless widget integration that raphaelGWT provides ?

Thanks for any advice

-- 
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: unable to install GWT Eclipse plugin

2010-11-03 Thread SteveB
Here is more information on this issue.  I am using JavaEE.  I am
behind a proxy at work but can access many other update sites like the
Helios update site, subclipse, WTP, EMF, etc.

I switched to the classic update site and tried to install that way
and got this error:

Unable to retrieve remote reference "http://dl.google.com/eclipse/
plugin/3.6/features/
com.google.gdt.eclipse.suite.e36.feature_1.4.0.v201010280102.jar".
[Server returned HTTP response code: "403 Forbidden" for URL:
http://dl.google.com/eclipse/plugin/3.6/features/com.google.gdt.eclipse.suite.e36.feature_1.4.0.v201010280102.jar.]

org.eclipse.update.internal.core.FatalIOException: Server returned
HTTP response code: "403 Forbidden" for URL:
http://dl.google.com/eclipse/plugin/3.6/features/com.google.gdt.eclipse.suite.e36.feature_1.4.0.v201010280102.jar.
at
org.eclipse.update.internal.core.UpdateManagerUtils.checkConnectionResult(UpdateManagerUtils.java:
468)
at
org.eclipse.update.core.ContentReference.getInputStream(ContentReference.java:
149)
at
org.eclipse.update.core.FeatureContentProvider.asLocalReference(FeatureContentProvider.java:
264)
at
org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureEntryArchiveReferences(FeaturePackagedContentProvider.java:
157)
at
org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureManifestReference(FeaturePackagedContentProvider.java:
83)
at
org.eclipse.update.internal.core.FeaturePackagedFactory.createFeature(FeaturePackagedFactory.java:
39)
at org.eclipse.update.core.Site.createFeature(Site.java:536)
at
org.eclipse.update.core.FeatureReference.createFeature(FeatureReference.java:
124)
at
org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:
112)
at
org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:
99)
at org.eclipse.update.internal.search.SiteSearchCategory
$FeatureDownloader.run(SiteSearchCategory.java:218)
at java.lang.Thread.run(Unknown Source)

On Nov 2, 7:17 pm, SteveB  wrote:
> I followed those steps.  However, after step 1, I get the errors
> listed in my original post.
>
> I'm running Windows XP Professional and Java 1.6
>
> On Nov 2, 4:38 pm, leslie  wrote:
>
>
>
> > I found the following page to be 
> > helpfulhttp://code.google.com/eclipse/docs/install-eclipse-3.6.html
>
> > What OS are you using?  What version of Java?  I don't know if this
> > information matters but it might help others help you.- Hide quoted text -
>
> - Show quoted text -

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



How can I use a Widget to edit a CellTree node?

2010-11-03 Thread David Pinn
When the user edits a node of my CellTree, I want to inject a
composite widget into the tree at that point to handle the editing.

To experiment with this, I created the following custom TextArea sub-
class:

class MyTextArea extends TextArea {
  public static MyTextArea addToElement(Element parent) {
MyTextArea textArea = new MyTextArea();
parent.appendChild(textArea.getElement());

textArea.onAttach();
RootPanel.detachOnWindowClose(textArea);

return textArea;
  }
}

When the user clicks on a node in the tree, I create an instance of
MyTextArea as follows:

ta = MyTextArea.addToElement(parent);

Tragically, I'm getting the following error message: "A widget that
has an existing parent widget may not be added to the detach list"

I understand that when MyTextArea calls
parent.appendChild(textArea.getElement()), it attaches itself via a
chain of parent elements to the CellTree; and in doing so, it
disqualifies itself from registration in the 'detach list'.

S...can you see a way to do what I'm trying to do?

-- 
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: My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
I've only tested it on the latest stable build of Chrome.

On 3 nov, 14:28, Lukas Herman  wrote:
> My CellTable is slow under Firefox 3.6 only.
>
> On 3 lis, 14:07, Owen Powell  wrote:
>
>
>
>
>
>
>
> > Hi everyone,
>
> > When I make a simple CellTable, the responsiveness of the table in the
> > browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
> > fast as the table in the Showcase (http://gwt.google.com/samples/
> > Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?
>
> > My code is below. Best,
>
> > ~Owen
>
> > // Data object class.
>
> > package tabletest.client;
>
> > import java.util.ArrayList;
>
> > public class InterestingThing {
>
> >         public ArrayList values = new ArrayList();
>
> >         public InterestingThing(int n) {
> >                 for (int i=0; i >                         values.add("Value " + i);
> >                 }
> >         }
>
> > }
>
> > // Custom CellTable class.
>
> > package tabletest.client;
>
> > import java.util.ArrayList;
>
> > import com.google.gwt.user.cellview.client.CellTable;
> > import com.google.gwt.user.cellview.client.TextColumn;
>
> > public class MyCellTable extends CellTable {
>
> >         public MyCellTable() {
> >                 super();
>
> >                 int NUM_COLUMNS = 4;
> >                 int NUM_ROWS = 25;
>
> >                 // Create table.
> >                 for (int i=0; i >                         addTextColumn(i);
> >                 }
>
> >                 // Create data.
> >                 ArrayList data = new
> > ArrayList();
> >                 for (int i=0; i >                         data.add(new InterestingThing(NUM_COLUMNS));
> >                 }
>
> >                 // Put data into table.
> >                 setRowData(0, data);
> >         }
>
> >         private void addTextColumn(final int i) {
> >                 TextColumn newColumn = new
> > TextColumn() {
>
> >                         public String getValue(InterestingThing m) {
> >                                 return m.values.get(i);
> >                         }
> >                 };
> >                 addColumn(newColumn, "Field " + i);
> >         }
>
> > }
>
> > // Entrypoint.
>
> > package tabletest.client;
>
> > import com.google.gwt.core.client.EntryPoint;
> > import com.google.gwt.user.client.ui.RootPanel;
>
> > public class TableTest implements EntryPoint {
>
> >         public void onModuleLoad() {
>
> >                 MyCellTable table = new MyCellTable();
> >                 RootPanel.get().add(table);
> >         }
>
> > }

-- 
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 CELL TABLE

2010-11-03 Thread Owen Powell
Hi Brad,

In Step 3, "CellTable" should be "CellTable",
right?

I'm having some problems. When I follow your code (and my adjustment
to Step 3), I end up with two "Matched CSS Rules" when I inspect my
table in the browser. My custom CSS is there, but so is the original,
and the original is taking precedence over the custom.

I seem to be close... any ideas?

~Owen

On 29 oct, 22:51, bradr  wrote:
> To do this, you have to override the CellTable's default style.
> Because CellTable uses a CssResource, which ultimately gets obfuscated
> when you compile, you have to create your own implementation and pass
> it to the CellTable in the constructor.
>
> Here is how I did it:
>
> Step 1) Create your own implementation of the Resource
>
> import com.google.gwt.core.client.GWT;
> import com.google.gwt.user.cellview.client.CellTable;
> import com.google.gwt.user.cellview.client.CellTable.Resources;
> public interface MyCellTableResources extends Resources {
>
>         public MyCellTableResources INSTANCE =
>                 GWT.create(MyCellTableResources.class);
>
>         /**
>          * The styles used in this widget.
>          */
>         @Source("CellTable.css")
>         CellTable.Style cellTableStyle();
>
> }
>
> Step 2) Copy the CellTable.css file into your project (from gwt trunk)
> into the same package as your Resource implementation. Customize the
> css until it meets your style needs.
>
> Step 3) When you create an instance of the CellTable, give it your
> your custom CssResource:
>
>    myTable = new
> CellTable(Integer.MAX_VALUE,CellTableResources.INSTANCE);
>
> Hope that helps!
>
> On Oct 29, 11:55 am, bond  wrote:
>
>
>
>
>
>
>
> > Hi,
> > is possibile to remove the box around the single cell that appears
> > when I click on a cell?
>
> > Thanks very much
>
> > Best regards

-- 
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: Cannot create new web applications.

2010-11-03 Thread Rajeev Dayal
Sorry, this slipped through the cracks..

Not sure if you still have the existing environment set up to repro this,
but do you see any errors in your error logs (Window -> Show View -> Error
Log)?

On Tue, Oct 5, 2010 at 11:49 AM, Justin Lilly wrote:

> Aptana does work with GWT.
>
> I installed GWT and Eclipse Java EE version (4 times, twice with 64
> bit, twice with 32 bit versions of eclipse). I installed the GWT
> plugin (install software, etc) but those menu options were not there,
> they did not appear after a restart (computer or eclipse itself), yet
> the plugin remained installed, just inaccessible through any method I
> tried (menu items, etc).
>
> I've since moved on to Aptana, which seems to work, but worth noting
> that it is an issue for at least some windows users. Contact me off
> list if you have specific questions about environment, etc.
>
>  -justin
>
> On Tue, Oct 5, 2010 at 11:23 AM, Chris Conroy  wrote:
> > Justin, we'd all love to not have to deal with the hassle of moderation,
> but
> > sadly there are a lot of spammers out there. Only new members are
> > automatically moderated, and once a member makes some legitimate posts,
> we
> > flip the bit that allows them to post without being stuck in the
> moderation
> > queue.
> > Aptana doesn't support GWT directly AFAIK.
> > The Eclipse UI for the new project dialog is a bit confusing. You'll
> > probably need to select File->New Project->Google->Web Application
> Project.
> > The plugin should also add a few buttons to your toolbar including one
> for
> > just this action.
> > On Mon, Oct 4, 2010 at 9:45 PM, Justin Lilly 
> wrote:
> >>
> >> This was sent 3 days ago. I've since gone with Aptana which worked
> >> successfully. The 32 and 64 bit versions of Eclipse didn't work. Also,
> >> this moderation is lame for a group based around user support :-/
> >>
> >>  -justin
> >>
> >> On Mon, Oct 4, 2010 at 9:19 PM, Y2i  wrote:
> >> > Strange, I didn't have such problem in Win 7 and Ubuntu 10.04 64-bit.
> >> > Can you verify that the GWT plugin is installed?
> >> > Help->Install New Software, then click "What is already isntalled?"
> >> > link
> >> >
> >> > On Oct 1, 10:03 pm, Justin Lilly  wrote:
> >> >> I just downloaded eclipse v3.6 (Helios), Java EE version. I then
> added
> >> >> the google repository athttp://dl.google.com/eclipse/plugin/3.6to my
> >> >> possible installation places, selected all downloads (which included
> >> >> the google plugin for eclipse as well as the appengine and gwt sdk).
> >> >>
> >> >> I'm attempting to follow through with the tutorial, but there is no
> >> >> "Create new web application" selection available in my new project
> >> >> dialog box. Yes, I already looked in the "other" section too.
> >> >>
> >> >> I'm on 64 bit windows 7, with 64 bit eclipse. Any help would be
> >> >> greatly appreciated.
> >> >>
> >> >>  -justin
> >> >
> >> > --
> >> > 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.
> >> >
> >> >
> >>
> >> --
> >> 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.
> >>
> >
> > --
> > 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-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.
>
>

-- 
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 +maven war plugin - Missing files after compile

2010-11-03 Thread stephan.beu...@googlemail.com
Hello,

I've problems using the gwt-maven-plugin. After compiling the gwt
project, there are some files missing in the war.

My pom.xml:

---


http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://
maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd";>


dashboard2
com.test
0.0.1-SNAPSHOT

4.0.0
com.test
dashboardClient
test Dashboard Client
war
0.0.1-SNAPSHOT



1.6
1.6







com.test
dashboardServer
${project.version}




org.springframework
spring-webmvc




com.google.gwt
gwt-servlet
runtime


com.google.gwt
gwt-user
provided


com.octo.gwt.test
gwt-test-utils
test




junit
junit
4.7
test




war/WEB-INF/classes


src/main/java

**/*.java
**/*.gwt.xml



src/main/resources

**/*.html
**/*.css





org.codehaus.mojo
gwt-maven-plugin
1.2



compile
test
resources





com.test.dashboard.Application

com.test.dashboard.Application/Application.html




org.apache.maven.plugins
maven-compiler-plugin
2.0.2


${maven.compiler.source}

${maven.compiler.target}



org.apache.maven.plugins
maven-war-plugin
2.1


war
war

src/main/webapp/WEB-INF/web.xml




maven-invoker-plugin


copy-deps
compile

run



.


pom.xml


true


dependency:copy-dependencies




  

Re: GWT 1.7 - Development Environment using Eclipse, unable to find on classpath

2010-11-03 Thread Rajeev Dayal
Can you post the source for WatchdogMain.html?

On Tue, Nov 2, 2010 at 4:38 AM, Panke  wrote:

> Hello everybody,
>
> I’m a student of computer science and in a new job of mine I can work
> at an existing application with gwt.
> Sadly I’m running into problems setting up my development environment.
> At the moment I’m able to compile
> and deploy the application to tomcat successfully, but running it in
> hosted mode does not work.
>
> When I click the run green button, the the hosted browser comes up and
> in the develoment shell I get these errors:
>
> > [TRACE] The development shell servlet received a request for
> 'szenarion/watchdog/server/WatchdogImpl' in module 'de.gwt.xml'
> > > [TRACE] Loading module 'de'
> > > > [ERROR] Unable to find 'de.gwt.xml' on your classpath; could be a
> typo, or maybe you forgot to include a classpath entry for source?
>
> What I don’t understand is, that I have no module called de.gwt.xml. I
> guess this is an error in my configuration,
> but I don’t know where.
>
> This is my first time  (seriously) using java and my very first time
> using gwt, so I’ll descripe my environment as
> precise as possible:
>
> I’m using Windows 7 x64, GWT 1.7 and I have Java6 x86 and x64
> installed. JAVA_HOME points to the x86 version as does my eclipse run
> configuration. Besides that, the run configuration looks like this:
>
> main class: com.google.gwt.dev.GWTShell
> arguments: -out www de.szenarion.watchdog.WatchdogMain/
> WatchdogMain.html
> classpath: gwt-dev-windows.jar gwt-servlet.jar gwt-user.jar (+ 3rd
> party libs)
> environment: java_home as stated above
>
> Does anyone know what goes wrong here?
>
> Thank you, Panke
>
> --
> 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.
>
>

-- 
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 module 'applicationScaffold' may need to be (re)compiled

2010-11-03 Thread Rajeev Dayal
This is a bug with the latest version of GPE. The problem is that launching
your Web Application attempts to synchronize Maven's target directory, which
wipes out all of the artifacts that have been dumped there (i.e. via a
compilation).

We're working to fix this, and a point release of GPE with this fix will be
forthcoming.

As an ugly workaround, perform a Run As launch, perform the GWT compilation
while the app is launched, and then try accessing the app in production
mode.

On Tue, Nov 2, 2010 at 7:33 AM, Juan Carlos González  wrote:

> Hi I've just upgraded GWT with 2.1 release and installed STS 2.5 and
> Roo 1.1.0.
>
> I've run the expenses-gae.roo script and the project has been
> generated properly. I can debug (Run As Web Application) the project
> from eclipse with the URL:
> http://127.0.0.1:/ApplicationScaffold.html?gwt.codesvr=127.0.0.1:9997.
> However, if I try to run in production mode (Run AS Web Application),
> I always get the following message from the browser: "GWT module
> 'applicationScaffold' may need to be (re)compiled" when browsing
> http://127.0.0.1:/ApplicationScaffold.html or
> http://localhost:/ApplicationScaffold.html
>
> I' ve tried to GWT recompile project before launching but the message
> is always there.
>
> Please, could anybody help with this?.
>
> K.R.
>
> Juan Carlos
>
> --
> 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.
>
>

-- 
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: How can I use a Widget to edit a CellTree node?

2010-11-03 Thread John LaBanca
GWT doesn't support what you are trying to do.  You cannot add a widget to
an arbitrary element that is already a descendant of a widget.

There are two alternatives that could work.  You could create a Cell that
switches to an editable via.  See EditableTextCell for an example.
 Alternatively, you can position a PopupPanel with your editor widget
directly over the cell.

Thanks,
John LaBanca
jlaba...@google.com


On Wed, Nov 3, 2010 at 10:11 AM, David Pinn  wrote:

> When the user edits a node of my CellTree, I want to inject a
> composite widget into the tree at that point to handle the editing.
>
> To experiment with this, I created the following custom TextArea sub-
> class:
>
> class MyTextArea extends TextArea {
>  public static MyTextArea addToElement(Element parent) {
>MyTextArea textArea = new MyTextArea();
>parent.appendChild(textArea.getElement());
>
>textArea.onAttach();
>RootPanel.detachOnWindowClose(textArea);
>
>return textArea;
>  }
> }
>
> When the user clicks on a node in the tree, I create an instance of
> MyTextArea as follows:
>
>ta = MyTextArea.addToElement(parent);
>
> Tragically, I'm getting the following error message: "A widget that
> has an existing parent widget may not be added to the detach list"
>
> I understand that when MyTextArea calls
> parent.appendChild(textArea.getElement()), it attaches itself via a
> chain of parent elements to the CellTree; and in doing so, it
> disqualifies itself from registration in the 'detach list'.
>
> S...can you see a way to do what I'm trying to do?
>
> --
> 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.
>
>

-- 
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: java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler

2010-11-03 Thread Rajeev Dayal
Hi,

Is this a maven-based project that you're having trouble with? What does
your project's build path look like?


Thanks,
Rajeev

On Tue, Nov 2, 2010 at 3:05 PM, masterGaurav  wrote:

> It seems gwt-dev.jar is missing in your project classpath.
>
>
> --
> Happy Hacking,
> Gaurav Vaish
> http://www.mastergaurav.com
>
>
> On Nov 2, 2:03 pm, ヒトリ  wrote:
> > Hi all,
> >
> >   When i upgrated my eclipse's google plug-in,when i click the compile
> > button,it says
> >  java.lang.NoClassDefFoundError: com/google/gwt/dev/Compiler
> >  Exception in thread "main"
> >   but i can run this project in eclipse,  anybody knows the reason?
> >
> > My eclipse version :3.5(Java) not J2EE ,
> >   GWT-SDK:2.0.3
> >GAE:1.3.8
> >
> > Jun Kou
> > 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.
>
>

-- 
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: My CellTable is slow and I don't know why

2010-11-03 Thread John LaBanca
Have you tried looking at it with SpeedTracer?  We tested with large tables
(100 rows), and the hover code is pretty straight forward.

In past applications, we've seen performance problems when hovering due
to descendant style selectors because of the way they are implemented in
browser.

For example, you have this CSS style defined:
.myRandomWidget td {
  padding: 3px;
}

And you have a CellTable that is NOT myRandomWidget, then changing the hover
style of the row will cause some browsers to walk up from every TD in the
CellTable trying to match the style definition.  In the degenerate case,
where CellTable is not myRandomWidget, this means walking up to the body
element.  This is a native browser implementation, and the only solution is
to avoid descendant style selectors.

If this isn't the case, SpeedTracer should be able to help you narrow down
the performance problem.

Thanks,
John LaBanca
jlaba...@google.com


On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell  wrote:

> I've only tested it on the latest stable build of Chrome.
>
> On 3 nov, 14:28, Lukas Herman  wrote:
> > My CellTable is slow under Firefox 3.6 only.
> >
> > On 3 lis, 14:07, Owen Powell  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi everyone,
> >
> > > When I make a simple CellTable, the responsiveness of the table in the
> > > browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
> > > fast as the table in the Showcase (http://gwt.google.com/samples/
> > > Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?
> >
> > > My code is below. Best,
> >
> > > ~Owen
> >
> > > // Data object class.
> >
> > > package tabletest.client;
> >
> > > import java.util.ArrayList;
> >
> > > public class InterestingThing {
> >
> > > public ArrayList values = new ArrayList();
> >
> > > public InterestingThing(int n) {
> > > for (int i=0; i > > values.add("Value " + i);
> > > }
> > > }
> >
> > > }
> >
> > > // Custom CellTable class.
> >
> > > package tabletest.client;
> >
> > > import java.util.ArrayList;
> >
> > > import com.google.gwt.user.cellview.client.CellTable;
> > > import com.google.gwt.user.cellview.client.TextColumn;
> >
> > > public class MyCellTable extends CellTable {
> >
> > > public MyCellTable() {
> > > super();
> >
> > > int NUM_COLUMNS = 4;
> > > int NUM_ROWS = 25;
> >
> > > // Create table.
> > > for (int i=0; i > > addTextColumn(i);
> > > }
> >
> > > // Create data.
> > > ArrayList data = new
> > > ArrayList();
> > > for (int i=0; i > > data.add(new InterestingThing(NUM_COLUMNS));
> > > }
> >
> > > // Put data into table.
> > > setRowData(0, data);
> > > }
> >
> > > private void addTextColumn(final int i) {
> > > TextColumn newColumn = new
> > > TextColumn() {
> >
> > > public String getValue(InterestingThing m) {
> > > return m.values.get(i);
> > > }
> > > };
> > > addColumn(newColumn, "Field " + i);
> > > }
> >
> > > }
> >
> > > // Entrypoint.
> >
> > > package tabletest.client;
> >
> > > import com.google.gwt.core.client.EntryPoint;
> > > import com.google.gwt.user.client.ui.RootPanel;
> >
> > > public class TableTest implements EntryPoint {
> >
> > > public void onModuleLoad() {
> >
> > > MyCellTable table = new MyCellTable();
> > > RootPanel.get().add(table);
> > > }
> >
> > > }
>
> --
> 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.
>
>

-- 
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: Can't compile in eclipe - unhandled event loop exception

2010-11-03 Thread Rajeev Dayal
This seems really odd - I know that we really only tested GPE against STS
2.5.0 (if you want GPE to work with Roo and Maven project in STS, you need
to be using STS 2.5.0), but I still do not understand why you'd be running
into problems against an Eclipse 3.5 version of an older incarnation of STS.

Did you have the Google Plugin for Eclipse installed previously? Was this an
upgrade?

On Wed, Nov 3, 2010 at 5:06 AM, Stephan T  wrote:

> Sometimes I also get this error in the Error log:
>
> Problems occurred when invoking code from plug-in:
> "org.eclipse.core.resources".
>
> java.lang.NoClassDefFoundError: com/google/gdt/eclipse/platform/jdt/
> model/PlatformJavaModelUtilities$IAnnotationNotAvailableException
>at
>
> com.google.gwt.eclipse.core.uibinder.UiBinderXmlModelUtilities.computeQualifiedWidgetTypeName(UiBinderXmlModelUtilities.java:
> 70)
>at
>
> com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.tryParseWidgetFromElement(UiBinderXmlParser.java:
> 632)
>at
>
> com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.parseElement(UiBinderXmlParser.java:
> 301)
>at
>
> com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.parse(UiBinderXmlParser.java:
> 285)
>at
>
> com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.access
> $0(UiBinderXmlParser.java:282)
>at
> com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser
> $1.visitNode(UiBinderXmlParser.java:170)
>at
> com.google.gdt.eclipse.core.XmlUtilities.visitNodes(XmlUtilities.java:
> 410)
>at
>
> com.google.gwt.eclipse.core.uibinder.model.reference.UiBinderXmlParser.parse(UiBinderXmlParser.java:
> 226)
>at
> com.google.gwt.eclipse.core.uibinder.validators.UiBinderJavaValidator
> $UiBinderSubtypeVisitor.parseAndValidateUiXml(UiBinderJavaValidator.java:
> 319)
>at
> com.google.gwt.eclipse.core.uibinder.validators.UiBinderJavaValidator
> $UiBinderSubtypeVisitor.visit(UiBinderJavaValidator.java:276)
>at
> org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:
> 467)
>at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
>at
> org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2551)
>at
> org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:
> 484)
>at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
>at
> org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2551)
>at
> org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:
> 219)
>at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2480)
>at
>
> com.google.gwt.eclipse.core.uibinder.validators.UiBinderJavaValidator.validate(UiBinderJavaValidator.java:
> 538)
>at
>
> com.google.gwt.eclipse.core.validators.java.JavaCompilationParticipant.buildStarting(JavaCompilationParticipant.java:
> 223)
>at
>
> org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.notifyParticipants(AbstractImageBuilder.java:
> 565)
>at
>
> org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:
> 287)
>at
>
> org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:
> 60)
>at
>
> org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:
> 254)
>at
> org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:
> 178)
>at org.eclipse.core.internal.events.BuildManager
> $2.run(BuildManager.java:627)
>at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
> 170)
>at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
> 201)
>at org.eclipse.core.internal.events.BuildManager
> $1.run(BuildManager.java:253)
>at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
>at
> org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:
> 256)
>at
>
> org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:
> 309)
>at
> org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:
> 341)
>at
> org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:
> 140)
>at
> org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:
> 238)
>at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: java.lang.ClassNotFoundException:
> com.google.gdt.eclipse.platform.jdt.model.PlatformJavaModelUtilities
> $IAnnotationNotAvailableException
> at
>
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
> 494)
>at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
> 410)
>at
> org.eclipse.osgi.internal.loader.BundleLo

Re: UiBinder fails after upgrading to gwt 2.1.0

2010-11-03 Thread pgraham
Update:

I have commented out all code in the two files listed above so that
they are as follows:

MainMenu.ui.xml:





MainMenu.java:

public class MainMenu extends Composite {

interface Binder extends UiBinder {}

private static Binder uiBinder = GWT.create(Binder.class);

public MainMenu() {
initWidget(uiBinder.createAndBindUi(this));
}
}

When I do this I get the same error so it is not related to the
content.

At this point I am thinking that there is a version conflict with
xerces.  Does anyone know if Dev Mode relies on xerces to parse
*.ui.xml files and if so which version?

NOTE:  I am using the gwt-maven-plugin to compile the app and it works
fine if I compile it and deploy it in Tomcat

Thanks,
Philip


On Nov 2, 1:54 pm, pgraham  wrote:
> MainMenu.ui.xml:
>
>      xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
>      type="org.sitebrand.ui.gwt.resources.UiResources.MainMenuCss" />
>      type="org.sitebrand.ui.gwt.resources.MainMenuLbls" />
>      type="org.sitebrand.gwt.constants.DebugConstants" />
>
>     
>          debugId="{debugIds.menuitem_campaigns}" text="{lbls.campaigns}">
>             
>                                      text="{lbls.createCampaign}" />
>                                      text="{lbls.viewCampaigns}" />
>                                      text="{lbls.campaignPriority}" />
>                                      text="{lbls.reports}" />
>             
>         
>
>          debugId="{debugIds.menuitem_content}" text="{lbls.content}">
>             
>                                      ui:field="createContent"
>                     text="{lbls.createContent}" />
>                                      ui:field="viewContent"
>                     text="{lbls.viewContent}" />
>                                      ui:field="integrate"
>                     text="{lbls.integrate}" />
>             
>         
>
>          debugId="{debugIds.menuitem_segments}" text="{lbls.segments}">
>             
>                                      ui:field="createSegment"
>                     text="{lbls.createSegment}" />
>                                      ui:field="viewSegments"
>                     text="{lbls.viewSegments}" />
>             
>         
>
>          debugId="{debugIds.menuitem_layout}" text="{lbls.layout}">
>             
>                                      ui:field="addTemplate"
>                     text="{lbls.addTemplate}" />
>                                      ui:field="viewTemplates"
>                     text="{lbls.viewTemplates}" />
>             
>         
>
>          debugId="{debugIds.menuitem_account_mgmt}" text="{lbls.account}">
>             
>                                      ui:field="myAccount"
>                     text="{lbls.myAccount}" />
>                                      ui:field="organizations"
>                     text="{lbls.organizations}" />
>                                      ui:field="sites"
>                     text="{lbls.sites}" />
>                                      ui:field="users"
>                     text="{lbls.users}" />
>                                      ui:field="globalSettings"
>                     text="{lbls.globalSettings}" />
>             
>         
>
>          text="{lbls.help}">
>             
>                                      ui:field="manual"
>                     text="{lbls.manual}" />
>                                      ui:field="support"
>                     text="{lbls.support}" />
>             
>         
>     
>
> 
>
> MainMenu.java:
>
> public class MainMenu extends Composite {
>
>     /*
>      *
> =
>      * UiBinder
>      *
> =
>      */
>
>     interface Binder extends UiBinder {}
>
>     private static Binder uiBinder = GWT.create(Binder.class);
>
>     static {
>         getCss().ensureInjected();
>     }
>
>     @UiFactory
>     public static MainMenuCss getCss() {
>         return UiResources.INST.mainMenuCss();
>     }
>
>     @UiFactory
>     public static MainMenuLbls getLbls() {
>         return MainMenuLbls.INST;
>     }
>
>     /*
>      *
> =
>      * Instance
>      *
> =
>      */
>
>     // Top level menu items
>     @UiField
>     MenuItem campaigns, content, segments, layout, account, help;
>
>     // Campaigns menu items
>     @UiField
>     MenuItem createCampaign, viewCampaigns, campaignPriority, reports;
>
>     // Content menu items
>     @UiField
>     MenuItem createContent, viewContent, integrate;
>
>     // Segments menu items
>     @UiField
>     MenuItem createSegment, viewSegments;
>
>     // Layout menu items
>     @UiField
>     MenuItem addTemplate, viewTemplates;
>
>     // Account menu items
>  

Re: unable to install GWT Eclipse plugin

2010-11-03 Thread Rajeev Dayal
I would stick with the non-classic install mechanism.

Have you set up your proxy settings in Preferences -> General -> Network
Connection?

Also, are you able to correctly access this update site:

http://download.eclipse.org/eclipse/updates/3.6

?

On Wed, Nov 3, 2010 at 9:36 AM, SteveB  wrote:

> Here is more information on this issue.  I am using JavaEE.  I am
> behind a proxy at work but can access many other update sites like the
> Helios update site, subclipse, WTP, EMF, etc.
>
> I switched to the classic update site and tried to install that way
> and got this error:
>
> Unable to retrieve remote reference "http://dl.google.com/eclipse/
> plugin/3.6/features/
> com.google.gdt.eclipse.suite.e36.feature_1.4.0.v201010280102.jar".
> [Server returned HTTP response code: "403 Forbidden" for URL:
>
> http://dl.google.com/eclipse/plugin/3.6/features/com.google.gdt.eclipse.suite.e36.feature_1.4.0.v201010280102.jar
> .]
>
> org.eclipse.update.internal.core.FatalIOException: Server returned
> HTTP response code: "403 Forbidden" for URL:
>
> http://dl.google.com/eclipse/plugin/3.6/features/com.google.gdt.eclipse.suite.e36.feature_1.4.0.v201010280102.jar
> .
>at
>
> org.eclipse.update.internal.core.UpdateManagerUtils.checkConnectionResult(UpdateManagerUtils.java:
> 468)
>at
>
> org.eclipse.update.core.ContentReference.getInputStream(ContentReference.java:
> 149)
>at
>
> org.eclipse.update.core.FeatureContentProvider.asLocalReference(FeatureContentProvider.java:
> 264)
>at
>
> org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureEntryArchiveReferences(FeaturePackagedContentProvider.java:
> 157)
>at
>
> org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureManifestReference(FeaturePackagedContentProvider.java:
> 83)
>at
>
> org.eclipse.update.internal.core.FeaturePackagedFactory.createFeature(FeaturePackagedFactory.java:
> 39)
>at org.eclipse.update.core.Site.createFeature(Site.java:536)
>at
>
> org.eclipse.update.core.FeatureReference.createFeature(FeatureReference.java:
> 124)
>at
> org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:
> 112)
>at
> org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:
> 99)
>at org.eclipse.update.internal.search.SiteSearchCategory
> $FeatureDownloader.run(SiteSearchCategory.java:218)
>at java.lang.Thread.run(Unknown Source)
>
> On Nov 2, 7:17 pm, SteveB  wrote:
> > I followed those steps.  However, after step 1, I get the errors
> > listed in my original post.
> >
> > I'm running Windows XP Professional and Java 1.6
> >
> > On Nov 2, 4:38 pm, leslie  wrote:
> >
> >
> >
> > > I found the following page to be helpfulhttp://
> code.google.com/eclipse/docs/install-eclipse-3.6.html
> >
> > > What OS are you using?  What version of Java?  I don't know if this
> > > information matters but it might help others help you.- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> 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.
>
>

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



Several errors when testing expenses-gae project with mobile browser (iphone-safari)

2010-11-03 Thread Juan Carlos González
Hi,

I'm testing the expenses-gae roo script provided with last STS version
I've deployed the example to app engine and the desktop version works
fine. However, when trying to browse with mobile safari I get the
following errors:

1. The dialog requesting signup keeps on showing forever. I think the
problem is that the file ScaffoldMobileApp.java is missing the line:
RequestEvent.register(eventBus, new AuthenticationFailureHandler());

2. After adding the previous line, the app requests the signup and
after signing up, redirects properly. However, after clicking any link
on the left planel the following message shows: Entity manager has not
been injected (is the Spring Aspects JAR configured as an AJC/AJDT
aspects library?)

K.R.

Juan Carlos

-- 
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 module 'applicationScaffold' may need to be (re)compiled

2010-11-03 Thread Juan Carlos González
Hi Rajeev,

Thanks for your answer. As we're just testing the new GWT version, Roo
tool, etc. this is not a problem. Anyway we deployed the example to
appengine and the desktop behaviour is OK. I've posted another issue
reporting some problems with the mobile behaviour.

K.R.

Juan Carlos

On Nov 3, 4:12 pm, Rajeev Dayal  wrote:
> This is a bug with the latest version of GPE. The problem is that launching
> your Web Application attempts to synchronize Maven's target directory, which
> wipes out all of the artifacts that have been dumped there (i.e. via a
> compilation).
>
> We're working to fix this, and a point release of GPE with this fix will be
> forthcoming.
>
> As an ugly workaround, perform a Run As launch, perform the GWT compilation
> while the app is launched, and then try accessing the app in production
> mode.
>
> On Tue, Nov 2, 2010 at 7:33 AM, Juan Carlos González 
>
>
>
>
>
>
> > wrote:
> > Hi I've just upgraded GWT with 2.1 release and installed STS 2.5 and
> > Roo 1.1.0.
>
> > I've run the expenses-gae.roo script and the project has been
> > generated properly. I can debug (Run As Web Application) the project
> > from eclipse with the URL:
> >http://127.0.0.1:/ApplicationScaffold.html?gwt.codesvr=127.0.0.1:
> > However, if I try to run in production mode (Run AS Web Application),
> > I always get the following message from the browser: "GWT module
> > 'applicationScaffold' may need to be (re)compiled" when browsing
> >http://127.0.0.1:/ApplicationScaffold.htmlor
> >http://localhost:/ApplicationScaffold.html
>
> > I' ve tried to GWT recompile project before launching but the message
> > is always there.
>
> > Please, could anybody help with this?.
>
> > K.R.
>
> > Juan Carlos
>
> > --
> > 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 > cr...@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.



UiFactory arguments

2010-11-03 Thread Jon Vaughan
The doc for UiFactory says "If your factory method needs arguments,
those will be required as attributes.".  The javadoc for the
annotation says "The parameter names of the constructor are treated as
required xml element attribute values."

So why do I get:

[ERROR]  missing required attribute(s): barUnit barHeight

For this:

 ...

with this:

 @UiFactory
public TabLayoutPanel createTabLayoutPanel(String barUnit, String
barHeight) {
return new TabLayoutPanel(Double.valueOf(barHeight),
Unit.valueOf(barUnit), messageSource);
}

Sure I've done something stupid, but what?

-- 
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: JUnit testing GWT

2010-11-03 Thread Ignat Alexeyenko
Arthur,

These rules are just good OO design - when you are depend on interfaces
rather than concrete classes.
One of the pros of following this principles - you can simplify testing by
using mocks instead of real objects.
You can read more about why programming to interfaces are so importang.

GWT team offers you MVP (Model View Presenter) pattern - here is a link:
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
You can find how they hide View's behind interfaces, so you can write tests
on presenters.

I have a sample project (have not many time for it :( ):
https://simpleworklog.svn.sourceforge.net/svnroot/simpleworklog/
It's a maven project, you should have no problems with how to configure it.

Please reffer to following test classes as examples of unit-testing:
- AdminDashboardPresenterTest.java
- LoginPresenterTest.java

Hope this helps!

--
Kind regards,
Ignat Alexeyenko.

On Fri, Oct 29, 2010 at 4:14 PM, chrisr wrote:

> Hi Ignat, thank you for the tip.  I do remember reading that there is
> a way to write gwt junit tests in a way that were much faster than the
> way I'm doing it now.  I wonder if this is it.
>
> Is there some documentation for how to write unit tests of this
> variety?  I searched but didn't come across anything that looked like
> what you suggested.
>
> --
> 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.
>
>

-- 
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 war plugin - Missing files after compile

2010-11-03 Thread Hilco Wijbenga
On 3 November 2010 08:02, stephan.beu...@googlemail.com
 wrote:
> I've problems using the gwt-maven-plugin. After compiling the gwt
> project, there are some files missing in the war.

Have a look at this:
http://osdir.com/ml/Google-Web-Toolkit/2010-08/msg00771.html. Maybe
the attached example project is of some help to you.

Cheers,
Hilco

-- 
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 war plugin - Missing files after compile

2010-11-03 Thread Jon Vaughan
Is the war folder a target folder or a source folder?

You would have more luck following the std maven war plugin convention
as detailed http://mojo.codehaus.org/gwt-maven-plugin/project.html

On Nov 3, 3:02 pm, "stephan.beu...@googlemail.com"
 wrote:
> Hello,
>
> I've problems using the gwt-maven-plugin. After compiling the gwt
> project, there are some files missing in the war.
>
> My pom.xml:
>
> ---
>
> 
> http://maven.apache.org/POM/4.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://
> maven.apache.org/POM/4.0.0http://maven.apache.org/maven-v4_0_0.xsd";>
>         
>         
>                 dashboard2
>                 com.test
>                 0.0.1-SNAPSHOT
>         
>         4.0.0
>         com.test
>         dashboardClient
>         test Dashboard Client
>         war
>         0.0.1-SNAPSHOT
>
>         
>
>                 1.6
>                 1.6
>
>         
>
>         
>
>                 
>                 
>                         com.test
>                         dashboardServer
>                         ${project.version}
>                 
>
>                 
>                 
>                         org.springframework
>                         spring-webmvc
>                 
>
>                 
>                 
>                         com.google.gwt
>                         gwt-servlet
>                         runtime
>                 
>                 
>                         com.google.gwt
>                         gwt-user
>                         provided
>                 
>                 
>                         com.octo.gwt.test
>                         gwt-test-utils
>                         test
>                 
>
>                 
>                 
>                         junit
>                         junit
>                         4.7
>                         test
>                 
>         
>
>         
>                 war/WEB-INF/classes
>                 
>                         
>                                 src/main/java
>                                 
>                                         **/*.java
>                                         **/*.gwt.xml
>                                 
>                         
>                         
>                                 src/main/resources
>                                 
>                                 **/*.html
>                                 **/*.css
>                                 
>                         
>                 
>                 
>                         
>                                 org.codehaus.mojo
>                                 gwt-maven-plugin
>                                 1.2
>                                 
>                                         
>                                                 
>                                                         compile
>                                                         test
>                                                         resources
>                                                 
>                                         
>                                 
>                                 
>                                 
> com.test.dashboard.Application
>                                         
> com.test.dashboard.Application/Application.html runTarget>
>                                 
>                         
>
>                         
>                                 org.apache.maven.plugins
>                                 maven-compiler-plugin
>                                 2.0.2
>                                 
>                                         
> ${maven.compiler.source}
>                                         
> ${maven.compiler.target}
>                                 
>                         
>                         
>                                 org.apache.maven.plugins
>                                 maven-war-plugin
>                                 2.1
>                                 
>                                         
> war
>                                         war
>                                         
> src/main/webapp/WEB-INF/web.xml
>                                 
>                         
>                         
>                         
>                                 maven-invoker-plugin
>                                 
>                                         
>                                                 copy-deps
>                                                 compile
>                                                 
>                                                         run
>                                                 
>                                                 
>                                                         
> .
>                                            

Re: gwt-log-3.0.4 available for download

2010-11-03 Thread gcstang
Will gwt-log still work in 2.1 ?

On Nov 2, 11:59 pm, Fred Sauer  wrote:
> The code in GWT 2.1 was inspired by gwt-log, but the two APIs and
> implementations are different. The most practical difference is this:
>
>    - GWT implements java.util.logging
>    - gwt-log uses a log4j inspired static API
>
> On Tue, Oct 19, 2010 at 11:48 PM, Harald Pehl 
> wrote:
>
>
>
> > Is this version part of GWT 2.1, as described in
> >http://code.google.com/intl/de-DE/webtoolkit/doc/trunk/DevGuideLoggin...
> > ?
>
> > - Harald
>
> > On Oct 19, 10:50 pm, Fred Sauer  wrote:
> > > Hi,
>
> > > There's a new version of gwt-log for your to try out.
>
> > > Downloads:
> > >  http://code.google.com/p/gwt-log/downloads/list
>
> > > Compatibility information and Getting Started guide:
> > >  http://code.google.com/p/gwt-log/wiki/GettingStarted
>
> > > Enjoy--
> > > Fred Sauer
> > > Developer Advocate
> > > Google Inc.
> > > 1600 Amphitheatre Parkway
> > > Mountain View, CA 94043
> > > fre...@google.com
>
> > > --
> > > Fred Sauer
> > > Developer Advocate
> > > Google Inc.
> > > 1600 Amphitheatre Parkway
> > > Mountain View, CA 94043
> > > fre...@google.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-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.
>
> --
> Fred Sauer
> Developer Advocate
> Google Inc.
> 1600 Amphitheatre Parkway
> Mountain View, CA 94043
> fre...@google.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-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.



RequestFactory and Collections

2010-11-03 Thread Tobias
Hi,

I am working on an example application to learn about RequestFactory
and the new Editor framework. The idea is to edit a Recipe, which has
multiple ingredients. The ingredients are displayed in CellTable. This
still involves a couple of problems (e.g.,
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/1725bc619a4459ab#
), but I got it working to the point, where the Request seems to be
correcty set up and contains the edited RecipeProxy as well as
multiple IngredientProxy instances.

When I edit a direct property of the Recipe, eg the name (String), on
the server Recipe.persist() is called and I can save the updated
object easily (I am using Objectify for this).

However, when I am editing a String property "text" on one of the
Ingredients, Ingredient.persist is NOT called for the edited
instance.

I looked at the raw JSON of the request made, and it seems to include
the updated Ingredient instance. Unfortunately, the DynatableRf and
the Expenses examples don't deal with n-ary relationships on the
entities. How is this done? Are there any more naming conventions for
handling collections?

My proxy interfaces currently look like this:

@ProxyFor(Ingredient.class)
public interface IngredientProxy extends EntityProxy {

String getId();

String getText();

void setText(String text);

@Override
EntityProxyId stableId();

}

@ProxyFor(Recipe.class)
public interface RecipeProxy extends EntityProxy {

long getId();

String getName();

void setName(String name);

@Override
EntityProxyId stableId();

List getIngredients();

void setIngredients(List ingredients);
}



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.



How do I check out the Samples into Eclipse

2010-11-03 Thread Greg Dougherty
How do I check out the samples in trunk into Eclipse in a useful
manner?

Note:  Adding 10 different projects to my Eclipse workspace isn't
"useful".  Neither is checking outa single project full of uncompiled
code.  The point of having it in Eclipse is that Eclipse has great
tools for dealing with compiled Java files (hover to see the javadoc,
control-click to be taken to where something was defined, etc.)  None
of that is of any use if I can't compile the code.

-- 
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: Images in buttons

2010-11-03 Thread pete
As far as I remembered, I instinctively tried to resize the image that
is assigned to the button and that worked...

I.e. Image image = new Image(source);
image.setWidth("100px");
image.setHeight("50px");
PushButton button = new PushButton(image);

I think if your image is really huge and only used for the button, it
is indeed smarter though, to make a smaller copy and resize that,
since if you let the browser resize, it still needs to load the full
image from the server (if I'm not mistaken...)

I don't understand what exactly you mean by "button floating over the
image" though, so I can't give you any tip about that...

Greetz


On Nov 2, 10:33 pm, David Cox  wrote:
> Hi everyone
>
> I thought I would pick up gwt and play around with trying to make some
> pretty standard stuff. But, I have been bashing my head on this one
> for a bit.
>
> I have a horizontal layout with [button - image - button] and have
> managed to make the buttons cycle through a number of images.
> Now I want to pretty up the buttons by making them into images of
> arrows. This is fine using code like:
>
> private PushButton LeftButton = new PushButton(new Image("images/gui/
> left.png"));
> or
> LeftButton.setStyleName("mainleftbutton"); and then doing it in CSS.
>
> However, my arrow pictures are huge and (while i could make many
> copies with photoshop) what I would really like to do is be able to
> code it so that the button (and image) is scaled to a specific width.
> ie: like 100px high.
>
> I guess the end goal here, would eventually have the buttons floating
> over the image, but i suppose that is a long way off for me.
>
> Any suggestions?
> David

-- 
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: How do I check out the Samples into Eclipse

2010-11-03 Thread Chris Conroy
Import the existing projects from the samples directory. I don't understand
your complaint about having separate projects: the samples are distinct and
isolated from each other.

On Wed, Nov 3, 2010 at 12:27 PM, Greg Dougherty
wrote:

> How do I check out the samples in trunk into Eclipse in a useful
> manner?
>
> Note:  Adding 10 different projects to my Eclipse workspace isn't
> "useful".  Neither is checking outa single project full of uncompiled
> code.  The point of having it in Eclipse is that Eclipse has great
> tools for dealing with compiled Java files (hover to see the javadoc,
> control-click to be taken to where something was defined, etc.)  None
> of that is of any use if I can't compile the code.
>
> --
> 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.
>
>

-- 
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: My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
Thanks John, the problem definitely seems to be descendant style
selectors (since I see recurring Javascript calls in Speed Tracer).

But I'm not sure why this is, since I don't have any styles defined in
my app. Could it be that the default CellTable style file is creating
this problem?

~Owen

On 3 nov, 16:25, John LaBanca  wrote:
> Have you tried looking at it with SpeedTracer?  We tested with large tables
> (100 rows), and the hover code is pretty straight forward.
>
> In past applications, we've seen performance problems when hovering due
> to descendant style selectors because of the way they are implemented in
> browser.
>
> For example, you have this CSS style defined:
> .myRandomWidget td {
>   padding: 3px;
>
> }
>
> And you have a CellTable that is NOT myRandomWidget, then changing the hover
> style of the row will cause some browsers to walk up from every TD in the
> CellTable trying to match the style definition.  In the degenerate case,
> where CellTable is not myRandomWidget, this means walking up to the body
> element.  This is a native browser implementation, and the only solution is
> to avoid descendant style selectors.
>
> If this isn't the case, SpeedTracer should be able to help you narrow down
> the performance problem.
>
> Thanks,
> John LaBanca
> jlaba...@google.com
>
>
>
>
>
>
>
> On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell  wrote:
> > I've only tested it on the latest stable build of Chrome.
>
> > On 3 nov, 14:28, Lukas Herman  wrote:
> > > My CellTable is slow under Firefox 3.6 only.
>
> > > On 3 lis, 14:07, Owen Powell  wrote:
>
> > > > Hi everyone,
>
> > > > When I make a simple CellTable, the responsiveness of the table in the
> > > > browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
> > > > fast as the table in the Showcase (http://gwt.google.com/samples/
> > > > Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?
>
> > > > My code is below. Best,
>
> > > > ~Owen
>
> > > > // Data object class.
>
> > > > package tabletest.client;
>
> > > > import java.util.ArrayList;
>
> > > > public class InterestingThing {
>
> > > >         public ArrayList values = new ArrayList();
>
> > > >         public InterestingThing(int n) {
> > > >                 for (int i=0; i > > >                         values.add("Value " + i);
> > > >                 }
> > > >         }
>
> > > > }
>
> > > > // Custom CellTable class.
>
> > > > package tabletest.client;
>
> > > > import java.util.ArrayList;
>
> > > > import com.google.gwt.user.cellview.client.CellTable;
> > > > import com.google.gwt.user.cellview.client.TextColumn;
>
> > > > public class MyCellTable extends CellTable {
>
> > > >         public MyCellTable() {
> > > >                 super();
>
> > > >                 int NUM_COLUMNS = 4;
> > > >                 int NUM_ROWS = 25;
>
> > > >                 // Create table.
> > > >                 for (int i=0; i > > >                         addTextColumn(i);
> > > >                 }
>
> > > >                 // Create data.
> > > >                 ArrayList data = new
> > > > ArrayList();
> > > >                 for (int i=0; i > > >                         data.add(new InterestingThing(NUM_COLUMNS));
> > > >                 }
>
> > > >                 // Put data into table.
> > > >                 setRowData(0, data);
> > > >         }
>
> > > >         private void addTextColumn(final int i) {
> > > >                 TextColumn newColumn = new
> > > > TextColumn() {
>
> > > >                         public String getValue(InterestingThing m) {
> > > >                                 return m.values.get(i);
> > > >                         }
> > > >                 };
> > > >                 addColumn(newColumn, "Field " + i);
> > > >         }
>
> > > > }
>
> > > > // Entrypoint.
>
> > > > package tabletest.client;
>
> > > > import com.google.gwt.core.client.EntryPoint;
> > > > import com.google.gwt.user.client.ui.RootPanel;
>
> > > > public class TableTest implements EntryPoint {
>
> > > >         public void onModuleLoad() {
>
> > > >                 MyCellTable table = new MyCellTable();
> > > >                 RootPanel.get().add(table);
> > > >         }
>
> > > > }
>
> > --
> > 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 > cr...@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-toolki

CellTree, adding data to a child node and refresh

2010-11-03 Thread Ümit
Hi all,

I have an issue with the CellTree and adding new items to a child
node. I am not exactly sure if my approach is flawed or maybe there is
an issue with the CellTree but maybe somebody can help with that
problem.
So basically I followed the CellTree example from the showace.

I have a CellTree which consists of 3 nodes which correspond to three
different DTO's (let's say: ObjectA, ObjectB and ObjectC)
Each ObjectA instance contains a list of ObjectBs and each ObjectB has
a list of ObjectCs.

ObjectA should be displayed in the root node, ObejctB in the second
node and ObjectC in the third node (= leaf node).

I created a CustomTreeModel with a custom constructor which takes a
List of ObjectA instances as a parameter. In the constructor I create
a ListDataProvider which is stored as a member variable in the
CustomTreeModel.

Then I define the necessary Cells for each node level and implement
the  public  NodeInfo getNodeInfo(T value)  function.

This looks something like this:
public  NodeInfo getNodeInfo(T value) {
if (value == null)
{
return new DefaultNodeInfo
(listDataProvider,new TextCell());
}
else if (value instanceof ObjectA)
{
ObjectA object  = (ObjectA)value;
return new DefaultNodeInfo(new
ListDataProvider(object.getObjectBList()),new TextCell());
}
else if (value instanceof ObjectB)
{
ObjectB object  = (ObjectB)value;
return new DefaultNodeInfo(new
ListDataProvider(object.getObjectCList()),new TextCell());
}
String type = value.getClass().getName();
throw new IllegalArgumentException("Unsupported object type: "+
type);
}


getObjectBList(),getObjectCList() return the List of the child
Objects.

I pass this model to the CellTree and the CellTree is displayed
correctly.

Now I try to add a new ObjectB instance to the list of ObjectBs in the
one of the ObjectA instances. In order to update the CellTree I have
to update the DataProvider. I define a updateData function in the
CustomTreeModel:

public void updateData(List objects){
listDataProvider.setList(objects);  //listDataProvider of the 
root
node level is stored in the CustomTreeModel
listDataProvider.refresh(); //probably not necessary as setList
already takes care of refreshing the Tree.
}


Now when I call this method and pass the List of ObjectA instances
(one of them has modified List of ObjectB instances). the CellTree
doesn't get updated/refreshed.

My assumption is that listDataProvider.setList() only checks the List
of ObjectAs and as I haven't changed anything in the root list but in
one of its client lists, the CellTree doesn't get updated. One
workaround is that I call listDataProvider.setList(new
ArrayList()) (empty list) before calling setList with the
actual list. However this causes the CellTree Nodes to get collapsed,
which I want to avoid.

Another approach would be to store the DataProviders for the ObjectB
and ObjectC instances (which I now only create as a local variable and
pass it to new DefaultNodeInfo) in the CustomTreeModel and also call
setList() on them. But IMHO that's not a really nice way of solving
it.


So basically there are two questions:

1.)  When does setList() on the DataAdapter cause the Display to
refresh it contents? ( I assume that setList() will only call refresh
if the amount of elements is changed -> that's the reason why using
the workaround with a new empty ArrayList worked). What happens, if I
only change one of the properties? How can I force the DataAdapter to
update the Display if the amount of elements doesn't change ?

2.) How can I map an object graph (parent -> client objects) to a
CellTree or CellBrowser, so that any change to one of the client
objects causes a refresh of the Display (CellTree).

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



Database data and GWT applications

2010-11-03 Thread OS
Hello,

This is my first posting here so I'm sorry if all this has been
covered before.

I've come to GWT from a J2EE background. I though GWT would be a great
way of combining data mining at the backend with a nice UI at the
front. However, I've fallen over at the first hurdle. Apparently GWT
will not permit database connections with the Google App Engine. Ok,
that's pants, but I'll move over to TomCat. But this is not as easy as
it sounds either. There is no Deploy action available and I'm not a
server admin. The instructions I've found on the web appear complex
and to top it all it seems I'm going to loose debugging features.

Have I missed the point about GWT? is it not really intended for
database driven applications?! What exactly is it for? After all, the
database and server root are on the same Intranet server and security
is pretty tight. Is it that the GAE is just not up to the job right
now but it will be coming.

Is there an easy way of using TomCat and keeping the debugging
ability? I can deploy the application / WAR to TomCat but I can't even
figure out how to get the GWT Eclipse plugin to launch it from the new
server, let alone debug the application!

If Eclipse won't do this then I might as well go back to doing this
long hand in NetBeans!!

Help

Thanks,
Owen

-- 
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: My CellTable is slow and I don't know why

2010-11-03 Thread Owen Powell
I checked the CellTable style sheet, it looks fine. But the standard
GWT stylesheet (the "standard.css" resource that gets loaded in my
app) contains a dependant style selector "table td".

Could this be my problem? Can the standard style sheet somehow be
modified?

Best,

~Owen

On 3 nov, 18:08, Owen Powell  wrote:
> Thanks John, the problem definitely seems to be descendant style
> selectors (since I see recurring Javascript calls in Speed Tracer).
>
> But I'm not sure why this is, since I don't have any styles defined in
> my app. Could it be that the default CellTable style file is creating
> this problem?
>
> ~Owen
>
> On 3 nov, 16:25, John LaBanca  wrote:
>
>
>
>
>
>
>
> > Have you tried looking at it with SpeedTracer?  We tested with large tables
> > (100 rows), and the hover code is pretty straight forward.
>
> > In past applications, we've seen performance problems when hovering due
> > to descendant style selectors because of the way they are implemented in
> > browser.
>
> > For example, you have this CSS style defined:
> > .myRandomWidget td {
> >   padding: 3px;
>
> > }
>
> > And you have a CellTable that is NOT myRandomWidget, then changing the hover
> > style of the row will cause some browsers to walk up from every TD in the
> > CellTable trying to match the style definition.  In the degenerate case,
> > where CellTable is not myRandomWidget, this means walking up to the body
> > element.  This is a native browser implementation, and the only solution is
> > to avoid descendant style selectors.
>
> > If this isn't the case, SpeedTracer should be able to help you narrow down
> > the performance problem.
>
> > Thanks,
> > John LaBanca
> > jlaba...@google.com
>
> > On Wed, Nov 3, 2010 at 10:22 AM, Owen Powell  wrote:
> > > I've only tested it on the latest stable build of Chrome.
>
> > > On 3 nov, 14:28, Lukas Herman  wrote:
> > > > My CellTable is slow under Firefox 3.6 only.
>
> > > > On 3 lis, 14:07, Owen Powell  wrote:
>
> > > > > Hi everyone,
>
> > > > > When I make a simple CellTable, the responsiveness of the table in the
> > > > > browser to mouse events (mouseOver, mouseOut) is nowhere nearly as
> > > > > fast as the table in the Showcase (http://gwt.google.com/samples/
> > > > > Showcase/Showcase.html#!CwCellTable). Any ideas why this might be?
>
> > > > > My code is below. Best,
>
> > > > > ~Owen
>
> > > > > // Data object class.
>
> > > > > package tabletest.client;
>
> > > > > import java.util.ArrayList;
>
> > > > > public class InterestingThing {
>
> > > > >         public ArrayList values = new ArrayList();
>
> > > > >         public InterestingThing(int n) {
> > > > >                 for (int i=0; i > > > >                         values.add("Value " + i);
> > > > >                 }
> > > > >         }
>
> > > > > }
>
> > > > > // Custom CellTable class.
>
> > > > > package tabletest.client;
>
> > > > > import java.util.ArrayList;
>
> > > > > import com.google.gwt.user.cellview.client.CellTable;
> > > > > import com.google.gwt.user.cellview.client.TextColumn;
>
> > > > > public class MyCellTable extends CellTable {
>
> > > > >         public MyCellTable() {
> > > > >                 super();
>
> > > > >                 int NUM_COLUMNS = 4;
> > > > >                 int NUM_ROWS = 25;
>
> > > > >                 // Create table.
> > > > >                 for (int i=0; i > > > >                         addTextColumn(i);
> > > > >                 }
>
> > > > >                 // Create data.
> > > > >                 ArrayList data = new
> > > > > ArrayList();
> > > > >                 for (int i=0; i > > > >                         data.add(new InterestingThing(NUM_COLUMNS));
> > > > >                 }
>
> > > > >                 // Put data into table.
> > > > >                 setRowData(0, data);
> > > > >         }
>
> > > > >         private void addTextColumn(final int i) {
> > > > >                 TextColumn newColumn = new
> > > > > TextColumn() {
>
> > > > >                         public String getValue(InterestingThing m) {
> > > > >                                 return m.values.get(i);
> > > > >                         }
> > > > >                 };
> > > > >                 addColumn(newColumn, "Field " + i);
> > > > >         }
>
> > > > > }
>
> > > > > // Entrypoint.
>
> > > > > package tabletest.client;
>
> > > > > import com.google.gwt.core.client.EntryPoint;
> > > > > import com.google.gwt.user.client.ui.RootPanel;
>
> > > > > public class TableTest implements EntryPoint {
>
> > > > >         public void onModuleLoad() {
>
> > > > >                 MyCellTable table = new MyCellTable();
> > > > >                 RootPanel.get().add(table);
> > > > >         }
>
> > > > > }
>
> > > --
> > > 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+unsubsc

Re: gwt-log-3.0.4 available for download

2010-11-03 Thread Fred Sauer
Yes, absolutely

On Wed, Nov 3, 2010 at 9:07 AM, gcstang  wrote:

> Will gwt-log still work in 2.1 ?
>
> On Nov 2, 11:59 pm, Fred Sauer  wrote:
> > The code in GWT 2.1 was inspired by gwt-log, but the two APIs and
> > implementations are different. The most practical difference is this:
> >
> >- GWT implements java.util.logging
> >- gwt-log uses a log4j inspired static API
> >
> > On Tue, Oct 19, 2010 at 11:48 PM, Harald Pehl <
> harald.p...@googlemail.com>wrote:
> >
> >
> >
> > > Is this version part of GWT 2.1, as described in
> > >http://code.google.com/intl/de-DE/webtoolkit/doc/trunk/DevGuideLoggin.
> ..
> > > ?
> >
> > > - Harald
> >
> > > On Oct 19, 10:50 pm, Fred Sauer  wrote:
> > > > Hi,
> >
> > > > There's a new version of gwt-log for your to try out.
> >
> > > > Downloads:
> > > >  http://code.google.com/p/gwt-log/downloads/list
> >
> > > > Compatibility information and Getting Started guide:
> > > >  http://code.google.com/p/gwt-log/wiki/GettingStarted
> >
> > > > Enjoy--
> > > > Fred Sauer
> > > > Developer Advocate
> > > > Google Inc.
> > > > 1600 Amphitheatre Parkway
> > > > Mountain View, CA 94043
> > > > fre...@google.com
> >
> > > > --
> > > > Fred Sauer
> > > > Developer Advocate
> > > > Google Inc.
> > > > 1600 Amphitheatre Parkway
> > > > Mountain View, CA 94043
> > > > fre...@google.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-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.
> >
> > --
> > Fred Sauer
> > Developer Advocate
> > Google Inc.
> > 1600 Amphitheatre Parkway
> > Mountain View, CA 94043
> > fre...@google.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-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.
>
>


-- 
Fred Sauer
Developer Advocate
Google Inc.
1600 Amphitheatre Parkway
Mountain View, CA 94043
fre...@google.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-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: How do I check out the Samples into Eclipse

2010-11-03 Thread Greg Dougherty
1: Separate samples take more time to set up / install.
2: Separate samples take up more space in my window.  If they're all
part of one project, I can close that project, and they all
disappear.
3: If they're all under one directory, I can easily do a search of all
the examples.  If they're each in their own directory, I have to
search them individually, or else search my entire workspace.
4: The samples are all in separate packages, so there's no collisions
from putting them all in the same space.

Greg

On Nov 3, 12:03 pm, Chris Conroy  wrote:
> Import the existing projects from the samples directory. I don't understand
> your complaint about having separate projects: the samples are distinct and
> isolated from each other.
>
> On Wed, Nov 3, 2010 at 12:27 PM, Greg Dougherty
> wrote:
>
> > How do I check out the samples in trunk into Eclipse in a useful
> > manner?
>
> > Note:  Adding 10 different projects to my Eclipse workspace isn't
> > "useful".  Neither is checking outa single project full of uncompiled
> > code.  The point of having it in Eclipse is that Eclipse has great
> > tools for dealing with compiled Java files (hover to see the javadoc,
> > control-click to be taken to where something was defined, etc.)  None
> > of that is of any use if I can't compile the code.
>
> > --
> > 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.

-- 
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: How do I check out the Samples into Eclipse

2010-11-03 Thread Stephen Haberman

> 1: Separate samples take more time to set up / install.
> 2: Separate samples take up more space in my window.  If they're all
> part of one project, I can close that project, and they all
> disappear.

You can use either Eclipse working sets or a separate workspace if it
really bothers you.

> 3: If they're all under one directory, I can easily do a search of all
> the examples.

It looks like Eclipse's search can also be scoped by working set.

Personally, I like small, discrete sample projects. Obviously you
don't, but in the grand scheme of things, I don't think it's a big deal
either way.

- Stephen

-- 
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: Database data and GWT applications

2010-11-03 Thread Jeff Schwartz
You can use gwt & the App Engine Datastore but you have to use the App
Engine Datastore api. There is no connection string required. Check out
google docs for the app engine datastore.

On Wed, Nov 3, 2010 at 1:20 PM, OS  wrote:

> Hello,
>
> This is my first posting here so I'm sorry if all this has been
> covered before.
>
> I've come to GWT from a J2EE background. I though GWT would be a great
> way of combining data mining at the backend with a nice UI at the
> front. However, I've fallen over at the first hurdle. Apparently GWT
> will not permit database connections with the Google App Engine. Ok,
> that's pants, but I'll move over to TomCat. But this is not as easy as
> it sounds either. There is no Deploy action available and I'm not a
> server admin. The instructions I've found on the web appear complex
> and to top it all it seems I'm going to loose debugging features.
>
> Have I missed the point about GWT? is it not really intended for
> database driven applications?! What exactly is it for? After all, the
> database and server root are on the same Intranet server and security
> is pretty tight. Is it that the GAE is just not up to the job right
> now but it will be coming.
>
> Is there an easy way of using TomCat and keeping the debugging
> ability? I can deploy the application / WAR to TomCat but I can't even
> figure out how to get the GWT Eclipse plugin to launch it from the new
> server, let alone debug the application!
>
> If Eclipse won't do this then I might as well go back to doing this
> long hand in NetBeans!!
>
> Help
>
> Thanks,
> Owen
>
> --
> 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.
>
>


-- 
Jeff

-- 
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: unable to install GWT Eclipse plugin

2010-11-03 Thread SteveB
Yes, I have set up my id/password for http & https with a manual
provider.

What is considered "able to correctly access" the update site?  I'm
getting a Not Found message.

On Nov 3, 10:35 am, Rajeev Dayal  wrote:
> I would stick with the non-classic install mechanism.
>
> Have you set up your proxy settings in Preferences -> General -> Network
> Connection?
>
> Also, are you able to correctly access this update site:
>
> http://download.eclipse.org/eclipse/updates/3.6
>
> ?
>
>
>
> On Wed, Nov 3, 2010 at 9:36 AM, SteveB  wrote:
> > Here is more information on this issue.  I am using JavaEE.  I am
> > behind a proxy at work but can access many other update sites like the
> > Helios update site, subclipse, WTP, EMF, etc.
>
> > I switched to the classic update site and tried to install that way
> > and got this error:
>
> > Unable to retrieve remote reference "http://dl.google.com/eclipse/
> > plugin/3.6/features/
> > com.google.gdt.eclipse.suite.e36.feature_1.4.0.v201010280102.jar".
> > [Server returned HTTP response code: "403 Forbidden" for URL:
>
> >http://dl.google.com/eclipse/plugin/3.6/features/com.google.gdt.eclip...
> > .]
>
> > org.eclipse.update.internal.core.FatalIOException: Server returned
> > HTTP response code: "403 Forbidden" for URL:
>
> >http://dl.google.com/eclipse/plugin/3.6/features/com.google.gdt.eclip...
> > .
> >        at
>
> > org.eclipse.update.internal.core.UpdateManagerUtils.checkConnectionResult(U­pdateManagerUtils.java:
> > 468)
> >        at
>
> > org.eclipse.update.core.ContentReference.getInputStream(ContentReference.ja­va:
> > 149)
> >        at
>
> > org.eclipse.update.core.FeatureContentProvider.asLocalReference(FeatureCont­entProvider.java:
> > 264)
> >        at
>
> > org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureE­ntryArchiveReferences(FeaturePackagedContentProvider.java:
> > 157)
> >        at
>
> > org.eclipse.update.internal.core.FeaturePackagedContentProvider.getFeatureM­anifestReference(FeaturePackagedContentProvider.java:
> > 83)
> >        at
>
> > org.eclipse.update.internal.core.FeaturePackagedFactory.createFeature(Featu­rePackagedFactory.java:
> > 39)
> >        at org.eclipse.update.core.Site.createFeature(Site.java:536)
> >        at
>
> > org.eclipse.update.core.FeatureReference.createFeature(FeatureReference.jav­a:
> > 124)
> >        at
> > org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:
> > 112)
> >        at
> > org.eclipse.update.core.FeatureReference.getFeature(FeatureReference.java:
> > 99)
> >        at org.eclipse.update.internal.search.SiteSearchCategory
> > $FeatureDownloader.run(SiteSearchCategory.java:218)
> >        at java.lang.Thread.run(Unknown Source)
>
> > On Nov 2, 7:17 pm, SteveB  wrote:
> > > I followed those steps.  However, after step 1, I get the errors
> > > listed in my original post.
>
> > > I'm running Windows XP Professional and Java 1.6
>
> > > On Nov 2, 4:38 pm, leslie  wrote:
>
> > > > I found the following page to be helpfulhttp://
> > code.google.com/eclipse/docs/install-eclipse-3.6.html
>
> > > > What OS are you using?  What version of Java?  I don't know if this
> > > > information matters but it might help others help you.- Hide quoted
> > text -
>
> > > - Show quoted text -
>
> > --
> > 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.- Hide quoted text -
>
> - Show quoted text -

-- 
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: CellTree, adding data to a child node and refresh

2010-11-03 Thread John LaBanca
You are correct that refreshing the ListDataProvider will only
update that level of the tree.  You need to keep a reference to
ListDataProvider in order to refresh that section of the tree.
 That probably means creating a parallel tree structure of
ListDataProviders, or at least having a map for ObjectA to the
ListDataProvider that represents its children.

One workaround is to close/reopen the TreeNode, which will cause it to
request a new DefaultNodeInfo from the TreeViewModel.

Thanks,
John LaBanca
jlaba...@google.com


On Wed, Nov 3, 2010 at 1:13 PM, Ümit  wrote:

> Hi all,
>
> I have an issue with the CellTree and adding new items to a child
> node. I am not exactly sure if my approach is flawed or maybe there is
> an issue with the CellTree but maybe somebody can help with that
> problem.
> So basically I followed the CellTree example from the showace.
>
> I have a CellTree which consists of 3 nodes which correspond to three
> different DTO's (let's say: ObjectA, ObjectB and ObjectC)
> Each ObjectA instance contains a list of ObjectBs and each ObjectB has
> a list of ObjectCs.
>
> ObjectA should be displayed in the root node, ObejctB in the second
> node and ObjectC in the third node (= leaf node).
>
> I created a CustomTreeModel with a custom constructor which takes a
> List of ObjectA instances as a parameter. In the constructor I create
> a ListDataProvider which is stored as a member variable in the
> CustomTreeModel.
>
> Then I define the necessary Cells for each node level and implement
> the  public  NodeInfo getNodeInfo(T value)  function.
>
> This looks something like this:
> public  NodeInfo getNodeInfo(T value) {
>if (value == null)
>{
>return new DefaultNodeInfo
>(listDataProvider,new TextCell());
>}
>else if (value instanceof ObjectA)
>{
>ObjectA object  = (ObjectA)value;
>return new DefaultNodeInfo(new
> ListDataProvider(object.getObjectBList()),new TextCell());
>}
>else if (value instanceof ObjectB)
>{
>ObjectB object  = (ObjectB)value;
>return new DefaultNodeInfo(new
> ListDataProvider(object.getObjectCList()),new TextCell());
>}
>String type = value.getClass().getName();
>throw new IllegalArgumentException("Unsupported object type:
> "+
> type);
>}
>
>
> getObjectBList(),getObjectCList() return the List of the child
> Objects.
>
> I pass this model to the CellTree and the CellTree is displayed
> correctly.
>
> Now I try to add a new ObjectB instance to the list of ObjectBs in the
> one of the ObjectA instances. In order to update the CellTree I have
> to update the DataProvider. I define a updateData function in the
> CustomTreeModel:
>
> public void updateData(List objects){
>listDataProvider.setList(objects);  //listDataProvider of
> the root
> node level is stored in the CustomTreeModel
>listDataProvider.refresh(); //probably not necessary as
> setList
> already takes care of refreshing the Tree.
> }
>
>
> Now when I call this method and pass the List of ObjectA instances
> (one of them has modified List of ObjectB instances). the CellTree
> doesn't get updated/refreshed.
>
> My assumption is that listDataProvider.setList() only checks the List
> of ObjectAs and as I haven't changed anything in the root list but in
> one of its client lists, the CellTree doesn't get updated. One
> workaround is that I call listDataProvider.setList(new
> ArrayList()) (empty list) before calling setList with the
> actual list. However this causes the CellTree Nodes to get collapsed,
> which I want to avoid.
>
> Another approach would be to store the DataProviders for the ObjectB
> and ObjectC instances (which I now only create as a local variable and
> pass it to new DefaultNodeInfo) in the CustomTreeModel and also call
> setList() on them. But IMHO that's not a really nice way of solving
> it.
>
>
> So basically there are two questions:
>
> 1.)  When does setList() on the DataAdapter cause the Display to
> refresh it contents? ( I assume that setList() will only call refresh
> if the amount of elements is changed -> that's the reason why using
> the workaround with a new empty ArrayList worked). What happens, if I
> only change one of the properties? How can I force the DataAdapter to
> update the Display if the amount of elements doesn't change ?
>
> 2.) How can I map an object graph (parent -> client objects) to a
> CellTree or CellBrowser, so that any change to one of the client
> objects causes a refresh of the Display (CellTree).
>
> --
> 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 

Re: Database data and GWT applications

2010-11-03 Thread Didier DURAND
Hi Owen,

Did you also install the Google App Engine part of Google SDK on your
Eclipse? Then running and debugging a database-oriented application
gets easy and efficient: the SDK has a Jetty (i.e Tomcat-like) in it.
So, you can fully test locally and test deploy as easily on App Engine
infrastructure.

So, give a try to the full package and come back if any question:

 I really find the combination GAE + GWT highly powerful for large
scale and at the same time very efficient to develop + debug on a
single machine

regards
didier





On Nov 3, 6:20 pm, OS  wrote:
> Hello,
>
> This is my first posting here so I'm sorry if all this has been
> covered before.
>
> I've come to GWT from a J2EE background. I though GWT would be a great
> way of combining data mining at the backend with a nice UI at the
> front. However, I've fallen over at the first hurdle. Apparently GWT
> will not permit database connections with the Google App Engine. Ok,
> that's pants, but I'll move over to TomCat. But this is not as easy as
> it sounds either. There is no Deploy action available and I'm not a
> server admin. The instructions I've found on the web appear complex
> and to top it all it seems I'm going to loose debugging features.
>
> Have I missed the point about GWT? is it not really intended for
> database driven applications?! What exactly is it for? After all, the
> database and server root are on the same Intranet server and security
> is pretty tight. Is it that the GAE is just not up to the job right
> now but it will be coming.
>
> Is there an easy way of using TomCat and keeping the debugging
> ability? I can deploy the application / WAR to TomCat but I can't even
> figure out how to get the GWT Eclipse plugin to launch it from the new
> server, let alone debug the application!
>
> If Eclipse won't do this then I might as well go back to doing this
> long hand in NetBeans!!
>
> Help
>
> Thanks,
> Owen

-- 
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: Database data and GWT applications

2010-11-03 Thread David Chandler
Hi Owen,

Whoa! Have you looked at the Expenses sample app in GWT trunk? It runs
on GAE with the App Engine Datastore.

http://code.google.com/p/google-web-toolkit/source/browse/#svn/trunk/samples/expenses%3Fstate%3Dclosed

GWT-RPC or RequestFactory let you easily make AJAX calls to any
servlet-based services, and how you implement those services is
completely up to you.

As far as debugging, you certainly can continue to use hosted mode
debugging while deploying server-side code to an external server. See
http://code.google.com/webtoolkit/doc/latest/FAQ_DebuggingAndCompiling.html#How_do_I_use_my_own_server_in_hosted_mode_instead_of_GWT's

HTH,
/dmc

On Wed, Nov 3, 2010 at 1:20 PM, OS  wrote:
> Hello,
>
> This is my first posting here so I'm sorry if all this has been
> covered before.
>
> I've come to GWT from a J2EE background. I though GWT would be a great
> way of combining data mining at the backend with a nice UI at the
> front. However, I've fallen over at the first hurdle. Apparently GWT
> will not permit database connections with the Google App Engine. Ok,
> that's pants, but I'll move over to TomCat. But this is not as easy as
> it sounds either. There is no Deploy action available and I'm not a
> server admin. The instructions I've found on the web appear complex
> and to top it all it seems I'm going to loose debugging features.
>
> Have I missed the point about GWT? is it not really intended for
> database driven applications?! What exactly is it for? After all, the
> database and server root are on the same Intranet server and security
> is pretty tight. Is it that the GAE is just not up to the job right
> now but it will be coming.
>
> Is there an easy way of using TomCat and keeping the debugging
> ability? I can deploy the application / WAR to TomCat but I can't even
> figure out how to get the GWT Eclipse plugin to launch it from the new
> server, let alone debug the application!
>
> If Eclipse won't do this then I might as well go back to doing this
> long hand in NetBeans!!
>
> Help
>
> Thanks,
> Owen
>
> --
> 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.
>
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.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-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: HTML5 innershiv

2010-11-03 Thread davidroe
I very much appreciate this and apologies for going silent on the
issue. I believe that I made all the changes indicated by steps #1, #2
and #3 above, my issue is how and where to include the innerShiv
function.

should the innerShiv function be included somewhere in the GWT source?
I could not pick an appropriate place.

should the innerShiv function be included as part of my project?
should the GWT source reference it as $wnd.innerShiv()?

my attempts were unsuccessful and frustrating, mainly due to IE
throwing an exception and the debugging experience not being up to
scratch. the major issue seemed to revolve around core/client/impl/
Impl.java and the entry0() function. my guess would be that GWT is
unhappy with how innerShiv() is being defined and called.

all in all, it looks like a great solution, I just can't get the
implementation right.

On Oct 22, 2:45 pm, Thomas Broyer  wrote:
> On 22 oct, 20:15, davidroe  wrote:
>
> > bump
>
> > I guess a better way of phrasing the question is how should a GWT
> > project render HTML5 tags for all browsers knowing that one of those
> > browsers could be IE?
>
> > this is achievable using html5shiv, but not when the HTML is dynamic
> > this is also achievable using innerShiv, when you have control over
> > the dynamic process
>
> > any thoughts on how this could be used with UiBinder?
>
> One possibility (that would work with *and* without UiBinder) would be
> to:
> 1. change c.g.g.dom.client.Element so that setInnerHTML calls DOMImpl
> (similar to 
> getInerHTML)http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/...
> 2. implement setInnerHTML in DOMImpl the same as it is today in
> Element
> 3. override setInnerHTML it in DOMImplTrident to use innerShiv.
>
> Steps #1 and #2 means patching GWT ("classpath override" is
> fortunately enough), but maybe the patch could be included in GWT
> proper in the next version, just to make #3 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-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 and Collections

2010-11-03 Thread David Chandler
Tobias,

RequestFactory doesn't do cascading updates or deletes. You'll have to
make a separate call from the client to do this (or possibly you could
implement in the parent entity's persist() method). By the way,
persist() is just an example method name. As far as RequestFactory is
concerned, it's just another service method that you create.

HTH,
/dmc

On Wed, Nov 3, 2010 at 12:09 PM, Tobias  wrote:
> Hi,
>
> I am working on an example application to learn about RequestFactory
> and the new Editor framework. The idea is to edit a Recipe, which has
> multiple ingredients. The ingredients are displayed in CellTable. This
> still involves a couple of problems (e.g.,
> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/1725bc619a4459ab#
> ), but I got it working to the point, where the Request seems to be
> correcty set up and contains the edited RecipeProxy as well as
> multiple IngredientProxy instances.
>
> When I edit a direct property of the Recipe, eg the name (String), on
> the server Recipe.persist() is called and I can save the updated
> object easily (I am using Objectify for this).
>
> However, when I am editing a String property "text" on one of the
> Ingredients, Ingredient.persist is NOT called for the edited
> instance.
>
> I looked at the raw JSON of the request made, and it seems to include
> the updated Ingredient instance. Unfortunately, the DynatableRf and
> the Expenses examples don't deal with n-ary relationships on the
> entities. How is this done? Are there any more naming conventions for
> handling collections?
>
> My proxy interfaces currently look like this:
>
> @ProxyFor(Ingredient.class)
> public interface IngredientProxy extends EntityProxy {
>
>        String getId();
>
>        String getText();
>
>        void setText(String text);
>
>       �...@override
>        EntityProxyId stableId();
>
> }
>
> @ProxyFor(Recipe.class)
> public interface RecipeProxy extends EntityProxy {
>
>        long getId();
>
>        String getName();
>
>        void setName(String name);
>
>       �...@override
>        EntityProxyId stableId();
>
>        List getIngredients();
>
>        void setIngredients(List ingredients);
> }
>
>
>
> 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.
>
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.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-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: Nested Views in MVP

2010-11-03 Thread David Chandler
Hi Nicolas,

Thanks for your comments. Do you mind sharing with us what would go in
the Presenter interface to allow you to "fully use" MVP? We're very
much open to ideas from the community as to how to make it work
better.

Thank you,
/dmc

On Wed, Nov 3, 2010 at 8:13 AM, Nicolas ANTONIAZZI
 wrote:
> Ok that's more clear now.
> I totally agree that not all presenters have to be an activity.
> Thus, there is something missing in the "MVP" class provided by GWT 2.1
> since it does not allow us to fully use MVP in this case. It would be great
> to get at least a tiny interface for this in future release of GWT.
> I discovered with your great post that Activity were not necesserely
> Presenters. I think that I will have to think again about the concept behind
> activity because altough it seems simple, I think that I do not really get
> the advantages of using all those layers and what are the real different
> between Activity and Presenter (excepts name).
> Thanks Tomas.
> Nicolas.
> 2010/11/3 Thomas Broyer 
>>
>> On 3 nov, 11:16, Nicolas ANTONIAZZI 
>> wrote:
>> >
>> > Would not be easier to create a Presenter interface that provides a
>> > start()
>> > method, that would be extended by Activity ?
>> > Thus, it would clarify the concept : Activity interface is an overlayer
>> > of
>> > Presenter for Place management, and Presenter is just a core part of the
>> > MVP
>> > pattern (that could be used for nested presenter too)
>>
>> Ray Ryan already clarified (several times IIRC) that not every
>> presenter has to be an Activity:
>>
>> http://www.google.com/buzz/t.broyer/471GGi9Jmkb/GWT-2-1-Activities-nesting-YAGNI
>>
>> and I'd add that Activities do not necessarily imply MVP either:
>> http://tbroyer.posterous.com/gwt-21-activities
>> (see section titled "Hey, where's the MVP framework you talked
>> about?")
>>
>> Maybe the doc needs to be improved, but many people were expecting
>> Google to release something about MVP in GWT proper, and so did they,
>> and it *had* to be prominent in the doc.
>>
>> --
>> 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.
>>
>
> --
> 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.
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.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-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: Nested Views in MVP

2010-11-03 Thread Thomas Broyer


On 3 nov, 13:13, Nicolas ANTONIAZZI 
wrote:
>
> I discovered with your great post that Activity were not necesserely
> Presenters. I think that I will have to think again about the concept behind
> activity because altough it seems simple, I think that I do not really get
> the advantages of using all those layers and what are the real different
> between Activity and Presenter (excepts name).

Activities are more tied to the concept of Places than of MVP, i.e.
navigation and user experience rather than code structure ("developer
experience"). Does that make things clearer?

-- 
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 and Collections

2010-11-03 Thread Tobias
David,

Thanks for your reply. So the RequestFactory calls persist on my
server-entity, because I call "persist" on the Request-object. In this
case though, I don't understand why RequestFactory transmits the whole
object-graph and what happens to it on the server?
Can you elaborate on how I could implement the children's update in
the parent entity's persist method?

Thanks,
Tobias

On Nov 3, 7:54 pm, David Chandler  wrote:
> Tobias,
>
> RequestFactory doesn't do cascading updates or deletes. You'll have to
> make a separate call from the client to do this (or possibly you could
> implement in the parent entity's persist() method). By the way,
> persist() is just an example method name. As far as RequestFactory is
> concerned, it's just another service method that you create.
>
> HTH,
> /dmc
>
>
>
>
>
>
>
>
>
> On Wed, Nov 3, 2010 at 12:09 PM, Tobias  wrote:
> > Hi,
>
> > I am working on an example application to learn about RequestFactory
> > and the new Editor framework. The idea is to edit a Recipe, which has
> > multiple ingredients. The ingredients are displayed in CellTable. This
> > still involves a couple of problems (e.g.,
> >http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
> > ), but I got it working to the point, where the Request seems to be
> > correcty set up and contains the edited RecipeProxy as well as
> > multiple IngredientProxy instances.
>
> > When I edit a direct property of the Recipe, eg the name (String), on
> > the server Recipe.persist() is called and I can save the updated
> > object easily (I am using Objectify for this).
>
> > However, when I am editing a String property "text" on one of the
> > Ingredients, Ingredient.persist is NOT called for the edited
> > instance.
>
> > I looked at the raw JSON of the request made, and it seems to include
> > the updated Ingredient instance. Unfortunately, the DynatableRf and
> > the Expenses examples don't deal with n-ary relationships on the
> > entities. How is this done? Are there any more naming conventions for
> > handling collections?
>
> > My proxy interfaces currently look like this:
>
> > @ProxyFor(Ingredient.class)
> > public interface IngredientProxy extends EntityProxy {
>
> >        String getId();
>
> >        String getText();
>
> >        void setText(String text);
>
> >       �...@override
> >        EntityProxyId stableId();
>
> > }
>
> > @ProxyFor(Recipe.class)
> > public interface RecipeProxy extends EntityProxy {
>
> >        long getId();
>
> >        String getName();
>
> >        void setName(String name);
>
> >       �...@override
> >        EntityProxyId stableId();
>
> >        List getIngredients();
>
> >        void setIngredients(List ingredients);
> > }
>
> > 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 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> David Chandler
> Developer Programs Engineer, Google Web 
> Toolkithttp://googlewebtoolkit.blogspot.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-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: How RPC works on GWT?

2010-11-03 Thread JuDaC
Tercio, had made that.

GWT do read the post body using InputStream. What I do is to make this
read before, in my valve, and put this content on the parameters. On
the RemoteServiceServlet I had to override the method readContent, so
I can get the value from the parameter and not from
"RPCServletUtils.readContentAsUtf8(request, true);"

I was wondering if exist a different way to get that, but not (I
didn't find a different way :( ).

Thanks a lot for answering Tercio.



On 2 nov, 17:53, Tercio  wrote:
> Why don't you override the RemoteServiceServlet?
>
> On Nov 1, 12:05 pm,JuDaC wrote:
>
> > Hi folks!
> >    I'd like to know how RPC works, but I do not want to know about the
> > proxy created and that abstraction we can easily found on GWT web
> > page.  I want to know exactly how the resquest is build. how the post
> > message is sent.
>
> >    I was reading to source code and it seems to me that a GWT class
> > read it as a resource stream I saw it on RemoteServiceServlet class on
> > the processPost method, the first thing that this method does is to
> > invoke the readContent method, passing the request as parameter.
>
> >   I would like to listen from you that I'm wrong and that the post
> > info is not read as a resource stream, but as a parameter :)
>
> >   I create a Valve to tomcat and I need to get the GWT post
> > information before it reaches the GWT servlet. but the thing is that
> > if it comes as an stream I can not do that. thats bad! :(
> > I'm afraid that if I do that the GWT servlet won't work (I wish I were
> > wrong here again).
>
> >   Thanks a lot folks!!!
> >   Best Regards
> >   JDC

-- 
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 and Collections

2010-11-03 Thread Tobias
I now realized that actually setText() is called for the server
Ingredient-entity. But I'm not sure if that helps me, since the Recipe
instance does not know anything about the Ingredient-instance on which
that happens. But I guess that's more an Objectify-problem then. Maybe
I'll switch to JDO for now.

Thanks anyway,
Tobias

On Nov 3, 8:05 pm, Tobias  wrote:
> David,
>
> Thanks for your reply. So the RequestFactory calls persist on my
> server-entity, because I call "persist" on the Request-object. In this
> case though, I don't understand why RequestFactory transmits the whole
> object-graph and what happens to it on the server?
> Can you elaborate on how I could implement the children's update in
> the parent entity's persist method?
>
> Thanks,
> Tobias
>
> On Nov 3, 7:54 pm, David Chandler  wrote:
>
>
>
>
>
>
>
> > Tobias,
>
> > RequestFactory doesn't do cascading updates or deletes. You'll have to
> > make a separate call from the client to do this (or possibly you could
> > implement in the parent entity's persist() method). By the way,
> > persist() is just an example method name. As far as RequestFactory is
> > concerned, it's just another service method that you create.
>
> > HTH,
> > /dmc
>
> > On Wed, Nov 3, 2010 at 12:09 PM, Tobias  wrote:
> > > Hi,
>
> > > I am working on an example application to learn about RequestFactory
> > > and the new Editor framework. The idea is to edit a Recipe, which has
> > > multiple ingredients. The ingredients are displayed in CellTable. This
> > > still involves a couple of problems (e.g.,
> > >http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
> > > ), but I got it working to the point, where the Request seems to be
> > > correcty set up and contains the edited RecipeProxy as well as
> > > multiple IngredientProxy instances.
>
> > > When I edit a direct property of the Recipe, eg the name (String), on
> > > the server Recipe.persist() is called and I can save the updated
> > > object easily (I am using Objectify for this).
>
> > > However, when I am editing a String property "text" on one of the
> > > Ingredients, Ingredient.persist is NOT called for the edited
> > > instance.
>
> > > I looked at the raw JSON of the request made, and it seems to include
> > > the updated Ingredient instance. Unfortunately, the DynatableRf and
> > > the Expenses examples don't deal with n-ary relationships on the
> > > entities. How is this done? Are there any more naming conventions for
> > > handling collections?
>
> > > My proxy interfaces currently look like this:
>
> > > @ProxyFor(Ingredient.class)
> > > public interface IngredientProxy extends EntityProxy {
>
> > >        String getId();
>
> > >        String getText();
>
> > >        void setText(String text);
>
> > >       �...@override
> > >        EntityProxyId stableId();
>
> > > }
>
> > > @ProxyFor(Recipe.class)
> > > public interface RecipeProxy extends EntityProxy {
>
> > >        long getId();
>
> > >        String getName();
>
> > >        void setName(String name);
>
> > >       �...@override
> > >        EntityProxyId stableId();
>
> > >        List getIngredients();
>
> > >        void setIngredients(List ingredients);
> > > }
>
> > > 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 
> > > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > David Chandler
> > Developer Programs Engineer, Google Web 
> > Toolkithttp://googlewebtoolkit.blogspot.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-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.



Problems while upgrading a GWT maven project from GWT 2.1 SNAPSHOT to GWT 2.1.0 final release

2010-11-03 Thread vsdev
I tried to upgrade a working GWT maven project from GWT 2.1 SNAPSHOT
to the GWT 2.1.0 final release. That is, I changed the GWT version in
the pom.xml from 2.1-SNAPSHOT to 2.1.0.

After doing that, I got the following error during the maven build
(mvn install):
[INFO] Unable to find resource 'com.google.gwt:gwt-soyc-vis:jar:2.1.0'
in repository central (http://central)

Then I read that upgrading the version of the gwt-maven-plugin in the
pom.xml from 1.3.1.google to 1.3.2.google should fix this problem. As
I didn't find a public maven repository containing the corresponding
artefacts I downloaded the jar manually from
http://google-web-toolkit.googlecode.com/svn/2.1.0/gwt/maven/org/codehaus/mojo/gwt-maven-plugin/1.3.2.google/
and installed it in my local maven repository. But now I get another
error
during the maven build:

[INFO] Internal error in the plugin manager executing goal
'org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:compile': Unable to
load the mojo 'org.codehaus.mojo:gwt-maven-plugin:
1.3.2.google:compile' in the plugin 'org.codehaus.mojo:gwt-maven-
plugin'. A required class is missing: org/codehaus/plexus/util/xml/
XmlStreamReader org.codehaus.plexus.util.xml.XmlStreamReader

What do I wrong? Could you give me a short tutorial how to upgrade a
GWT maven project from GWT 2.1 SNAPSHOT to GWT 2.1.0 final release?

-- 
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: Database data and GWT applications

2010-11-03 Thread Chad
Owen,

Everyone is responding with, yes you can use GAE as your datastore and
you can. But you don't have to. Every app I've developed with GWT is a
database driven application and I've not used GAE for any of them.
I've used SQL Server for some and MySQL for others and Tomcat for all
of them. All of your database communication happens on the server
side. Once there, you simply use whatever server side language you
want to communicate to the database however you want. I suspect you
will be using Java on the server (which is what I use). You can run
your app locally launching the embedded server from Eclipse. You run
the app in a browser of your choice. You will be prompted to download
and install a browser plug-in for the debugging. When you want to
deploy, simply compile, war the war folder and copy it to your Tomcat
webapps folder. Done.

HTH,
Chad Bourque
www.milamade.com

On Nov 3, 12:20 pm, OS  wrote:
> Hello,
>
> This is my first posting here so I'm sorry if all this has been
> covered before.
>
> I've come to GWT from a J2EE background. I though GWT would be a great
> way of combining data mining at the backend with a nice UI at the
> front. However, I've fallen over at the first hurdle. Apparently GWT
> will not permit database connections with the Google App Engine. Ok,
> that's pants, but I'll move over to TomCat. But this is not as easy as
> it sounds either. There is no Deploy action available and I'm not a
> server admin. The instructions I've found on the web appear complex
> and to top it all it seems I'm going to loose debugging features.
>
> Have I missed the point about GWT? is it not really intended for
> database driven applications?! What exactly is it for? After all, the
> database and server root are on the same Intranet server and security
> is pretty tight. Is it that the GAE is just not up to the job right
> now but it will be coming.
>
> Is there an easy way of using TomCat and keeping the debugging
> ability? I can deploy the application / WAR to TomCat but I can't even
> figure out how to get the GWT Eclipse plugin to launch it from the new
> server, let alone debug the application!
>
> If Eclipse won't do this then I might as well go back to doing this
> long hand in NetBeans!!
>
> Help
>
> Thanks,
> Owen

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



Application works in devlopment mode but not in war file

2010-11-03 Thread Deepak Singh
Hi,

My application works well in development mode but when war file is deployed
in tomcat 5.5, it fails at the time of rpc call with following error

Uncaught com.google.gwt.event.shared.UmbrellaException: One or more
exceptions caught, see full set in UmbrellaException#getCauses

Any idea pls. I am using GWT 2.1 with Spring 3.0

-- 
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: Problems while upgrading a GWT maven project from GWT 2.1 SNAPSHOT to GWT 2.1.0 final release

2010-11-03 Thread David Chandler
Hi vsdev,

I think you're the 3rd person to run into the plexus error on the
list. As far as I know, starting with a fresh local maven repo
resolves it.

Please post back with your progress.

/dmc

On Wed, Nov 3, 2010 at 4:27 PM, vsdev  wrote:
> I tried to upgrade a working GWT maven project from GWT 2.1 SNAPSHOT
> to the GWT 2.1.0 final release. That is, I changed the GWT version in
> the pom.xml from 2.1-SNAPSHOT to 2.1.0.
>
> After doing that, I got the following error during the maven build
> (mvn install):
> [INFO] Unable to find resource 'com.google.gwt:gwt-soyc-vis:jar:2.1.0'
> in repository central (http://central)
>
> Then I read that upgrading the version of the gwt-maven-plugin in the
> pom.xml from 1.3.1.google to 1.3.2.google should fix this problem. As
> I didn't find a public maven repository containing the corresponding
> artefacts I downloaded the jar manually from
> http://google-web-toolkit.googlecode.com/svn/2.1.0/gwt/maven/org/codehaus/mojo/gwt-maven-plugin/1.3.2.google/
> and installed it in my local maven repository. But now I get another
> error
> during the maven build:
>
> [INFO] Internal error in the plugin manager executing goal
> 'org.codehaus.mojo:gwt-maven-plugin:1.3.2.google:compile': Unable to
> load the mojo 'org.codehaus.mojo:gwt-maven-plugin:
> 1.3.2.google:compile' in the plugin 'org.codehaus.mojo:gwt-maven-
> plugin'. A required class is missing: org/codehaus/plexus/util/xml/
> XmlStreamReader org.codehaus.plexus.util.xml.XmlStreamReader
>
> What do I wrong? Could you give me a short tutorial how to upgrade a
> GWT maven project from GWT 2.1 SNAPSHOT to GWT 2.1.0 final release?
>
> --
> 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.
>
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.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-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.



event opening a window with GWT.

2010-11-03 Thread everton_verbo
I´m trying to display a message in mi system when the session expires.
For this, i want to use an event when show the page, like a gmail. If
you using gtalk in gmail and switch the tab, gtalk show your status
busy or absent. I want to know what event gmail use to set the status
in gtalk.

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



plug in problem

2010-11-03 Thread babai
hi i am babai ,i am  new in GWT ,i  have  problem showing  team
structure in tree format ,data is coming from database in HashMap .I
have tried   some sample code but it was not working properly.so plz
give some full coded example

-- 
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: how to create a new field "username" in spring roo generated entities

2010-11-03 Thread Arash
+1

authentication and authorization is certainly a crucial requirement
for any application. Since integrated with Roo already It would be
very nice if we could have a working example of Spring Security 3
authentication utilizing User and UserDetails implementations.
Something like the following entity that implements the following
methods:

@Entity
@Table(name = "app_user")
public class User extends Person implements UserDetails {

GrantedAuthority[] getAuthorities();
String getPassword();
String getUsername();
boolean isAccountNonExpired();
boolean isAccountNonLocked();
boolean isCredentialsNonExpired();
boolean isEnabled();

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



Correct usage of CompositeEditor?

2010-11-03 Thread billy
After watching gwt 2.1 release doc, I am exciting to try out editor
framework and the request factory.
Currently I had already successfully retieve of a eventProxy from my
mongodb using requestFactory.I am trying to glue the eventProxy to the
editor framework.
I follow the MVP idea which the presenter would tranfer the eventProxy
to the view layer for editing so my view is now implementing
Editor
Since my eventProxy contain lots of property, which a single class
would be too large, I wish to logically divide the eventProxy into
three part like (name1,name2,name3), (time1,time2,time3) ,
(location1,location2,location3).
I had follow design at hand

class eventPresenter   // (injected 1 viewEditor)

class eventView  extends Editor  // (injected 1
namesEditor, 1 timesEditor,injected 1 locationsEditor)

class namesEditor extends Composite implements Editor

class timesEditor extends Composite implements  Editor

class locationsEditor extends Composite implements Editor


currently the eventPrenter contain the driver code like

interface Driver extends
RequestFactoryEditorDriver

should my view implemnts CompositeEditor or
Editor
how can I link up the sub-editor nameEditor,timeEditor,locationEditor
with the eventEvent


or i should make three driver code in the presenter layer? like
interface Driver extends RequestFactoryEditorDriver
interface Driver extends RequestFactoryEditorDriver
interface Driver extends RequestFactoryEditorDriver

Thanks for any hint

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



External js file inclusions for specific permutations only?

2010-11-03 Thread mstahv
Hi,

If have recently played with several nice libraries that would help to
broaden browser support for modern web technologies. These include web-
socket-js, svgweb and swfupload.

To make a decent GWT module around them there is often a problem how
to include JS file that is doing all the magic. The easiest way is to
use a script tag in module description file. Things usually work fine
this way, but I really wouldn't like to punish good browsers like
Safari and Chrome. For example a solid SVG support is possible without
svgweb for most browsers without the Neuberg's great library, but I'd
want to include it only for IE. The same goes for my latest project
http://vaadin.com/addon/dontpush ( provides WebSocket support for
Vaadin and plain GWT too).

So the question is, is it possible to include external javascript only
for specific browser permutations? If not, are there any plans for
such a feature? I'd guess it would be easy to implement.

If this is not currently possible, does someone have an alternative
solution for this? Those libraries are often built so that they rely
on unload event and expect to be attached to head. Injecting those
libraries on runtime via e.g. IE widget implementation, is therefore
sometimes impossible. I would not also like to add requirement to
modify host page headers  (and conditionally to browser ua string) GWt
modules.

cheers,
matti

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



WebSockets with GWT

2010-11-03 Thread mstahv
Hi,

I played with WebSockets and GWT (Vaadin to be more specific) last
weekend. I found two projects that had built GWT wrappers for the
emerging protocol, but the one I tried didn't work with hosted mode
and the other was way too complex for my needs.

I built the module so that it also includes web-socket-js library
providing support for IE's and other old browsers. So in case somebody
needs a simple JS overlay for WebSocket, feel free to try this:

http://vaadin.com/addon/dontpush

Any suggestions and contributions are welcome.

cheers,
matti

-- 
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+Roo a few days later

2010-11-03 Thread Amir Kashani
I've been playing with Roo & GWT for a couple of days now, which
certainly doesn't make me an expert, but I'd like to share my
experience and see how it compares with others.

The application that I'm trying to create has about 8 entities that
require a CRUD like interface. The rest of the application requires a
more specific (non-CRUD) UI. My hope was that Roo would help generate
the CRUD portions, just allowing for some basic customizations, and
let me handle the rest. So far, I seem to be fighting it more than
it's helped. Some examples:

- You can't modify the generated ui.xml files -- Roo will simply
clobber them as soon as it makes the next change for that entity. For
example, I don't want to list the ID field in the list view, but I
don't see a way to remove it. There's a JIRA open about this, that was
deferred to post 1.1.0 (ROO-937).

- New dynamic finders don't seem to be added to the respective Request
interface. Further, and this may be a Roo thing, they return
TypedQuery rather than a List or the entity, which I don't imagine the
RequestFactory framework can handle. There's another JIRA than covers
this, I believe (ROO-1595)

- Adding custom finders doesn't work, because again, Roo will clobber
the Request interface. I tried removing the @RooGwtMirroredFrom
annotation from the Request, but Roo just readied it for me. Probably
under the previous JIRA.

Lastly, the documentation is atrocious. The Roo reference guide only
mentions GWT in its appendix of commands, and other guides only go as
far as a simple "gwt setup". There's no mention of the expectations,
limitations, guide to customization, or anything else. I've seen
several, yet unanswered posts on the Roo forum about customization, so
I imagine I'm not alone here.

I've been a very loyal GWT user since 1.3, and I'm very pleased with
the ongoing progress, including the gamut of features introduced in
2.1, so I hope nobody takes this as GWT bashing. However, unless I'm
really missing something, the implementation of Roo+GWT falls far
short of the hype it's received since I/O. In the current form, it
makes for a very impressive demo: type a few commands and a full
functioning database editor pops out. But as soon as you try to do
anything outside of what's generated, it's very hard, if not
impossible.

So, it's only been a few days since final release, but what do other
people think? Is anyone having better luck?

Thanks.

- Amir

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



Testing complex Widgets without interface ?

2010-11-03 Thread Ed
I like to know how others test their logica in complex widgets.

Example: I have a Form and FormField widget and the both extend from
Composite.
They contain logic that I would love to test in a unit test which is
hard.

Of course I could split this up in a MVP pattern, but that isn't very
elegant on widget level and too cumbersome in this case.

So this makes testing very hard... and it can only be done through the
slow GWTTestCase JUnit mechanism.
If I would have a Widget interface, I could easily mock the Form and
FormField with a test implementation containing the logic that I want
to test.

I am now considering these widgets to NOT extends from Composite
anymore such that I can create them in a not-gwt environment and test
them properly.
I then let Form and FormField implement HasAWidget interface that
contains a method Widget asWidget(), in case you want the associated
widget from Form and FormField..
It's an OK solution, but still a workaround because we don't have a
Widget interface.

I am suprised that not many people talk about this problem in the
community so maybe I am just missing something :(
I noticed this issue: 5275, that is similar:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5275

How do you do this?

-- 
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: Application works in devlopment mode but not in war file

2010-11-03 Thread David Chandler
Hi Deepak,

Please post the stack trace from the server.

Thanks,
/dmc

On Wed, Nov 3, 2010 at 4:33 PM, Deepak Singh  wrote:
> Hi,
> My application works well in development mode but when war file is deployed
> in tomcat 5.5, it fails at the time of rpc call with following error
> Uncaught com.google.gwt.event.shared.UmbrellaException: One or more
> exceptions caught, see full set in UmbrellaException#getCauses
> Any idea pls. I am using GWT 2.1 with Spring 3.0
>
> --
> 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.
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.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-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: Testing complex Widgets without interface ?

2010-11-03 Thread Stephen Haberman

> It's an OK solution, but still a workaround because we don't have a
> Widget interface.

GWT 2.1 does have an IsWidget interface, if that is all that you need:

http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/app/place/IsWidget.html

If you need more, I've been making interfaces for each widget:

https://github.com/stephenh/gwt-mpv/tree/master/user/src/main/java/org/gwtmpv/widgets

They work great for my purposes, e.g. I can do:

IsTextBox t = newTextBox(); // will be real text box or stub text box
t.getStyle().setColor("blue");

And in a non-GWT unit test, use the stub widget/stub style to:

assertThat(t.getStyle().getColor(), is("blue"));

(Also, I commented on the bug you mentioned--I hadn't seen that before.
Thanks for the link.)

- Stephen


-- 
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: Images in buttons

2010-11-03 Thread David Cox
Thanks pete!

Your solution is great and simple, and i worked that out too, but I
havn't tested if you can still size the image after it has been
attached to the button. Would be very interesting to try that some
time.
Also, it didn't work for me when i tried to declare all the widgets in
the entry point part of the class.
Actually, i gave it a few hours and got exactly what i wanted.

What i did was solve the floating issue first, then the image size
issue fell in place pretty easily.
I wanted to have was buttons with semi-transparent images over the top
of another image.
Like a left arrow on the left and a right arrow on the right.
I found some tutorials on how to add CSS fixed headers and footers and
then applied the principals to left and right.

Then i noticed the z-index function, so i just did the same with an
image widget and just put it under the button.

The result is that its all done with CSS.

/* left and right button placement */
/* scaleing and floating */
.mainleftbutton, .mainrightbutton {
clear: both;
 position: relative;
 width: 3em;
 height: 3em;
 margin-top:240px;
}

/* left, right difference */
.mainleftbutton { margin-right: -3em; }
.mainrightbutton { margin-left: -3em; }

/* places button over the image */
img.mainrightbutton, img.mainleftbutton { z-index: 9; }
div.mainrightbutton, div.mainleftbutton { z-index: 10; }

Then you just add these styles to both the images and the buttons and
they pick up the width,heights and placements independantly!
  LeftButton.setStyleName("mainleftbutton");
  LeftArrow.setStyleName("mainleftbutton");
  RightArrow.setStyleName("mainrightbutton");
  RightButton.setStyleName("mainrightbutton");

Very happy.
Thanks for your advice about the loading times too, need to keep that
in mind.

/David

On Nov 3, 5:51 pm, pete  wrote:
> As far as I remembered, I instinctively tried to resize the image that
> is assigned to the button and that worked...
>
> I.e. Image image = new Image(source);
> image.setWidth("100px");
> image.setHeight("50px");
> PushButton button = new PushButton(image);
>
> I think if your image is really huge and only used for the button, it
> is indeed smarter though, to make a smaller copy and resize that,
> since if you let the browser resize, it still needs to load the full
> image from the server (if I'm not mistaken...)
>
> I don't understand what exactly you mean by "button floating over the
> image" though, so I can't give you any tip about that...
>
> Greetz
>
> On Nov 2, 10:33 pm,DavidCox wrote:
>
> > Hi everyone
>
> > I thought I would pick up gwt and play around with trying to make some
> > pretty standard stuff. But, I have been bashing my head on this one
> > for a bit.
>
> > I have a horizontal layout with [button - image - button] and have
> > managed to make the buttons cycle through a number of images.
> > Now I want to pretty up the buttons by making them into images of
> > arrows. This is fine using code like:
>
> > private PushButton LeftButton = new PushButton(new Image("images/gui/
> > left.png"));
> > or
> > LeftButton.setStyleName("mainleftbutton"); and then doing it in CSS.
>
> > However, my arrow pictures are huge and (while i could make many
> > copies with photoshop) what I would really like to do is be able to
> > code it so that the button (and image) is scaled to a specific width.
> > ie: like 100px high.
>
> > I guess the end goal here, would eventually have the buttons floating
> > over the image, but i suppose that is a long way off for me.
>
> > Any suggestions?
> >David

-- 
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: how to create a new field "username" in spring roo generated entities

2010-11-03 Thread Flan Brody
+1

Integrate GWT and Spring Security 3 with Roo

On Wed, Nov 3, 2010 at 11:44 AM, Arash  wrote:

> +1
>
> authentication and authorization is certainly a crucial requirement
> for any application. Since integrated with Roo already It would be
> very nice if we could have a working example of Spring Security 3
> authentication utilizing User and UserDetails implementations.
> Something like the following entity that implements the following
> methods:
>
> @Entity
> @Table(name = "app_user")
> public class User extends Person implements UserDetails {
>
>GrantedAuthority[] getAuthorities();
>String getPassword();
>String getUsername();
>boolean isAccountNonExpired();
>boolean isAccountNonLocked();
>boolean isCredentialsNonExpired();
>boolean isEnabled();
>
> --
> 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.
>
>

-- 
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: Testing complex Widgets without interface ?

2010-11-03 Thread Thomas Broyer


On 3 nov, 22:39, Ed  wrote:
> I like to know how others test their logica in complex widgets.
>
> Example: I have a Form and FormField widget and the both extend from
> Composite.
> They contain logic that I would love to test in a unit test which is
> hard.
>
> Of course I could split this up in a MVP pattern, but that isn't very
> elegant on widget level and too cumbersome in this case.
>
> So this makes testing very hard... and it can only be done through the
> slow GWTTestCase JUnit mechanism.
> If I would have a Widget interface, I could easily mock the Form and
> FormField with a test implementation containing the logic that I want
> to test.
>
> I am now considering these widgets to NOT extends from Composite
> anymore such that I can create them in a not-gwt environment and test
> them properly.
> I then let Form and FormField implement HasAWidget interface that
> contains a method Widget asWidget(), in case you want the associated
> widget from Form and FormField..
> It's an OK solution, but still a workaround because we don't have a
> Widget interface.
>
> I am suprised that not many people talk about this problem in the
> community so maybe I am just missing something :(
> I noticed this issue: 5275, that is similar:
> http://code.google.com/p/google-web-toolkit/issues/detail?id=5275
>
> How do you do this?

See my answer in the issue tracker; in brief, move from a "Passive
View" pattern to a "Supervising Controller" pattern and you'll no
longer see "widgets" in your presenter.

-- 
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: Testing complex Widgets without interface ?

2010-11-03 Thread Thomas Broyer


On 4 nov, 00:58, Thomas Broyer  wrote:
> On 3 nov, 22:39, Ed  wrote:
>
> > I like to know how others test their logica in complex widgets.
>
> > Example: I have a Form and FormField widget and the both extend from
> > Composite.
> > They contain logic that I would love to test in a unit test which is
> > hard.
>
> > Of course I could split this up in a MVP pattern, but that isn't very
> > elegant on widget level and too cumbersome in this case.
>
> > So this makes testing very hard... and it can only be done through the
> > slow GWTTestCase JUnit mechanism.
> > If I would have a Widget interface, I could easily mock the Form and
> > FormField with a test implementation containing the logic that I want
> > to test.
>
> > I am now considering these widgets to NOT extends from Composite
> > anymore such that I can create them in a not-gwt environment and test
> > them properly.
> > I then let Form and FormField implement HasAWidget interface that
> > contains a method Widget asWidget(), in case you want the associated
> > widget from Form and FormField..
> > It's an OK solution, but still a workaround because we don't have a
> > Widget interface.
>
> > I am suprised that not many people talk about this problem in the
> > community so maybe I am just missing something :(
> > I noticed this issue: 5275, that is similar:
> >http://code.google.com/p/google-web-toolkit/issues/detail?id=5275
>
> > How do you do this?
>
> See my answer in the issue tracker; in brief, move from a "Passive
> View" pattern to a "Supervising Controller" pattern and you'll no
> longer see "widgets" in your presenter.

Oops, sorry, I read your post too fast and missed the point: you want
to test widgets, not an "MVP component".
Have a look at the Cell widgets' internals, they use MVP internally so
the presenter can be tested independently from the views.

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



override method then calling super yields infinite loop

2010-11-03 Thread A. Stevko
Has anyone else seen this situation happen to them?

I've got a class that extends PopupPanel and overrides the show() method.

class MyPopup extends PopupPanel {

 

/**
 * @see com.google.gwt.user.client.ui.PopupPanel#show()
 */
@Override
public void show() {
Log.info( this.getClass().getName() + ".show()" );
/*** custom initialization done here ***/
super.show();
}

}

When I create an instance and call show, it goes into an infinite loop.
Walking the code in the debugger shows super.show() calling MyPopup.show()
rather than PopupPanel.show()

I'm using GWT 2.0.4

-- 
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: Nested Views in MVP

2010-11-03 Thread Nicolas Antoniazzi
>
> Thanks for your comments. Do you mind sharing with us what would go in

the Presenter interface to allow you to "fully use" MVP? We're very

much open to ideas from the community as to how to make it work

better.


Well, in my opinion, it would be clearer to create 2 new interfaces :
1) a "Presenter" interface that contains
- start(ForIsWidget container)
- onStop()

then, Activity interface could extends Presenter and add mayStop()...

It would clarify that we can insert nested presenter into activity without
adding activity into activity since it is not really the same concept in my
opinion.

2) Then, create an interface called "View" that
contains
- setPresenter(T presenter)

they could be implemented by Composite or UiObject.

Maybe that it sounds a bit unecessary to you, but I think that it would
clarify things between Activities and Presenter/View just with those 2 new
interfaces.

 Activities are more tied to the concept of Places than of MVP, i.e.

navigation and user experience rather than code structure ("developer

experience"). Does that make things clearer?


Yes, it is clearer. Thanks Thomas.

Thanks for all your great work on GWT.

Nicolas.

-- 
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: Testing complex Widgets without interface ?

2010-11-03 Thread Ed
Thanks Thomas, now worries, I understand you point/advice,
I wasn't aware of the WhyWidgetIsAClass article which is very helpful.
I just commented on it as well. I would love to hear your advice on
that?
http://code.google.com/p/google-web-toolkit/wiki/WhyWidgetIsAClass



-- 
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: How RPC works on GWT?

2010-11-03 Thread Thomas Broyer


On 3 nov, 20:24, JuDaC  wrote:
> Tercio, had made that.
>
> GWT do read the post body using InputStream. What I do is to make this
> read before, in my valve, and put this content on the parameters. On
> the RemoteServiceServlet I had to override the method readContent, so
> I can get the value from the parameter and not from
> "RPCServletUtils.readContentAsUtf8(request, true);"
>
> I was wondering if exist a different way to get that, but not (I
> didn't find a different way :( ).

If keeping the content in memory really isn't an issue for you (for
GWT-RPC it shouldn't, but if your valve is also "triggered" for, say,
file uploads, ouch!) the you could just read the request's payload
into a memory buffer and pass an InputStream on that buffer down the
chain. I don't know how it's done in Tomcat valves, but it works
pretty well with servlet filters (when "chaining", pass a wrapper on
the request that overrides the getInputStream and related methods).
Of course, you can apply the same recipe and read into a temporary
file instead of a memory buffer; there's code that do this (not
invoked in a filter, but it should work the same) here:
http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/remote-api/source/java/org/alfresco/repo/webdav/WebDAVMethod.java
(search for HttpServletRequestWrapper)

-- 
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: Testing complex Widgets without interface ?

2010-11-03 Thread Ed
I am looking in the Cell Widgets, but can't find what you mean.
Can you give me some more details like a specific Cell Widget and his
internal presenter ?

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



Does SimplePager have to be subclassed in order for the last page button to work?

2010-11-03 Thread Jeff Schwartz
I am using a SimplePager but the last page button is never enabled. I didn't
subclass SimplePager. Doe it need to be? Thanks in advance.

Jeff

-- 
Jeff

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



Extend GOverlay from the Maps API

2010-11-03 Thread Patrick Tucker
Is it possible to write a GWT JavaScriptObject that extends GOverlay
from the Google Maps API?

I don't have the luxury of using any of the GWT wrappers that are out
there because none of them are compatible with the GFusionMap object
from the enterprise version of the API.  If this statement is not
correct please enlighten me, I would be excited to hear otherwise.

Thanks,
Pat

-- 
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: Serializing Enum with Marker Interface

2010-11-03 Thread Patrick Tucker
Is the package or any parent package of the interface included in your
project's xml file so that GWT can find it?

On Nov 1, 2:57 pm, Mike  wrote:
> If I move the interface into the Enum's package, the GWT compiler
> appears happy.
>
> Opened an 
> issue:http://code.google.com/p/google-web-toolkit/issues/detail?id=5520
>
> Thanks!
> Mike
>
> On Oct 30, 2:59 am, Didier DURAND  wrote:
>
>
>
>
>
>
>
> > Hi Mike,
>
> > Probably an issue in the location of the various classes: can you tell
> > us the packages that they belong to ?
>
> > didier
>
> > On Oct 29, 11:23 pm, Mike  wrote:
>
> > > I tried changing the line to:
>
> > > public enum Color implements IsConfigurable, Serializable
>
> > > and I'm still getting the same compile error.
>
> > > Thanks!
> > > Mike
>
> > > On Oct 29, 3:57 pm, Patrick Tucker  wrote:
>
> > > > The enum itself can implement Serializable
>
> > > > On Oct 29, 2:41 pm, Mike  wrote:
>
> > > > > How can I make an enum that implements a marker interface serializable
> > > > > in GWT 2.0?
>
> > > > > The below example:
>
> > > > > public interface IsConfigurable
> > > > > {
>
> > > > > }
>
> > > > > public enum Color implements IsConfigurable
> > > > > {
> > > > >     BLUE,
> > > > >     RED;
>
> > > > > }
>
> > > > > Results in the following:
> > > > >      [java] Compiling module com.colors
> > > > >      [java]    Validating newly compiled units
> > > > >      [java]       [ERROR] Errors in 'file:...Color.java'
> > > > >      [java]          [ERROR] Line 7: The import ...IsConfigurable
> > > > > cannot be resolved
> > > > >      [java]          [ERROR] Line 12: IsConfigurable cannot be
> > > > > resolved to a type
> > > > >      [java]    Compiling 6 permutations
> > > > > ...
>
> > > > > Thanks!
> > > > > Mike

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

2010-11-03 Thread aces2805
Hi Guys,

I have some problems in the integration of google visualization
and GWT, need some references and examples.
Hoping for your kind help.


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: Nested Views in MVP

2010-11-03 Thread David Chandler
Thanks for your thoughts, Nicolas. I believe the reason we've not
created View and Presenter interfaces to date is because there are two
different styles of MVP widely in use, only one of which allows the
view to call the presenter as in your example. Which leaves us in the
funny position that the new MVP framework is missing *formal*
definitions of View and Presenter. Personally, I think it's a good
thing that GWT Activities and Places are independent of views and
presenters so as not to force you into one model. I think View and
Presenter as you've described would fall in the category of things
that are not quite core code, but are nevertheless useful abstractions
that probably need a home in the GWT source somewhere for reference.
We'll chew on this a bit for 2.1.1...

/dmc

On Wed, Nov 3, 2010 at 8:06 PM, Nicolas Antoniazzi
 wrote:
>> Thanks for your comments. Do you mind sharing with us what would go in
>>
>> the Presenter interface to allow you to "fully use" MVP? We're very
>>
>> much open to ideas from the community as to how to make it work
>>
>> better.
>
> Well, in my opinion, it would be clearer to create 2 new interfaces :
> 1) a "Presenter" interface that contains
> - start(ForIsWidget container)
> - onStop()
> then, Activity interface could extends Presenter and add mayStop()...
> It would clarify that we can insert nested presenter into activity without
> adding activity into activity since it is not really the same concept in my
> opinion.
> 2) Then, create an interface called "View" that
> contains
> - setPresenter(T presenter)
> they could be implemented by Composite or UiObject.
> Maybe that it sounds a bit unecessary to you, but I think that it would
> clarify things between Activities and Presenter/View just with those 2 new
> interfaces.
>>
>> Activities are more tied to the concept of Places than of MVP, i.e.
>>
>> navigation and user experience rather than code structure ("developer
>>
>> experience"). Does that make things clearer?
>
> Yes, it is clearer. Thanks Thomas.
> Thanks for all your great work on GWT.
> Nicolas.
>
> --
> 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.
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.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-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: UiBinder fails after upgrading to gwt 2.1.0

2010-11-03 Thread Richard Berger
OK, this won't help much, but... I was having the same problem just
going through some basic tutorial using UiBinder and GWT 2.1.  So, I
redid everything, writing down each step - and, of course, the problem
vanished.

So, there exists the possibility that 2.1 and UiBinder do actually
work together.

I can only offer the truly lame suggestion of restarting Eclipse to
clean up any old invocations of the dev server.

Good luck,
RB

On Nov 3, 8:34 am, pgraham  wrote:
> Update:
>
> I have commented out all code in the two files listed above so that
> they are as follows:
>
> MainMenu.ui.xml:
>
>      xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> 
>
> MainMenu.java:
>
> public class MainMenu extends Composite {
>
>     interface Binder extends UiBinder {}
>
>     private static Binder uiBinder = GWT.create(Binder.class);
>
>     public MainMenu() {
>         initWidget(uiBinder.createAndBindUi(this));
>     }
>
> }
>
> When I do this I get the same error so it is not related to the
> content.
>
> At this point I am thinking that there is a version conflict with
> xerces.  Does anyone know if Dev Mode relies on xerces to parse
> *.ui.xml files and if so which version?
>
> NOTE:  I am using the gwt-maven-plugin to compile the app and it works
> fine if I compile it and deploy it in Tomcat
>
> Thanks,
> Philip
>
> On Nov 2, 1:54 pm, pgraham  wrote:
>
>
>
>
>
>
>
> > MainMenu.ui.xml:
>
> >  >     xmlns:g="urn:import:com.google.gwt.user.client.ui">
>
> >      > type="org.sitebrand.ui.gwt.resources.UiResources.MainMenuCss" />
> >      > type="org.sitebrand.ui.gwt.resources.MainMenuLbls" />
> >      > type="org.sitebrand.gwt.constants.DebugConstants" />
>
> >     
> >          > debugId="{debugIds.menuitem_campaigns}" text="{lbls.campaigns}">
> >             
> >                  >                     text="{lbls.createCampaign}" />
> >                  >                     text="{lbls.viewCampaigns}" />
> >                  >                     text="{lbls.campaignPriority}" />
> >                  >                     text="{lbls.reports}" />
> >             
> >         
>
> >          > debugId="{debugIds.menuitem_content}" text="{lbls.content}">
> >             
> >                  >                     ui:field="createContent"
> >                     text="{lbls.createContent}" />
> >                  >                     ui:field="viewContent"
> >                     text="{lbls.viewContent}" />
> >                  >                     ui:field="integrate"
> >                     text="{lbls.integrate}" />
> >             
> >         
>
> >          > debugId="{debugIds.menuitem_segments}" text="{lbls.segments}">
> >             
> >                  >                     ui:field="createSegment"
> >                     text="{lbls.createSegment}" />
> >                  >                     ui:field="viewSegments"
> >                     text="{lbls.viewSegments}" />
> >             
> >         
>
> >          > debugId="{debugIds.menuitem_layout}" text="{lbls.layout}">
> >             
> >                  >                     ui:field="addTemplate"
> >                     text="{lbls.addTemplate}" />
> >                  >                     ui:field="viewTemplates"
> >                     text="{lbls.viewTemplates}" />
> >             
> >         
>
> >          > debugId="{debugIds.menuitem_account_mgmt}" text="{lbls.account}">
> >             
> >                  >                     ui:field="myAccount"
> >                     text="{lbls.myAccount}" />
> >                  >                     ui:field="organizations"
> >                     text="{lbls.organizations}" />
> >                  >                     ui:field="sites"
> >                     text="{lbls.sites}" />
> >                  >                     ui:field="users"
> >                     text="{lbls.users}" />
> >                  >                     ui:field="globalSettings"
> >                     text="{lbls.globalSettings}" />
> >             
> >         
>
> >          > text="{lbls.help}">
> >             
> >                  >                     ui:field="manual"
> >                     text="{lbls.manual}" />
> >                  >                     ui:field="support"
> >                     text="{lbls.support}" />
> >             
> >         
> >     
>
> > 
>
> > MainMenu.java:
>
> > public class MainMenu extends Composite {
>
> >     /*
> >      *
> > =
> >      * UiBinder
> >      *
> > =
> >      */
>
> >     interface Binder extends UiBinder {}
>
> >     private static Binder uiBinder = GWT.create(Binder.class);
>
> >     static {
> >         getCss().ensureInjected();
> >     }
>
> >     @UiFactory
> >     public static MainMenuCss getCss() {
> >         return UiResources.INST.mainMenuCss();
> >     }
>
> >     @UiFactory
> >     public sta

life is a game so enjoy

2010-11-03 Thread siva subramanian
http://123maza.com/35/traditional951/

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



  1   2   >