Re: CellTable, how to create a cell with custom listbox

2010-12-03 Thread Efstathios Kalyvas
Thank you very much John for pointing the direction.

I'll do it and share it.

On Fri, Dec 3, 2010 at 11:50 PM, John LaBanca  wrote:

> You can create a Popup containing your list of options (some people have
> used a vertical MenuBar as a list of selectable items).  When the user
> clicks on the Cell, open the Popup.  When they select an option, close it.
>  DatePickerCell is a good example of this technique.
>
> We'll probably include a CustomListBoxCell in a future version of GWT, but
> it isn't on the agenda for GWT 2.2.
>
> Thanks,
> John LaBanca
> jlaba...@google.com
>
>
>
> On Fri, Dec 3, 2010 at 3:24 PM, savilak  wrote:
>
>> Can you please give me a hint on this?
>>
>>
>> On Nov 29, 6:22 pm, savilak  wrote:
>> > I have to create a CellTable with cells that contain ListBoxes.
>> >
>> > The issue is that I want each item of the listbox to contain an Image
>> > and Text!
>> > Standard ListBoxes does not allow us to use images at its items
>> > ( Item 1 ).
>> >
>> > What is the best approach I can follow to implement this?
>> >
>> > Thank you for your time.
>> >
>> > Savilak
>>
>> --
>> 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-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 How to render "different" cell types at a given level ?

2010-12-03 Thread Subhrajyoti Moitra
http://google-web-toolkit.googlecode.com/svn/trunk/user/javadoc/com/google/gwt/examples/cellview/CellTreeExample2.java

see the code for this example. What you describe is implemented in the
example below, with 3 levels, (ie 3 different objects).
HTH.

Thanks,
Subhro.

On Sat, Dec 4, 2010 at 10:34 AM, metalhammer29a wrote:

> How to implement this use case, which is also mentioned in Google
> documentation ?
> "Each node has a Cell of a specific type; usually, all Cells at a
> given level are of the same type, but that isn't required." [1]
>
> I am using GWT CellTree.
> public static class MyFolderTreeModel implements TreeViewModel
>
> @Override
> public  NodeInfo getNodeInfo(T value)
>
> in this method, I check each Node value
>
> if( value instance of Folder)
> //data provider
> //render
>
> return new DefaultNodeInfo(dataProvider, cell);
>
> The problem is, each Folder can contain child "Folders" AND "Files".
> but I can return "only one" from getNodeInfo.
>
> Does anyone know how I can get around this problem ?
>
>
> [1]
> http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html#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.
>
>

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



CellTree How to render "different" cell types at a given level ?

2010-12-03 Thread metalhammer29a
How to implement this use case, which is also mentioned in Google
documentation ?
"Each node has a Cell of a specific type; usually, all Cells at a
given level are of the same type, but that isn't required." [1]

I am using GWT CellTree.
public static class MyFolderTreeModel implements TreeViewModel

@Override
public  NodeInfo getNodeInfo(T value)

in this method, I check each Node value

if( value instance of Folder)
//data provider
//render

return new DefaultNodeInfo(dataProvider, cell);

The problem is, each Folder can contain child "Folders" AND "Files".
but I can return "only one" from getNodeInfo.

Does anyone know how I can get around this problem ?


[1] 
http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html#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.



How do you style td elements in a CellTable?

2010-12-03 Thread James Moore
I'd like to apply styles like the ones in CellTable#renderRowValues,
but based on some conditions of my own.  The current set of a dozen or
so styles looks completely hardcoded in that method; there's no logic
in renderRowValues I see that would let me get in there and apply my
own style in addition to the dozen or so that are there.  Ideally I'd
like renderRowValues to just ask the cell what styles should be
applied to the td - is there a way to do that that I'm missing?

-- 
James Moore
ja...@restphone.com
http://jamesmoorecode.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: Best way to handle Hierarchical structures/queries in GWT + GAE Datastore

2010-12-03 Thread metalhammer29a
forgot to add that my question is mainly toward Recursive entities.
what is the best data structure to use ?
(a Folder, can have Zero or Many Folders, and Zero or Many Documents)

-- 
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: Calling EJB from RPC method

2010-12-03 Thread Gaurav Vaish
Hi,

I am not quite sure what's your EJB configuration and how are the
EJB's being loaded... but to me it seems that in the GWT-Service
method addCustomer you're working with a null pointer.

Note that GWT-RPC (server-side) will not automatically setup the bean.
You'll need to use the JNDI etc in your server code to ensure that the
bean is available.


Disclaimer: I am not an EJB expert. Albeit, I hate them
passionately. ;)


--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.com


On Dec 3, 7:32 pm, "dato.java"  wrote:
> Hello ,
>
> I am developing simple GWT application with EJB 3.0 ,and user Apache
> Maven 3.0 , but my porblem is that when i try to call some ejb method
> from rpc method it fails with error:
>
> 2010-12-03 18:26:34,698 ERROR [org.apache.catalina.core.ContainerBase.
> [jboss.web].[localhost].[/gwt-mvc-ui]] Exception while dispatching
> incoming RPC call
> com.google.gwt.user.server.rpc.UnexpectedException: Service method
> 'public abstract java.lang.String
> david.chokhonelidze.gwt.mvc.ui.client.ApplicationService.addCustomer(java.lang.String)'
> threw an unexpected exception: java.lang.NullPointerException
>         at
> com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
> 378)
>         at
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 581)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
> 207)
>         at
> com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
> 243)
>         at
> com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
> 62)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 290)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
> 206)
>         at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
> 96)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
> 235)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
> 206)
>         at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
> 230)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
> 175)
>         at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:
> 182)
>         at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
> 84)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> 127)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
> 102)
>         at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:
> 157)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
> 109)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
> 262)
>         at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
> 844)
>         at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
>         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
> 446)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.NullPointerException
>         at
> david.chokhonelidze.gwt.mvc.ui.server.ApplicationServiceImpl.addCustomer(ApplicationServiceImpl.java:
> 26)
>         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
> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 562)
>         ... 23 more
>
> I see that it cant inject my ejb, so what is solution?

-- 
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: equals and hashCode methods server and client side

2010-12-03 Thread metalhammer29a
You can use gwt-hashcode-equals, which is  port of HashCodeBuilder and
EqualsBuilder from the Apache Commons project to Google Web Toolkit.

http://code.google.com/p/gwt-hashcode-equals/

your hashCode, equals,  would become a lot more cleaner too.

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



equals and hashCode methods server and client side

2010-12-03 Thread Sydney
Hello,

I organized my project using a standard approach:
src/client
src/server
src/shared

I put my model classes into src/shared because they are used in RPC
calls. In some of them I generated the equals and hashCode methods
using eclipse. Then when I run my app I have an exception about
Float.floatToIntBits() method that does not exist in Float. I
understand why I got this exception because that method is not
supported client side. So I was wondering how I could replace that
method.

Snippet of hashCode(); alpha and beta are defined as float.

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + Float.floatToIntBits(alpha);
result = prime * result + Float.floatToIntBits(beta);
result = prime * result
+ ((timestamp == null) ? 0 : timestamp.hashCode());
return result;
}

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



SuggestBox is overengineered

2010-12-03 Thread George Georgovassilis
So I've been on a webapp of mine that does RPC, Google Maps, MVP, uses
a ton of stock and homebrewn widgets and plenty of other things,
touching most of the GWT API and, like in every other GWT App I've
done so far it also uses SuggestBox. And like in every other GWT App
I've written, I come to battle the usual cross browser compatibility
issues, double events firing, display issues etc [1] that haunt
SuggestBox.

A discouraging look at the SOYC report reveals that a whooping 17% of
the code volume is courtesy of SuggestBox & friends, so I decide to
write a (simpler) version (something like they [2] are doing) which
results in a 15% reduction of the gzipped code.

On a side note: this made me really appreciate the ingenuity of the
original SuggestBox author - there is a myriad of details one needs to
take care of, for instance keeping track of focus/blur events between
the listbox and textbox.


[1]
https://code.google.com/p/google-web-toolkit/issues/list?can=2&q=suggestbox&colspec=ID+Type+Status+Owner+Milestone+Summary+Stars&cells=tiles

[2] http://www.airbnb.com/

[3]

import java.util.ArrayList;
import java.util.List;

import com.google.gwt.core.client.GWT;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.BlurEvent;
import com.google.gwt.event.dom.client.BlurHandler;
import com.google.gwt.event.dom.client.ChangeEvent;
import com.google.gwt.event.dom.client.ChangeHandler;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.FocusEvent;
import com.google.gwt.event.dom.client.FocusHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyDownEvent;
import com.google.gwt.event.dom.client.KeyDownHandler;
import com.google.gwt.event.dom.client.KeyEvent;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.event.dom.client.KeyPressHandler;
import com.google.gwt.event.logical.shared.HasValueChangeHandlers;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.user.client.Timer;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.ListBox;
import com.google.gwt.user.client.ui.SuggestOracle;
import com.google.gwt.user.client.ui.SuggestOracle.Request;
import com.google.gwt.user.client.ui.SuggestOracle.Response;
import com.google.gwt.user.client.ui.SuggestOracle.Suggestion;
import com.google.gwt.user.client.ui.TextBox;

public class SuggestBox extends Composite implements BlurHandler,
KeyDownHandler, ChangeHandler, ClickHandler,
SuggestOracle.Callback, FocusHandler, HasText,
HasValueChangeHandlers {

private TextBox textbox = new TextBox();
private ListBox listOfSuggestions = new ListBox();
private SuggestOracle oracle;
private FlowPanel panel = new FlowPanel();
private Timer timer;
private boolean hasFocus;
private String lastAnnouncedValue = "";

public SuggestBox(SuggestOracle oracle) {
initWidget(panel);
this.oracle = oracle;
panel.add(textbox);
panel.add(listOfSuggestions);
setStyleName("SuggestBox");

listOfSuggestions.setVisibleItemCount(10);
//textbox.addKeyPressHandler(this);
textbox.addKeyDownHandler(this);
textbox.addFocusHandler(this);
listOfSuggestions.addFocusHandler(this);
listOfSuggestions.addChangeHandler(this);
listOfSuggestions.addClickHandler(this);
listOfSuggestions.addBlurHandler(this);
textbox.addBlurHandler(this);
hideListOfSuggestions();
}

private void hideListOfSuggestions() {
listOfSuggestions.removeStyleName("hidden");
listOfSuggestions.addStyleName("hidden");
}

private void showListOfSuggestions() {

listOfSuggestions.getElement().getStyle().setLeft(textbox.getAbsoluteLeft(),
Unit.PX);

listOfSuggestions.getElement().getStyle().setTop(textbox.getAbsoluteTop()
+ textbox.getOffsetHeight(), Unit.PX);
listOfSuggestions.removeStyleName("hidden");
}

private boolean isListOfSuggestionsShowing() {
return !listOfSuggestions.getStyleName().contains("hidden");
}

private void showSuggestions(String text) {
oracle.requestSuggestions(new SuggestOracle.Request(text), 
this);
}

private void showSuggestionsForCurrentText() {
if (timer != null)
timer.cancel();
  

Re: Ship a GWT app as a desktop app with local server?

2010-12-03 Thread nino ekambi
Hello you Adobe AIR will perfectly fit your need. you can use adobe AIR with
GWT without any use of JavaScript using the library here :
http://code.google.com/p/gwt4air/

for any help feel free to contact me

Regards,

Alain

2010/12/3 Brian Reilly 

> As much as I like GWT, I think it might not be the right tool for your
> situation.
>
> Your two use cases are:
>
> * Remote data and compute
> * Local data and compute (unless you meant that desktop use would use
> remote compute, but I don't think so because that would require transmitting
> local data to the server)
>
> While being able to reuse the UI (for both consistency and
> development efficiency) is a good goal, it sounds like your real substance
> is the analysis algorithms. What language are those implemented in?
>
> Assuming you're using Java, you do have some options. A separate desktop
> application is one of them. You could also go with a webapp and use
> something like Jetty on the desktop, like Gaurav suggested. I think that
> would be awkward in desktop mode as you'd have two processes to worry about,
> the jetty server and the browser, which may be tricky to do well and may be
> confusing to users. Plus your access to the local filesystem is going to be
> awkward. You'd probably have to present an upload widget to invoke the
> system file dialog, but then just pass the file path to the locally running
> server for it to open directly (which hopefully it would be able to do...)
>
> You might instead want to look into using Swing, SWT, JavaFX, or Apache
> Pivot. I went to a NEJUG talk about Pivot earlier this year and was pretty
> impressed with it. Some things even reminded me of GWT.
>
> One catch, though... I'm not sure if it's just their demos, but they
> require Java 6, and they don't quite work in-browser on Mac OS X 10.5.
> Supposedly they do work in 10.6, but I haven't upgraded yet so I can't
> confirm. (See
> http://mail-archives.apache.org/mod_mbox/pivot-user/201006.mbox/%3c8d8726ba-54bd-4745-87d1-40d067b34...@mac.com%3efor
>  the response to my question on the Pivot mailing list.)
>
> -Brian
>
> On Fri, Dec 3, 2010 at 1:36 PM, Gaurav Vaish wrote:
>
>> Why not use Jetty (Embeddable, Lightweight Java Servlet Container -
>> cross platform).
>>
>>
>>
>> --
>> Happy Hacking,
>> Gaurav Vaish
>> http://www.mastergaurav.com
>>
>>
>> On Dec 3, 10:09 pm, Brett Thomas  wrote:
>> > Hi all, sort of an off beat question: what's the best cross-platform
>> library
>> > for a local web server, that could effectively make a standard GWT app
>> into
>> > a desktop app? Ideal would be super light weight, and just allow users
>> to
>> > run the app offline, with local data. Language could be Java, C++ or
>> Python.
>> >
>> > If curious about why such a library would be desired, some background at
>> the
>> > end of the email...
>> > Thanks for the help,
>> > Brett
>> >
>> > ***
>> > Background:
>> >
>> > I'm about to build an app for researchers to browse and analyze large
>> > scientific datasets. We want to permit two uses:
>> > -- Web version: users can browse/analyze common public datasets over the
>> web
>> > -- Local version: users can do the same browsing/analysis on their own
>> data
>> > set, *without* transferring the data to the server.
>> >
>> > The plan now is to build a desktop app for this. I'd love to make it a
>> > browser app instead, with GWT as the front end. If we went this route,
>> we'd
>> > have to provide some software download for the local version. Here are
>> the
>> > options I can think of:
>> > 1 -- Local version is a completely separate app. Hope to avoid this so
>> users
>> > get the same interface on web/local.
>> > 2 -- Use Gears (or Adobe Air). Avoided because that would require
>> > transferring server side analysis code to javascript (or Actionscript).
>> > (Right?)
>> > 3 -- Ship an executable that starts a local web server. User views app
>> athttp://localhost:12345/in the browser.
>> > (Any others I'm missing?)
>> >
>> > I am trying to assess the feasability of #3. The ideal workflow of our
>> app
>> > would be:
>> > -- Researcher checks out our site in the browser and tries it out. Likes
>> it,
>> > clicks the "Try this on your own data" button
>> > -- Downloads executable with mystery web server described above :)
>> > -- Double clicks executable and a minor GUI shows up with a "Get
>> started!"
>> > button
>> > -- User clicks, and the app is loaded in the browser
>> athttp://localhost:[whatever
>> > port]/. The app looks the same as it did online with the same
>> functionality,
>> > except the "Select data set" option lists local files...
>>
>> --
>> 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
>

Re: Google's CellTree documentation - CellTreeExample2.java won't compile !

2010-12-03 Thread John LaBanca
We're working on GWT 2.1.1 in the GWT 2.1 release branch:
http://code.google.com/p/google-web-toolkit/source/browse/#svn/releases/2.1

All GWT 2.1.1 features are also available in the trunk.  If you would like
to preview new features, you can checkout the 2.1 release branch or trunk by
following these instructions:
http://code.google.com/webtoolkit/makinggwtbetter.html#workingoncode

Remember that both trunk and the release branch are less stable than an
actual release.  Also, we always upload a release candidate (and sometimes
beta) jars before we release, so you can also preview those jars.

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


On Fri, Dec 3, 2010 at 5:10 PM, metalhammer29a wrote:

> Thank you.
>
> are GWT 2.1.1 features available to the public ?
>
> Would be nice to look at what is going to be added in future releases,
> and be prepared for changes.
>
> I don't think I could find GWT 2.1.1 in the trunk.
>
>
> --
> 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.



Best way to handle Hierarchical structures/queries in GWT + GAE Datastore

2010-12-03 Thread metalhammer29a
I have a Hierarchical structure, similar to Folders/Directories.

I am going to use CellTreeWidget for data presentation.
and planning to use RequestFactory/JDO/Google Data Store /GAE for
persistence/data access.


What is the best way to deal with this situation?

two approaches for the model that I could think of:

Approach #1:
class Folder {
String id;
String name;
Folder parent;
}

or
Approach #2:
class Folder {
String id;
String name;
Folder parent;
List children; // here we are keeping/references to the
children

}

with Approach #1:

Query #1: we Select Folders whose parent is null --> this gives us
the  list of top level folders

now that we have top level folders, every time user selects an item,
we can fetch child folders from the server

Query #2:
user selects a folder --> selects folders whose parent is the selected
folder

my concern is this approach could be slow, as upon each slection, user
has to wait for children (if any) to be fetched.

the alternative is to use Approach #2:

with this, since we are having references to children folders,when
user selects an item,
we already have its children. somehow like being one step ahead from
the user.


or better yet,
is is possible to issue Hierarchical Queries on App Engine datastore ?
so that with one single query, we can get multiple levels deep into
the tree structure ?


-- 
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: Google's CellTree documentation - CellTreeExample2.java won't compile !

2010-12-03 Thread metalhammer29a
Thank you.

are GWT 2.1.1 features available to the public ?

Would be nice to look at what is going to be added in future releases,
and be prepared for changes.

I don't think I could find GWT 2.1.1 in the trunk.


-- 
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, how to create a cell with custom listbox

2010-12-03 Thread John LaBanca
You can create a Popup containing your list of options (some people have
used a vertical MenuBar as a list of selectable items).  When the user
clicks on the Cell, open the Popup.  When they select an option, close it.
 DatePickerCell is a good example of this technique.

We'll probably include a CustomListBoxCell in a future version of GWT, but
it isn't on the agenda for GWT 2.2.

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


On Fri, Dec 3, 2010 at 3:24 PM, savilak  wrote:

> Can you please give me a hint on this?
>
>
> On Nov 29, 6:22 pm, savilak  wrote:
> > I have to create a CellTable with cells that contain ListBoxes.
> >
> > The issue is that I want each item of the listbox to contain an Image
> > and Text!
> > Standard ListBoxes does not allow us to use images at its items
> > ( Item 1 ).
> >
> > What is the best approach I can follow to implement this?
> >
> > Thank you for your time.
> >
> > Savilak
>
> --
> 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: Google's CellTree documentation - CellTreeExample2.java won't compile !

2010-12-03 Thread John LaBanca
GWT 2.1.1 will add the Context parameter to Cell methods.  Its a breaking
change, but it allows us to pass the row index and cell index, and add more
variables in the future without another breaking change.

You can use the following example that is compatible with GWT 2.1.0.
http://google-web-toolkit.googlecode.com/svn/tags/2.1.0/user/javadoc/com/google/gwt/examples/cellview/CellTreeExample2.java

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


On Fri, Dec 3, 2010 at 3:27 PM, metalhammer29a wrote:

> does anyone know how the problem mentioned can be fixed ?
>
> --
> 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: CellTable composite Header

2010-12-03 Thread John LaBanca
Mike -

Most of what you want to do is not supported yet, but we plan to add support
in GWT 2.2.

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


On Fri, Dec 3, 2010 at 1:24 PM, manstis  wrote:

> Hi,
>
> I'd like to make a composite Header for CellTable.
>
> My requirements are:-
> * Multiple rows
>
Planned for GWT 2.2.


> * ColSpan in one of the multiple rows
>
Available in GWT 2.1.1, which is coming soon.  If two headers == each other,
they will colspan.


> * Multiple Clickable elements in each TH's TD
>
Sounds like a bug.  Can you open an issue on the issue tracker for this.
 Including a table in a Cell shouldn't affect events.


>
> Naively my plan was to generate the required HTML in the Header's
> render method and hook up clickHandlers to some of the elements;
> however (obviously) the render method only returns HTML which is used
> by CellTable to populate the inner HTML of elements already created
> (namely the TH and TD elements).
>
> Furthermore to provide the multi-row\colspan requirements I planned on
> using the same Header for all columns (so CellTable spans all columns)
> and generate HTML for a nested table - with multiple rows\colspan etc.
> Provided the nested table's column widths match those of the CellTable
> and I override CSS to remove padding and margins it gives the required
> effect.
>
> I also found that click events do not get raised when the Header
> contains HTML for another table.
>
> So, some questions:-
> * Does anybody have advice on implementing composite headers?
> * Can you attach Handlers to HTML elements created in a render method?
> * How can I get Click Events to pass through to a nested HTML table?
> * Would I be better off writing my own Widget rather than use
> CellTable?
>
> Thanks for reading this far.
>
> 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.
>
>

-- 
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: Getting a user Enter key

2010-12-03 Thread Greg Dougherty
Thank you both, that worked like a charm.

Greg

On Dec 3, 2:54 pm, David Chandler  wrote:
> Also seehttp://code.google.com/p/google-web-toolkit/issues/detail?id=5558for
> a workaround.
>
> /dmc
>
> On Fri, Dec 3, 2010 at 3:36 PM, Brian Reilly wrote:
>
>
>
> > Greg,
>
> > As I mentioned in a thread earlier today (
> >http://groups.google.com/group/google-web-toolkit/browse_thread/threa...),
> > try using a KeyDownEvent handler and inspect 
> > event.getNativeEvent().getKeyCode()
> > instead of event.getCharCode().
>
> > From the other thread, it sounds like this behavior may have changed in
> > 2.1, so it could be that the documentation is wrong, but only as of fairly
> > recently.
>
> > -Brian
>
> > On Fri, Dec 3, 2010 at 3:21 PM, Greg Dougherty  > > wrote:
>
> >> Ok, the tutorial says that to get a user pressing an enter key in a
> >> TextBox you should write something like the following:
>
> >>http://code.google.com/webtoolkit/doc/latest/tutorial/manageevents.html
>
> >>        public void onKeyPress (KeyPressEvent event)
> >>        {
> >>                char    keyPress = event.getCharCode();
> >>                int     keyCode = keyPress;
> >>                if (keyPress == KeyCodes.KEY_ENTER)
> >>                        goToRecord ();
> >>        }
>
> >> Unfortunately, when I do that, I get a keyCode of 0 for  Enter, Tab,
> >> and Left Arrow (the keys I tested), while I get the actual key when I
> >> type a number key.  What gives?  Is the tutorial wrong?  If so, what
> >> should I be calling?
>
> >> TIA,
>
> >> Greg
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google Web Toolkit" group.
> >> To post to this group, send email to google-web-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 
> 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.



UiBinder Internationalization

2010-12-03 Thread Srividhya Ramachandran
I am having trouble with UiBinder Internationalization. I create a
LocalizableResource.properties file with messages and use keys for the
messages in the **.ui.xml files. Basically followed the steps in showcase
sample project and find that the messages are not being picked up from the
properties file, but still come from the ui.xml files.
Anybody experienced this problem before?
I read somewhere that in previous versions of GWT (i am using 2.1) the
messages for default locale always came from the ui.xml file even though you
provide a  .properties file. Is this still an issue? Thanks for taking the
time to read and reply.
V

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



MVP place/view/page navigation control: hardcode vs. declarative

2010-12-03 Thread Michael W
Since GWT 2.0, Google provides MVP pattern to develop large scale GWT
application.
However, the logic of navigating to the next view/page is hard coded
in the Java code.

For example of GWT 2.1.0 HelloMVP, first it requires to register all
places(view/page) with AppPlaceHistoryMapper, then the navigation
logic is embedded inside ViewImpl.

In order to navigation from hello to goodbye, the following piece of
code is needed in HelloViewImpl:

   listener.goTo(new GoodbyePlace(name));

As we know, for server side development, we can use struct-config.xml
for Struts and/or spring-servlet.xml for Spring MVC to control the
navigation.

Just wonder:
Is there any reason that MVP does not provide a similar approach like
Struts/Spring by using declarative config of navigation?

BR/

--Michael

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



New book: Google App Engine Java and GWT Application Development

2010-12-03 Thread Supercobra Thatbytes
hi,

Some of you may be interested in a book I co-authored that has just
been published:
"Google App Engine Java and GWT Application Development" by Amy Unruh
and Daniel Guermeur, from Packt.

The book describes many of the techniques and approaches used to
develop GAE+GWT applications, and includes an app developed
throughout  the book as a running example. It has a particular focus
on some of the technologies useful for building scalable social-media-
oriented applications, including: MVP and UiBinder, using the Channel
API for push, using Facebook and Twitter OAuth for authorization, JDO,
the Task Queue, transactions and transactional tasks, Memcache, and
XMPP.


This is the Packt Publishing link:
- http://link.packtpub.com/5XWJBI

Book blog w/ table of contents:
- http://theconnectr.blogspot.com/

Enjoy.

-- Daniel

-- 
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: onResize issue with IE 7

2010-12-03 Thread PhilBeaudoin
Just found this issue which is basically recommending the same
workaround as the one proposed here:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5245

-- 
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 JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Greg Dougherty
Hi David,

I must humbly disagree.  Maybe I just don't see enough Open Source
projects, but MySQL, which I use on a regular basis, has documentation
that is easy to search, has it all in one place, and does a good job
of explaining what's going on.

The GWT documentation, OTOH, in my experience NEVER gives you a
COMPLETE explanation on how to do anything.  Which I find very
frustrating, especially since I assume that, before you folks claim to
have created a feature, you've actually TESTED that feature, which
means that somewhere you must have the code that works out that
feature to its fullest extent.  Given that it's an open source
project, I honestly fail to see why you wouldn't make that test code
publicly available.

But if you have, I can't find it anywhere.

Take the CellTable for example.  Clearly the purpose of the thing is
to have something that lets you download chunks of data from a server,
and display it quickly.  So, what do all the "examples for how to use
a CellTable" show?  How to display local data.  Is there ANYONE,
ANYWHERE, who's going to use it for that purpose in an actual GWT
application?  So why is that the "example"?  Presumably someone's
actually written a GWT app that gets information from a servlet using
RPC.  Where is that code?

Or, take a really frustrating case, because it was SO close to being
great documentation.  You've got a nice code sample at
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html
You've got an entirely different one in the history JavaDoc.  Any
reason why they couldn't be combined in one example, that includes the
sample versions of addSelectionHandler and addValueChangeHandler that
the JavaDoc lack, AND includes the rather vital
History.fireCurrentHistoryState (); that the "Coding Basics" lack?

Personally, if I were writing things for an open source project, it
would be because I actually wanted people to use the things I was
writing.  So what's the point of writing great code if the
documentation is so poor that few people can figure out how to use it?

As for adding things to the project, there's a couple of problems with
that:
1: The places where I want something added to the documentation are
places where I don't know what the heck is going on.  So I'd be the
last person to add it.
2: My contract specifies that everything I write belongs to the people
paying me.  So I can't take the code I've written and add it to the
GWT code base / documentation, because I lack the rights to it.
3: I'm working 50 hours a week writing code.  By the time I get home,
I lack the mental energy necessary to write code for any purpose.

If you want to email me off list with a simple way to update the
JavaDocs with what I've learned and think I can legally offer, there's
some things I'd be happy to update.  But the key word there is
SIMPLE.  If it requires jumping through a lot of hoops, then I've got
much better things to do with my time.

Respectfully,

Greg

On Dec 3, 2:05 pm, David Chandler  wrote:
> Hi Greg,
>
> Prior to joining Google, I thought (and still do think) that the GWT
> developer guides are actually pretty rich for an open source project and
> many of the Javadocs, too. Of course, there are always holes and we welcome
> constructive feedback through the issue tracker.
>
> GWT is open source, so I hope you will contribute Javadocs as you find
> things that can be improved.
>
> /dmc
>
> On Fri, Dec 3, 2010 at 2:50 PM, Greg Dougherty
> wrote:
>
>
>
> > Jeff,
>
> > Thank you.  That' lets me know which one I want to use.
>
> > If I knew JavaScript and DOM, or, for that matter, even WANTED to know
> > JavaScript and DOM, I wouldn't be using GWT, I'd be writing the
> > JavaScript myself.  No?
>
> > The whole point of using something like GWT is that it lets a Java
> > programmer write a web app w/o having to learn all the crap that
> > normal web app writers have to wade through.  That's certainly why I
> > spent the time and effort to learn GWT.  For that matter, I presume
> > that the people writing things like the KeyPressEventHandler DO know
> > JavaScript and DOM.  So, really, how hard is it for them to put that
> > knowledge into the documentation?  Isn't that what the documentation
> > is THERE for?
>
> > I write a JavaDoc header for every routine I write.  And the point of
> > that header is to explain why it is that someone would be calling that
> > routine, and what they'll get by calling it.  To my mind that's the
> > MINIMUM that should be in any JavaDoc, and if you're not going to
> > cover that, you should stop wasting time and just not write anything.
> > Do you disagree?
>
> > What % of the GWT JavaDoc actually answer those questions?  1%?  10%?
>
> > Greg
>
> > On Dec 3, 1:09 pm, Jeff Schwartz  wrote:
> > > KeyPress - triggered when the user presses a key and releases it (key
> > down
> > > and then key up)
> > > KeyDown - triggered when the user presses the key (key down)
>
> > > Perhaps the documentation assumes some

Re: Getting a user Enter key

2010-12-03 Thread David Chandler
Also see http://code.google.com/p/google-web-toolkit/issues/detail?id=5558for
a workaround.

/dmc

On Fri, Dec 3, 2010 at 3:36 PM, Brian Reilly wrote:

> Greg,
>
> As I mentioned in a thread earlier today (
> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/82a98103dfa76528),
> try using a KeyDownEvent handler and inspect 
> event.getNativeEvent().getKeyCode()
> instead of event.getCharCode().
>
> From the other thread, it sounds like this behavior may have changed in
> 2.1, so it could be that the documentation is wrong, but only as of fairly
> recently.
>
> -Brian
>
> On Fri, Dec 3, 2010 at 3:21 PM, Greg Dougherty  > wrote:
>
>> Ok, the tutorial says that to get a user pressing an enter key in a
>> TextBox you should write something like the following:
>>
>> http://code.google.com/webtoolkit/doc/latest/tutorial/manageevents.html
>>
>>public void onKeyPress (KeyPressEvent event)
>>{
>>charkeyPress = event.getCharCode();
>>int keyCode = keyPress;
>>if (keyPress == KeyCodes.KEY_ENTER)
>>goToRecord ();
>>}
>>
>> Unfortunately, when I do that, I get a keyCode of 0 for  Enter, Tab,
>> and Left Arrow (the keys I tested), while I get the actual key when I
>> type a number key.  What gives?  Is the tutorial wrong?  If so, what
>> should I be calling?
>>
>> TIA,
>>
>> Greg
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-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: Getting a user Enter key

2010-12-03 Thread Brian Reilly
Greg,

As I mentioned in a thread earlier today (
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/82a98103dfa76528),
try using a KeyDownEvent handler and inspect
event.getNativeEvent().getKeyCode()
instead of event.getCharCode().

>From the other thread, it sounds like this behavior may have changed in 2.1,
so it could be that the documentation is wrong, but only as of fairly
recently.

-Brian

On Fri, Dec 3, 2010 at 3:21 PM, Greg Dougherty
wrote:

> Ok, the tutorial says that to get a user pressing an enter key in a
> TextBox you should write something like the following:
>
> http://code.google.com/webtoolkit/doc/latest/tutorial/manageevents.html
>
>public void onKeyPress (KeyPressEvent event)
>{
>charkeyPress = event.getCharCode();
>int keyCode = keyPress;
>if (keyPress == KeyCodes.KEY_ENTER)
>goToRecord ();
>}
>
> Unfortunately, when I do that, I get a keyCode of 0 for  Enter, Tab,
> and Left Arrow (the keys I tested), while I get the actual key when I
> type a number key.  What gives?  Is the tutorial wrong?  If so, what
> should I be calling?
>
> TIA,
>
> Greg
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-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: Tutorial-Contacts2-2.1

2010-12-03 Thread Doug Kramer
Thanks for reporting this issue. This was a bogus download, so I
removed it.



There's no link to that file from the Developer Guide (only to
Tutorial-Contact.zip and Tutorial-Contact2.zip).
The file Tutorial-Contact2.zip covers both 2.0 and 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.



Re: GWT JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Brian Reilly
Greg,

For what it's worth, I had very similar feelings when I ran into a very
similar problem. (I was trying to get consistent behavior when pressing
enter or tab. Tab is a tricky one because different browsers do different
things with different events to handle element focus. Hint: in Safari, you
may have to call event.preventDefault() in order to prevent focus shifting
to funny places, though that might depend on whether or not you're also
trying to manage focus).

To make a long story short, this is a very problematic area when it comes to
cross-browser compatibility. If you're survived it (despite frustrations),
you're in pretty good shape.

This is probably one of the worst corners you'll find in GWT because it
actually affects functionality. There are still issues with things rendering
differently, but at least those are only visual. There's not much you can do
about that other than to learn how to deal with some and avoid the others.

There are some areas where GWT does hide some of the complexity (element
visibility, for example), but GWT is more about leveling the behavior of
JavaScript than the DOM.

-Brian

On Fri, Dec 3, 2010 at 3:05 PM, David Chandler wrote:

> Hi Greg,
>
> Prior to joining Google, I thought (and still do think) that the GWT
> developer guides are actually pretty rich for an open source project and
> many of the Javadocs, too. Of course, there are always holes and we welcome
> constructive feedback through the issue tracker.
>
> GWT is open source, so I hope you will contribute Javadocs as you find
> things that can be improved.
>
> /dmc
>
>
> On Fri, Dec 3, 2010 at 2:50 PM, Greg Dougherty  > wrote:
>
>> Jeff,
>>
>> Thank you.  That' lets me know which one I want to use.
>>
>> If I knew JavaScript and DOM, or, for that matter, even WANTED to know
>> JavaScript and DOM, I wouldn't be using GWT, I'd be writing the
>> JavaScript myself.  No?
>>
>> The whole point of using something like GWT is that it lets a Java
>> programmer write a web app w/o having to learn all the crap that
>> normal web app writers have to wade through.  That's certainly why I
>> spent the time and effort to learn GWT.  For that matter, I presume
>> that the people writing things like the KeyPressEventHandler DO know
>> JavaScript and DOM.  So, really, how hard is it for them to put that
>> knowledge into the documentation?  Isn't that what the documentation
>> is THERE for?
>>
>> I write a JavaDoc header for every routine I write.  And the point of
>> that header is to explain why it is that someone would be calling that
>> routine, and what they'll get by calling it.  To my mind that's the
>> MINIMUM that should be in any JavaDoc, and if you're not going to
>> cover that, you should stop wasting time and just not write anything.
>> Do you disagree?
>>
>> What % of the GWT JavaDoc actually answer those questions?  1%?  10%?
>>
>> Greg
>>
>> On Dec 3, 1:09 pm, Jeff Schwartz  wrote:
>> > KeyPress - triggered when the user presses a key and releases it (key
>> down
>> > and then key up)
>> > KeyDown - triggered when the user presses the key (key down)
>> >
>> > Perhaps the documentation assumes some prior knowledge of javascript and
>> dom
>> > events and though GWT tries to shield the developer from much of it it
>> > cannot do so 100%.
>> >
>> > Jeff
>> >
>> > On Fri, Dec 3, 2010 at 1:47 PM, Greg Dougherty
>> > wrote:
>> >
>> >
>> >
>> > > This is my first entry in what will be a continuing series of pointing
>> > > out GWT JavaDocs achieving Microsoftian levels of "saying everything
>> > > while explaining nothing."  Why? Because if you're going to actually
>> > > write documentation, it shouldn't be totally worthless.
>> >
>> > > KeyPressHandler: Handler interface for KeyPressEvent events
>> > > KeyDownHandler: Handler interface for KeyDownEvent events
>> >
>> > > KeyPressEvent : Represents a native key press event
>> > > KeyDownEvent: Represents a native key down event
>> >
>> > > Does anyone believe this "documentation" provides anything of value?
>> > > I sure don't.  What I want to know is what is teh difference between
>> > > these two things?  What, EXACTLY, is a KeyDownEvent?  How does it
>> > > differ from  KeyPressEvent ?  When would I use one, when would I use
>> > > the other?  Which one should I use if I want to fire off a command
>> > > when the user hits Enter or Return?
>> >
>> > > The first place most people are going to look to answer these
>> > > questions is the JavaDoc.  If you're programming in Eclipse (and, if
>> > > you're not, you're wasting a lot of time and killing your
>> > > productivity), you get the JavaDoc whenever you hover over one of
>> > > these objects, which means that the fist place to put anything and
>> > > everything the user needs to know is there (you want to put it other
>> > > places, too?  Great.  Disk space is cheap.  Programmer time is not).
>> >
>> > > So, what IS the difference between the two?  Anyone know?  Because
>> > > while I could make a guess, I'

Re: Google's CellTree documentation - CellTreeExample2.java won't compile !

2010-12-03 Thread metalhammer29a
does anyone know how the problem mentioned can be fixed ?

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



Google's CellTree documentation - CellTreeExample2.java won't compile !

2010-12-03 Thread metalhammer29a

In Google's documentation for CelLTree,
http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html#celltree

the sample code provided for CellTreeExample2 doesnt compile:
http://google-web-toolkit.googlecode.com/svn/trunk/user/javadoc/com/google/gwt/examples/cellview/CellTreeExample2.java

the problem is in :

Cell cell = new AbstractCell() {
  @Override
  public void render(Context context, Composer value,
SafeHtmlBuilder sb) {
if (value != null) {
  sb.appendEscaped(value.getName());
}
  }
};

and

ListDataProvider dataProvider = new
ListDataProvider(
((Composer) value).getPlaylists());
Cell cell = new AbstractCell() {
  @Override
  public void render(Context context, Playlist value,
SafeHtmlBuilder sb) {
if (value != null) {
  sb.appendEscaped(value.getName());
}
  }
};


IDE suggests:

- The method render(AutoBeanVisitor.Context,
ApplicationMain.Composer, SafeHtmlBuilder) of type new
AbstractCell(){} must override or implement
a supertype
 method

- Context cannot be resolved to a type


the problem is "Context".
do you know what is the correct type for Context ? is it
AutoBeanVisitor ?

h

-- 
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, how to create a cell with custom listbox

2010-12-03 Thread savilak
Can you please give me a hint on this?


On Nov 29, 6:22 pm, savilak  wrote:
> I have to create a CellTable with cells that contain ListBoxes.
>
> The issue is that I want each item of the listbox to contain an Image
> and Text!
> Standard ListBoxes does not allow us to use images at its items
> ( Item 1 ).
>
> What is the best approach I can follow to implement this?
>
> Thank you for your time.
>
> Savilak

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



Getting a user Enter key

2010-12-03 Thread Greg Dougherty
Ok, the tutorial says that to get a user pressing an enter key in a
TextBox you should write something like the following:

http://code.google.com/webtoolkit/doc/latest/tutorial/manageevents.html

public void onKeyPress (KeyPressEvent event)
{
charkeyPress = event.getCharCode();
int keyCode = keyPress;
if (keyPress == KeyCodes.KEY_ENTER)
goToRecord ();
}

Unfortunately, when I do that, I get a keyCode of 0 for  Enter, Tab,
and Left Arrow (the keys I tested), while I get the actual key when I
type a number key.  What gives?  Is the tutorial wrong?  If so, what
should I be calling?

TIA,

Greg

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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: Ship a GWT app as a desktop app with local server?

2010-12-03 Thread Brian Reilly
As much as I like GWT, I think it might not be the right tool for your
situation.

Your two use cases are:

* Remote data and compute
* Local data and compute (unless you meant that desktop use would use remote
compute, but I don't think so because that would require transmitting local
data to the server)

While being able to reuse the UI (for both consistency and
development efficiency) is a good goal, it sounds like your real substance
is the analysis algorithms. What language are those implemented in?

Assuming you're using Java, you do have some options. A separate desktop
application is one of them. You could also go with a webapp and use
something like Jetty on the desktop, like Gaurav suggested. I think that
would be awkward in desktop mode as you'd have two processes to worry about,
the jetty server and the browser, which may be tricky to do well and may be
confusing to users. Plus your access to the local filesystem is going to be
awkward. You'd probably have to present an upload widget to invoke the
system file dialog, but then just pass the file path to the locally running
server for it to open directly (which hopefully it would be able to do...)

You might instead want to look into using Swing, SWT, JavaFX, or Apache
Pivot. I went to a NEJUG talk about Pivot earlier this year and was pretty
impressed with it. Some things even reminded me of GWT.

One catch, though... I'm not sure if it's just their demos, but they require
Java 6, and they don't quite work in-browser on Mac OS X 10.5. Supposedly
they do work in 10.6, but I haven't upgraded yet so I can't confirm. (See
http://mail-archives.apache.org/mod_mbox/pivot-user/201006.mbox/%3c8d8726ba-54bd-4745-87d1-40d067b34...@mac.com%3efor
the response to my question on the Pivot mailing list.)

-Brian

On Fri, Dec 3, 2010 at 1:36 PM, Gaurav Vaish  wrote:

> Why not use Jetty (Embeddable, Lightweight Java Servlet Container -
> cross platform).
>
>
>
> --
> Happy Hacking,
> Gaurav Vaish
> http://www.mastergaurav.com
>
>
> On Dec 3, 10:09 pm, Brett Thomas  wrote:
> > Hi all, sort of an off beat question: what's the best cross-platform
> library
> > for a local web server, that could effectively make a standard GWT app
> into
> > a desktop app? Ideal would be super light weight, and just allow users to
> > run the app offline, with local data. Language could be Java, C++ or
> Python.
> >
> > If curious about why such a library would be desired, some background at
> the
> > end of the email...
> > Thanks for the help,
> > Brett
> >
> > ***
> > Background:
> >
> > I'm about to build an app for researchers to browse and analyze large
> > scientific datasets. We want to permit two uses:
> > -- Web version: users can browse/analyze common public datasets over the
> web
> > -- Local version: users can do the same browsing/analysis on their own
> data
> > set, *without* transferring the data to the server.
> >
> > The plan now is to build a desktop app for this. I'd love to make it a
> > browser app instead, with GWT as the front end. If we went this route,
> we'd
> > have to provide some software download for the local version. Here are
> the
> > options I can think of:
> > 1 -- Local version is a completely separate app. Hope to avoid this so
> users
> > get the same interface on web/local.
> > 2 -- Use Gears (or Adobe Air). Avoided because that would require
> > transferring server side analysis code to javascript (or Actionscript).
> > (Right?)
> > 3 -- Ship an executable that starts a local web server. User views app
> athttp://localhost:12345/in the browser.
> > (Any others I'm missing?)
> >
> > I am trying to assess the feasability of #3. The ideal workflow of our
> app
> > would be:
> > -- Researcher checks out our site in the browser and tries it out. Likes
> it,
> > clicks the "Try this on your own data" button
> > -- Downloads executable with mystery web server described above :)
> > -- Double clicks executable and a minor GUI shows up with a "Get
> started!"
> > button
> > -- User clicks, and the app is loaded in the browser
> athttp://localhost:[whatever
> > port]/. The app looks the same as it did online with the same
> functionality,
> > except the "Select data set" option lists local files...
>
> --
> 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: onResize issue with IE 7

2010-12-03 Thread PhilBeaudoin
I'm working with Mayumi on this bug and I'm pretty sure there is a
problem somewhere in GWT. In our case, it happens with deeply nested
layout panels. To reproduce the bug, we removeFromParent() a panel in
the middle of the hierarchy and later re-add() it. At that point, the
children of the re-added panel have wrong width/height and their width/
height does not update when resizing the browser window. (Again, only
in IE7.)

I have fixed the problem by calling forceLayout() recursively on the
nested layout panels. I do this by calling the following method on the
reattached panel right after we add() it:

private void forceLayoutRecursive(Widget widget) {
HasWidgets parent = null;
if (widget instanceof LayoutPanel) {
((LayoutPanel) widget).forceLayout( );
parent = (HasWidgets) widget;
}
if (widget instanceof DockLayoutPanel) {
((DockLayoutPanel) widget).forceLayout( );
parent = (HasWidgets) widget;
}
if (parent != null) {
Iterator iter = parent.iterator( );
while (iter.hasNext( )) {
Widget child = iter.next( );
forceLayoutRecursive(child);
}
}
}

If I had more time I would work on a simple test case that reproduces
the problem and file an issue... :)

   Philippe

On Dec 3, 12:01 pm, mayumi  wrote:
> A senior developer that I work with found the solution.
> We used forceLayout() on LayoutPanel which will
> layout the children immediately.
>
> Thanks for the reply.
>
> Mayumi
>
> On Dec 3, 12:20 pm, Magnus  wrote:
>
>
>
>
>
>
>
> > Hi Mayumi,
>
> > I am happy that there is someone else struggling with this problem.
>
> > Well, within onResize I just call resizeLater:
>
> >  public void onResize()
> >  {
> >   super.onResize();
> >   resizeLater();
> >  }
>
> > Ans resizeLater just schedules this action to be performed later:
>
> >  private void resizeLater ()
> >  {
> >   Scheduler.get().scheduleDeferred
> >   (
> >    new ScheduledCommand()
> >    {
> >     public void execute()
> >     {
> >      myResize ();
> >     }
> >    }
> >   );
> >  }
>
> > And in myResize I do the resize actions themselves. When this method
> > is called, the new sizes are available through getOffset[Width|
> > Height].
>
> > But this is not a solution for me, since I have to deal with this
> > stuff in every subclass.
>
> > HTH (but I hope that someone helps me .-))
> > Magnus

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



Calling EJB from RPC method

2010-12-03 Thread dato.java
Hello ,

I am developing simple GWT application with EJB 3.0 ,and user Apache
Maven 3.0 , but my porblem is that when i try to call some ejb method
from rpc method it fails with error:

2010-12-03 18:26:34,698 ERROR [org.apache.catalina.core.ContainerBase.
[jboss.web].[localhost].[/gwt-mvc-ui]] Exception while dispatching
incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
david.chokhonelidze.gwt.mvc.ui.client.ApplicationService.addCustomer(java.lang.String)'
threw an unexpected exception: java.lang.NullPointerException
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
207)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
243)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:
96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
175)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:
182)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:
84)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:
157)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
262)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
844)
at org.apache.coyote.http11.Http11Protocol
$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
446)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
at
david.chokhonelidze.gwt.mvc.ui.server.ApplicationServiceImpl.addCustomer(ApplicationServiceImpl.java:
26)
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
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
562)
... 23 more

I see that it cant inject my ejb, so what is solution?

-- 
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 JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread David Chandler
Hi Greg,

Prior to joining Google, I thought (and still do think) that the GWT
developer guides are actually pretty rich for an open source project and
many of the Javadocs, too. Of course, there are always holes and we welcome
constructive feedback through the issue tracker.

GWT is open source, so I hope you will contribute Javadocs as you find
things that can be improved.

/dmc

On Fri, Dec 3, 2010 at 2:50 PM, Greg Dougherty
wrote:

> Jeff,
>
> Thank you.  That' lets me know which one I want to use.
>
> If I knew JavaScript and DOM, or, for that matter, even WANTED to know
> JavaScript and DOM, I wouldn't be using GWT, I'd be writing the
> JavaScript myself.  No?
>
> The whole point of using something like GWT is that it lets a Java
> programmer write a web app w/o having to learn all the crap that
> normal web app writers have to wade through.  That's certainly why I
> spent the time and effort to learn GWT.  For that matter, I presume
> that the people writing things like the KeyPressEventHandler DO know
> JavaScript and DOM.  So, really, how hard is it for them to put that
> knowledge into the documentation?  Isn't that what the documentation
> is THERE for?
>
> I write a JavaDoc header for every routine I write.  And the point of
> that header is to explain why it is that someone would be calling that
> routine, and what they'll get by calling it.  To my mind that's the
> MINIMUM that should be in any JavaDoc, and if you're not going to
> cover that, you should stop wasting time and just not write anything.
> Do you disagree?
>
> What % of the GWT JavaDoc actually answer those questions?  1%?  10%?
>
> Greg
>
> On Dec 3, 1:09 pm, Jeff Schwartz  wrote:
> > KeyPress - triggered when the user presses a key and releases it (key
> down
> > and then key up)
> > KeyDown - triggered when the user presses the key (key down)
> >
> > Perhaps the documentation assumes some prior knowledge of javascript and
> dom
> > events and though GWT tries to shield the developer from much of it it
> > cannot do so 100%.
> >
> > Jeff
> >
> > On Fri, Dec 3, 2010 at 1:47 PM, Greg Dougherty
> > wrote:
> >
> >
> >
> > > This is my first entry in what will be a continuing series of pointing
> > > out GWT JavaDocs achieving Microsoftian levels of "saying everything
> > > while explaining nothing."  Why? Because if you're going to actually
> > > write documentation, it shouldn't be totally worthless.
> >
> > > KeyPressHandler: Handler interface for KeyPressEvent events
> > > KeyDownHandler: Handler interface for KeyDownEvent events
> >
> > > KeyPressEvent : Represents a native key press event
> > > KeyDownEvent: Represents a native key down event
> >
> > > Does anyone believe this "documentation" provides anything of value?
> > > I sure don't.  What I want to know is what is teh difference between
> > > these two things?  What, EXACTLY, is a KeyDownEvent?  How does it
> > > differ from  KeyPressEvent ?  When would I use one, when would I use
> > > the other?  Which one should I use if I want to fire off a command
> > > when the user hits Enter or Return?
> >
> > > The first place most people are going to look to answer these
> > > questions is the JavaDoc.  If you're programming in Eclipse (and, if
> > > you're not, you're wasting a lot of time and killing your
> > > productivity), you get the JavaDoc whenever you hover over one of
> > > these objects, which means that the fist place to put anything and
> > > everything the user needs to know is there (you want to put it other
> > > places, too?  Great.  Disk space is cheap.  Programmer time is not).
> >
> > > So, what IS the difference between the two?  Anyone know?  Because
> > > while I could make a guess, I'm not paid to guess, I'm paid to know.
> > > (And yes, I'd be quite happy to pay ~$50 to get JavaDoc for GWT that
> > > were something more than the pointless repeating of what's already
> > > there.  Anyone selling something like that 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.
> >
> > --
> > *Jeff Schwartz*
>
> --
> 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 Gr

Re: onResize issue with IE 7

2010-12-03 Thread mayumi
A senior developer that I work with found the solution.
We used forceLayout() on LayoutPanel which will
layout the children immediately.

Thanks for the reply.

Mayumi

On Dec 3, 12:20 pm, Magnus  wrote:
> Hi Mayumi,
>
> I am happy that there is someone else struggling with this problem.
>
> Well, within onResize I just call resizeLater:
>
>  public void onResize()
>  {
>   super.onResize();
>   resizeLater();
>  }
>
> Ans resizeLater just schedules this action to be performed later:
>
>  private void resizeLater ()
>  {
>   Scheduler.get().scheduleDeferred
>   (
>    new ScheduledCommand()
>    {
>     public void execute()
>     {
>      myResize ();
>     }
>    }
>   );
>  }
>
> And in myResize I do the resize actions themselves. When this method
> is called, the new sizes are available through getOffset[Width|
> Height].
>
> But this is not a solution for me, since I have to deal with this
> stuff in every subclass.
>
> HTH (but I hope that someone helps me .-))
> Magnus

-- 
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 JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Greg Dougherty
Jeff,

Thank you.  That' lets me know which one I want to use.

If I knew JavaScript and DOM, or, for that matter, even WANTED to know
JavaScript and DOM, I wouldn't be using GWT, I'd be writing the
JavaScript myself.  No?

The whole point of using something like GWT is that it lets a Java
programmer write a web app w/o having to learn all the crap that
normal web app writers have to wade through.  That's certainly why I
spent the time and effort to learn GWT.  For that matter, I presume
that the people writing things like the KeyPressEventHandler DO know
JavaScript and DOM.  So, really, how hard is it for them to put that
knowledge into the documentation?  Isn't that what the documentation
is THERE for?

I write a JavaDoc header for every routine I write.  And the point of
that header is to explain why it is that someone would be calling that
routine, and what they'll get by calling it.  To my mind that's the
MINIMUM that should be in any JavaDoc, and if you're not going to
cover that, you should stop wasting time and just not write anything.
Do you disagree?

What % of the GWT JavaDoc actually answer those questions?  1%?  10%?

Greg

On Dec 3, 1:09 pm, Jeff Schwartz  wrote:
> KeyPress - triggered when the user presses a key and releases it (key down
> and then key up)
> KeyDown - triggered when the user presses the key (key down)
>
> Perhaps the documentation assumes some prior knowledge of javascript and dom
> events and though GWT tries to shield the developer from much of it it
> cannot do so 100%.
>
> Jeff
>
> On Fri, Dec 3, 2010 at 1:47 PM, Greg Dougherty
> wrote:
>
>
>
> > This is my first entry in what will be a continuing series of pointing
> > out GWT JavaDocs achieving Microsoftian levels of "saying everything
> > while explaining nothing."  Why? Because if you're going to actually
> > write documentation, it shouldn't be totally worthless.
>
> > KeyPressHandler: Handler interface for KeyPressEvent events
> > KeyDownHandler: Handler interface for KeyDownEvent events
>
> > KeyPressEvent : Represents a native key press event
> > KeyDownEvent: Represents a native key down event
>
> > Does anyone believe this "documentation" provides anything of value?
> > I sure don't.  What I want to know is what is teh difference between
> > these two things?  What, EXACTLY, is a KeyDownEvent?  How does it
> > differ from  KeyPressEvent ?  When would I use one, when would I use
> > the other?  Which one should I use if I want to fire off a command
> > when the user hits Enter or Return?
>
> > The first place most people are going to look to answer these
> > questions is the JavaDoc.  If you're programming in Eclipse (and, if
> > you're not, you're wasting a lot of time and killing your
> > productivity), you get the JavaDoc whenever you hover over one of
> > these objects, which means that the fist place to put anything and
> > everything the user needs to know is there (you want to put it other
> > places, too?  Great.  Disk space is cheap.  Programmer time is not).
>
> > So, what IS the difference between the two?  Anyone know?  Because
> > while I could make a guess, I'm not paid to guess, I'm paid to know.
> > (And yes, I'd be quite happy to pay ~$50 to get JavaDoc for GWT that
> > were something more than the pointless repeating of what's already
> > there.  Anyone selling something like that 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.
>
> --
> *Jeff Schwartz*

-- 
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: NetBeans GWT and JUNIT

2010-12-03 Thread darkling
I also wanted to add my Test class in case something in there is being
done wrong:





package com.baa.client;

import com.baa.client.model.WebAppRestDataSource;
import com.baa.client.presentation.DummyDynamicFormPresentation;
import com.baa.client.presentation.DynamicFormPresentation;
import com.google.gwt.junit.client.GWTTestCase;
import com.smartgwt.client.data.Criteria;
import com.smartgwt.client.data.DSRequest;
import com.smartgwt.client.data.DSResponse;

/**
 *
 * @author mmagliocca
 */
public class BaseDynamicFormTest extends GWTTestCase{

public BaseDynamicFormTest()
{
//ClasspathUtility.printDuplicates();
}

@Override
public String getModuleName() {
return "com.baa.Scaffolding";
}



/*
@Test
public void testTest() {
}

@Test
public void testSave() {
}

@Test
public void testCancel() {
}

@Test
public void testGetPermissionsObject() {
}
*/
//@Test
public void testFetchData()
{
   int x =1;
   x++; //finishTest();
}

//@Test
public void testGetXSD()
{
BaseDynamicFormImpl impl = new BaseDynamicFormImpl();
TestDynamicFormXSDDSCallBack xsdCallBack = new
TestDynamicFormXSDDSCallBack();
TestDynamicFormDataDSCallBack dataCallBack = new
TestDynamicFormDataDSCallBack();
Criteria criteria = new Criteria("ID", "3");
dataCallBack.setForm(impl);
xsdCallBack.setForm(impl);
xsdCallBack.setForm(impl);
xsdCallBack.setDsCallback(dataCallBack);
xsdCallBack.setForm(impl);
this.delayTestFinish(5000);
impl.fetchXSD(criteria, xsdCallBack);
}

/*
@Test
public void testSetValidator() {
}
*/
public class BaseDynamicFormImpl extends BaseDynamicForm {

public DynamicFormPresentation getPermissionsObject() {
return new DummyDynamicFormPresentation(null);
}
}

public class TestDynamicFormXSDDSCallBack extends
DynamicFormXSDCallBack
{
@Override
public void execute(WebAppRestDataSource ds) {
finishTest();
super.execute(ds);
//validate correctness
}
}

public class TestDynamicFormDataDSCallBack extends
DynamicFormDataCallBack
{
@Override
public void execute(DSResponse response, Object rawData,
DSRequest request)
{
super.execute(response, rawData, request);
//validate correctness
finishTest();
}
}
}




On Dec 3, 9:24 am, darkling  wrote:
> I'm trying to debug my Junit test case because its throwing tons of
> errors. However when I try to debug it instead of being able to run
> it, it tells me
>
> The test class 'com.baa.client.BaseDynamicFormTest' was not found in
> module 'com.baa.AccountView'; no compilation unit for that type was
> seen
> com.google.gwt.junit.JUnitFatalLaunchException: The test class
> 'com.baa.client.BaseDynamicFormTest' was not found in module
> 'com.baa.AccountView'; no compilation unit for that type was seen
>         at
> com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:
> 605)
>         at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:
> 1189)
>         at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:
> 1152)
>         at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:
> 541)
>         at
> com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:406)
>         at
> com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:282)
>
> So now rather than debugging the errors that are caused when I run the
> test, I'm trying to debug the errors that only appear when I debug the
> test!
>
> I've seen lots of posts on this basic topic but they've all been
> Eclipse based and I'm not sure how to translate it for Netbeans. I'm
> using the GWT netbeans plugin and my test classes live in the test
> directory not the src directory.
> This is my module file:
>
> 
>  EN" "http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro-
> source/core/src/gwt-module.dtd">
> 
>   
>   
>   
>
>   
>   
>   
>
>   
>   
>   
>   
>
>   
>   
>   
>   
>   
> 
>    
>    
>    
>    
>   
>   
> 
>
> I'm trying to include the test sources in the module but I'm not sure
> if I did it right. Can anyone help me?
> 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: GWT JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Jim Douglas
It can help to remember that GWT generates JavaScript, so GWT concepts
(widgets, events, etc) generally map pretty much directly to
JavaScript concepts.

In this case, you can start with a google search for those events:

http://www.google.com/search?q=keydown+keypress+keyup

The first item in that search is excellent:

http://www.quirksmode.org/dom/events/keys.html

Bookmark and use this site [quirksmode.org, run by Peter-Paul Koch
(ppk)] as a regular reference.

This reference page + test page is also excellent:

http://unixpapa.com/js/key.html
http://unixpapa.com/js/testkey.html

FWIW, JavaScript and Java key events work very similarly, so the Java
KeyEvent documentation is helpful from a conceptual point of view:

http://download.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html

Java KEY_PRESSED = JavaScript keydown
Java KEY_TYPED = JavaScript keypress
Java KEY_RELEASED = JavaScript keyup

On Dec 3, 10:47 am, Greg Dougherty  wrote:
> This is my first entry in what will be a continuing series of pointing
> out GWT JavaDocs achieving Microsoftian levels of "saying everything
> while explaining nothing."  Why? Because if you're going to actually
> write documentation, it shouldn't be totally worthless.
>
> KeyPressHandler: Handler interface for KeyPressEvent events
> KeyDownHandler: Handler interface for KeyDownEvent events
>
> KeyPressEvent : Represents a native key press event
> KeyDownEvent: Represents a native key down event
>
> Does anyone believe this "documentation" provides anything of value?
> I sure don't.  What I want to know is what is teh difference between
> these two things?  What, EXACTLY, is a KeyDownEvent?  How does it
> differ from  KeyPressEvent ?  When would I use one, when would I use
> the other?  Which one should I use if I want to fire off a command
> when the user hits Enter or Return?
>
> The first place most people are going to look to answer these
> questions is the JavaDoc.  If you're programming in Eclipse (and, if
> you're not, you're wasting a lot of time and killing your
> productivity), you get the JavaDoc whenever you hover over one of
> these objects, which means that the fist place to put anything and
> everything the user needs to know is there (you want to put it other
> places, too?  Great.  Disk space is cheap.  Programmer time is not).
>
> So, what IS the difference between the two?  Anyone know?  Because
> while I could make a guess, I'm not paid to guess, I'm paid to know.
> (And yes, I'd be quite happy to pay ~$50 to get JavaDoc for GWT that
> were something more than the pointless repeating of what's already
> there.  Anyone selling something like that 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.



Re: GWT JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Jeff Schwartz
KeyPress - triggered when the user presses a key and releases it (key down
and then key up)
KeyDown - triggered when the user presses the key (key down)

Perhaps the documentation assumes some prior knowledge of javascript and dom
events and though GWT tries to shield the developer from much of it it
cannot do so 100%.

Jeff



On Fri, Dec 3, 2010 at 1:47 PM, Greg Dougherty
wrote:

> This is my first entry in what will be a continuing series of pointing
> out GWT JavaDocs achieving Microsoftian levels of "saying everything
> while explaining nothing."  Why? Because if you're going to actually
> write documentation, it shouldn't be totally worthless.
>
> KeyPressHandler: Handler interface for KeyPressEvent events
> KeyDownHandler: Handler interface for KeyDownEvent events
>
> KeyPressEvent : Represents a native key press event
> KeyDownEvent: Represents a native key down event
>
> Does anyone believe this "documentation" provides anything of value?
> I sure don't.  What I want to know is what is teh difference between
> these two things?  What, EXACTLY, is a KeyDownEvent?  How does it
> differ from  KeyPressEvent ?  When would I use one, when would I use
> the other?  Which one should I use if I want to fire off a command
> when the user hits Enter or Return?
>
> The first place most people are going to look to answer these
> questions is the JavaDoc.  If you're programming in Eclipse (and, if
> you're not, you're wasting a lot of time and killing your
> productivity), you get the JavaDoc whenever you hover over one of
> these objects, which means that the fist place to put anything and
> everything the user needs to know is there (you want to put it other
> places, too?  Great.  Disk space is cheap.  Programmer time is not).
>
> So, what IS the difference between the two?  Anyone know?  Because
> while I could make a guess, I'm not paid to guess, I'm paid to know.
> (And yes, I'd be quite happy to pay ~$50 to get JavaDoc for GWT that
> were something more than the pointless repeating of what's already
> there.  Anyone selling something like that 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.
>
>


-- 
*Jeff Schwartz*

-- 
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 JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Greg Dougherty
This is my first entry in what will be a continuing series of pointing
out GWT JavaDocs achieving Microsoftian levels of "saying everything
while explaining nothing."  Why? Because if you're going to actually
write documentation, it shouldn't be totally worthless.

KeyPressHandler: Handler interface for KeyPressEvent events
KeyDownHandler: Handler interface for KeyDownEvent events

KeyPressEvent : Represents a native key press event
KeyDownEvent: Represents a native key down event

Does anyone believe this "documentation" provides anything of value?
I sure don't.  What I want to know is what is teh difference between
these two things?  What, EXACTLY, is a KeyDownEvent?  How does it
differ from  KeyPressEvent ?  When would I use one, when would I use
the other?  Which one should I use if I want to fire off a command
when the user hits Enter or Return?

The first place most people are going to look to answer these
questions is the JavaDoc.  If you're programming in Eclipse (and, if
you're not, you're wasting a lot of time and killing your
productivity), you get the JavaDoc whenever you hover over one of
these objects, which means that the fist place to put anything and
everything the user needs to know is there (you want to put it other
places, too?  Great.  Disk space is cheap.  Programmer time is not).

So, what IS the difference between the two?  Anyone know?  Because
while I could make a guess, I'm not paid to guess, I'm paid to know.
(And yes, I'd be quite happy to pay ~$50 to get JavaDoc for GWT that
were something more than the pointless repeating of what's already
there.  Anyone selling something like that 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.



Re: Ship a GWT app as a desktop app with local server?

2010-12-03 Thread Gaurav Vaish
Why not use Jetty (Embeddable, Lightweight Java Servlet Container -
cross platform).



--
Happy Hacking,
Gaurav Vaish
http://www.mastergaurav.com


On Dec 3, 10:09 pm, Brett Thomas  wrote:
> Hi all, sort of an off beat question: what's the best cross-platform library
> for a local web server, that could effectively make a standard GWT app into
> a desktop app? Ideal would be super light weight, and just allow users to
> run the app offline, with local data. Language could be Java, C++ or Python.
>
> If curious about why such a library would be desired, some background at the
> end of the email...
> Thanks for the help,
> Brett
>
> ***
> Background:
>
> I'm about to build an app for researchers to browse and analyze large
> scientific datasets. We want to permit two uses:
> -- Web version: users can browse/analyze common public datasets over the web
> -- Local version: users can do the same browsing/analysis on their own data
> set, *without* transferring the data to the server.
>
> The plan now is to build a desktop app for this. I'd love to make it a
> browser app instead, with GWT as the front end. If we went this route, we'd
> have to provide some software download for the local version. Here are the
> options I can think of:
> 1 -- Local version is a completely separate app. Hope to avoid this so users
> get the same interface on web/local.
> 2 -- Use Gears (or Adobe Air). Avoided because that would require
> transferring server side analysis code to javascript (or Actionscript).
> (Right?)
> 3 -- Ship an executable that starts a local web server. User views app 
> athttp://localhost:12345/in the browser.
> (Any others I'm missing?)
>
> I am trying to assess the feasability of #3. The ideal workflow of our app
> would be:
> -- Researcher checks out our site in the browser and tries it out. Likes it,
> clicks the "Try this on your own data" button
> -- Downloads executable with mystery web server described above :)
> -- Double clicks executable and a minor GUI shows up with a "Get started!"
> button
> -- User clicks, and the app is loaded in the browser 
> athttp://localhost:[whatever
> port]/. The app looks the same as it did online with the same functionality,
> except the "Select data set" option lists local files...

-- 
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 install GWT Designer

2010-12-03 Thread Basi Lambanog
Thank you for your reply.

I'm new to Eclipse (though not to IDEs). When I start Eclipse I don't
see the expected menu items like File Edit Navigate, etc. Instead, I
see the Package Explorer perspective and a bunch of icons (related to
cutting and pasting along the top where the menu items should be.

I installed the Eclipse IDE for Java developers Helios package. Mac
Mini OSX 10.6.

I'm missing a menu. I can't order anything. I'm hungry!

Thanks.



On Dec 3, 8:33 am, András Csányi  wrote:
> On 3 December 2010 10:19, Basi Lambanog  wrote:
>
> > Hello,
> > I'm trying to install GWT Designer onto Eclipse 3.6. The instruction
> > says
>
> > In Eclipse, click Help > Install New Software...
>
> > but there is no Help option on the Eclipse menu.
>
> > How else can I install GWT Designer?
>
> > Thanks,.
>
> Should be.
> File - Edit - Navigate - Search - Project - Run - Window - Help
>
> It's first start? There is a little "x" on the left side, close the
> advertise page and everything is going to fine.
>
> --
> - -
> --  Csanyi Andras (Sayusi Ando)  
> --http://sayusi.hu--http://facebook.com/andras.csanyi
> --  ""Trust in God and keep your gunpowder dry!" - Cromwell

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



CellTable composite Header

2010-12-03 Thread manstis
Hi,

I'd like to make a composite Header for CellTable.

My requirements are:-
* Multiple rows
* ColSpan in one of the multiple rows
* Multiple Clickable elements in each TH's TD

Naively my plan was to generate the required HTML in the Header's
render method and hook up clickHandlers to some of the elements;
however (obviously) the render method only returns HTML which is used
by CellTable to populate the inner HTML of elements already created
(namely the TH and TD elements).

Furthermore to provide the multi-row\colspan requirements I planned on
using the same Header for all columns (so CellTable spans all columns)
and generate HTML for a nested table - with multiple rows\colspan etc.
Provided the nested table's column widths match those of the CellTable
and I override CSS to remove padding and margins it gives the required
effect.

I also found that click events do not get raised when the Header
contains HTML for another table.

So, some questions:-
* Does anybody have advice on implementing composite headers?
* Can you attach Handlers to HTML elements created in a render method?
* How can I get Click Events to pass through to a nested HTML table?
* Would I be better off writing my own Widget rather than use
CellTable?

Thanks for reading this far.

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.



Re: onResize issue with IE 7

2010-12-03 Thread Magnus
Hi Mayumi,

I am happy that there is someone else struggling with this problem.

Well, within onResize I just call resizeLater:

 public void onResize()
 {
  super.onResize();
  resizeLater();
 }

Ans resizeLater just schedules this action to be performed later:

 private void resizeLater ()
 {
  Scheduler.get().scheduleDeferred
  (
   new ScheduledCommand()
   {
public void execute()
{
 myResize ();
}
   }
  );
 }

And in myResize I do the resize actions themselves. When this method
is called, the new sizes are available through getOffset[Width|
Height].

But this is not a solution for me, since I have to deal with this
stuff in every subclass.

HTH (but I hope that someone helps me .-))
Magnus

-- 
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: MySQL Error

2010-12-03 Thread du.hahn
Hi Paul,

I disabled the GAE and now i have this error:

 [WARN] Nested in java.lang.ExceptionInInitializerError:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@106df95 for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category) (Caused by
org.apache.commons.logging.LogConfigurationException: No suitable Log
constructor [Ljava.lang.Class;@106df95 for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category))
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:
543)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:
235)
at
org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:
209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at org.apache.jasper.servlet.JspServlet.(JspServlet.java:58)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
at java.lang.Class.newInstance0(Class.java:372)
at java.lang.Class.newInstance(Class.java:325)
at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
253)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
616)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1220)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
513)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
448)
at com.google.gwt.dev.shell.jetty.JettyLauncher
$WebAppContextWithReload.doStart(JettyLauncher.java:447)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:
115)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:222)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
39)
at
com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:
542)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:431)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1053)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:795)
at com.google.gwt.dev.DevMode.main(DevMode.java:282)
Caused by: org.apache.commons.logging.LogConfigurationException: No
suitable Log constructor [Ljava.lang.Class;@106df95 for
org.apache.commons.logging.impl.Log4JLogger (Caused by
java.lang.NoClassDefFoundError: org/apache/log4j/Category)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:
413)
at
org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:
529)
... 31 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Category
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2406)
at java.lang.Class.getConstructor0(Class.java:2716)
at java.lang.Class.getConstructor(Class.java:1674)
at
org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:
410)
... 32 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Category
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
... 37 more

The code is the same.

Thanks for help!



On Dec 3, 12:38 pm, Paul Robinson  wrote:
> You have google app engine enabled, but GAE doesn't support MySQL.
>
> Either disable GAE, or stop using MySQL.
>
> Paul
>
> On 03/12/10 14:10, du.hahn wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > I'm using GWT + Mysql in my project and I ge

Ship a GWT app as a desktop app with local server?

2010-12-03 Thread Brett Thomas
Hi all, sort of an off beat question: what's the best cross-platform library
for a local web server, that could effectively make a standard GWT app into
a desktop app? Ideal would be super light weight, and just allow users to
run the app offline, with local data. Language could be Java, C++ or Python.


If curious about why such a library would be desired, some background at the
end of the email...
Thanks for the help,
Brett

***
Background:

I'm about to build an app for researchers to browse and analyze large
scientific datasets. We want to permit two uses:
-- Web version: users can browse/analyze common public datasets over the web
-- Local version: users can do the same browsing/analysis on their own data
set, *without* transferring the data to the server.

The plan now is to build a desktop app for this. I'd love to make it a
browser app instead, with GWT as the front end. If we went this route, we'd
have to provide some software download for the local version. Here are the
options I can think of:
1 -- Local version is a completely separate app. Hope to avoid this so users
get the same interface on web/local.
2 -- Use Gears (or Adobe Air). Avoided because that would require
transferring server side analysis code to javascript (or Actionscript).
(Right?)
3 -- Ship an executable that starts a local web server. User views app at
http://localhost:12345/ in the browser.
(Any others I'm missing?)

I am trying to assess the feasability of #3. The ideal workflow of our app
would be:
-- Researcher checks out our site in the browser and tries it out. Likes it,
clicks the "Try this on your own data" button
-- Downloads executable with mystery web server described above :)
-- Double clicks executable and a minor GUI shows up with a "Get started!"
button
-- User clicks, and the app is loaded in the browser at
http://localhost:[whatever
port]/. The app looks the same as it did online with the same functionality,
except the "Select data set" option lists local files...

-- 
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 mappings with 2 GWTapp - upgrade 2.0 to 2.1

2010-12-03 Thread Tom
Hi,

I developped two GWT applications app1 et app2 with spring in GWT 2.0
I do some stuff in app1 then I go on app2 with the line :

Window.open(GWT.getHostPageBaseURL()+"app2.html", "_self", "");

These two apps are in the same webapp. Moreover I defined the
mapping :












The application worked fine with GWT 2.0.
The problem occurs when I upgraded GWT to  2.1.

the mapping works but the link between app1 et app2 failes. I get the
error :

springWebapp: ERROR: The serialization policy file '/avenanceportage/
6C7454447EB3F5DE8F334854ABD1DC32.gwt.rpc' was not found; did you
forget to include it in this deployment?
- springWebapp: WARNING: Failed to get the SerializationPolicy
'6C7454447EB3F5DE8F334854ABD1DC32' for module 'http://localhost:8080/
test/test2/'; a legacy, 1.3.3 compatible, serialization policy will be
used.  You may experience SerializationExceptions as a result.

The file  '6C7454447EB3F5DE8F334854ABD1DC32' doesn't exist in any
folder.

Thanks
Thomas



-- 
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-plugin / "google plugin for eclipse" / working for anyone?!?!

2010-12-03 Thread PhilBeaudoin
A valuable resource that has helped me quite a bit are the POMs from
Harald Pehl in his various open source projects. Check out:

Super POM with global settings:
http://code.google.com/p/pehl-parent/source/browse/trunk/pom.xml

Super POM for Piriti:
http://code.google.com/p/piriti/source/browse/trunk/pom.xml

Piriti Core module (framework character):
http://code.google.com/p/piriti/source/browse/trunk/core/pom.xml

Piriti Sample module (GWT App deployed on AppEngine):
http://code.google.com/p/piriti/source/browse/trunk/sample/pom.xml


We are in the process of migrating gwt-platform to Maven, so you might
find some information in there too:
http://code.google.com/p/gwt-platform/issues/detail?id=211

Cheers,

 Philippe


On Dec 2, 4:25 pm, cri  wrote:
> No. No errors other than the ones mentioned in the original post.
> After resolving those errors, we could run the default project using
> "run as / web application". The problem only comes after we add
> dependencies to our pom file.
>
> On Dec 2, 2:43 pm, David Chandler  wrote:
>
>
>
>
>
>
>
> > Do you see errors in any of the Eclipse consoles (including Maven console)
> > while doing the import?
>
> > On Thu, Dec 2, 2010 at 3:28 PM, cri  wrote:
> > > We are trying to use gwt-maven-plugin to generate our mavenized gwt
> > > project. Our versions are:
>
> > > eclipse helios
> > > gwt 2.1
> > > gwt-maven-plugin 2.1.1-SNAPSHOT
>
> > > We generate our initial project with the command line:
>
> > > mvn archetype:generate \
> > > -DarchetypeRepository=https://nexus.codehaus.org/content/groups/
> > > snapshots-group/  \
> > > -DarchetypeGroupId=org.codehaus.mojo \
> > > -DarchetypeArtifactId=gwt-maven-plugin \
> > > -DarchetypeVersion=2.1.1-SNAPSHOT
>
> > > We then import the project into eclipse using "import / as existing
> > > project".
>
> > > Here are the problems we then encountered:
>
> > > (1) Eclipse compile errors complaining of unknown classes. These are
> > > classes the plugin generates and places in target/generated-sources/
> > > gwt. The classes are Messages.java and GreetingServiceAsync.java. We
> > > work around this problem by adding  target/generated-sources/gwt to
> > > our eclipse project classpath.
>
> > > (2) The class GwtTesttest.java has eclipse compile errors. We don't
> > > care much about this so for the moment we are just deleting that
> > > class.
>
> > > (3) This is the problem we can't find a workaround for. If we add
> > > dependencies to our pom, say spring framework, they then get added
> > > automatically to the "Libraries/Maven Dependencies". The problem comes
> > > when we invoke "Run As... / Web Application". Jetty fails to find
> > > classes in our newly added maven dependency, e.g Spring.
>
> > > Is there anyone out there that can shed some light on this? 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 > >  cr...@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 
> > 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: Tutorial-Contacts2-2.1

2010-12-03 Thread Chris Conroy
(looking into it)

On Fri, Dec 3, 2010 at 10:48 AM, Diego Lovison wrote:

> http://google-web-toolkit.googlecode.com/files/Tutorial-Contacts2-2.1.zip
>
> isnt impossible open the zip file is currupt
>
> --
> 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: CSS3 Selector nth-child

2010-12-03 Thread dusty
I guess this is already a recorded issue:
http://code.google.com/p/google-web-toolkit/issues/detail?id=4422

--Dusty

On Dec 2, 10:53 am, dusty  wrote:
> Hello,
>
> Using UiBinder I have an embedded CSS style and want to use nth-
> child(even).  The Uibinder crashes saying it can't interpret the CSS.
> If I replace "even" with a number it says it is expecting .  Is
> this possible with GWT?
>
> Here is my CSS segment:
>
> 
>         .productlist {
>                 cursor: pointer;
>                 width: 50em;
>                 padding: 10px 10px 0px 10px;
>         }
>
>         .productlist tr:nth-child(even) {
>                 background-color: silver;
>         }
>
> 

-- 
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: To smart GWT or not

2010-12-03 Thread Sanjiv Jivan
Jaroslav,
If you're happy with GWT that’s great but please do not make such vague and
baseless claims about Smart GWT. Legitimate bugs reported are fixed really
quickly and existing users can attest to this. Smart GWT currently has
around 42 open defects with a majority of them being low priority, and 16
enhancement requests ( http://code.google.com/p/smartgwt/issues/list ).
Considering the depth and breadth of features provided by the framework this
is a pretty low number of defects.

3 of the 7 issues that you filed were invalid, and 2 defects that were fixed
and the remaining 2 were marked WontFix since they were trivial pieces of
functionality that the user could easily implement.

http://code.google.com/p/smartgwt/issues/list?can=1&q=reporter:jaroslav.zaruba

And
when you were advised how to implement a warning dialog before record
deletion on this issue that you filed  (
http://code.google.com/p/smartgwt/issues/detail?id=325 ), you responded by "you
are sad". Nice way to show your appreciation when using a free product.

Sanjiv

2010/12/3 Jaroslav Záruba 

> ...until you run into some SmartGWT magic - like widgets not working
> without otherwise completely useless 'final' (have fun trying figure
> that out), newly spanned records not appearing in tree, styles not
> getting applied until mouseover, etc.
> What looks like polished set of awesome widgets might turn into
> nightmare which makes you throwing your deadlines out of the window.
>
> (Like I said before, this particular experience with SmartGWT is one
> year old.)
>
> With GWT the start might be slower but you can predict the deadlines +
> you're not working with 'black box'.
>
> On 3 pro, 00:00, ckendrick  wrote:
> > Sorry that's quite absurd: SmartGWT is often introduced to solve
> > performance problems, and it solves them.
> >
> > SmartGWT is intentionally designed to have a one-time-ever download of
> > a feature rich runtime in exchange for reducing subsequent server
> > requests.  For example, Adaptive Filtering greatly reduces the
> > costliest types of database hits:
> >
> >
> http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_fe...
> >
> > .. and allows you to introduce an extremely powerful data highlighting
> > system with no server load at all:
> >
> >http://blog.isomorphic.com/?p=234
> >
> > If your application is the kind we target - complex enterprise
> > applications which are used repeatedly and for significant lengths of
> > time - this provides a gigantic performance boost, and once-ever
> > download of cachable JavaScript files is a negligible factor.
> >
> > Look at a deployed SmartGWT application and you've got users humming
> > along, ripping through the interface and nothing being downloaded
> > anymore because it's all cached.  And everyone is getting fast
> > responses from the database because the Smart GWT framework is
> > minimizing database load.
> >
> > The larger your application becomes, the more these benefits accrue.
> > And, by the time you've built an application with comparable
> > functionality with core GWT or another GWT-based framework, you're
> > going to be downloading the same size runtime as SmartGWT anyway.
> >
> > On Dec 1, 1:44 pm, aarnott  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > I've found Smart GWT to have rather poor performance and it comes at
> > > the added cost of massive javascript libraries (even when they are
> > > gzipped). If you are anything like me, you will probably find that you
> > > lose time in the long run by going with Smart GWT because you will
> > > want to get rid of it later to boost performance.
>
> --
> 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.



Tutorial-Contacts2-2.1

2010-12-03 Thread Diego Lovison
http://google-web-toolkit.googlecode.com/files/Tutorial-Contacts2-2.1.zip

isnt impossible open the zip file is currupt

-- 
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 install GWT Designer

2010-12-03 Thread András Csányi
On 3 December 2010 10:19, Basi Lambanog  wrote:
> Hello,
> I'm trying to install GWT Designer onto Eclipse 3.6. The instruction
> says
>
> In Eclipse, click Help > Install New Software...
>
> but there is no Help option on the Eclipse menu.
>
> How else can I install GWT Designer?
>
> Thanks,.

Should be.
File - Edit - Navigate - Search - Project - Run - Window - Help

It's first start? There is a little "x" on the left side, close the
advertise page and everything is going to fine.

-- 
- -
--  Csanyi Andras (Sayusi Ando)  -- http://sayusi.hu --
http://facebook.com/andras.csanyi
--  ""Trust in God and keep your gunpowder dry!" - Cromwell

-- 
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 get to default place

2010-12-03 Thread ailinykh
Yes, of course. As I told, everything works as supposed to. The only
problem- clicking back.

On Dec 3, 12:46 am, zixzigma  wrote:
> Have you added your newly created place to AppPlaceHistoryMapper ?
>
> http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd...
>
> @WithTokenizers({HelloPlace.Tokenizer.class,
> GoodbyePlace.Tokenizer.class})
> public interface AppPlaceHistoryMapper extends PlaceHistoryMapper
> {
>
>
>
>
>
>
>
> }

-- 
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: OT: Re: how to achieve pretty URLs in GWT 2.0 application

2010-12-03 Thread Kenneth Jacker
> yes, you are right, on ff 3.6 and safari 5 it did not work for me, but on 
> good old ie6 it works.

OK, you have confirmed the problem ...

> if you need the pdf, send me a short notice

You are so kind!  But that won't be necessary.


As a die hard Unix/Linux user for many years, I put on my "cloak of
invisibility", made sure no one was around/looking, and discretely
used a Windoze machine.

Running IE on it allowed me to print.


Thanks for the work around!

Doesn't  Google need to do something about this?  Seems that printing
of those docs should work on most modern browsers ... including their
own "Google Chrome" ...

Thanks again Dominic!

-Kenneth

-- 
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: Safe Html check?

2010-12-03 Thread Philip Rogers
As a best practice, it is usually best to "unwrap" (call
safehtml.asString()) as close to the value's use as possible. When
migrating you can replace many String occurrences with SafeHtml, and
widgets provide SafeHtml-aware methods that will automatically handle
your SafeHtml object. The toSafeString(String) method is private for
this reason--to encourage passing around SafeHtml instead of String.

Does an attribute-less  tag do anything? Allowing attributes
certainly makes  and  unsafe, as you point out with the
onclick example.

Creating your own sanitizer may be the way to go for your application,
as the one provided is quite simple (hence the name :) That said, it's
very easy to introduce security holes and I would recommend against
rolling your own. Large apps, for instance Google Wave, have been
written using SafeHtml and without custom sanitizers. (AFAIK)

Another option for you may be the SafeHtmlTemplates. The SafeHtml
guide I linked before gives all the details, and you can see some
additional uses of templates in practice in CellTable.java (and many
of the other Cell-based widgets.)

Example:
@Template("{0}")
SafeHtml div(SafeHtml contents);

Philip

On Dec 2, 2:15 pm, Ed  wrote:
> Apearantly I was reading too fast :(...
> I seem to need the class SimpleHtmlSanitizer .
> Thanks for the tip.
>
> I am using it now, but noticed that snaitizeHtml always returns an
> SafeHtml object.
>   public static SafeHtml sanitizeHtml(String html);
>
> That's often not what I want, especially not when migrating to it's
> usage. I rather have it return a string, but that method is private:
>   private static String simpleSanitize(String text) {
>
> As it safes me the creation of this object that I don't use.
> I use it at this moment through a central method in my UtilsGwt:
>         public static String toSafeString(final String text) {
>                 return SimpleHtmlSanitizer.sanitizeHtml(text).asString();
>         }
>
> Besides that, I see you throw an exception if the specified html is
> null:
>   public static SafeHtml sanitizeHtml(String html) {
>     if (html == null) {
>       throw new NullPointerException("html is null");
>     }
>     return new SafeHtmlString(simpleSanitize(html));
>   }
>
> I would prefer you just return null, especially as it's valid to set
> null as: element.innerHtml(null)
>
> Hmmm I also see that  is escaped, so I probably better off
> creating my own sanitizer ;)..
> It would be nice if there would a default sanitizer that you can
> configure maybe (flexible white list)..
>
> Just one question: why are elements as div and span not whitelisted ?
> I think because you could do something like:
> 
>
> or not?

-- 
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: MySQL Error

2010-12-03 Thread Paul Robinson

You have google app engine enabled, but GAE doesn't support MySQL.

Either disable GAE, or stop using MySQL.

Paul

On 03/12/10 14:10, du.hahn wrote:

Hi,

I'm using GWT + Mysql in my project and I get this error when running
in Eclipse:

[ERROR] javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
com.globalmind.gwt.dbmind.client.GreetingService.greetServer(java.lang.String,java.lang.String)'
threw an unexpected exception: java.lang.NoClassDefFoundError:
com.mysql.jdbc.Driver is a restricted class. Please see the Google
App Engine developer's guide for more details.
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
207)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
243)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:349)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError: com.mysql.jdbc.Driver is a
restricted class. Please see the Google  App Engine developer's guide
for more details.
at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:
51)
at com.mysql.jdbc.Driver.(Driver.java:65)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at
com.globalmind.gwt.dbmind.server.GreetingServiceImpl.conecta(GreetingServiceImpl.java:
24)
at
com.globalmind.gwt.dbmind.server.GreetingServiceImpl.greetServer(GreetingServiceImpl.java:
15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
562)
... 30 more

My code is (on the server side):

private void conecta(){
String driver = "com.mysql.jdbc.Driver";
Connection con = null;

try {
Class.forName(driver).n

Re: Form element values not binding in custom input cell (using AbstractInputCell)

2010-12-03 Thread John LaBanca
AbstractInputCell is intended to be wrap a single input element, not an
entire form.  Specifically, you need to override getInputElement(parent) to
dig into the DOM and get the input element that you are wrapping.  By
default, getInputElement(parent) gets the first child of the parent,
assuming that the cell renders a single input element and nothing else.
 Still, even if you override getInputElement, you'll only be able to return
one value.

What you really need to do is create a new AbstractEditableCell.  In
onBrowserEvent, catch the change event and dig down to all of the input
elements in the form, updating the DTO as needed.

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


On Fri, Dec 3, 2010 at 9:23 AM, sevendays  wrote:

> I have created a CellBrowser where each cell is a custom HTML
> component that features a few different HTML form components (e.g.
> age, feeling etc.).
>
> The form displays fine, however, I can't get the value entered in the
> form into the client-side code. The relevant element in the DOM
> doesn't have the 'value' attribute set properly.
>
> I have tried a few things, including:
>
> 1) Getting the element from the DOM object using
> dom.getElementById(ELEMENT_AGE_ID), this returns an entity but value
> is null, even though I had just entered a value into this element.
>
> 2) Recursively looping round the DOM node tree, and printing it out to
> the console (printElementTree()) - again I can see the element but the
> value is null (after entering a value).
>
>
> What am I not doing correctly? How can I get the value attribute to
> update on the element in the DOM? Once it has been updated, how do I
> get the values from the elements with IDs ELEMENT_AGE_ID,
> ELEMENT_FEELING_ID etc.?
>
> An extract of the code is below. Any suggestions or advice would be
> appreciated.
>
> ---
>
> public class NodeTreeItemCell extends AbstractInputCell NodeTreeItemCell.ViewData> {
>
>public static final int CELL_WIDTH = 440;
>
>// these statics are the HTML element IDs
>public static final String ELEMENT_AGE_ID = "txtAge";
>public static final String ELEMENT_FEELING_ID = "optFeeling";
>public static final String ELEMENT_TOWN_ID = "txtTown";
>public static final String ELEMENT_BUTTON_UPDATE_ID = "btnUpdate";
>
>public NodeTreeItemCell() {
>/*
> * Let the parent class know that our cell responds to click
> events
> and
> * keydown events.
> */
>super("click", "change", "keyup");
>
>}
>
>
>@Override
>public void render(NodeDTO value, Object key, SafeHtmlBuilder sb) {
>
>if (value == null) {
>return;
>}
>
>// Start
>sb.appendHtmlConstant(" class=\"nbRoot\" >");
>sb.appendHtmlConstant(" ");
>sb.appendHtmlConstant(" ");
>
>// left panel
>sb.appendHtmlConstant("   id=
> \"vPanelLeft\">");
>sb.appendHtmlConstant("  ");
>sb.appendHtmlConstant("class=\"nbIcon\">*");
>sb.appendHtmlConstant("  ");
>sb.appendHtmlConstant(" ");
>
>// main panel
>sb.appendHtmlConstant("  id=
> \"vPanelMain\" class=\"nbMainPanel\">");
>sb.appendHtmlConstant("  ");
>sb.appendHtmlConstant("   ");
>sb.appendHtmlConstant("");
>sb.appendHtmlConstant("Build:");
>sb.appendHtmlConstant(" class=\"nbTextBox\"
> size=\"3\" maxlength=\"3\" id=\"" +
> SafeHtmlUtils.fromTrustedString(ELEMENT_AGE_ID) + "\">");
>sb.appendHtmlConstant("%");
>sb.appendHtmlConstant("Feeling:");
>sb.appendHtmlConstant(" SafeHtmlUtils.fromTrustedString(ELEMENT_FEELING_ID) + "\">");
>sb.appendHtmlConstant("");
>sb.appendHtmlConstant("");
>sb.appendHtmlConstant("   ");
>sb.appendHtmlConstant("   ");
>sb.appendHtmlConstant(" class=\"nbItemRow\">");
>sb.appendHtmlConstant("Expected
> Complete:");
>sb.appendHtmlConstant(" SafeHtmlUtils.fromTrustedString(ELEMENT_TOWN_ID) + "\">");
>sb.appendHtmlConstant(" value=\"Update\"
> class=\"nbButton\"id=\"" +
> SafeHtmlUtils.fromTrustedString(ELEMENT_BUTTON_UPDATE_ID) + "\"> input>");
>sb.appendHtmlConstant("");
>sb.appendHtmlConstant("   ");
>sb.appendHtmlConstant("   ");
>sb.appendHtmlConstant(" ");
>
>// end
>sb.appendHtmlConstant(" ");
>sb.appendHtmlConstant(" ");
>sb.appendHtmlConstant("");
>
>}
>
>@Override
>public void onBrow

NetBeans GWT and JUNIT

2010-12-03 Thread darkling
I'm trying to debug my Junit test case because its throwing tons of
errors. However when I try to debug it instead of being able to run
it, it tells me

The test class 'com.baa.client.BaseDynamicFormTest' was not found in
module 'com.baa.AccountView'; no compilation unit for that type was
seen
com.google.gwt.junit.JUnitFatalLaunchException: The test class
'com.baa.client.BaseDynamicFormTest' was not found in module
'com.baa.AccountView'; no compilation unit for that type was seen
at
com.google.gwt.junit.JUnitShell.checkTestClassInCurrentModule(JUnitShell.java:
605)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:
1189)
at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:
1152)
at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:
541)
at
com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:406)
at
com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:282)


So now rather than debugging the errors that are caused when I run the
test, I'm trying to debug the errors that only appear when I debug the
test!

I've seen lots of posts on this basic topic but they've all been
Eclipse based and I'm not sure how to translate it for Netbeans. I'm
using the GWT netbeans plugin and my test classes live in the test
directory not the src directory.
This is my module file:


http://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro-
source/core/src/gwt-module.dtd">

  
  
  

  
  
  

  
  
  
  

  
  
  
  
  

   
   
   
   
  
  



I'm trying to include the test sources in the module but I'm not sure
if I did it right. Can anyone help me?
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.



Form element values not binding in custom input cell (using AbstractInputCell)

2010-12-03 Thread sevendays
I have created a CellBrowser where each cell is a custom HTML
component that features a few different HTML form components (e.g.
age, feeling etc.).

The form displays fine, however, I can't get the value entered in the
form into the client-side code. The relevant element in the DOM
doesn't have the 'value' attribute set properly.

I have tried a few things, including:

1) Getting the element from the DOM object using
dom.getElementById(ELEMENT_AGE_ID), this returns an entity but value
is null, even though I had just entered a value into this element.

2) Recursively looping round the DOM node tree, and printing it out to
the console (printElementTree()) - again I can see the element but the
value is null (after entering a value).


What am I not doing correctly? How can I get the value attribute to
update on the element in the DOM? Once it has been updated, how do I
get the values from the elements with IDs ELEMENT_AGE_ID,
ELEMENT_FEELING_ID etc.?

An extract of the code is below. Any suggestions or advice would be
appreciated.

---

public class NodeTreeItemCell extends AbstractInputCell {

public static final int CELL_WIDTH = 440;

// these statics are the HTML element IDs
public static final String ELEMENT_AGE_ID = "txtAge";
public static final String ELEMENT_FEELING_ID = "optFeeling";
public static final String ELEMENT_TOWN_ID = "txtTown";
public static final String ELEMENT_BUTTON_UPDATE_ID = "btnUpdate";

public NodeTreeItemCell() {
/*
 * Let the parent class know that our cell responds to click 
events
and
 * keydown events.
 */
super("click", "change", "keyup");

}


@Override
public void render(NodeDTO value, Object key, SafeHtmlBuilder sb) {

if (value == null) {
return;
}

// Start
sb.appendHtmlConstant("");
sb.appendHtmlConstant(" ");
sb.appendHtmlConstant(" ");

// left panel
sb.appendHtmlConstant(" ");
sb.appendHtmlConstant("  ");
sb.appendHtmlConstant("   *");
sb.appendHtmlConstant("  ");
sb.appendHtmlConstant(" ");

// main panel
sb.appendHtmlConstant(" ");
sb.appendHtmlConstant("  ");
sb.appendHtmlConstant("   ");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("Build:");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("%");
sb.appendHtmlConstant("Feeling:");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("   ");
sb.appendHtmlConstant("   ");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("Expected Complete:");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("");
sb.appendHtmlConstant("   ");
sb.appendHtmlConstant("   ");
sb.appendHtmlConstant(" ");

// end
sb.appendHtmlConstant(" ");
sb.appendHtmlConstant(" ");
sb.appendHtmlConstant("");

}

@Override
public void onBrowserEvent(Element parent, NodeDTO value, Object key,
NativeEvent event, ValueUpdater valueUpdater) {

super.onBrowserEvent(parent, value, key, event, valueUpdater);
String type = event.getType();
if ("change".equals(type)) {

printElementTree(parent, 1);

//  InputElement txtPctProgress =
//  SelectElement select = 
parent.getFirstChild().cast();
//  String newValue = 
options.get(select.getSelectedIndex());
//  setViewData(key, newValue);
//  finishEditing(parent, newValue, key, valueUpdater);
//  if (valueUpdater != null) {
//  valueUpdater.update(newValue);
//  }
}

}

@Override
protected void finishEditing(Element parent, NodeDTO value, Object
key, ValueUpdater valueUpdater) {
//super.finishEditing(parent, value, key, valueUpdater);
String newValue = getInputElement(parent).getValue();

// newValue is always null
System.out.println("NEW VALUE = " + newValue);


}

private static void printElementTree(Node n, int level) {
NodeList childNodes = n.getChildNodes()

In Eclipse Helios plug in problem

2010-12-03 Thread abhishek
Hello,

I'm having a really tough time today. I upgraded my eclipse 3.6 GWT
Plug in at the update site . Almost 36% update the GWT Plug-in after
that i got error show the below

An error occurred while collecting items to be installed
session context was:(profile=epp.package.jee,
phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=,
action=).
Unable to read repository at
http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.appengine.eclipse.sdkbundle.1.3.8_1.3.8.v201010161055.jar.
Read timed out
Unable to read repository at
http://dl.google.com/eclipse/plugin/3.6/plugins/com.google.gwt.eclipse.sdkbundle.2.1.0_2.1.0.v201010280102.jar.
Read timed out

Please tell me what is the problem regarding gwt plug-in update.

Regards
Abhishek Maheshwari

-- 
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 IE 7 Window Resizing Bug

2010-12-03 Thread mayumi
For a GWT project I am working on, I having trouble fixing a weird IE
7 bug having to do with window resizing.
Basically, when I re-size the window and change the history token(load
the different section of the app) center of the app stops resizing, so
sort of like becoming fixed positioning.

Center of the app is styled with   with  as
child element.
There is no custom styling for this section of the page.
So basically when you re-size the window and re-size it back to full
screen, window does re-sizes but not the app (app is weirdly fixed in
the previously re-sized position)

Does anyone know how to fix this issue?

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: gwt2.1 Expense example--eclipse reported error to @Proxyfor

2010-12-03 Thread Charms Styler
Hi could you explain which version of eclipse your using?? And your
project config, like is it a maven project??

On Nov 11, 6:44 pm, Sun  wrote:
> hi all:
>     After downloading the project i mentioned above from gwt2.1 trunk,
> there are some errors in my eclipse project:
>
> @ProxyFor(com.google.gwt.sample.expenses.server.domain.Employee.class)
> public interface EmployeeProxy extends EntityProxy {
> 
>
> }
>
> eclipse said:
> com.google.gwt.sample.expenses.server.domain.Employee can not be found
> in source packages. Check the inheritance chain from your module; it
> may not be inheriting a required module or a module may not be adding
> its source path entries properly.
>
> that's not right, because Employee is located at server package. so
> how can i get rid of this error message?
>
> by the way, the class comments said:
> /**
>  * "API Generated" DTO interface based on
>  * {...@link com.google.gwt.sample.expenses.server.domain.Employee}.
>  * 
>  * IRL this class will be generated by a JPA-savvy tool run before
> compilation.
>  */
> what's JPA-savvy tool? where can i find it?
>
> many thanks.

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

2010-12-03 Thread Basi Lambanog
Hello,
I'm trying to install GWT Designer onto Eclipse 3.6. The instruction
says

In Eclipse, click Help > Install New Software...

but there is no Help option on the Eclipse menu.

How else can I install GWT Designer?

Thanks,.

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

2010-12-03 Thread mayumi
Could you please explain more in details on your workaround?
I am having same problem with IE 7.

Thanks.

On Dec 2, 10:19 am, Magnus  wrote:
> Hi,
>
> I found a problem with onResize on IE 7:
>
> My panel receives an onResize, but at this point, getOffset[Width|
> Height] returns the old window size, not the new size.
>
> I am currently using a workaround like this:
> Within onResize I schedule a deferred command, which does the resize
> actions later, when the new window size is returned by getOffset[Width|
> Height].
>
> This workaround is not nice, since I cannot hide it in some base
> class, but have to deal with in every derived class. In every onResize
> method I cannot rely on getOffset[Width|Height], so I always have to
> do the deferred stuff within the derived classes.
>
> Is this a known issue and can I expect a solution in the near future?
> Or is there a better workaround?
>
> Thank you very much!
> Magnus

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



MySQL Error

2010-12-03 Thread du.hahn
Hi,

I'm using GWT + Mysql in my project and I get this error when running
in Eclipse:

[ERROR] javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.lang.String
com.globalmind.gwt.dbmind.client.GreetingService.greetServer(java.lang.String,java.lang.String)'
threw an unexpected exception: java.lang.NoClassDefFoundError:
com.mysql.jdbc.Driver is a restricted class. Please see the Google
App Engine developer's guide for more details.
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
207)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
243)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:349)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.NoClassDefFoundError: com.mysql.jdbc.Driver is a
restricted class. Please see the Google  App Engine developer's guide
for more details.
at
com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime.java:
51)
at com.mysql.jdbc.Driver.(Driver.java:65)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at
com.globalmind.gwt.dbmind.server.GreetingServiceImpl.conecta(GreetingServiceImpl.java:
24)
at
com.globalmind.gwt.dbmind.server.GreetingServiceImpl.greetServer(GreetingServiceImpl.java:
15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
562)
... 30 more

My code is (on the server side):

private void conecta(){
String driver = "com.mysql.jdbc.Driver";
Connection con = null;

try {
Class.forName(driver).newInstance();
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.

ClassCastException in client deserialization of JPA annotated entities

2010-12-03 Thread cfillol
I'm using GWT 2.1 in hosted mode.

The following GWT-RPC service that returns JPA annotated objects that
are NOT connected to database, produces a deserialization error in the
client side.

public TipoCable findTestTipoCable() {
TipoCable tp = new TipoCable();
tp.setId((long)1);
tp.setDescrip("Hola");

DesignacionCable dc = new DesignacionCable();
dc.setDescrip("sadfad");
dc.setTipoCable(tp);

tp.getDesignacionCables().add(dc);

return tp;
}

The object returned by the server is serialized with no errors, but
the client produces an error when tries to deserialize it.
If I remove JPA annotations from the entity classes, the
deserialization goes right.
Is this a bug?


I have observed that the the serialized string returned in each case
are slighty different:

The one from JPA annotated objects that produces the deserialization
error:
//OK['B',6,0,0,3,0,1,0,5,4,1,3,2,1,
["es.excentia.esco.data.model.TipoCable/
95382644","Hola","java.util.HashSet/
1594477813","es.excentia.esco.data.model.DesignacionCable/
3990987763","sadfad","java.lang.Long/4227064769"],0,6]

The one from the same objects without JPA annotations, that works ok.
//OK['B',6,-1,0,5,4,1,3,2,1,
["es.excentia.esco.data.model.test.TipoCable/
4254737913","Hola","java.util.HashSet/
1594477813","es.excentia.esco.data.model.test.DesignacionCable/
1472385747","sadfad","java.lang.Long/4227064769"],0,6]


Here is the error that is generated when deserializing in the client
side.

java.lang.ClassCastException: es.excentia.esco.data.model.TipoCable
cannot be cast to java.lang.Long
at
es.excentia.esco.data.model.DesignacionCable_FieldSerializer.deserialize(DesignacionCable_FieldSerializer.java:
51)
at es.excentia.esco.data.model.DesignacionCable_FieldSerializer
$Handler.deserialize(DesignacionCable_FieldSerializer.java:11)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:
91)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:
108)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
119)
at
es.excentia.esco.data.dto.Page_FieldSerializer.deserialize(Page_FieldSerializer.java:
65)
at es.excentia.esco.data.dto.Page_FieldSerializer
$Handler.deserialize(Page_FieldSerializer.java:11)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:
91)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:
108)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
119)
at
es.excentia.esco.data.model.TipoCable_FieldSerializer.deserialize(TipoCable_FieldSerializer.java:
51)
at es.excentia.esco.data.model.TipoCable_FieldSerializer
$Handler.deserialize(TipoCable_FieldSerializer.java:11)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:
91)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:
108)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
119)
at
com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.deserialize(Collection_CustomFieldSerializerBase.java:
34)
at
com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.deserialize(ArrayList_CustomFieldSerializer.java:
32)
at
com.google.gwt.user.client.rpc.core.java.util.ArrayList_FieldSerializer
$Handler.deserialize(ArrayList_FieldSerializer.java:11)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:
91)
at
com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize(ClientSerializationStreamReader.java:
108)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject(AbstractSerializationStreamReader.java:
119)
at
es.excentia.esco.data.dto.Page_FieldSerializer.deserialize(Page_FieldSerializer.java:
65)
at es.excentia.esco.data.dto.Page_FieldSerializer
$Handler.deserialize(Page_FieldSerializer.java:11)
at
com.google.gwt.user.client.rpc.impl.SerializerBase.deserialize(SerializerBase.java:
91)


Here are the contents of the related returned classes:

@Entity
@Table(name="tipo_cable"
,schema="public"
)
public class TipoCable  implements java.io.Serializable,
IsSerializable {

private static final long serialVersionUID = 1L;

private Long id;
private String descrip;
private Set designacionCables = new
HashSet(0);

/** default construc

Re: AXIS2 WITH ECLIPSE AND GWT PLUGIN

2010-12-03 Thread bond
Hi,
thanks for your reply.
I created an Tomcat 6.20 server but how I can add it to my project? I
remember you that my project is a "GWT Web Application Project"
created with Gwt Plugin for Eclipse.

Can you send me a link of a tutorial?

Thanks very much

Regards

Daniele

On 3 Dic, 14:53, v b  wrote:
> Look for adding a server in eclipse.
>
> On Dec 3, 1:32 pm, bond  wrote:
>
> > Hi guys,
> > I've a big problem. I've a gwt project with Eclipse Helios + gwt 2.1
> > and gwt plugin 3.6. So my project is NOT a web project and when I run
> > it Eclipse uses Jetty to deploy it.
>
> > Now I've to creare some web services with axis 2 in order to publish
> > them in my project. The web service wizard can't create my service
> > because it wants a web project with Tomcat.
>
> > There is some solutions to my problem?
>
> > 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.



gwt-maven-plugin 1.3.2.google NoInitialContextException

2010-12-03 Thread ultrafil
Hi,

I need to uses jndi to connected my apps with my postgresql database.

My jndi conf is ok on external tomcat server. (mvn install -> and running tomcat is ok)

But, in dev mode, mvn gwt:run i the following error:
Caused by: javax.naming.NoInitialContextException: Need to
specify class name in environment or system property, or as an applet
parameter, or in an application resource file:
java.naming.factory.initial

I put the jetty-env.xml in the WEB-INF folder.

Seeing my gwt-maven-pligin config :


org.codehaus.mojo
gwt-maven-plugin
1.3.2.google

${gwt.version}

fr.grouperatp.ratp.applications.accessio.Application

fr.grouperatp.ratp.applications.accessio.Application/
Application.html

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

src/main/webapp/WEB-INF/jetty-env.xml
true
false




compile
test






I trying to added this "-
Djava.naming.factory.initial=org.mortbay.naming.InitialContextFactory"
on argument in run configuration but i have the same error log.

How can i solved my problem ?

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

2010-12-03 Thread cri
I know this is a little off topic, but has anyone noticed that the gwt
website is very slow the last few days. Hopefully, they know about it
and are working on the fix. Sometimes I have to wait literally minutes
for a gwt forumn search to complete, for example. Also, I just clicked
on a forum article link and it took a few minutes to come up in a page.

-- 
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: AXIS2 WITH ECLIPSE AND GWT PLUGIN

2010-12-03 Thread v b
Look for adding a server in eclipse.

On Dec 3, 1:32 pm, bond  wrote:
> Hi guys,
> I've a big problem. I've a gwt project with Eclipse Helios + gwt 2.1
> and gwt plugin 3.6. So my project is NOT a web project and when I run
> it Eclipse uses Jetty to deploy it.
>
> Now I've to creare some web services with axis 2 in order to publish
> them in my project. The web service wizard can't create my service
> because it wants a web project with Tomcat.
>
> There is some solutions to my problem?
>
> 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: To smart GWT or not

2010-12-03 Thread Jaroslav Záruba
...until you run into some SmartGWT magic - like widgets not working
without otherwise completely useless 'final' (have fun trying figure
that out), newly spanned records not appearing in tree, styles not
getting applied until mouseover, etc.
What looks like polished set of awesome widgets might turn into
nightmare which makes you throwing your deadlines out of the window.

(Like I said before, this particular experience with SmartGWT is one
year old.)

With GWT the start might be slower but you can predict the deadlines +
you're not working with 'black box'.

On 3 pro, 00:00, ckendrick  wrote:
> Sorry that's quite absurd: SmartGWT is often introduced to solve
> performance problems, and it solves them.
>
> SmartGWT is intentionally designed to have a one-time-ever download of
> a feature rich runtime in exchange for reducing subsequent server
> requests.  For example, Adaptive Filtering greatly reduces the
> costliest types of database hits:
>
>    http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_fe...
>
> .. and allows you to introduce an extremely powerful data highlighting
> system with no server load at all:
>
>    http://blog.isomorphic.com/?p=234
>
> If your application is the kind we target - complex enterprise
> applications which are used repeatedly and for significant lengths of
> time - this provides a gigantic performance boost, and once-ever
> download of cachable JavaScript files is a negligible factor.
>
> Look at a deployed SmartGWT application and you've got users humming
> along, ripping through the interface and nothing being downloaded
> anymore because it's all cached.  And everyone is getting fast
> responses from the database because the Smart GWT framework is
> minimizing database load.
>
> The larger your application becomes, the more these benefits accrue.
> And, by the time you've built an application with comparable
> functionality with core GWT or another GWT-based framework, you're
> going to be downloading the same size runtime as SmartGWT anyway.
>
> On Dec 1, 1:44 pm, aarnott  wrote:
>
>
>
>
>
>
>
> > I've found Smart GWT to have rather poor performance and it comes at
> > the added cost of massive javascript libraries (even when they are
> > gzipped). If you are anything like me, you will probably find that you
> > lose time in the long run by going with Smart GWT because you will
> > want to get rid of it later to boost performance.

-- 
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 Activities – nesting? YAGNI ? - an exa mple of where you NEED it !

2010-12-03 Thread Brian Reilly
Looks like I'm going to have to eat my hat on this one:

http://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/57cae16478971519

It's a proposal to change Activity from an interface to an abstract class...
basically removing the Activity interface and renaming the existing
AbstractActivity to Activity.

It sounds like there are other breaking changes coming in 2.1.1. I'm curious
to know what they are...

-Brian

On Tue, Nov 30, 2010 at 3:19 PM, Brian Reilly  wrote:

> There's a difference between "experimental" and "immature". I don't think
> Activities and Places are experimental. They are building blocks upon which
> more functionality can be built. While there may be bigger plans for future
> versions of GWT, I'm glad that we have this much to work with sooner rather
> than have to wait longer for a complete out-of-the-box solution.
>
> I wouldn't  take Ray's comments (from
> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/2173bd71a6289c84)
> to mean that these features are experimental. More likely, you'll be able to
> rip out a bunch of code when newer versions are released rather than have to
> maintain boilerplate.
>
> That said, have a look at the options, including other MVP frameworks, and
> then choose what's going to work best for your situation.
>
> -Brian
>
> On Tue, Nov 30, 2010 at 2:34 PM, zixzigma  wrote:
>
>> Thank you everyone for your wonderful insights.
>> You provided very helpful suggestions and invaluable solutions to deal
>> with the problem i described.
>>
>> I was going to implement some of the solutions offered, but this
>> comment by Ray Ryan,
>> got me very worried and kind of put me off.
>>
>> "The activity and place packages in GWT 2.1 are pretty minimal first
>> stabs,
>> kind of rushed out the door. One focus of GWT 2.2 will be improving
>> their
>> flexibility and reducing the boilerplate they require. "
>>
>>
>> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/2173bd71a6289c84
>>
>> I am going to start working on a new project, and I'm afraid based on
>> Ray Ryan's comment, GWT 2.1 MVP is too experimental,
>> and there is a very high risk that GWT 2.2 would be dramatically
>> different than 2.1, leaving me with
>> a lot of boilerplate code to maintain !
>>
>> I am leaning toward using GWTP, as Brian Reilly suggested.
>> GWTP is more stable and mature than GWT 2.1 MVP,
>> and it comes with many added features.
>>
>> I will keep you updated on this, as I continue with my project.
>>
>> Sincerely,
>> zixzigma
>>
>>
>> --
>> 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: Facing some problems after switching to GWT 2.1 from GWT 2.0.4

2010-12-03 Thread Brian Reilly
I fiddled with this quite a bit a while back, and I just upgraded to 2.1 so
I panicked when I read this. However, I just tested in Safari and Firefox
(both on Mac) and everything still works.

The key, as Dominic mentioned, is to handle KEY_ENTER in a handler for
KeyDownEvent instead of KeyPressEvent. Actually, I also just noticed that
I'm not using event.getCharCode(). I'm
using event.getNativeEvent().getKeyCode(). In fact, looking at the JavaDoc
for KeyCode, it says, "Contains the native key codes ...", so that gives me
some confidence that getting the key code from the native event is the way
to go.

I suspect that it's the combination of using KeyDownEvent
and event.getNativeEvent().getKeyCode(). Character codes are probably more
to represent printable characters. While you could consider a new line a
printable character, the enter key doesn't translate to a new line in all
input contexts. I suspect you're in one of those contexts (if you're trying
to add some behavior for it), so it makes sense that you want the native
event in this case instead of whatever character it would be interpreted as.

-Brian

On Fri, Dec 3, 2010 at 7:57 AM, aditya sanas <007aditya.b...@gmail.com>wrote:

> hi dominic,
>
>
> I m receiving key press event in all the browser the thing that i have
> noticed which doesn't work in GWT 2.1 is -
>
>  *if(event.getCharCode()==KeyCodes.KEY_ENTER){ *
>
> the o/p of event.getCharCode() in GWT 2.1 is nothing not even 0 so i cnt
> compare it with KeyCodes.KEY_ENTER
>
> i had tried one more new method that has been introduced in GWT 2.1 which
> getUnicodeCode() which gives 0 whenever i presses ENTER but this is not the
> right because i m getting 0 even when i m pressing any arrow key.
>
> how to figure this out...?
>
>
> --
> Aditya
>
>
>
> On Fri, Dec 3, 2010 at 5:46 PM, dominic jansen 
> wrote:
>
>> hi aditya,
>>
>> i ve noticed that there are different behaviours for the
>> KeyPressHandler for each browser (e.g. for me the safari browser did
>> not recognize the keypressevent).
>>
>> maybe you can use the KeyDownHandler or KeyUpHandler instead of the
>> KeyPressHandler. this worked for me
>>
>> best, dom
>>
>>
>>
>> 2010/12/3 Aditya <007aditya.b...@gmail.com>:
>> > Hi,
>> >
>> > I have updated my GWT version to 2.1 and faced some of the problems
>> > regarding textbox' key press handlers...
>> >
>> > the code which works completely fine in previous version is
>> >
>> >   txtPassword.addKeyPressHandler(new
>> > KeyPressHandler() {
>> >   @Override
>> >   public void onKeyPress(KeyPressEvent event) {
>> >
>> >
>>  if(event.getCharCode()==KeyCodes.KEY_ENTER){
>> > // some processing here to send
>> > username password to server
>> >   }
>> > // class closures.
>> >
>> > whenever user presses an ENTER key the code from 'if' condition gets
>> > executed but this does nt work in GWT 2.1
>> > is there any other way to perform this validation to know user has
>> > striked ENTER or not...?
>> >
>> > Thanks,
>> > 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.
>> >
>> >
>>
>> --
>> 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-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: To smart GWT or not

2010-12-03 Thread Jaroslav Záruba
+1 for pure GWT 2.1

I have rather unpleasant experience with SmartGWT, but that was 1yr
ago and maybe things have changed.

-- 
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 MVP Activities and Places

2010-12-03 Thread Brian Reilly
>
> >>That's the exact use case for FilteredActivityMapper and
> >>CachingActivityMapper (and how they're used AFAICT in "scaffold"
> >>applications generated by String Roo for the "master" activities).
>

Thanks for the confirmation, Thomas. I felt like it was a bit cumbersome to
use, but it makes more sense as a consistent way to get that behavior in
generated code (which is unfortunate, but it is what it is).


> what about situations where a display region is master in some cases
> (requiring to be cached), and
> detail in other cases ?
>
> for example, when we have West, Center, and East Regions,
> Center region can act as Detail for West Region in some use cases,
> but in other use cases, be used as Master for East Region.
>

I can think of two approaches, depending on the specificity of the places.

1. Use an activity mapper for the center region but not the east region.
This would be appropriate if the center region shows the item of interest
and the east region contains some contextual detail that isn't worthy of
being encoded into a place.

2. Have both the center and east regions react to the same place where,
unlike option 1, the place contains enough context for both regions. The
east region would use that extra detail to display something specific about
the item of interest while the center region can ignore it if it doesn't
affect what's displayed.

I'm sure there are more ways to approach it. Just keep in mind that activity
mappers are for mapping places to activities. Once you decide how granular
you want your places to be, that will help determine the best use of
activity mappers.


> what happens if we use CachingActivityMapper for ALL of our
> ActivityMappers ?
> would there be a performance problem, what are the implications,
> benefits or drawbacks ?


CachingActivityMapper "caches the last activity it returned, to be re-used
if we see the same place twice" (
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/activity/shared/CachingActivityMapper.html).
If your concern is memory, there should be little to no overhead when using
a CachingActivityMapper. As for performance, the goal of
CachingActivityMapper is to avoid initializing a new activity (and
potentially fetching data from the server, doing client-side processing,
etc.) when the current activity already represents the requested place. I
can't think of any downside to using CachingActivityMapper... as long as the
wrapped activity mapper and the places it uses are implemented as advised
(be sure to properly implement equals() and hashCode() for your places).

-Brian

-- 
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-RPC Portlets Liferay

2010-12-03 Thread Ani
Hello Olivier,

Yes, i've had already read both of this links, but I'm still getting
errors. Now, after making some changes they suggest, I'm getting this:

"Estado HTTP 404 - /GWTPortlet/

The resource is not avaliable."

I don't know what i'm doing wrong... PLEASE, any help??? :(

Thank you very much!!


On 2 dic, 21:43, Olivier TURPIN  wrote:
> Hello,
>
> There is some resources about GWT-APP management on liferay's forum 
> :http://www.liferay.com/web/guest/community/forums/-/message_boards/me...
>
> http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/How+to+bu...
>
> I think that there is a gwt sample with the demo bundle, did you try
> it ?
>
> Maybe you've got some troubles with contextpath (N.B i'm not a Liferay
> expert...°)
>
> Olivier
>
> On 2 déc, 15:05, Ani  wrote:
>
> > Hello,
>
> > I'm new on portlets and LifeRay world. I have a GWT-RPC ap and i'd
> > like to use it in a portlet, and see it in LifeRay, but when i try to
> > add the portlet, i get the following error:
>
> > Error:
> > The call failed on the server; see server log for details
>
> > In localhost."date".log i see:
> > org.apache.catalina.core.StandardHostValve custom
> > FINA: Processing ErrorPage[errorCode=404, location=/errors/404.jsp]
>
> > Could you help me with this issue?
>
> > Than you very much in advance por any kind of information you can give
> > me about this, because i was not able to find much, and the one i've
> > found, didn't help me, as i continue getting the same error.
>
> > Regards,
> > Ana

-- 
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: Facing some problems after switching to GWT 2.1 from GWT 2.0.4

2010-12-03 Thread aditya sanas
hi dominic,


I m receiving key press event in all the browser the thing that i have
noticed which doesn't work in GWT 2.1 is -

 *if(event.getCharCode()==KeyCodes.KEY_ENTER){ *

the o/p of event.getCharCode() in GWT 2.1 is nothing not even 0 so i cnt
compare it with KeyCodes.KEY_ENTER

i had tried one more new method that has been introduced in GWT 2.1 which
getUnicodeCode() which gives 0 whenever i presses ENTER but this is not the
right because i m getting 0 even when i m pressing any arrow key.

how to figure this out...?


--
Aditya


On Fri, Dec 3, 2010 at 5:46 PM, dominic jansen wrote:

> hi aditya,
>
> i ve noticed that there are different behaviours for the
> KeyPressHandler for each browser (e.g. for me the safari browser did
> not recognize the keypressevent).
>
> maybe you can use the KeyDownHandler or KeyUpHandler instead of the
> KeyPressHandler. this worked for me
>
> best, dom
>
>
>
> 2010/12/3 Aditya <007aditya.b...@gmail.com>:
> > Hi,
> >
> > I have updated my GWT version to 2.1 and faced some of the problems
> > regarding textbox' key press handlers...
> >
> > the code which works completely fine in previous version is
> >
> >   txtPassword.addKeyPressHandler(new
> > KeyPressHandler() {
> >   @Override
> >   public void onKeyPress(KeyPressEvent event) {
> >
> >
>  if(event.getCharCode()==KeyCodes.KEY_ENTER){
> > // some processing here to send
> > username password to server
> >   }
> > // class closures.
> >
> > whenever user presses an ENTER key the code from 'if' condition gets
> > executed but this does nt work in GWT 2.1
> > is there any other way to perform this validation to know user has
> > striked ENTER or not...?
> >
> > Thanks,
> > 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-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.



Re: Facing some problems after switching to GWT 2.1 from GWT 2.0.4

2010-12-03 Thread dominic jansen
hi aditya,

i ve noticed that there are different behaviours for the
KeyPressHandler for each browser (e.g. for me the safari browser did
not recognize the keypressevent).

maybe you can use the KeyDownHandler or KeyUpHandler instead of the
KeyPressHandler. this worked for me

best, dom



2010/12/3 Aditya <007aditya.b...@gmail.com>:
> Hi,
>
> I have updated my GWT version to 2.1 and faced some of the problems
> regarding textbox' key press handlers...
>
> the code which works completely fine in previous version is
>
>                       txtPassword.addKeyPressHandler(new
> KeyPressHandler() {
>                       @Override
>                       public void onKeyPress(KeyPressEvent event) {
>
>                                if(event.getCharCode()==KeyCodes.KEY_ENTER){
>                                     // some processing here to send
> username password to server
>                               }
> // class closures.
>
> whenever user presses an ENTER key the code from 'if' condition gets
> executed but this does nt work in GWT 2.1
> is there any other way to perform this validation to know user has
> striked ENTER or not...?
>
> Thanks,
> 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.
>
>

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



AXIS2 WITH ECLIPSE AND GWT PLUGIN

2010-12-03 Thread bond
Hi guys,
I've a big problem. I've a gwt project with Eclipse Helios + gwt 2.1
and gwt plugin 3.6. So my project is NOT a web project and when I run
it Eclipse uses Jetty to deploy it.

Now I've to creare some web services with axis 2 in order to publish
them in my project. The web service wizard can't create my service
because it wants a web project with Tomcat.

There is some solutions to my problem?

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: How to create Gmail contextual gadget using GWT?

2010-12-03 Thread Alexander


On 2 дек, 03:24, Simeon Ross  wrote:

> What is the structure of your inject.xml file? I had a lot of problems
> trying that approach and only was able to get one required tag in
> there otherwise I got compile issues for malformed xml

My inject.xml:



google.com:MessageIDExtractor



I didn't try add other tags yet.

-- 
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 MVP How to change Page title upon Navigation (Place Change)

2010-12-03 Thread Mauro Bertapelle
use Document.setTitle()
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/dom/client/Document.html#setTitle(java.lang.String)

-- 
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: Announcing free online GWT/GAE mini-book

2010-12-03 Thread Harald Pehl
Hi Marius,

thanks a lot for your work on this great book!

Best regards
Harald


On Dec 3, 2:04 am, metalhammer29a  wrote:
> Thank you, what a valuable resource.
> already bookmarked it, going to read it soon.

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