Re: Unit testing classes that depends on RequestFactory

2011-09-02 Thread Dominik Steiner
I'm pretty new to RF but by reading through various posts regarding
the testing of RF i came up with the following solution that seems to
work well so far with spring

First an abstract test case that your unit test would extends

@TransactionConfiguration(defaultRollback = false)
@ContextConfiguration({ "classpath:spring/somecontext.xml" })
@RunWith(SpringJUnit4ClassRunner.class)
public abstract class SpringRequestFactoryServletTest{

@Autowired
SpringRequestFactoryServlet springRequestFactoryServlet;

protected MockServletConfig servletConfig = new
MockServletConfig();
protected MockServletContext servletContext = new
MockServletContext();
protected T requestFactory;
private SpringRequestTransport transport;
private final Class requestFactoryClass;

public SpringRequestFactoryServletTest(Class
requestFactoryClass) {
this.requestFactoryClass = requestFactoryClass;
}

@Before
public void init() {
requestFactory = create(requestFactoryClass);
springRequestFactoryServlet.setServletConfig(servletConfig);
springRequestFactoryServlet.setServletContext(servletContext);

String[] contexts = new String[] { "classpath:spring/
somecontext.xml" };
XmlWebApplicationContext webApplicationContext = new
XmlWebApplicationContext();
webApplicationContext.setConfigLocations(contexts);
webApplicationContext.setServletContext(servletContext);
webApplicationContext.refresh();

servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE,
webApplicationContext);
}

private T create(Class requestFactoryClass) {
T t = RequestFactorySource.create(requestFactoryClass);
transport = new SpringRequestTransport(springRequestFactoryServlet);
t.initialize(new SimpleEventBus(), transport);
return t;
}


/**
 * Allows firing a Request synchronously. In case of success, the
result is
 * returned. Otherwise, a {@link RuntimeException} containing the
server
 * error message is thrown.
 */
public  T fire(Request request) {
return fire(request, null);
}

public  T fire(Request request, String loginname) {
ReceiverCaptor receiver = new ReceiverCaptor();
MockHttpServletRequest httpRequest = new MockHttpServletRequest();
MockHttpServletResponse httpResponse = new MockHttpServletResponse();
transport.setRequest(httpRequest);
transport.setResponse(httpResponse);
if(loginname != null) {
httpRequest.setUserPrincipal(new PrincipalMock(loginname));
}
request.fire(receiver);

handleFailure(receiver.getServerFailure());
return receiver.getResponse();
}

private void handleFailure(ServerFailure failure) {
if (failure != null) {
throw new RuntimeException(buildMessage(failure));
}
}

private String buildMessage(ServerFailure failure) {
StringBuilder result = new StringBuilder();
result.append("Server Error. Type: ");
result.append(failure.getExceptionType());
result.append(" Message: ");
result.append(failure.getMessage());
result.append(" StackTrace: ");
result.append(failure.getStackTraceString());
return result.toString();
}

}

The SpringRequestTransport looks like this

public class SpringRequestTransport implements RequestTransport {
private final SpringRequestFactoryServlet requestFactoryServlet;
private MockHttpServletRequest request;
private MockHttpServletResponse response;

public SpringRequestTransport(SpringRequestFactoryServlet
requestFactoryServlet) {
this.requestFactoryServlet = requestFactoryServlet;
}

public void setRequest(MockHttpServletRequest request) {
this.request = request;
}

public void setResponse(MockHttpServletResponse response) {
this.response = response;
}

@Override
public void send(String payload, TransportReceiver receiver) {
try {
request.setContentType("application/json");
request.setCharacterEncoding("UTF-8");
request.setContent(payload.getBytes());
requestFactoryServlet.handleRequest(request, response);
String contentAsString = response.getContentAsString();
receiver.onTransportSuccess(contentAsString);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

The SpringRequestFactoryServlet

@Controller
@Transactional
public class SpringRequestFactoryServlet extends RequestFactoryServlet
implements ServletContextAware, ServletConfigAware{

private static final ThreadLocal perThreadContext
=
  new ThreadLocal();
private ServletContext servletContext;
private ServletConfig servletConfig;

public SpringRequestFactoryServlet() {
super(new DefaultExceptionHandler(), new
Spri

Re: Requestfactory : best practice for persisting updates with Locator

2011-09-01 Thread Dominik Steiner
Perhaps a small test case might better explain what problem i'm facing
with the delta's send from request factory to the locator class (the
fire() method is in order to do synchronous testing of the requests
sent)

@Test
public void testPersistAndUpdate() throws Exception {
SomeRequestContext addRequest = requestFactory.someRequest();
FooProxy fooProxyCreated = addRequest.create(FooProxy.class);
fooProxyCreated.setName("fooname");
BarProxy barProxy = addRequest.create(BarProxy.class);
barProxy.setName("barname");
fooProxyCreated.setBars(Arrays.asList(barProxy));

IntegerResponseProxy addResponse =
fire(addRequest.persist(fooProxyCreated));
assertEquals(null, addResponse.getErrormessage());
assertNotNull(addResponse.getValue());
Integer id = addResponse.getValue();

SomeRequestContext findRequest = requestFactory.someRequest();
FooProxy fooProxyFound = fire(findRequest.find(id).with("bars"));

SomeRequestContext updateRequest = requestFactory.someRequest();
fooProxyFound = updateRequest.edit(fooProxyFound);
BarProxy bar = fooProxyFound.getBars().get(0);
bar.setName("newname");
IntegerResponseProxy updateResponse =
fire(updateRequest.persist(fooProxyFound));
assertEquals(null, updateResponse.getErrormessage());
assertEquals(id, updateResponse.getValue());
}


So on the server the service method just looks like this

public IntegerResponse persist(Foo foo)

and the
public class Foo{
   Integer id;
   String name;
   List bars;
|

and Bar might have a composite id

public class Bar {
BarPK barPK;
}

public class BarPK{
   Integer fooId;
   String name;
}

When it is created all properties gets sent to the persist() method
and the full object can easily be persisted using hibernate. The
second time an update is occuring on that object the fooId will be
null as no changes have been made to that on the client evidently.
This makes working with the Foo foo object in the persist method quite
manual. And how would i differentiate if some null property is just
not sent because no update has occured or because it has been reset to
null? Is such a use case not supported by RF and i have to stick with
RPC?

Thanks for any hints

Dominik

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



Requestfactory : best practice for persisting updates with Locator

2011-08-31 Thread Dominik Steiner
Hi,

I finally did a first try at RF and am wondering what is the best way
to implement the persist method on a Locator class in order to deal
with only the deltas send from the client?

As right now my persist(T objectToPersist) method on the Locator is
doing a create if the object has no id associated to it. This use case
is pretty similar to what i would have done with RPC as the whole
object is being sent evidently. But when i then reload the object from
the server, change some properties on it and call persist again a
pretty 'light' objectToPersist appears in that method which seems to
even have lost the PK on the associations in that object.

So am i missing something or is there a good way to implement those
updates especially when dealing with associations in that object?

Thanks

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



Re: Touchscreen laptops - access touch events?

2010-06-06 Thread Dominik Steiner
Thanks for your answers, it confirms then what I was thinking.

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



Touchscreen laptops - access touch events?

2010-06-05 Thread Dominik Steiner
Hi there,

is there a way to get touch events from touchscreen laptops or desktop
computers? Am I right that only the iphone and android browser support
touch events so far? So that it is not possible to access those touch
events from the touchscreen computers?

Thanks

Dominik

-- 
You received 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: OOPHM memory leak?

2010-03-24 Thread Dominik Steiner

Thanks kozura for your reply,

here with me I see an increase of around 40 MB on each reload, and my  
app already starts with java allocating 200 MB on the first load.


Not sure if the project size correlates with the amount of memory that  
leaks, here with me I have around 700 classes on my project?


Also not sure what eclipse is doing in the background and perhaps is  
holding the threads until garbage collecting them, but I see 3 new  
threads added each time when i relaunch the application.


Thanks again for your information

Dominik

Same setup, I do see a slow increase of about 10-20MB per page upload
in the Developer application.  Eventually this might lead to out of
memory exception; you could always increase the heap size for now to
avoid that for awhile longer, -Xmx512 or whatever.  I see nothing
maintained in the app that should be causing extra memory to be take
for each reload, so seems there may be a legitimate memory leak here.

I don't see the consistent thread increase, although it does seem to
go up by one occasionally on restart.

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



OOPHM memory leak?

2010-03-24 Thread Dominik Steiner
Hi there,

I'm using eclipse 3.5 on Mac OSX with the google eclipse plugin and
GWT 2.0.

What I see is that every time I reload my gwt app that I'm debugging
using the Web Application launch configuration from the plugin and
OOPHM in Firefox 3.5, the memory usage of the java process that is
being started when i start the Web Application via OOPHM is constantly
rising until reaching 400 MB where i get an OutOfMemory exception.
Basically I can thus only 4 or 5 times reload the web page until
having to close the Web Application from within eclipse and start a
new one. Besides that I'm seeing that everytime I launch a new Web
Application (having terminated the prior one) the threads in my
eclipse process is steadily rising too, so that after a while i get
like > 150 threads which is bring down my eclipse performance.

I really like the way OOPHM works, but did someone else experiment the
same performance/memory problems while using it?

Thanks for any hints you can give me

Dominik

-- 
You received 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: Alternative for Class.isAssignableFrom() ?

2010-02-22 Thread Dominik Steiner
I added an issue to the issue tracker if you also are in need of that
method and want to star it

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

Dominik

On 19 Feb., 09:09, Dominik Steiner 
wrote:
> @Chris,
>
> yes, thanks for the tip, I already tried that by getSuperclass() will  
> not get any classes that are implemented by this class but only a  
> superclass. So I would not be able to use interfaces but only extend  
> from a base class to which i could also attach a listener too and that  
> would be triggered if a subclass event would be fired, but that's not  
> the same than having the power and flexibility of interfaces.
>
> @Nathan,
>
> your solution is what I tried first and my junit tests would run just  
> fine with this but GWT doesn't implement theisAssignableFrom()  
> method, so that's why I'm looking for some alternatives if there are?
>
> Thanks again for your great help and perhaps there are other solutions  
> out there still?
>
> Dominik
>
> > The JRE Emulation Reference says, that getSuperclass() is supported.
> >http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html
> > Maybe you can make do with this?
>
> > Chris
>
> > On Feb 19, 3:58 am, Dominik Steiner 
> > wrote:
> >> Hi there,
>
> >> I'm trying to implement an event bus that will receive register
> >> listeners like this
>
> >> public  void registerListener(Class
> >> eventClassname, EventListener eventListener);
> >> (Event is a custom interface)
>
> >> what i would like then to achieve would be to be able to fire an  
> >> event
>
> >> public void fireEvent(Event event);
>
> >> and be able to trigger all my event listeners that either are of the
> >> same event.getClass() or that are assignable from the event class  
> >> that
> >> has been fired. Getting all the listeners that correspond to the  
> >> event
> >> class itself is no problem, but how can i achieve getting all the
> >> listeners that registered to a interface that the event class might
> >> implement without being able to use Class.isAssignableFrom()?
>
> >> Thanks for any hints and help in advance.
>
> >> Dominik
>
> > --
> > You received this message because you are subscribed to the Google  
> > Groups "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com
> > .
> > To unsubscribe from this group, send email to 
> > google-web-toolkit+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en
> > .

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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: Alternative for Class.isAssignableFrom() ?

2010-02-19 Thread Dominik Steiner

@Chris,

yes, thanks for the tip, I already tried that by getSuperclass() will  
not get any classes that are implemented by this class but only a  
superclass. So I would not be able to use interfaces but only extend  
from a base class to which i could also attach a listener too and that  
would be triggered if a subclass event would be fired, but that's not  
the same than having the power and flexibility of interfaces.


@Nathan,

your solution is what I tried first and my junit tests would run just  
fine with this but GWT doesn't implement the isAssignableFrom()  
method, so that's why I'm looking for some alternatives if there are?


Thanks again for your great help and perhaps there are other solutions  
out there still?


Dominik


The JRE Emulation Reference says, that getSuperclass() is supported.
http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html
Maybe you can make do with this?

Chris

On Feb 19, 3:58 am, Dominik Steiner 
wrote:

Hi there,

I'm trying to implement an event bus that will receive register
listeners like this

public  void registerListener(Class
eventClassname, EventListener eventListener);
(Event is a custom interface)

what i would like then to achieve would be to be able to fire an  
event


public void fireEvent(Event event);

and be able to trigger all my event listeners that either are of the
same event.getClass() or that are assignable from the event class  
that
has been fired. Getting all the listeners that correspond to the  
event

class itself is no problem, but how can i achieve getting all the
listeners that registered to a interface that the event class might
implement without being able to use Class.isAssignableFrom()?

Thanks for any hints and help in advance.

Dominik


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



Alternative for Class.isAssignableFrom() ?

2010-02-18 Thread Dominik Steiner
Hi there,

I'm trying to implement an event bus that will receive register
listeners like this

public  void registerListener(Class
eventClassname, EventListener eventListener);
(Event is a custom interface)

what i would like then to achieve would be to be able to fire an event

public void fireEvent(Event event);

and be able to trigger all my event listeners that either are of the
same event.getClass() or that are assignable from the event class that
has been fired. Getting all the listeners that correspond to the event
class itself is no problem, but how can i achieve getting all the
listeners that registered to a interface that the event class might
implement without being able to use Class.isAssignableFrom()?

Thanks for any hints and help in advance.

Dominik

-- 
You received 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: MVP - interface that implements setVisible()

2010-01-14 Thread Dominik Steiner

Hi Davis,

thanks for the fast reply.

That is actually a good idea, I was always looking for getters to  
implement on the Display, never occured to me that simple methods that  
go the other way might be as efficient too.


Thanks again for your help.

Dominik

Hi Dominik, why not have a display interface like this?

interface Display {
   void toggleVisible(boolean toggle);
}

If you need the presenter to toggle specific widgets on the display  
create an enum:


interface Display {

  enum WidgetType {
  BUTTON,
  TEXTBOX
  };

  void toggleVisible(boolean toggle, WidgetType type);
}

On Thu, Jan 14, 2010 at 8:45 PM, Dominik Steiner > wrote:

Hi there,

I'm wondering how you best handle the situation that in your Presenter
you need to call setVisible() on some UI Object returned via the
Display interface?

I could of course just write something like this in the Presenter

interface Display{
 Widget getOkButton();
}

but that would made the class not JUnit testable. So I'm wondering why
there are interfaces in GWT like HasText in order to set text on a
Label or something but no interface in order to pass that to the
Presenter for setting the visiblity of an UI element?

Am I missing something?

Dominik

P.S. of course I could just extend the Widget class with my own custom
ones and let this implement a custom Interface that defines setVisible
() in order to pass that to the Presenter to make it testable, but
wondering if others have run into the same problem?

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







--
Zeno Consulting, Inc.
home: http://www.zenoconsulting.biz
blog: http://zenoconsulting.wikidot.com
p: 248.894.4922
f: 313.884.2977
--
You received 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.



MVP - interface that implements setVisible()

2010-01-14 Thread Dominik Steiner
Hi there,

I'm wondering how you best handle the situation that in your Presenter
you need to call setVisible() on some UI Object returned via the
Display interface?

I could of course just write something like this in the Presenter

interface Display{
  Widget getOkButton();
}

but that would made the class not JUnit testable. So I'm wondering why
there are interfaces in GWT like HasText in order to set text on a
Label or something but no interface in order to pass that to the
Presenter for setting the visiblity of an UI element?

Am I missing something?

Dominik

P.S. of course I could just extend the Widget class with my own custom
ones and let this implement a custom Interface that defines setVisible
() in order to pass that to the Presenter to make it testable, but
wondering if others have run into the same 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.




Re: deRPC - any documentation available?

2010-01-13 Thread Dominik Steiner

Thanks Chris for the quick reply,

that was exactly what i needed.


Hi,

some documentation is at the bottom of
http://code.google.com/webtoolkit/doc/latest/DevGuideServerCommunication.html
--  
You received this message because you are subscribed to the Google  
Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-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.




deRPC - any documentation available?

2010-01-13 Thread Dominik Steiner
Hi,

I've been reading about deRPC on some other posts, but so far haven't
been able to find any documentation about this new RPC implementation,
can someone point me into the right direction?

And what is the opinion about deRPC? Is it ready to be used? What are
the advantages over the former RPC?

Thanks

Dominik
-- 
You received 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: no border on a dialogBox (macosx,netbeans)

2009-11-24 Thread Dominik Steiner
Did you try to use css to format your dialog box?

Formulaire fenetreAjout = new Formulaire();
fenetreAjout.addStyleName('my-dialog-box');

and then in the css file

.my-dialog-box{
  border:1px solid black;
}


HTH

Dominik
On 22 Nov., 07:29, lolveley  wrote:
> hi,
>
> I copied a program from a magazine with the purpose of learn GWT, and
> all run fine except the dialog box has no border, as shown in this
> picture 
> :http://serv3.upndl.com/raw/6be0cb4a4b30f0e1eee2d4bede59/capture-d...
> .
> I use netbeans with the plugin GWT4NB, I use macosx 10.6, I downloaded
> GWT (the last one), and the application container is tomcat 6.0 .
> can you tell me why the dialogbox has no border?
>
> here is the code of the dialogBox :
> *
> public class Formulaire extends DialogBox{
>
>     public TextBox saisieUrl=new TextBox();
>     public TextBox saisieTitre=new TextBox();
>
>     public Formulaire(){
>
>         super();
>         setText("Ajouter une nouvelle image");
>         Grid grid=new Grid(3, 2);
>         grid.setWidget(0, 0, new Label("url"));
>         grid.setWidget(0, 1, saisieUrl);
>         grid.setWidget(1, 0, new Label("titre"));
>         grid.setWidget(1, 1, saisieTitre);
>         Button boutonAjouter=new Button("Ajouter");
>         grid.setWidget(2, 1, boutonAjouter);
>         boutonAjouter.addClickHandler(new ClickHandler() {
>
>             public void onClick(ClickEvent event) {
>                 Formulaire.this.hide();
>             }
>         });
>         add(grid);
>         center();
>     }
>
> }
>
> *
> and here is the code for the calling of the dialogBox :
> *
> public void onClick(ClickEvent event) {
>
>         if (event.getSource()==boutonAjouter){
>
>             Formulaire fenetreAjout = new Formulaire();
>             fenetreAjout.addCloseHandler(this);
>             fenetreAjout.show();
>
>         }
> *
>
> can you help me?
>
> olivier.

--

You received 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: UnmodifiableList Serialization

2009-11-12 Thread Dominik Steiner
Hi Frederico,

how about before sending back the list creating an ArrayList and
iterating through the list you want to return in order to then fill
that ArrayList and return that?

HTH

Dominik

On Nov 11, 1:03 pm, fedy2  wrote:
> Hi,
> I'm using GWT 1.5.3 and I'm trying to send a List by RPC but I'm
> getting a serialization exception:
>
> Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
> 'java.util.Collections$UnmodifiableList' was not included in the set
> of types which can be serialized by this SerializationPolicy or its
> Class object could not be loaded. For security purposes, this type
> will not be serialized.
>
> How can make the UnmodifiableList type serializable?
>
> The object transmitted by RPC contains a List type variable.
> I set the list variable taking the value from a method that return a
> List type value
> so I can't assume to receive an UnmodifiableList.
>
> Thanks
> Federico

--

You received 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=.




Re: how to use a server class in client code

2009-11-11 Thread Dominik Steiner

Sanjith,

you can move the model classes to anywhere under the client folder,  
the client/domain example is just what i use here with me. And then  
the server will reuse those classes on server side where he will read  
the jdo annotations.

Let me know if it works for you

Dominik


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



Re: how to use a server class in client code

2009-11-10 Thread Dominik Steiner

Sanjith,

I'm using GWT on GAE and I also have my data model classes with JDO
annotations. I have those classes reside under client/domain and GWT
2.0 handles/ignores those JDO related annotations well and i don't
have to use Dozer or another framework in order to be able to use
those classes on the client.

If you need more help, please let me know.

HTH

Dominik

On Nov 9, 12:40 pm, Dalla  wrote:
> I´m not sure you can solve this particular problem the way DaveS
> suggested, not without modifying the class anyway.
> Even if you created a separate .jar and referenced that from your
> client project, the GWT compiler wouldn´t understand the annotations.
>
> My problem was similar to yours, and would be solved by creating a new
> even simpler class like this:
>
> Public class PhotoSetStoreDTO {
>
> private String setid;
> private String title;
> private String description;
>
> private String primaryPhotoURL;
> public PhotoSetStore(String id, String title, String descString,
> String photoURL) {
> setSetID(id);
> setTitle(title);
> setDescrption(descString);
> setPrimaryPhotoURL(photoURL);
>
> }
> }
>
> Then use Dozer or a similar mapping framework to do the mapping
> between server side and client side objects.
> I haven´t been working with GAE at all to be honest, so there might be
> a better approach.
>
> On 9 Nov, 18:39, Sanjith Chungath  wrote:
>
> > Thanks to all for your suggestions.
>
> > As my application needs to be deployed in google app engine, I doubt whether
> > I can move those classes from server to client. I use JDO to persist objects
> > to the GAE data store. The class is a simple class and I have mentioned it
> > below,
>
> > @PersistenceCapable(identityType = IdentityType.DATASTORE)
> > public class PhotoSetStore {
> > @PrimaryKey
> > @Persistent
> > private String setid;
>
> > @Persistent
> > private String title;
>
> > @Persistent
> > private String description;
>
> > @Persistent
> > private String primaryPhotoURL;
>
> > public PhotoSetStore(String id, String title, String descString,
> > String photoURL) {
> > setSetID(id);
> > setTitle(title);
> > setDescrption(descString);
> > setPrimaryPhotoURL(photoURL);
>
> > }
> > }
>
> > Dave, it looks simple approach to have a (java) project to have common
> > classes defined. I need few clarifications, do you have seperate projects
> > for GWT client code and server code? If not, how did you added the common
> > .jar file to the client code?
>
> > Also, I didnt quiet get how the common .jar file is different from the class
> > existing in a server package of same GWt project!
>
> > -Sanjith
>
> > On Mon, Nov 9, 2009 at 5:10 PM, sathya  wrote:
>
> > > Hi,
> > >    You can serialize classes only defined in client side(not server
> > > side).Class you defined on server side should be moved to client side
> > > to serialize.
>
> > > On Nov 9, 4:01 pm, DaveS  wrote:
> > > > That's how we did it originally, but then we created a separate GWT
> > > > project (well, actually it's just a JAR project) that defines all our
> > > > types that are common over the RPC interfaces. We reference that
> > > > project in both the server and client projects, and the JAR gets
> > > > pulled into the client side and GWT happily generates JS code from it.
> > > > We now also use it for some 'shared' client-side classes as well so
> > > > it's effectively just a library project.
>
> > > >   DaveS.
>
> > > > On Nov 9, 3:35 am, rjcarr  wrote:
>
> > > > > Hi Sanjith-
>
> > > > > I don't completely follow your question but any shared code between
> > > > > the client and the server has to reside in the client package (by
> > > > > default).  This is because GWT can only see code in the modules you
> > > > > have defined and the server package isn't a GWT module (again, by
> > > > > default).
>
> > > > > Hope this helps!
>
> > > > > On Nov 8, 10:30 am, Sanjith Chungath  wrote:
>
> > > > > > Greetings to all,
> > > > > >        I have defined a class in the server and want to get a list 
> > > > > > of
> > > > > > objects (of that class) as return parameter of an async call. But
> > > while
> > > > > > compile I got  following error "No source code is available for type
> > > > > > com.abc.pqr.data.XXX; did you forget to inherit a required module?".
> > > I know
> > > > > > that it is because GWT dont know the java script code for
> > > coresponding
> > > > > > class. What is the general practice to use a object of class in
> > > server side
> > > > > > at client code, serialize it? or any other better way.
>
> > > > > > -Sanjith.- Hide quoted text -
>
> > > > - Show quoted text -
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-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/grou

Re: com.google.gwt.junit.client.TimeoutException: The browser did not contact the server within 60000ms.

2009-11-02 Thread Dominik Steiner

I haven't tried the UiBinder yet, but if i remember right I read
somewhere that it is now prefered to use HtmlUnit tests instead of
using the GWTTestCase.

HTH

Dominik

On Oct 31, 9:49 am, Tiago Fernandez  wrote:
> Hello,
>
> I have a fully working webapp built with GWT-2.0.0-ms2's UiBinder.
> Recently I decided to get it covered by unit tests using GWTTestCase,
> but after coding a simple test case:
>
> public class MyTest extends GWTTestCase {
>
>   @Override public String getModuleName() {
>     return "foo.bar.MyApp";
>   }
>
>   public void testAnythingYouWant() {
>     assertTrue(true);
>   }
>
> I stumbled on this:
>
> com.google.gwt.junit.client.TimeoutException: The browser did not
> contact the server within 6ms.
>  - 1 client(s) haven't responded back to JUnitShell since the start of
> the test.
>  Actual time elapsed: 60.009 seconds.
>
>         at com.google.gwt.junit.JUnitShell.notDone(JUnitShell.java:800)
>         at com.google.gwt.junit.JUnitShell.runTestImpl(JUnitShell.java:989)
>         at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:436)
>         at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:
> 386)
>         at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:269)
>         at com.intellij.junit3.JUnit3IdeaTestRunner.doRun
> (JUnit3IdeaTestRunner.java:108)
>         at com.intellij.rt.execution.junit.JUnitStarter.main
> (JUnitStarter.java:60)
>
> Process finished with exit code 255
>
> The same test works fine when targeting a module NOT UiBinder-based.
>
> Any hint? I am using IDEA on a Mac, with the following VM arguments:
> -XstartOnFirstThread -Xmx512M
>
> Thanks in advance,
> Tiago Fernandez
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How do I get the current position of a widget within a Absolute Panel?

2009-10-29 Thread Dominik Steiner

Hi,

did you try to use the getAbsoluteLeft() or getAbsoluteTop() methods
of the widget class?

So you could query those for the child widget and for the absolute
panel and simply substract both in order to get the relative position
of the widget inside the panel.

also if the widget is a direct child of the absolute panel you might
want to have a look at

  /**
   * Gets the position of the left outer border edge of the widget
relative to
   * the left outer border edge of the panel.
   *
   * @param w the widget whose position is to be retrieved
   * @return the widget's left position
   */
  public int getWidgetLeft(Widget w) {

HTH

Dominik

On Oct 29, 4:49 am, Kriptonis Azullis  wrote:
> Can't anyone help?
>
> On Oct 28, 1:31 pm, Kriptonis Azullis  wrote:
>
> > Hi there, I'm making a application where the user makes diagrams,
> > saves them, and then loads them to visualise or edit.
> > I need a way of getting the position of the widgets within the
> > absolute panel where they are. The absolute panel occupies a certain
> > area of the page, so it's not the whole page. And it's CSS is set to
> > (40%, 450px). I did it this way because if I but a percentage in both
> > height and width, when the panel is empty it disappears, and I didn't
> > want that.
>
> > How can I know where a widget is in the absolute panel, so I can save
> > it's position, and load it from a file afterwards?
> > Also, is there a way to know the current size of the Absolute panel?
>
> > Thanks in advance ;)
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How can I remove a FlexTable?

2009-10-17 Thread Dominik Steiner

how about using the removeFromParent() method, so something like

listado.removeFromParent();

should do the trick

HTH

Dominik
On Oct 16, 8:31 am, nacho  wrote:
> Hi, i cant remove a FlexTable. This is my code:
>
> In my html
>
> 
>
> In my Java
>
> FlexTable listado = new FlexTable();
> ...
>
> ...
> RootPanel.get("listado").add(listado);
>
> And then in a click handler i want to remove that table, but it doesnt
> erase
>
> RootPanel.get("listado").clear();
>
> How can i do to take it out?
>
> Thanx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: com.google.gwt.user.client.rpc.SerializationException: java.lang.reflect.InvocationTargetException

2009-10-15 Thread Dominik Steiner

you should check that all of the types of your properties insides your
DTO are also serializable and have an empty default constructor.

HTH

Dominik

On Oct 13, 11:45 pm, Satya Lakshminath 
wrote:
> Hi,
>
> I am too getting a similar problem like was reported above
> I am trying to run application on tomcat and I have some of the DTO
> objects under a package com.x. and I able to get objects from
> table except for one DTO, I am implementing IsSerializable interface
> for my DTO when I watch at the the loggers in tomcat I see the
> following stack trace
>
> SEVERE: Exception while dispatching incoming RPC call
> com.google.gwt.user.client.rpc.SerializationException:
> java.lang.reflect.InvocationTargetException
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer
> (ServerSerializationStreamWriter.java:696)
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl
> (ServerSerializationStreamWriter.java:659)
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize
> (ServerSerializationStreamWriter.java:593)
> at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject
> (AbstractSerializationStreamWriter.java:129)
> at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
> $ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue
> (ServerSerializationStreamWriter.java:530)
> at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573)
> at com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess
> (RPC.java:441)
> at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
> 529)
> at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall
> (RemoteServiceServlet.java:166)
> at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost
> (RemoteServiceServlet.java:86)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:290)
> at org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:206)
> at org.apache.catalina.core.StandardWrapperValve.invoke
> (StandardWrapperValve.java:233)
> at org.apache.catalina.core.StandardContextValve.invoke
> (StandardContextValve.java:191)
> at org.apache.catalina.core.StandardHostValve.invoke
> (StandardHostValve.java:128)
> at org.apache.catalina.valves.ErrorReportValve.invoke
> (ErrorReportValve.java:102)
> at org.apache.catalina.core.StandardEngineValve.invoke
> (StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service
> (CoyoteAdapter.java:286)
> at org.apache.coyote.http11.Http11Processor.process
> (Http11Processor.java:845)
> at org.apache.coyote.http11.Http11Protocol
> $Http11ConnectionHandler.process(Http11Protocol.java:583)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:
> 447)
> at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeWithCustomSerializer
> (ServerSerializationStreamWriter.java:678)
> … 24 more
> Caused by: com.google.gwt.user.client.rpc.SerializationException: Type
> ‘[Ljava.lang.Object;’ was not included in the set of types which can
> be serialized by this SerializationPolicy or its Class object could
> not be loaded. For security purposes, this type will not be
> serialized.
> at
> com.google.gwt.user.server.rpc.impl.StandardSerializationPolicy.validateSerialize
> (StandardSerializationPolicy.java:83)
> at
> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize
> (ServerSerializationStreamWriter.java:591)
> at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject
> (AbstractSerializationStreamWriter.java:129)
> at
> com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize
> (Collection_CustomFieldSerializerBase.java:43)
> at
> com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize
> (ArrayList_CustomFieldSerializer.java:36)
> … 29 more
>
> nothing else is displayed in the loggers. while compiling my
> application I am shown with the following warning :
>
> Compiling module com....EPestReporting
> Scanning for additional dependencies: file:/E:/code//src/com//
> ///LoginScreen.java
> Computing all possible rebind results for
> ‘com....client.HibernateService’
> Rebindi

Re: Horizontal Panel isn't displaying

2009-10-15 Thread Dominik Steiner

Hi Brendan,

for such problems I would recommend using GWT 2.0 and the OOPHM so
that you can debug your application from within FF for example and use
FireBug to inspect your HorizontalPanel (which will be a  in
the DOM) and look with Firebug why the anchors are not visible in it.
(which could be then a css problem or something)

HTH

Dominik

On Oct 13, 10:29 pm, Brendan  wrote:
> Hello,
>
> I am trying to use a HorizontalPanel for a navigation bar that I am
> building with a loop.  The code looks like this:
>
> 
>                 HorizontalPanel navigation = new HorizontalPanel();
>                 int count = 0;
>                 for (final String name : artists.keySet()) {   // artists is 
> an
> instance of a LinkedHashMap
>                         count++;
>
>                         // create the link
>                         Anchor link = new Anchor(name, "");
>                         if (artists.size() == count) {
>                                 link.addStyleName("last");
>                         }
>                         link.addClickHandler(new ClickHandler() {
>
>                                 public void onClick(ClickEvent event) {
>                                         /// ...
>                                 }
>
>                         });
>                         // add to navigation
>                         navigation.add(link);
>                 }
> 
>
> If there is only 1 item in the list of artists it works, however if
> there is another one added nothing shows up.  I tried debugging it in
> eclipse and the only thing odd (when i inspected navigation) is that
> the text in navigation>children>array>[1]=Anchor (id=474) shows up red
> (where [0]=Anchor (id=470) shows up black).  Also the size property of
> the children says 2 but is also in red.
>
> The toString() of navigation shows the table with the 2 anchors
> properly added, just doesnt show up on the page.
>
> Also, I am new to GWT so any suggestions on code improvement for
> accomplishing the above would be appreciated.
>
> Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Cross-domain problem

2009-10-15 Thread Dominik Steiner

or you could use cross-site JSON requests

http://code.google.com/intl/de/webtoolkit/tutorials/1.6/Xsite.html

HTH

Dominik

On Oct 14, 8:53 am, Bakul  wrote:
> GWT RPC call must be served from the same server from where GWT
> generated script initially served on the browser.
>
> For example I am the user and I am requesting page from domain A, as
> my page has been served from domain A, GWT RPC calls must be served
> from domain A.GWT RPC can't communicate to domain B. Its a part of
> standard document.
>
> In your case, you need to distribute a server component with GWT
> Component. The server component could be either Java servlet or
> similar for .net world and this server component could interact with a
> component deployed on domain B vis web Service or REST servlet.
>
> Thanks,
> Bakul.
>
> On Oct 14, 2:41 am, Jakes  wrote:
>
> > I have made a component using gwt, this is a GIS-card viewer that uses
> > a C# made server where i use RPC calls to send data between the server
> > and the client (cardviewer).
> > All this works like a charm.
>
> > The problem is that while this component runs from the domain
> > cardviewer.company.com, and the produckts which use this component
> > runs from different other domains like produckt.company.com or
> > produckt.othercompany.com.
>
> > What do i do so i can use the javascript communication form the
> > products to the component?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: RichText: inconsistent output on different browsers

2009-10-09 Thread Dominik Steiner

yes, i can confirm this too, pressing enter in IE inserts a 
whereas on FF and Safari no  is inserted. Would wish to see some
coherent behaviour here too.

Dominik

On Oct 8, 3:29 am, Martin Trummer  wrote:
> I just noticed, that the RichtText editor produces different output
> for the same actions in different browsers:
> you can try it at:http://examples.roughian.com/index.htm#Widgets~RichTextArea
>
> Example: write a word, select it, click 'Toglle Bold' button, will
> produce:
>     * Firefox 3.5.2, Chrome 3.x
>       test
>     * Opera 10.00
>       test
>     * Iron 2.0.178, Chrome 4.x
>       test
>
> This makes it very difficult to implement consitent logic for checking
> the richt-text content (e.g. XSS check, custom transormations, ..)
> So: Is there a way to configure the RichText Area to always produce
> the same output (e.g. ?)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: rpc serialization problem

2009-10-08 Thread Dominik Steiner

Hi,

I'm using JDO with App Engine and GWT and sending the domain objects
with the JDO tags via RPC is working fine, so not sure if the problem
is JPA?

HTH

Dominik

On Oct 7, 3:48 am, Lubomir  wrote:
> Hi, I was experimenting with it a bit as well and it seems to me that
> even the most simple Entity bean cannot be passed through RPC call. I
> had a simple class:
>
> @Entity
> public class Tournament implements Serializable {
>
>         @Id
>         @GeneratedValue(strategy = GenerationType.IDENTITY)
>         private Long id;
>
>         private int tournamentId;
>
>         @Temporal(value = TemporalType.DATE)
>         private Date date;
> ...
> and I wasnt able either to pass it from the server to the client or
> the other way. Once I removed all the JPA annotation (no other
> change!), everything went fine. So I think despite the fact that the
> class above is de facto compliant with GWT requirements for via-RPC-
> sendable classes (see the docs - serializable, fields serializable,
> etc.), it's the JPA annotations and its processing by DataNucleus that
> create the problem.
> That there's some kind of problem can also be seen in the tutorial for
> GWT and appengine: instead of much more natural approach (from certain
> point of view) of creating the Stock entity in client code and sending
> it through RPC, addStock is called only with String argument and Stock
> Entity is constructed on server. Same with getStock: stock list is
> fetched from datastore and then parsed and getStock() passes array of
> Strings back to client, although it would be nice and convenient to
> have Stock entity on client and populate the table by calling getters.
> The solution is to use either DTO pattern or a 3rd party library
> called Gilead (that does basically the same boring work of cloning
> entity, passing it to the client and when it comes back, merging it
> with the original)
> LZ
>
> On Oct 6, 11:06 pm, Sudeep S  wrote:
>
> >  Hey Benjamin,
>
> >  Since u are using Generics ensure that all the classes Service, ServiceAync
> > and ServiceImpl
> >  use the same signature i.e List  .
> >    btw which version of gwt are u using.
>
> >  Also, you can the temp dir where u can find a rpc.log file with the list of
> > all objects that are serialized.
>
> > On Wed, Oct 7, 2009 at 2:20 AM, Benjamin  wrote:
>
> > > I'm struggeling with this now - did you guys solve it?  I have a
> > > simple client class that will be a parent in a simple parent-child
> > > relationship.  If i add an ArrayList property to the parent class (i
> > > don't even have to decorate it as persistant) i get
>
> > > EVERE: [1254861190636000] javax.servlet.ServletContext log: Exception
> > > while dispatching incoming RPC call
> > > com.google.gwt.user.client.rpc.SerializationException: Type
> > > 'org.datanucleus.sco.backed.List' was not included in the set of types
> > > which can be serialized by this SerializationPolicy or its Class
> > > object could not be loaded. For security purposes, this type will not
> > > be serialized.
>
> > > i've tried java.util.list and java.util.arraylist with same result -
> > > defiitly not a 'org.datanucleus.sco.backed.List'
>
> > > what's odd is that the RPC call runs in a way and the object is
> > > persisted but without the list field.
>
> > > Anyway - this seems like something that can't be passed in an RPC call
> > > but i don't see why
>
> > > @PersistenceCapable(identityType = IdentityType.APPLICATION)
> > > public class Catagory extends BaseTreeModel implements Serializable {
>
> > > public  Catagory() {}
>
> > >        private static final long serialVersionUID = 1L;
> > >       �...@primarykey
> > >   �...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> > >   �...@extension(vendorName="datanucleus", key="gae.encoded-pk",
> > > value="true")
> > >        private String key;
>
> > >         @Persistent(mappedBy = "catagory")
> > >   private  List subcatagories;
>
> > > }
>
> > > On Sep 22, 5:43 am, Angel  wrote:
> > > > i have the same problem
>
> > > > On 5 ago, 04:52, mike  wrote:
>
> > > > > I have a simple one-to-many betwen two entities.  The parent entity
> > > > > uses List to contain the child entities.  I am able to persist these
> > > > > entities in the datastore without problems.
>
> > > > > However, when reading a root entity at the server, I get:
>
> > > > > rpc.SerializationException: Type 'org.datanucleus.sco.backed.List' was
> > > > > not included in the set of types  which can be serialized...
>
> > > > > The entities are successfully read from the datastore, but something
> > > > > in Datanucleus doesn't build the List correctly.
>
> > > > > Has anyone found a workaround for this serialization problem.
>
> > > > > Thanks
>
> > > > > GWT 1.7 GAE 1.2.2- Hide quoted text -
>
> > > > - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this grou

Re: GWT PHP HTML 5 interaction

2009-10-07 Thread Dominik Steiner
Hi,

to be honest I'm no php guy, so I'm not sure about the implementation  
details of the hessian control on php side.

on gwt side you simply implement an interface, for example like this

public interface HelpHessianService {

public List getHelpTopics(String search);

}

and you then instantiate this interface via a helper method

import com.caucho.hessian.client.HessianProxyFactory;

String hostUrl = getHostUrl(request);
String url = hostUrl + "/index.php? 
main_page=gwt_handler&hessian=true";
HessianProxyFactory factory = new HessianProxyFactory();
HelpHessianService helpHessianService =  
factory.create(HelpHessianService.class, url);

and then you can just call helpHessianService.getHelpTopics(search);

HTH

Dominik
> Thank you,
>
> Dominik for your prompt reply.
>
> It is sounds great to me. I have a feeling I could provide  
> connection through the hessian web service to PHP application to get  
> some of the services from the PHP/Apache application.
>
> Also I have researched in the web and found the Hessian PHP Client/ 
> Server application.
>
> Dominik, how the hessian protocol is basically operate the data from  
> the PHP/Apache and
> GWT/Tomcat.
>
> More details appreciated.
>
> Regards,
>
> R
>
> On Wed, Oct 7, 2009 at 11:27 AM, Dominik Steiner 
>  > wrote:
>
> on our project our GWT frontend (running on tomcat) was talking with
> the php backend (on another server) via hessian protocol and it was
> working good.
>
> HTH
>
> Dominik
> On Oct 6, 11:26 am, Takalov Rustem  wrote:
> > Hey Guys,
> >
> > I have been researching on GWT and PHP integration a while.
> >
> > The reason is - I need a simple, flexible client - side AJAX based  
> Framework
> > to develop and integrate web - based application into existing PHP
> > application running @ Rackspace (Linux, PHP, MySQL).
> >
> > Is anyway to integrate GWT api's into PHP code or I need to call  
> PHP scripts
> > from GWT?
> >
> > Do I have to run Tomcat server, Apache at the same server? How  
> they would
> > interact between each other?
> >
> > I think the solution connected with JSON, Jetty, hosted server  
> mode, but I
> > am not sure.
> >
> > Here is php script:
> >
> >  >
> > echo "";
> >
> > // I need AJAX Editor to Save/Load Editable Text Box to load it  
> unto MySQL
> > DB.
> >
> > echo "AJAXEditor();";
> >
> > ?>
> >
> > How will it interact with HTML 5 manifest?
> >
> > Let me know if any questions.
> >
> > Thanks,
> >
> > Guys
> >
> > R
>
>
>
>
> -- 
> Regards,
> Rustem T
>
> >


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



Re: Announcing GWT 2.0 Milestone 1

2009-10-07 Thread Dominik Steiner

Hi Jospeh,

did you consider to install the Google Plugin for eclipse?

You will even then run into problems, but reading through this post

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/527518f17e7a484e/28e2bbd2786143f3

you should be up and running pretty soon.

HTH

Dominik

On 7 Okt., 20:00, Joseph Arceneaux  wrote:
> There does not appear to be a nice URL I can point Eclipse 3.5 at in order
> to install GWT 2.0 in the usual fashion.  Nor, apparently, any instructions
> about an alternate procedure.
> It appears unclear on just where / how to merge the contents of the zip file
> into an existing Eclipse integration;  does anyone have a pointer to
> documentation for this?
>
> Thanks,
> Joe
>
> On Mon, Oct 5, 2009 at 4:43 PM, Amit Manjhi  wrote:
>
> > Hi everyone,
>
> > We are excited to release the first milestone build for GWT 2.0 today.
> > This milestone provides early access (read: known to still be
> > unfinished and buggy) to the various bits of core functionality that
> > will be coming in GWT 2.0. Please download the bits from:
>
> >http://code.google.com/p/google-web-toolkit/downloads/list?can=1&q=2
>
> > Things that are changing with GWT 2.0 that might otherwise be
> > confusing without explanation
> > * Terminology changes: We're going to start using the term
> > "development mode" rather than the old term "hosted mode." The term
> > "hosted mode" was sometimes confusing to people, so we'll be using the
> > more descriptive term from now on. For similar reasons, we'll be using
> > the term "production mode" rather than "web mode" when referring to
> > compiled script.
>
> > * Changes to the distribution: Note that there's only one download,
> > and it's no longer platform-specific. You download the same zip file
> > for every development platform. This is made possible by the new
> > plugin approach used to implement development mode (see below). The
> > distribution file does not include the browser plugins themselves;
> > those are downloaded separately the first time you use development
> > mode in a browser that doesn't have the plugin installed.
>
> > Functionality that will be coming in GWT 2.0
> > * In-Browser Development Mode: Prior to 2.0, GWT hosted mode provided
> > a special-purpose "hosted browser" to debug your GWT code. In 2.0, the
> > web page being debugged is viewed within a regular-old browser.
> > Development mode is supported through the use of a native-code plugin
> > for each browser. In other words, you can use development mode
> > directly from Safari, Firefox, IE, and Chrome.
>
> > * Code Splitting: Developer-guided code splitting allows you to chunk
> > your GWT code into multiple fragments for faster startup. Imagine
> > having to download a whole movie before being able to watch it. Well,
> > that's what you have to do with most Ajax apps these days -- download
> > the whole thing before using it. With code splitting, you can arrange
> > to load just the minimum script needed to get the application running
> > and the user interacting, while the rest of the app is downloaded as
> > needed.
>
> > * Declarative User Interface: GWT's UiBinder now allows you to create
> > user interfaces mostly declaratively. Previously, widgets had to be
> > created and assembled programmatically, requiring lots of code. Now,
> > you can use XML to declare your UI, making the code more readable,
> > easier to maintain, and faster to develop. The Mail sample has been
> > updated to use the new declarative UI.
>
> > * Bundling of resources (ClientBundle): GWT has shipped with
> > ImageBundles since GWT v1.4, giving developers automatic spriting of
> > images. ClientBundle generalizes this technique, bringing the power of
> > combining and optimizing resources into one download to things like
> > text files, CSS, and XML. This means fewer network round trips, which
> > in turn can decrease application latency -- especially on mobile
> > applications.
>
> > * Using HtmlUnit for running GWT tests: GWT 2.0 no longer uses SWT or
> > the old mozilla code (on linux) to run GWT tests. Instead, it uses
> > HtmlUnit as the built-in browser. HtmlUnit is 100% Java. This means
> > there is a single GWT distribution for linux, mac, and windows, and
> > debugging GWT Tests in development mode can be done entirely in a Java
> > debugger.
>
> > Known issues
> > *  If you are planning to run the webAppCreator, i18nCreator, or the
> > junitCreator scripts on Mac or Linux, please set their executable bits
> > by doing a 'chmod +x *Creator'
> > * Our HtmlUnit integration is still not complete. Additionally,
> > HtmlUnit does not do layout. So tests can fail either because they
> > exercise layout or they hit bugs due to incomplete integration. If you
> > want such tests to be ignored on HtmlUnit, please annotate the test
> > methods with @DoNotRunWith({Platform.Htmlunit})
> > * The Google Eclipse Plugin will only allow you to add GWT release
> > directories that include a fil

Re: GWT PHP HTML 5 interaction

2009-10-07 Thread Dominik Steiner

on our project our GWT frontend (running on tomcat) was talking with
the php backend (on another server) via hessian protocol and it was
working good.

HTH

Dominik
On Oct 6, 11:26 am, Takalov Rustem  wrote:
> Hey Guys,
>
> I have been researching on GWT and PHP integration a while.
>
> The reason is - I need a simple, flexible client - side AJAX based Framework
> to develop and integrate web - based application into existing PHP
> application running @ Rackspace (Linux, PHP, MySQL).
>
> Is anyway to integrate GWT api's into PHP code or I need to call PHP scripts
> from GWT?
>
> Do I have to run Tomcat server, Apache at the same server? How they would
> interact between each other?
>
> I think the solution connected with JSON, Jetty, hosted server mode, but I
> am not sure.
>
> Here is php script:
>
> 
> echo "";
>
> // I need AJAX Editor to Save/Load Editable Text Box to load it unto MySQL
> DB.
>
> echo "AJAXEditor();";
>
> ?>
>
> How will it interact with HTML 5 manifest?
>
> Let me know if any questions.
>
> Thanks,
>
> Guys
>
> R
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: OOPHM GWT 2.0 Milestone 1 on Mac

2009-10-07 Thread Dominik Steiner

Hi Christian,

I moved to the ms1 yesterday but had been playing around with OOPHM
with a version that i built from the trunk before and also got into
problems when FF 3.5 came out and broke the OOPHM mode that i was
using. Now yesterday with the ms1 release and the plugin already
installed i tried to connect to the url that the OOPHM gave me but it
always told me that there was no plugin available. I first tried to
deactivate the plugin and reinstall it, but with no luck. So what I
did was to remove the plugin from FF 3.5 first and then reinstall it
from the link that the "no plugin available" page gave me. After that
the OOPHM is now working fine.

HTH

Dominik
On Oct 6, 1:02 pm, Christian Goudreau 
wrote:
> Hi,  I'm always getting an error while trying to run in OOPHM. First they
> ask me to copy and URL to a browser with the plugin, after doing that, they
> always ask me to re-compile.
>
> I have the plugin and using Firefox 3.5.
>
> Anyone know how to get it work properly ?
>
> Thanks
>
> Christian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT Performance issue in IE browser.

2009-10-07 Thread Dominik Steiner

pal,

you could try using IE8 and the profiler it is shipping with to
determine which methods are being called (compiling your code first
with -pretty) and which one take more time than others.
In our project we thus found out that IE was behaving bad on equals()
and equalsIgnoreCase() methods which we replaced then by using
hashmaps.

HTH

Dominik

On Oct 6, 3:15 pm, Chris Ramsdale  wrote:
> Pal,
> In regards to speed and load times, there is generally no "silver bullet"
> and each browser is wildly different. That said the the browser's Javascript
> interpreters and rendering engines generally have the greatest impact on
> application performance. In your case, determining exactly what is causing
> your app to load 3x times slower on IE is difficult given that FF and IE
> have completely different JS interpreters (different names depending on what
> version you are running) and rendering engines (Trident on IE and Gecko on
> FF).
>
> If you would be able to provide the code that is being executed on startup,
> or some related design doc we may be better positioned to provide some
> guidance.
>
> Thanks,
> Chris Ramsdale
>
> On Tue, Oct 6, 2009 at 6:03 AM, pal  wrote:
>
> > We have developed a stand alone web based application using GWT and
> > performance of this application (Page Load time) in Mozilla firefox
> > browser is 3 times better than the IE browser. Any help in improving
> > performance of this application in IE browser would be great help to
> > us.
>
> > Thanks,
> > Pal
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Announcing GWT 2.0 Milestone 1

2009-10-06 Thread Dominik Steiner
Thanks Chris for the link,

as described in the link just copying gwt-dev.jar and renaming it to  
gwt-dev-mac.jar tricks the eclipse plugin and let's you easily start  
the OOPHM mode.

Dominik
> Domink,
>
> The post below may provide you with some information regarding this  
> issue:
>
> http://groups.google.com/group/google-web-toolkit/browse_thread/thread/527518f17e7a484e/28e2bbd2786143f3
>
> - Chris
>
> On Tue, Oct 6, 2009 at 8:32 PM, Dominik Steiner 
>  > wrote:
>
> Congratulations! That was way faster than I expected, thanks for
> getting this release out that early.
>
> One remark: seems like the eclipse plugin is not accepting the current
> release with the message after selecting the gwt-dev-ms1 folder that
> gwt-dev-mac.jar (in my case) is missing. So I guess that a new eclipse
> plugin version will have to handle that accordingly.
>
> Domink
>
> On 6 Okt., 12:49, Rakesh  wrote:
> > great release ... especially the declarative ui, download on demand
> > and multiple browsers piece!!! good going gwt team... you rock!!
>
>
>
> >


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



Re: Announcing GWT 2.0 Milestone 1

2009-10-06 Thread Dominik Steiner

Congratulations! That was way faster than I expected, thanks for
getting this release out that early.

One remark: seems like the eclipse plugin is not accepting the current
release with the message after selecting the gwt-dev-ms1 folder that
gwt-dev-mac.jar (in my case) is missing. So I guess that a new eclipse
plugin version will have to handle that accordingly.

Domink

On 6 Okt., 12:49, Rakesh  wrote:
> great release ... especially the declarative ui, download on demand
> and multiple browsers piece!!! good going gwt team... you rock!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Hosted Mode very slow on Mac

2009-09-30 Thread Dominik Steiner

i'm running gwt with eclipse and on osx leopard too and haven't had
any problems with it for years, so i would guess that the problem will
be hidden somewhere in your code. You might try to uncomment
temporarily parts of your code that you could think problematic and
see if that fixes it and thus being able to track down the exact point
that is causing that problem.

HTH

Dominik

On 30 Sep., 03:42, jd  wrote:
> Hi,
>
> I am using gwt trunk with Eclipse on a os x leopard and find that the
> hosted mode is almost too slow to use.  For example, clicking on a
> StackLayoutPanel header to change panels causes both Firefox and
> Safari to freeze and the CPU pegs close to 100% for about 10 seconds.
>
> Is this unusual or related to the hosted mode UI freezing up due to
> the -XStartOnFirstThread bug?  I haven't profiled it yet to see where
> the issue is but the fact that it occurs on the stack panel switch
> shows it is not related to RPC.
>
> Thanks,
>
> John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Guardar imagen

2009-09-30 Thread Dominik Steiner

Hola,

si el problema es la parte del servidor, quizas esa clase te puede
ayudar

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.fileupload.FileItemIterator;
import org.apache.commons.fileupload.FileItemStream;
import
org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import org.apache.commons.io.IOUtils;

public class FileUploadServlet extends HttpServlet {

public void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
ServletFileUpload upload = new ServletFileUpload();
upload.setSizeMax(1000);
res.setContentType("text/plain");
PrintWriter out = res.getWriter();
try {
try {
FileItemIterator iterator = 
upload.getItemIterator(req);
while (iterator.hasNext()) {
FileItemStream item = iterator.next();
InputStream in = item.openStream();

if (item.isFormField()) {
//  out.println("Got a form field: 
" + item.getFieldName());
} else {
String fieldName = 
item.getFieldName();
String fileName = 
item.getName();
String contentType = 
item.getContentType();

//  out.println("--");
//  out.println("fileName = " + 
fileName);
//  out.println("field name = " + 
fieldName);
//  out.println("contentType = " + 
contentType);

try {
Blob blob = new 
Blob(IOUtils.toByteArray(in));
String imageId = 
DataDao.dataDao.saveFile(blob, req);
String type = 
req.getParameter("type");
String id = 
req.getParameter("id");

if(!StringUtil.isEmpty(type) && !StringUtil.isEmpty(id)){
HasImage 
hasImage = (HasImage) DataDao.dataDao.getObjectById
(id, Class.forName(type));
if(hasImage != 
null){

hasImage.setImageId(imageId);

DataDao.dataDao.updateObject((ModelObject) hasImage);
}
}
out.print(imageId);
} finally {

IOUtils.closeQuietly(in);
}

}
}
} catch (SizeLimitExceededException e) {
out.println("You exceeded the maximu size ("
+ e.getPermittedSize() + ") of 
the file ("
+ e.getActualSize() + ")");
}
} catch (Exception ex) {
out.print(Constants.MSG_FILE_UPLOAD_FAILED);
ex.printStackTrace();
}
}
}

la clave es de usar las librerias de commons-fileupload-1.2.1.jar y
commons-io-1.3.2.jar

asi que puedes convertir a bytes usando

IOUtils.toByteArray(in)

Espero que ayuda

Dominik
On 30 Sep., 02:34, preguntona  wrote:
> Hola a todos, a ver si alguien me puede echar una mano en algo q
> seguro es facil, pero soy una principiante.
> He creado un formulario con un TextField donde introduzco el nombre
> del personaje y un FileUpload para subir
> una unica imagen para el personaje en cuestión. En la base de datos,
> esta imagen la tengo como tipo BLOB, por
> lo que debo recogerla como byte[], pero no se cómo hacerlo. ¿Alguien
> que me pueda ayudar?
> La necesito como el aire para respirar! Muchas gracias por
> adel

Re: Download of GWT 1.7 keeps failing

2009-09-30 Thread Dominik Steiner

try using a download manager

Dominik

On 30 Sep., 08:23, R  wrote:
> Anyone else suffering this? My ISP is fine - I've downloaded Sun Java
> SDK just fine, and Apache ANT, but I've had three attempts downloading
> GWT and the download breaks and the zip file is corrupted.  First and
> third times, it broke at 1.7mb, second time it went to 8mb... What
> gives? I'm curious to muck about with it...
>
> Thanks...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to initiate a event inside a KeyPressHandler

2009-09-29 Thread Dominik Steiner
you could do something like this

public void onModuleLoad() {
 // Create a tab panel with three tabs, each of which  
displays a
different
 // piece of text. VerticalPanel  
formSelectPanel = new VerticalPanel();

 formSelectPanel.setSize("150px", "400px");
 final TextBox formFilterBox = new TextBox();
 formFilterBox.setFocus(true);
 formFilterBox.setSize("150px", "20px");
 formFilterBox.addKeyPressHandler(new KeyPressHandler  
(){
 @Override
 public void onKeyPress(KeyPressEvent event) {

int index = 0;

//implement some logic to set index according to key pressed

formFilterBox.setSelectedIndex(int index); });

 formFilterBox.addChangeHandler(handler)
 ListBox formList = new ListBox(false);
 formList.setVisibleItemCount(10);
 for ( int i = 0; i < 40; i++){
 formList.addItem("form"+i);
 }
 formList.setSize("150px", "380px");
 formSelectPanel.add(formFilterBox);
 formSelectPanel.add(formList);
 RootPanel.get().add(formSelectPanel);
 }

I haven't tested the code, you might need to adapt the syntax, but i  
hope that you get going like this

HTH

Dominik
>
> Hi thanks for your response but i don't get it :-(
>
> Can you make an example with pseudo code? Thanks
>
> On 27 Sep., 02:09, Dominik Steiner 
> wrote:
>> Hi ojay,
>>
>> did you try to make your KeyListener an anonymous class so that you
>> can reference from within it the formList and then change the
>> selection of the ListBox by using the method
>>
>> formList.setSelectedIndex(int index);
>>
>> HTH
>>
>> Dominik
>>
>> On 25 Sep., 17:07, ojay  wrote:
>>
>>> Hi,
>>
>>> after I read the intro to gwt in practice and looking around on the
>>> gwt site I just started my first steps with gwt and now I'm stuck.
>>
>>> I guess its an easy question for you guys...
>>
>>> I have a textbox and a listbox in my project. Now I added a
>>> KeyPressHandler to the textbox so that I can do something if  
>>> somebody
>>> types in. I want to use this textbox input as a filter for the shown
>>> values in the listbox. So now what I do not know is, how can I
>>> initialize a change of the Listbox from my KeyPressHandler ??
>>
>>> Here my Module
>>
>>> public void onModuleLoad() {
>>> // Create a tab panel with three tabs, each of  
>>> which displays a
>>> different
>>> // piece of text.
>>> KeyPressHandler changeFormFilter = new  
>>> FormFilterChanger();
>>
>>> VerticalPanel formSelectPanel = new VerticalPanel();
>>> formSelectPanel.setSize("150px", "400px");
>>
>>> TextBox formFilterBox = new TextBox();
>>> formFilterBox.setFocus(true);
>>> formFilterBox.setSize("150px", "20px");
>>
>>> formFilterBox.addKeyPressHandler(changeFormFilter);
>>> formFilterBox.addChangeHandler(handler)
>>
>>> ListBox formList = new ListBox(false);
>>> formList.setVisibleItemCount(10);
>>
>>> for ( int i = 0; i < 40; i++){
>>> formList.addItem("form"+i);
>>> }
>>> formList.setSize("150px", "380px");
>>
>>> formSelectPanel.add(formFilterBox);
>>> formSelectPanel.add(formList);
>>
>>> RootPanel.get().add(formSelectPanel);
>>
>>> }
>>
>>> and the Handler
>>
>>> public class FormFilterChanger implements KeyPressHandler {
>>
>>> @Override
>>> public void onKeyPress(KeyPressEvent event) {
>>> System.out.println("change"); // TODO Auto- 
>>> generated method stub
>>
>>> }
>>
>>> }
> >


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



Re: Character.isWhitespace alternative? (whitespace check)

2009-09-29 Thread Dominik Steiner

Hi Ed,

for performance reason I would definitely recommend you to actually  
use regex instead of equals or equalsIgnoreCase methods of the String  
class. Especially IE has really performance problems with former ones.  
Concerning heavy, I would actually say that it is much cleaner to use  
regex and more adaptable in case you would need in the future

HTH

Dominik
Am 29.09.2009 um 01:11 schrieb Ed:

>
> Yes I can, but don't want to, as it's way to heave for just checking
> if a character is a white space... Especialy in my case where
> performance is an issue.
>
> >


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



Re: Character.isWhitespace alternative? (whitespace check)

2009-09-28 Thread Dominik Steiner

did you try to use the regex method

boolean matches = someString.matches("\\S");

HTH

Dominik

On 28 Sep., 13:39, Ed  wrote:
> What is the correct way to check for a white space character?
>
> This is done by the method Character.isWhitespace(char) but not
> supported by GWT. What is the alternative?
>
> I know check for whiteSpaces through
> someString.charAt(index) == ' ';
>
> But I am not sure if that's good enough as I think I forget things
> like \t
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: formpanel

2009-09-26 Thread Dominik Steiner

Did you try debug it with Firebug and the network panel? there you can
see when the post is being dispatched and the answer of the post is
also being output in that view, so that when an error occured on the
server you can see it in the answer of the post

HTH

Dominik

On 25 Sep., 17:09, John Restrepo  wrote:
> Hi, me again, now my problem is with the formpanel and its mehotd
> submit(), I've been trying in Safari 4.0.3 and it sends the data
> sometimes and opens the action page, but when I try it in IE or
> Firefox it doesn't work, the page sends some info, think a little time
> and then nothing happens, what can it be? thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: datanucleus management

2009-09-26 Thread Dominik Steiner

Hi Joe,

try the url

http://localhost:8080/_ah/admin

which will bring up the admin console where you can use the Data
Viewer in order to view your persisted entities and also are able to
delete them from there

HTH

Dominik

On 25 Sep., 18:10, Joseph Arceneaux  wrote:
> Is there some console for managing the JDO data store when running locally
> in hosted mode?
> I have somehow stored an object with ID = 0, and trying calling
> deletePersistent() on it throws an exception - "can't delete object with id
> of 0"
>
> Thanks,
> Joe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: can i cancel request?

2009-09-26 Thread Dominik Steiner

Hi Henrique,

I know that if you would use RPC you could be canceling the

com.google.gwt.http.client.Request.cancel();

but as you have to upload a file and using a FormPanel probably I
don't see any other way than handling the canceling on GWT side, ie
set a variable isCanceled = true and when the form returns handle
according to that variable any further action in order to rollback the
action.

HTH

Dominik

On 26 Sep., 12:48, Henrique Miranda  wrote:
> I'm uploading a file but i want can cancel this upload. how can i do it? I
> would like to know how can i canel a request?
>
> Henrique Miranda
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to initiate a event inside a KeyPressHandler

2009-09-26 Thread Dominik Steiner

Hi ojay,

did you try to make your KeyListener an anonymous class so that you
can reference from within it the formList and then change the
selection of the ListBox by using the method

formList.setSelectedIndex(int index);

HTH

Dominik

On 25 Sep., 17:07, ojay  wrote:
> Hi,
>
> after I read the intro to gwt in practice and looking around on the
> gwt site I just started my first steps with gwt and now I'm stuck.
>
> I guess its an easy question for you guys...
>
> I have a textbox and a listbox in my project. Now I added a
> KeyPressHandler to the textbox so that I can do something if somebody
> types in. I want to use this textbox input as a filter for the shown
> values in the listbox. So now what I do not know is, how can I
> initialize a change of the Listbox from my KeyPressHandler ??
>
> Here my Module
>
> public void onModuleLoad() {
>                 // Create a tab panel with three tabs, each of which displays 
> a
> different
>             // piece of text.
>                 KeyPressHandler changeFormFilter = new FormFilterChanger();
>
>                 VerticalPanel formSelectPanel = new VerticalPanel();
>                 formSelectPanel.setSize("150px", "400px");
>
>                 TextBox formFilterBox = new TextBox();
>                 formFilterBox.setFocus(true);
>                 formFilterBox.setSize("150px", "20px");
>
>                 formFilterBox.addKeyPressHandler(changeFormFilter);
>                 formFilterBox.addChangeHandler(handler)
>
>                 ListBox formList = new ListBox(false);
>                 formList.setVisibleItemCount(10);
>
>                 for ( int i = 0; i < 40; i++){
>                         formList.addItem("form"+i);
>                 }
>                 formList.setSize("150px", "380px");
>
>                 formSelectPanel.add(formFilterBox);
>                 formSelectPanel.add(formList);
>
>                 RootPanel.get().add(formSelectPanel);
>
>         }
>
> and the Handler
>
> public class FormFilterChanger implements KeyPressHandler {
>
>         @Override
>         public void onKeyPress(KeyPressEvent event) {
>                 System.out.println("change");         // TODO Auto-generated 
> method stub
>
>         }
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Cookies and RPC

2009-09-24 Thread Dominik Steiner

Tom,

this code has to be on client side (GWT code).

HTH

Dominik
>
> Yep, I found that API when I did a Google Search ...
>
> So, I tried the code:  String cookie = Cookie.getCookie
> (myCookieName);
> And I must have got some sort of error, because my code stopped, and
> there were no other log statements.
>
> So, I guess I was asking if this code has to be on the client side,
> server side, or both?
>
> Thanks!
>        Tom
>
> On Sep 23, 11:01 pm, Dominik Steiner
>  wrote:
>> Hi Tom,
>>
>> not sure I understand yourcookiequestion, but in GWT you can query
>> for cookies using the class
>>
>> com.google.gwt.user.client.Cookie
>>
>> and there have a look at the method
>>
>>   /**
>>* Gets thecookieassociated with the given name.
>>*
>>* @param name the name of thecookieto be retrieved
>>* @return thecookie'svalue, or null if thecookie
>> doesn't exist
>>*/
>>   public static String getCookie(String name)
>>
>> So in your GWT code you would check if acookieexists like this
>>
>> Stringcookie=Cookie.getCookie(myCookieName);
>> if(cookie!= null){
>>   //cookieexists
>>
>> }
>>
>> HTH
>>
>> Dominik
>> On 23 Sep., 12:00, Thomas Holmes  wrote:
>>
>>> I have the demo StockWatcher Application working.  I have client/
>>> server side code working for the most part.
>>> I can use a Spring DAO class, make a call to the database to get
>>> Hibernate POJO's, and then convert that data to GWT-RPC DTO
>>> classes ... seems to work ok.
>>
>>> I am using a TestAdvDataSource demo app for SmartGWT and GWT-RPC
>>> DataSource, and it is coming along well.
>>> Just having a few issues getting the data to appear, but I am  
>>> working
>>> on that.
>>
>>> So ... the question is, in my existing Spring Application, a user is
>>> capable of signing on and I put the users ID in acookie.  So, where
>>> do I get thecookie?
>>
>>> Do I get it from the server/TestServiceImpl code?   I expect I would
>>> get the cookies from the request, and be able to use that data to
>>> filter what I want from the database.
>>
>>> Or, would I get thecookiein the client/TestDataSource code and then
>>> pass that as an argument to the server/TestServiceImpl?
>>
>>> Thanks!
>>>   Tom
> >


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



Re: Cookies and RPC

2009-09-23 Thread Dominik Steiner

Hi Tom,

not sure I understand your cookie question, but in GWT you can query
for cookies using the class

com.google.gwt.user.client.Cookie

and there have a look at the method

  /**
   * Gets the cookie associated with the given name.
   *
   * @param name the name of the cookie to be retrieved
   * @return the cookie's value, or null if the cookie
doesn't exist
   */
  public static String getCookie(String name)

So in your GWT code you would check if a cookie exists like this

String cookie = Cookie.getCookie(myCookieName);
if(cookie != null){
  // cookie exists
}

HTH

Dominik
On 23 Sep., 12:00, Thomas Holmes  wrote:
> I have the demo StockWatcher Application working.  I have client/
> server side code working for the most part.
> I can use a Spring DAO class, make a call to the database to get
> Hibernate POJO's, and then convert that data to GWT-RPC DTO
> classes ... seems to work ok.
>
> I am using a TestAdvDataSource demo app for SmartGWT and GWT-RPC
> DataSource, and it is coming along well.
> Just having a few issues getting the data to appear, but I am working
> on that.
>
> So ... the question is, in my existing Spring Application, a user is
> capable of signing on and I put the users ID in a cookie.  So, where
> do I get the cookie?
>
> Do I get it from the server/TestServiceImpl code?   I expect I would
> get the cookies from the request, and be able to use that data to
> filter what I want from the database.
>
> Or, would I get the cookie in the client/TestDataSource code and then
> pass that as an argument to the server/TestServiceImpl?
>
> Thanks!
>                       Tom
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT performance

2009-09-02 Thread Dominik Steiner

To add my two cents here too, for our large GWT app we found out that
IE especially was getting slow because we had a lot of equalsIgnoreCase
() method called in our controllers that checked for property changes
of the model objects. Changing this to equals() already helped a bit,
and using maps instead was getting the performance back to what it was
in the other browsers.

HTH

Dominik

On 2 Sep., 04:27, Chris Lowe  wrote:
> Kristian,
>
> Do GMail or the GWT showcase application work well enough for you in
> your intended browser?  If so, then in all likelihood your GWT
> application will perform adequately.
>
> I'm not aware of any reliability issues as such. The only thing that
> springs to mind is that GWT compiles for specific browsers that it
> knows about at compile time.  Like many other web application
> technologies, if a new browser comes out then they can break
> compatibility. Recent examples of this are with IE8 and FF 3.5,
> however Google have always endeavoured to roll out compiler updates to
> rectify these issues.
>
> Loading times can be a problem and it boils down to a couple of
> things: 1. I believe IE's JavaScript parser gets disproportionately
> slower the larger your GWT application is (other browsers do not
> suffer with this); 2. a compressed GWT application can still be fairly
> large, say 150k to 200k, which can be an issue if your target audience
> are all on dial up connections.  Remember though that this download is
> a one-off and the browser will cache that version of the app forever
> so all subsequent app launches are significantly quicker.  Also, GWT
> 2.0 has a number of things in the pipeline to address these issues
> (like code splitting).
>
> Cheers,
>
> Chris.
>
> On Sep 2, 5:32 am, kristian  wrote:
>
> > Hello All, i am a newbie that want to try to build a web application
> > using GWT, but i heard from some of my colleague that GWT has some
> > issue with its performance (reliability, load slowly). So, is there
> > anyone can enlighten 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-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: translate DateTimeFormat output

2009-09-02 Thread Dominik Steiner

Hi PH,

you mean how you can set the locale for a specific language?

I added this line to the modules gwt.xml file



This one will set the locale for the language of spanish.

HTH

Dominik

On 2 Sep., 14:34, PH  wrote:
> Hi guys,
>
>  sorry if this question looks stupid, but I didn't find an answer for
> it.
>
>  How could I translate the DateTimeFormat.getFormat().format() output?
> ie.:
>
>  DateTimeFormat.getFormat(" ").format(dateobject);
>
>  from: "October 2009" to "Outubro 2009"
>
>  Tnx in advance.
>
>  Best regards,
>
>  PH
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: how to remove scroll bar around Disclosure Panel

2009-08-31 Thread Dominik Steiner

Hi KR,

you might want to consider CSS to do that by adding overflow:hidden to
the element that shows the scroll bars

HTH

Dominik

On 30 Aug., 07:52, enorm  wrote:
> Hi, all
> I'm making a daemon according to gwt examples. I made a "Disclosure
> Panel"  then add it to "Horizontal Split Panel", I found that there
> are scroll bar exist if resize the window. Is there any method to
> remove them?
>
> K. R
> enorm
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: DOM is not properly working with mozilla

2009-08-31 Thread Dominik Steiner

Hi Vruddhi,

I would suggest trying to do setting the background color of a button
from within a CSS file and just set a classname from within GWT.

I could not see why your code is not working, as one class is missing
from what you sent, but I would also recommend if you are using labels
like "black" to set colors to use the equivalent hex code like
"FF"

HTH

Dominik

On 31 Aug., 03:14, vruddhi shah  wrote:
> Hello All,
>
> I have implemented gwt buttons to change color of  button's background. I
> have changed button background color using DOM.setStyleAttribute. It is not
> working in mozilla (button color is not chaged) . Please help me out. I have
> attached the code.
>
> --
> Vruddhi Shah
> Pyther Innovations Pvt. Ltd.
> Land line: 91 78 40074893
> 617, Devpath Complex
> C.G. Road, Ahmedabad
> India
>
>  GwtColorPicker.java
> 11KAnzeigenHerunterladen
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT testing without GWTTestCase and the DOM

2009-08-24 Thread Dominik Steiner

Hi Eugen,

I would recommend you to read this post

http://robvanmaris.jteam.nl/2008/03/09/test-driven-development-for-gwt-ui-code/

There's currently also the MVP (not MVC) design approach being
discussed on this forum, you might also be able to use that for
testing with normal Junit tests and not GWT tests.
For my part I'm using above method and it has worked well for me.

HTH

Dominik

On 24 Aug., 16:29, Eugen Paraschiv  wrote:
> Can I test my client side GWT code without GWTTestCase? I've heard
> somewhere (I think it was one of the Google IO 2009 conferences) that
> they were successfully testing their code with a fake DOM, in the JVM
> and not in Javascript with the DOM. That would be brilliant. Does
> anybody have any idea about how to do this? Thanks. Eugen.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Page flickering on FF 3.5

2009-08-21 Thread Dominik Steiner

Hi there,

we have a web app based on GWT that you can see at

http://beta.homeprodigy.com/index.php?main_page=map

this page is now flickering when you load it with FF 3.5. On FF 3.0 it
was working fine.

My only guess is that it might have to do something with

DeferredCommand.addCommand(new Command(){
public void execute() {

as we add the main UI components to the RootPanel using above commands
in order to break those tasks into smaller ones. As the page is
flickering while those elements are added my assumption goes into that
direction.

Anybody has run into similar problems?

Thanks for any answers in advance.

Dominik

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



Re: RichTextArea on IE7 insert after enter typed

2009-08-20 Thread Dominik Steiner

I guess that the double line spacing occurs because of those inserted  
 tags that by default are taking up much more space than simple .

One could format the  to take up less space, but I'm wondering why  
in the first place this inserting  is happening on IE instead of  
 for all other browers?

Thanks for the reply.

>
> I think it also cause double line spacing
>
> On 18 Aug, 21:04, Dominik Steiner 
> wrote:
>> Hi there,
>>
>> why doesRichTextAreaformat the text on IE7 with a  when you type
>> enter? On FF and Safari typing enter just inserts a  into the  
>> text
>> and looks more what you would expect after typing enter or line  
>> break.
>>
>> Any ideas if this is a bug or a feature?
>>
>> Thanks
>>
>> Dominik
> >


--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



RichTextArea on IE7 insert after enter typed

2009-08-18 Thread Dominik Steiner

Hi there,

why does RichTextArea format the text on IE7 with a  when you type
enter? On FF and Safari typing enter just inserts a  into the text
and looks more what you would expect after typing enter or line break.

Any ideas if this is a bug or a feature?

Thanks

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



Re: Regex issue with IE

2009-08-14 Thread Dominik Steiner

Hi davis,

I'm using the following regex to match addresses in the format of 123
west road

public static final String ADDRESS_REGEX = 
"[0-9]+\\s*\\D+";

and it works fine on IE too. Note the double slash before s and D

So I don't think that the double slash is the problem.

HTH

Dominik

davis schrieb:
> I think I figured out the problem, using an online regex tester for
> JavaScript: http://www.pagecolumn.com/tool/regtest.htm
>
> Note that the regex translation in JavaScript has a double backslash
> to escape the \d special character.  This fails standard regex test
> for JavaScript for inputs like abcd1234.
>
> ^(?=.*\\d)(?=.*[a-z]).{8,15}$
>
> If you replace the regex text with:
>
> ^(?=.*\d)(?=.*[a-z]).{8,15}$
>
> Then it works for JavaScript.  However, Java requires the character to
> be escaped.  I'm guessing Firefox simply interprets \\d as \d, which
> is why it passes, but IE is not as forgiving.  This seems like a bug
> in the GWT compiler.  It seems to me it should take the \\d and
> translate it to \d when compiling from Java to JavaScript.
>
> Can someone confirm?
>
> Regards,
> Davis
>
> On Aug 14, 9:44 am, davis  wrote:
> > Hi, I have the following Java code to validate a password box.
> > Basically it checks that the password can't be null, is between 8-15
> > characters, and must contain both numbers and letters.
> >
> > public static boolean validatePassword(PasswordTextBox box, Label
> > errorLabel) {
> >                 String text = box.getText();
> >                 if(text.isEmpty()) {
> >                         ValidatorUtil.onFailure(box, 
> > custom.passwordMayNotBeNull(),
> > errorLabel);
> >                         return false;
> >                 } if(text.length() < 8 || text.length() > 15) {
> >                         ValidatorUtil.onFailure(box, 
> > custom.passwordHasInvalidLength(8, 15,
> > text.length()), errorLabel);
> >                         return false;
> >                 } if(!text.matches(CustomMessages.REGEX_PASSWORD)) {
> >                         ValidatorUtil.onFailure(box, 
> > custom.passwordHasInvalidFormat(),
> > errorLabel);
> >                         return false;
> >                 }
> >                 return true;
> >         }
> >
> > This works fine in Firefox, but it does not work in IE.  The
> > JavaScript compiles down to this for IE8:
> >
> > function validatePassword(box, errorLabel){
> >   var text, matchObj;
> >   text = $getPropertyString(box.element, 'value');
> >   if (!text.length) {
> >     setStyleName(box.element, 'validationFailedBorder', true);
> >     ($clinit_114() , errorLabel.element).innerText = 'You must provide
> > a password.';
> >     return false;
> >   }
> >   if (text.length < 8 || text.length > 15) {
> >     onFailure_1(box, 'Sorry, your password must be between 8 and 15
> > characters long (you have ' + text.length + ' characters).',
> > errorLabel);
> >     return false;
> >   }
> >   if (!(matchObj = (new RegExp('^(?=.*\\d)(?=.*[a-z]).{8,15}$')).exec
> > (text) , matchObj == null?false:text == matchObj[0])) {
> >     setStyleName(box.element, 'validationFailedBorder', true);
> >     ($clinit_114() , errorLabel.element).innerText = 'Sorry, your
> > password must contain both letters [a-z] and numbers [0-9].';
> >     return false;
> >   }
> >   return true;
> >
> > }
> >
> > The behavior is a bit odd.  It passes the text.length checks, but then
> > fails the regex expression (which also has length checks with {8,15}.
> > It always prints: 'Sorry, your password must contain both letters [a-
> > z] and numbers [0-9].' in IE, but in Firefox, it works fine...for
> > inputs like this:
> >
> > abcd1234 <- valid password, 8 characters with letters and numbers
> >
> > Even more strange is the fact that if I enter a password with 12
> > characters with both letters and numbers, IE passes, like this:
> >
> > abcd1234abcd
> >
> > But if I enter only 11 characters, it fails:
> >
> > abcd1234abc
> >
> > Any clues on what is wrong here?
> >
> > Regards,
> > Davis
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



a print killer for IE?

2009-07-30 Thread Dominik Steiner

Hi there,

I have the feeling that the  tag that is used on IE7/IE8
for the image bundle I guess is breaking printing of GWT pages on IE.

I also have the feeling as that  tag is new, that means
we moved to gwt 1.7 recently and that is when I first saw that tag and
when printing stopped working.

What I had to do was to parse the whole html and remove those
gwt:clipper tags and all their content. Then printing in IE worked
again.

Anybody with some similar experience or thoughts out there?

Thanks

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



Re: compile gwt svn from source

2009-06-26 Thread Dominik Steiner

i had the same problem and it turned out that i had to update my svn
to a newer version (1.6.3), for mac i used the dmg package at

http://www.collab.net/downloads/community/

Dominik

On 22 Jun., 09:21, waf  wrote:
> I had similar problem and the following 
> helpedhttp://code.google.com/p/google-web-toolkit/issues/detail?id=3556
>
> --
> waf
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Real estate website using GWT

2009-05-01 Thread Dominik Steiner

Hi there,

right now we are building a leading real estate website for all of
Northern Texas which is using GWT to first include some components on
php side as you can see at

www.homeprodigy.com

where the search box on the top right is fully built with GWT. And we
have a 100% GWT part of the website, a dynamic map which filters over
6 properties at real time to the many filters that you can set and
displays all of them on the map even when you are way zoomed out at

www.homeprodigy.com/index.php?main_page=map

I think that GWT is really a great technology, most of all being able
to debug the code in the GWT Shell, the pain it takes from having to
deal with the DOM and different browsers. What we learned during this
project and having for the dynamic map already quite a huge
application is the extensive of LazyWidget in order to instantiate the
widgets only when they are needed. Especially for IE we had
performance problems because of extensive equals() or equalsIgnoreCase
() methods which we switched to the use of hashmaps.

Items that we are looking for would certainly be OOPHM and the
possibility to set points in the code so that the GWT code could be
loaded lazily and thus speeding up load time of our application.

Thanks for this great product and keep on with the great work!

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



Re: Problems with ImageBundle in IE8 when not in compatibility mode

2009-04-29 Thread Dominik Steiner

Thanks for the tip Thomas,

just to amend/aggragate something i found out that you have to add the
meta tag to the head section before any other elements and the meta
tag i added was



HTH

Dominik

On 15 Apr., 03:56, Thomas Broyer  wrote:
> On 14 avr, 18:41, "toont...@googlemail.com" 
> wrote:
>
> > Greetings,
>
> > Only inIE8with compatibility mode off do I see the images in the
> >ImageBundledisplayed in the right location but other images from the
> > bundle are displayed to the left of the displayed image. In other
> > words it isn't clipping the bundle to the left. In compatibility mode
> > it works fine and it works in IE7, FF3, Opera, and Safari.
>
> > This a problem in 1.6.4 and 1.5.3.
>
> Other things will break inIE8's"super standards" mode.
>
> > I've looked for previous discussions of this and found
>
> >http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> > where Janie says "I'm trying to track down an issue with ImageBundles
> > that I'm having inIE8.  This email is not about that issue... ". But
> > then nothing more about this.
>
> > Suggestions?
>
> AskIE8to use the appropriate mode by including the corresponding
> HTTP response header or  to your HTML host page; e.g.
>
>    
>
> Seehttp://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Memory Leak in IE7

2009-04-23 Thread Dominik Steiner

I can recommend to everybody with performance problems on IE6 or IE7
to download IE8 and use it's javascript profiler in order to check
your js calls and time they take in order to see bottlenecks.
For example I found out that in my code (a big application) a lot of
equalsIgnoreCase() calls were made that slowed down IE7 dramatically.
I refactored the code where possible to even avoid having to use equals
() by simply using maps to store the data which was way faster.

HTH

Dominik

On 19 Apr., 16:51, Vitali Lovich  wrote:
> You contradict yourself.  A memory leak by definition does not display a
> constant memory usage - *the* defining characteristic is that memory used
> keeps increasing.  What you are describing is heavy memory usage & it is
> consistent across browsers.
>
> Thus you have a problem with your application - either it actually does need
> that much memory, or you are doing some caching of objects somewhere and
> never freeing that cache.
>
> Without the code for your app or even knowing what it does, all I can
> recommend is you first use Firebug to profile your code to find the heavy
> CPU usage to track down what exactly is causing it - that might help you
> find where you have heavy memory usage.
>
> There's also the $199 tool that claims to be able to profile your JS memory
> usage for you (I've never used it & couldn't find any free 
> alternativeshttp://www.softwareverify.com/javascript/memory/index.html)
>
> There's a free tool for IE memory leak detection 
> (http://www.outofhanwell.com/ieleak/index.php?title=Main_Page) but that
> probably won't help you as what you have described is not a leak.
>
> On Sun, Apr 19, 2009 at 6:20 PM, mike177  wrote:
>
> > Hello,
> > We have built a very large, complex GWT site and it works great in FF,
> > Chrome, and Safari (and with limited testing we seem to be ok in IE8
> > too).  IE7, though, is hit or miss.  I originally thought that our
> > performance issues were all being caused by IE7's poor JS engine, but
> > I have started to believe that we have a memory leak issue too.  After
> > upgrading to GWT 1.6 to see if there was anything there that would fix
> > the problem, I did some testing and found the following results:
>
> > IE7
> > When performing heavy tasks:
> > * CPU usage :  95-100% (will stick for 10 to 20 seconds sometimes),
> > * RAM usage :  55% to 70% (most of the time).
> > * the one trait that is not stereotypical of a memory leak, though, is
> > that our site does not progressively get worse ultimately resulting in
> > the browser freezing.  Instead, it gets bad quickly (after 1-2 minutes
> > of use) and then stays at this poor level until you quit the site.  Go
> > figure???
>
> > All Other Browsers
> > When performing heavy tasks
> > * CPU usage : 50-75%
> > * RAM usage :  < 50%
>
> > So, we seem to have most of the stereotypical indicators of a leak in
> > IE7 and unfortunately we will have to live with IE7 for another couple
> > years (not to mention IE6).
>
> > Does anyone have any thoughts on how to find, isolate, and fix memory
> > leaks specific to IE7 in GWT code?
>
> > Below are some of the resources I have dug up.  I did not have much
> > luck looking for GWT specific information so I am leveraging whatever
> > I can find.
>
> > Many thanks for your thoughts and opinions.
>
> > Regards,
> > Mike
>
> > --
>
> > While these artcles not GWT specific, lots of information can be
> > gleaned from them:
> > *http://www.codeproject.com/KB/scripting/leakpatterns.aspx
> > *http://msdn.microsoft.com/en-us/library/bb250448.aspx
>
> > There is a JS memory leak detector for IE here:
> > *http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
> > Of course, this just confirms that you have a leak, which we do.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Load gwt module before image are loaded on IE7

2009-04-23 Thread Dominik Steiner

Thanks for all your responses,

at the end we didn't change anything because the image provider fixed
the problem on his side and now images are loading fast as before. But
I think that the loading image from within gwt would have been a
feasable solution.

Dominik

On 15 Apr., 10:26, Vitali Lovich  wrote:
> Try putting your 

Re: Load gwt module before image are loaded on IE7

2009-04-15 Thread Dominik Steiner

Ok, i must have understand something wrong then, but from the wiki i
read the last four sequences as following

9. ...cache.js completes. onModuleLoad() is not called yet, as we're
still waiting on externalScriptOne.js to complete before the document
is considered 'ready'.
10. externalScriptOne.js completes. The document is ready, so
onModuleLoad() fires.
11. reallyBigImageTwo.jpg completes.
12. body.onload() fires, in this case showing an alert() box.

So as described in the wiki the onModuleLoad will fire once the last
js script is loaded, but before the reallyBigImageTwo is loaded. This
applies to all normal browsers it seems except IE...

On 15 Apr., 09:52, Vitali Lovich  wrote:
> if you read it, you'll notice it says that body.onload gets fired after all
> resources are fetched.  this is when onModuleLoad gets fired.  there doesn't
> appear to be anything wrong with that documentation.
>
> On Wed, Apr 15, 2009 at 9:13 AM, Dominik Steiner <
>
> dominik.j.stei...@googlemail.com> wrote:
>
> > Thanks Salvador for pointing out the interesting link above.
>
> > I read through it and I must admit that I found an error in it, namely
> > exactly my problem on IE7, that the
>
> > 
>
> > will block on IE7 the firing of the onModuleLoad() event in GWT until
> > the image has finished loading.
>
> > I will post back once I implement a working solution.
>
> > Thanks
>
> > Dominik
> > Am 15.04.2009 um 04:08 schrieb Salvador Diaz:
>
> > > I think it should be helpful to understand the bootstrap sequence,
> > > maybe it will inspire you to come up with a better solution and share
> > > it with us :)
>
> >http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_WhenDoMo...
>
> > > Cheers,
>
> > > Salvador
>
> > > On Apr 14, 6:55 pm, Dominik Steiner 
> > > wrote:
> > >> Hi,
>
> > >> I have a page that contains a lot of images and some of those images
> > >> take a long time to load (in total like 1 min)
>
> > >> I have searched the forum and found this similar post
>
> > >>http://groups.google.com/group/Google-Web-Toolkit/browse_thread/
> > >> threa...
>
> > >> but with no concrete solution to the problem, that IE7 will wait
> > >> until
> > >> all the images are loaded until it will then load the GWT module.
>
> > >> Is there a work around for this so that the gwt module will be loaded
> > >> before the images have finished loading? (using gwt 1.5.3)
>
> > >> Thanks
>
> > >> Dominik
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Load gwt module before image are loaded on IE7

2009-04-15 Thread Dominik Steiner

Thanks Salvador for pointing out the interesting link above.

I read through it and I must admit that I found an error in it, namely  
exactly my problem on IE7, that the



will block on IE7 the firing of the onModuleLoad() event in GWT until  
the image has finished loading.

I will post back once I implement a working solution.

Thanks

Dominik
Am 15.04.2009 um 04:08 schrieb Salvador Diaz:

>
> I think it should be helpful to understand the bootstrap sequence,
> maybe it will inspire you to come up with a better solution and share
> it with us :)
>
> http://code.google.com/p/google-web-toolkit-doc-1-5/wiki/FAQ_WhenDoModulesLoad
>
> Cheers,
>
> Salvador
>
> On Apr 14, 6:55 pm, Dominik Steiner 
> wrote:
>> Hi,
>>
>> I have a page that contains a lot of images and some of those images
>> take a long time to load (in total like 1 min)
>>
>> I have searched the forum and found this similar post
>>
>> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/ 
>> threa...
>>
>> but with no concrete solution to the problem, that IE7 will wait  
>> until
>> all the images are loaded until it will then load the GWT module.
>>
>> Is there a work around for this so that the gwt module will be loaded
>> before the images have finished loading? (using gwt 1.5.3)
>>
>> Thanks
>>
>> Dominik
> >


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



Re: Load gwt module before image are loaded on IE7

2009-04-14 Thread Dominik Steiner

Thanks for your answers.

Ok, i can see the javascript solution, in our case a php backend would
rewrite the html and add unique ids to the divs where the images will
be added and call a JSNI method that will be triggered on gwt module
load and pass the image urls to that method in an array or something.

Any other possible solutions out there?

Thanks for the input.

Dominik

On 14 Apr., 18:16, Vitali Lovich  wrote:
> A browser will fetch all resources from a page before executing any
> Javascript.  So move those images into an ImageBundle (you'll get better
> performance too) or use the Image widget (equivalent to the  in HTML)
> to add your images using Javascript.
>
> On Tue, Apr 14, 2009 at 7:45 PM, Jeff Chimene  wrote:
>
> > On 04/14/2009 04:31 PM, Dominik Steiner wrote:
> > > Thanks Jeff for your response,
>
> > > the problem is that the images are within the html page and the gwt
> > > module is just a component that has to be included into that html
> > > page. So what i would need would be a way that the onModule() method
> > > of that gwt component is triggered without having to wait that the
> > > images from the html host page finish loading.
>
> > > Thanks
>
> > > Dominik
>
> > How about a bootstrap page that displays a "loading..." message,
> > preloads the images, then loads the problem child?
>
> > Do you have /any/ control over the contents of that page? W/O rewriting
> > or encapsulating it, I think you're SOL.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Load gwt module before image are loaded on IE7

2009-04-14 Thread Dominik Steiner

Thanks Jeff for your response,

the problem is that the images are within the html page and the gwt
module is just a component that has to be included into that html
page. So what i would need would be a way that the onModule() method
of that gwt component is triggered without having to wait that the
images from the html host page finish loading.

Thanks

Dominik

On 14 Apr., 17:22, Jeff Chimene  wrote:
> On 04/14/2009 09:55 AM, Dominik Steiner wrote:> Hi,
>
> > I have a page that contains a lot of images and some of those images
> > take a long time to load (in total like 1 min)
>
> > I have searched the forum and found this similar post
>
> >http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
>
> > but with no concrete solution to the problem, that IE7 will wait until
> > all the images are loaded until it will then load the GWT module.
>
> > Is there a work around for this so that the gwt module will be loaded
> > before the images have finished loading? (using gwt 1.5.3)
>
> Load the images via RequestBuilder() and attach them to the DOM as they
> arrive?
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Load gwt module before image are loaded on IE7

2009-04-14 Thread Dominik Steiner

Hi,

I have a page that contains a lot of images and some of those images
take a long time to load (in total like 1 min)

I have searched the forum and found this similar post

http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/d0f0f71ebfd74f0/ff7cc59bd0cb3447?lnk=gst&q=ie7+images+load#ff7cc59bd0cb3447

but with no concrete solution to the problem, that IE7 will wait until
all the images are loaded until it will then load the GWT module.

Is there a work around for this so that the gwt module will be loaded
before the images have finished loading? (using gwt 1.5.3)

Thanks

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



Re: StackOverflowError with OOPHM GWTCompiler

2008-10-16 Thread Dominik Steiner
i tried with

-Xmx724M -Xss32M

and it still produced the same error. i have the feeling that it might  
be a bug in the windows distribution from the gwt trunk?

Dominik
Am 16.10.2008 um 13:10 schrieb Isaac Truett:

> Jason's suggestion of increasing stack space is a good one, but he  
> probably meant -Xss (-Xmx is heap space).
>
>
> On Thu, Oct 16, 2008 at 3:06 PM, Jason Essington <[EMAIL PROTECTED] 
> > wrote:
>
> are you guys increasing the stack space for the compiler? -Xmx and -
> Xms jvm args?
>
> -jason
> On Oct 16, 2008, at 11:36 AM, Dominik Steiner wrote:
>
> >
> > I get the same StackOverflowError but on a version build from the
> > 1.5.2 trunk on the 30th of September.
> >
> > I also have a big application and I get that error when i'm  
> launching
> > the GWT shell and then try to Compile/Browse. (on Windows XP SP2)
> >
> > On a mac leopard machine with the same build for mac I don't get  
> this
> > error.
> >
> > I understand that we are on the bloody edge when building from gwt
> > trunk but perhaps some GWT guys have an estimate on when a new  
> release
> > is due?
> >
> > Thanks
> >
> > Dominik
> >
> > On 14 Okt., 10:02, Thad <[EMAIL PROTECTED]> wrote:
> >> I'm running GWT OOPHM, which I most recently downloaded and build
> >> from
> >> the main branch yesterday, Oct 14th.  I'm running on SuSE Linux  
> 10.3
> >> (2.6.22.18-0.2-default #1 SMP) and Java 1.6_10
> >>
> >> For the most part, the OOPHM behaves correctly.  However, when I
> >> attempt to build my admittedly large application, GWTCompiler
> >> throws aStackOverflowError, producing a trace of over 1000 lines
> >> (the few of
> >> which are shown below).
> >>
> >> Smaller apps build fine with OOPHM's GWTCompiler, and this large  
> app
> >> builds fine with GWT 1.5.2.
> >>
> >> What can I do to troubleshoot this or provide folks with more  
> info on
> >> it?
> >>
> >> Compiling module com.optix.web.Workstation
> >> [ERROR] Unexpected internal compiler error
> >> java.lang.StackOverflowError
> >>at java.lang.ref.ReferenceQueue.poll(ReferenceQueue.java:82)
> >>at
> >> java.io.ObjectStreamClass.processQueue(ObjectStreamClass.java:
> >> 2234)
> >>at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:
> >> 266)
> >>at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> >> 1106)
> >>at
> >> java
> >> .io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> >> 1509)
> >>at
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> >> 1474)
> >>at
> >> java
> >> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> >> 1392)
> >>at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> >> 1150)
> >>at
> >> java
> >> .io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> >> 1509)
> >>at
> >> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> >> 1474)
> >>at
> >> java
> >> .io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> >> 1392)
> >>at
> >> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> >> 1150)
> >>at
> >> java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> >> 326)
> >>at java.util.ArrayList.writeObject(ArrayList.java:570)
> >>at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown
> >> Source)
> >>at
> >> sun
> >> .reflect
> >> .DelegatingMethodAccessorImpl
> >> .invoke(DelegatingMethodAccessorImpl.java:
> >> 25)
> >>at java.lang.reflect.Method.invoke(Method.java:597)
> >> ...
> > >
>
>
>
>
>
> >


--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: StackOverflowError with OOPHM GWTCompiler

2008-10-16 Thread Dominik Steiner

I get the same StackOverflowError but on a version build from the
1.5.2 trunk on the 30th of September.

I also have a big application and I get that error when i'm launching
the GWT shell and then try to Compile/Browse. (on Windows XP SP2)

On a mac leopard machine with the same build for mac I don't get this
error.

I understand that we are on the bloody edge when building from gwt
trunk but perhaps some GWT guys have an estimate on when a new release
is due?

Thanks

Dominik

On 14 Okt., 10:02, Thad <[EMAIL PROTECTED]> wrote:
> I'm running GWT OOPHM, which I most recently downloaded and build from
> the main branch yesterday, Oct 14th.  I'm running on SuSE Linux 10.3
> (2.6.22.18-0.2-default #1 SMP) and Java 1.6_10
>
> For the most part, the OOPHM behaves correctly.  However, when I
> attempt to build my admittedly large application, GWTCompiler throws 
> aStackOverflowError, producing a trace of over 1000 lines (the few of
> which are shown below).
>
> Smaller apps build fine with OOPHM's GWTCompiler, and this large app
> builds fine with GWT 1.5.2.
>
> What can I do to troubleshoot this or provide folks with more info on
> it?
>
> Compiling module com.optix.web.Workstation
> [ERROR] Unexpected internal compiler error
> java.lang.StackOverflowError
> at java.lang.ref.ReferenceQueue.poll(ReferenceQueue.java:82)
> at java.io.ObjectStreamClass.processQueue(ObjectStreamClass.java:
> 2234)
> at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:266)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1106)
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> 1509)
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1474)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1392)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1150)
> at
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:
> 1509)
> at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:
> 1474)
> at
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:
> 1392)
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:
> 1150)
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:
> 326)
> at java.util.ArrayList.writeObject(ArrayList.java:570)
> at sun.reflect.GeneratedMethodAccessor56.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
> 25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> ...
--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Invalid version number "null" when using the hosted mode

2008-10-01 Thread Dominik Steiner

I just tried it on IE and windows machine, it seems that when loading
the hosted.html url from the remote web server you have to add the ?
modulename to the url and then do the reload of that page. so
something like this

http://urlToConnectTo:8080//hosted.html?com_mycompany_mymodulename

HTH

Dominik

On 1 Okt., 11:01, Dominik Steiner <[EMAIL PROTECTED]>
wrote:
> Ok,
>
> i have something to add here too. I had the same issue and my maven
> build was using the correct new gwt vars, but i wasn't able to connect
> to a remote url as i was before moving to gwt 1.5.2.
>
> What helped for me was to load the hosted.html url directly in the gwt
> shell, so something like this
>
> http://urlToConnectTo:8080//hosted.html
>
> (the same url loaded into a browser did show that it was using the
> "1.5" string, so that it was the correct one)
>
> And then at least here on Mac i could make a right mouse click on the
> page and select Element-Information which brought up the source code
> of the hosted html page, where i could see that the "1.5" was missing
> and thus the GWT shell was still loading a stale one. So i had to make
> another right mouse click on the GWT shell and select "Reload" which
> then after again inspecting the source code brought up the correct
> hosted.html page with the correct "1.5" string.
>
> After this reload of the hosted.html I could connect to the remote url
> without problems. So it seems that the GWT shell is doing some caching
> that could only be fixed like this.
>
> HTH
>
> Dominik
>
> On 21 Sep., 11:28, Marco  Mustapic <[EMAIL PROTECTED]> wrote:
>
> > Yes, it works now, thanks!
>
> > On Sep 20, 1:12 pm, rakesh wagh <[EMAIL PROTECTED]> wrote:
>
> > > Symptoms:
> > > - You switched to 1.5.2 from some older version of gwt.
> > > - You are running hosted mode with -noserver flag for your app/
> > > module.
> > > - During war generation, your build scripts compiles the gwt
> > > moudule(GWTCompile).
>
> > > Cause:
> > > You are using older version of gwt jars in your ant build, while you
> > > have updated your those files in eclipse/run/debug-configuration
>
> > > Cure:
> > > Make sure you use 1.5.2 in your ant build as well.
>
> > > Hope it works for you!
>
> > > Rakesh Wagh
>
> > > On Sep 17, 3:57 pm, Marco  Mustapic <[EMAIL PROTECTED]> wrote:
>
> > > > I'm having the same problem, on os x, using -noserver and tomcat, .
> > > > How do I load hosted.html from the classpath? I also tried loading the
> > > > app from 127.0.0.1 and still get the same error.
>
> > > > thanks,
>
> > > > Marco
>
> > > > On Sep 16, 6:30 pm, Daniel <[EMAIL PROTECTED]> wrote:
>
> > > > > One more thing.  I'm using JBoss and have tried clearing out all tmp/
> > > > > work directories to no avail.  Also, when looking at the access log in
> > > > > jboss you don't see a request for the hosted.html file.
>
> > > > > On Sep 16, 2:28 pm, Daniel <[EMAIL PROTECTED]> wrote:
>
> > > > > > I'm getting this same problem.  I'm using osx and noserver mode.  I
> > > > > > have tried force refreshing from within the hosted mode, and also
> > > > > > tried clearing the cache/history from within safari (not sure if 
> > > > > > they
> > > > > > are linked).  I also noticed the comment earlier about loading the
> > > > > > hosted.html file from the classpath, but the wierd thing is that if 
> > > > > > I
> > > > > > use 127.0.0.1 instead of localhost, it works; so I don't think it's 
> > > > > > a
> > > > > > problem with an old hosted.html file in my classpath.  It's not an 
> > > > > > IDE
> > > > > > thing either as I get the problem when running from IDEA or from the
> > > > > > command line.
>
> > > > > > Any help would be greatly appreciated!!!
>
> > > > > > Daniel
>
> > > > > > On Sep 15, 12:58 pm, WildWarrior03 <[EMAIL PROTECTED]> wrote:
>
> > > > > > > anybody found any solution? I am not using tomcat..I am not sure 
> > > > > > > what
> > > > > > > is wrong..I also get the same error..
>
> > > > > > > On Sep 5, 7:17 am, Noé <[EMAIL PROTECTED]> wrote:
>
> > > > > > > > It works now. I think it was because of the cache on tomcat.
>
> > > > > > > > To achieve this, I erased all the temporary files on the web 
> > > > > > > > server.
--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Invalid version number "null" when using the hosted mode

2008-10-01 Thread Dominik Steiner

Ok,

i have something to add here too. I had the same issue and my maven
build was using the correct new gwt vars, but i wasn't able to connect
to a remote url as i was before moving to gwt 1.5.2.

What helped for me was to load the hosted.html url directly in the gwt
shell, so something like this


http://urlToConnectTo:8080//hosted.html

(the same url loaded into a browser did show that it was using the
"1.5" string, so that it was the correct one)

And then at least here on Mac i could make a right mouse click on the
page and select Element-Information which brought up the source code
of the hosted html page, where i could see that the "1.5" was missing
and thus the GWT shell was still loading a stale one. So i had to make
another right mouse click on the GWT shell and select "Reload" which
then after again inspecting the source code brought up the correct
hosted.html page with the correct "1.5" string.

After this reload of the hosted.html I could connect to the remote url
without problems. So it seems that the GWT shell is doing some caching
that could only be fixed like this.

HTH

Dominik

On 21 Sep., 11:28, Marco  Mustapic <[EMAIL PROTECTED]> wrote:
> Yes, it works now, thanks!
>
> On Sep 20, 1:12 pm, rakesh wagh <[EMAIL PROTECTED]> wrote:
>
> > Symptoms:
> > - You switched to 1.5.2 from some older version of gwt.
> > - You are running hosted mode with -noserver flag for your app/
> > module.
> > - During war generation, your build scripts compiles the gwt
> > moudule(GWTCompile).
>
> > Cause:
> > You are using older version of gwt jars in your ant build, while you
> > have updated your those files in eclipse/run/debug-configuration
>
> > Cure:
> > Make sure you use 1.5.2 in your ant build as well.
>
> > Hope it works for you!
>
> > Rakesh Wagh
>
> > On Sep 17, 3:57 pm, Marco  Mustapic <[EMAIL PROTECTED]> wrote:
>
> > > I'm having the same problem, on os x, using -noserver and tomcat, .
> > > How do I load hosted.html from the classpath? I also tried loading the
> > > app from 127.0.0.1 and still get the same error.
>
> > > thanks,
>
> > > Marco
>
> > > On Sep 16, 6:30 pm, Daniel <[EMAIL PROTECTED]> wrote:
>
> > > > One more thing.  I'm using JBoss and have tried clearing out all tmp/
> > > > work directories to no avail.  Also, when looking at the access log in
> > > > jboss you don't see a request for the hosted.html file.
>
> > > > On Sep 16, 2:28 pm, Daniel <[EMAIL PROTECTED]> wrote:
>
> > > > > I'm getting this same problem.  I'm using osx and noserver mode.  I
> > > > > have tried force refreshing from within the hosted mode, and also
> > > > > tried clearing the cache/history from within safari (not sure if they
> > > > > are linked).  I also noticed the comment earlier about loading the
> > > > > hosted.html file from the classpath, but the wierd thing is that if I
> > > > > use 127.0.0.1 instead of localhost, it works; so I don't think it's a
> > > > > problem with an old hosted.html file in my classpath.  It's not an IDE
> > > > > thing either as I get the problem when running from IDEA or from the
> > > > > command line.
>
> > > > > Any help would be greatly appreciated!!!
>
> > > > > Daniel
>
> > > > > On Sep 15, 12:58 pm, WildWarrior03 <[EMAIL PROTECTED]> wrote:
>
> > > > > > anybody found any solution? I am not using tomcat..I am not sure 
> > > > > > what
> > > > > > is wrong..I also get the same error..
>
> > > > > > On Sep 5, 7:17 am, Noé <[EMAIL PROTECTED]> wrote:
>
> > > > > > > It works now. I think it was because of the cache on tomcat.
>
> > > > > > > To achieve this, I erased all the temporary files on the web 
> > > > > > > server.
--~--~-~--~~~---~--~~
You received 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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---