Re: Million access to GWT Appl ??

2010-06-23 Thread Blessed Geek
You know that cows (and deer too) chew their cud. Cows have a
secondary stomach, so it could store whatever grass it has chewed off
the field in the 2ndary stomach. Then it could regurgitate the stored
cud and chew on it afterwards.

Your question is akin to saying that you read an article that says
that the delivery of food (cows like alfalfa, I'm told) to cows is not
efficient when there are more than a million cows in a dairy farm, the
reason being cows chew their cud.

What has cows chewing their cud got to do with the efficiency of
delivery of food to cows. It is the fault of the delivery system and
has nothing to do with whether a cow chews its cud. The efficiency of
delivery is the same whether there are a million cows or a million
kangaroos.

Obviously, the article you read is erroneous and/or its author has a
huge grudge against Google.

Likewise, GWT allowing a browser to chew on its cud  does not dictate
the efficiency of the data delivery system.

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



StackLayoutPanel within a ScrollPanel

2010-06-23 Thread Roy
I want a StackLayoutPanel with a bar for each letter of the alphabet.
The idea is that Contacts will be organised within the appropriate
bar.

All works fine, except when I try to put my SLP within a ScrollPanel
so that I can have a shorter window.
When I do this, I see the A bar only, the rest of the SP is blank.
If I look at the DOM, I can see the other bars with descending
positive values of style-bottom. Thus they are rendering with Z
immediately above the A (and outside my viewable window), Y above Z
and so on.

Any ideas how to make SLP and SP play nice together?

best
Roy

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



Re: Maven is obfuscating and GWT2.1 should not depend on it

2010-06-23 Thread Blessed Geek
Chris, I am working on it now because I need that feature really badly
- it's a do or die situation because I have so many forms to crud.

Please write to my gmail id: blessedgeek.

-- 
You received 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: Error: Permission denied for domain2 to get property Location.href from domain1.

2010-06-23 Thread Jeff
Ok, I'm sorry not having be able to help you more than this...
Good luck for your app

Regards,
Jeff

On 22 juin, 17:53, randasin r4nd7...@gmail.com wrote:
 Created a bug 
 report:http://code.google.com/p/google-web-toolkit/issues/detail?id=5049q=s...

 On Jun 22, 10:32 am, randasin r4nd7...@gmail.com wrote:

  It's this line on hosted.html in GWT bootstrap process that causes SOP
  violation

  Line 227: var url = topWin.location.href;

  I am guessing GWT only uses hosted.html in DevMode.  That's why there
  is no violation in web mode?

  Does anyone have insights on a workaround?

-- 
You received 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: blank page in IE8

2010-06-23 Thread Asier

El 23/06/2010 7:02, kais blah escribió:

Hi,

I have problem on my GWT application. its working correctly under chrome
and Firefox but not IE.

can someone help me to troubleshoot it, is it CSS problem or scripts
problem?


Perhaps you can try to enable the Compatibility View?

Regards

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



Unsinking mouse over/out/move events for a CellList/Tree/Table

2010-06-23 Thread Paul Schwarz
Summary: in a CellList I want to sink the ONCLICK and ONCONTEXTMENU
events to be handled by my Cell's onBrowserEvent method, but I don't
want any mouse over/out/move events, but cannot seem to unsink them.

In 2.1 M1 we have CellList. If you look at the constructor of CellList
you'll see on line 139
sinkEvents(Event.ONCLICK | Event.ONCHANGE | Event.MOUSEEVENTS);

So the CellList is presuming that these are the events that we're
interested in. Now I have created my own concrete implementation of an
AbstractCell.
Other implementations are TextCell, ButtonCell, CheckboxCell, etc. So
I have followed those as examples, but have created my own Cell
implementation.

One of the methods that can be implemented is:
public abstract Object onBrowserEvent(Element parent, C value, Object
viewData, NativeEvent event, ValueUpdaterC valueUpdater);

... and in that method I am interested in a Click event and a Context
menu event. I notice that my CPU usage peaks at 50ish% when I move my
mouse around. Sure enough GWT is picking up all the mouse over, mouse
out, mouse move events as well. AND I'm not getting my Context menu
event (because I haven't explicitly sunk it yet).

So in my UI class that keeps an instance of this CellList, in the
constructor I have:
  myCellList.sinkEvents(Event.ONCONTEXTMENU);
  myCellList.unsinkEvents(Event.MOUSEEVENTS);

... so now I am getting my Context menu event, but I am still getting
a flood of mouse events as I wiggle my mouse over the Cells in the
CellList. I have tried explicitly unsinking Event.ONMOUSEOVER et al.
but that has no effect either.

Either this is a bug, or more likely I am unsinking the event on the
wrong element or unsinking in the wrong order, or I am missing
something altogether.

Any ideas?

-- 
You received 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: Data Presentation Widgets Help

2010-06-23 Thread KenJi_getpowered
I am trying to find the same doc, so far it is a bit empty.

http://stackoverflow.com/questions/2891803/how-to-use-gwt-2-1-data-presentation-widgets
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/357ab22364b0bcea?pli=1

That is all i found but I have not tested that code yet.

On 21 mai, 04:15, licht...@gmail.com licht...@gmail.com wrote:
 Anyone know where to find the sources, examples, docs to the new Data
 Presentation Widgets?

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

-- 
You received 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: Inserting an external HTML/JSP Page in GWT

2010-06-23 Thread Gaurav Munjal
Thanks

On Jun 18, 8:05 pm, Stefan Bachert stefanbach...@yahoo.de wrote:
 Hi Gaurav,

 as you say,
 just use the Widget Frame which is an html iframe
 The method is setUrl ()

 Stefan Bacherthttp://gwtworld.de

 On Jun 16, 2:43 pm, Gaurav Munjal mail2gauravmun...@gmail.com wrote:

  Is there an option that when the user clicks on one of the buttons in
  gwt, in a seperate panel a html page ( kind of an iframe) is inserted
  whose link will be specified by us.

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



FYI: Element .getTagName() returns uppercase tag names, like DIV, LABEL, SPAN

2010-06-23 Thread Paul Schwarz
Using 2.1 M1 I noticed that Element has the method hasTagName, which
looks like this:

  public final boolean hasTagName(String tagName) {
assert tagName != null : tagName must not be null;
return tagName.equals(getTagName());
  }

Almost synonymous with this:
div.equals(element.getTagName())

However one gotcha got me, assume element is a div:
div.equals(element.getTagName()) --- returns false :-(
DIV.equals(element.getTagName())--- returns true :-)

Likewise:
element.hasTagName(div)--- returns false :-(
element.hasTagName(DIV)--- returns true :-)

Obviously Java's String .equals() method is case sensitive. But how
would we know that element.getTagName returns uppercase or otherwise?

Here is the method at is stands in 2.1 M1:

  /**
   * Gets the element's full tag name, including the namespace-prefix
if
   * present.
   *
   * @return the element's tag name
   */
  public final String getTagName() {
return DOMImpl.impl.getTagName(this);
  }

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



Re: Data Presentation Widgets Help

2010-06-23 Thread Paul Schwarz
I got started by using antony.trupe's examples given in:
http://stackoverflow.com/questions/2891803/how-to-use-gwt-2-1-data-presentation-widgets/2944454#2944454

It doesn't have a CellTree example, and since my project doesn't
include a Tree I haven't delved into that yet.

I needed something that was like a Table but with more flexibility, so
I've ended up just using a CellList and then doing quite a bit of
rendering in the render() override of the AbstractCell class.

So basically I have a CellList that is a list of MyCustomCell, and in
there I have learned all that I need by looking at other
implementations of AbstractCell, such as TextCell, ButtonCell, etc.


On May 21, 5:15 am, licht...@gmail.com licht...@gmail.com wrote:
 Anyone know where to find the sources, examples, docs to the new Data
 Presentation Widgets?

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

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



Dynamic Label from database.

2010-06-23 Thread cody
Hi,

Any idea how to create a label which text is retrieve from database?

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



Re: Dynamic Label from database.

2010-06-23 Thread Jeff
Is your database situated on the server-side or on the client-side ?

If on server-side, I see no other way than this :
Prepare your Java logic on your server (extract the data you want from
the DB) , and then expose this method, the same way it's done in the
greeting sample project.

If on client-side, I'm sorry I don't know how to do this... It even
seems a bit tricky...
On 23 juin, 11:25, cody lse...@gmail.com wrote:
 Hi,

 Any idea how to create a label which text is retrieve from database?

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



Re: compile problems with GWT 2.1

2010-06-23 Thread KenJi_getpowered
Thanks BlessedGeek,

It works perfectly with that line   inherits
name='com.google.gwt.requestfactory.RequestFactory'/

My app is totally functionnal and I was even able to add the new Data
Presentation Widget.

FYI: Correction is not yet included in the GWT 2.1 M1 version

On 25 mai, 15:34, Thomas Broyer t.bro...@gmail.com wrote:
 On 24 mai, 01:53, Blessed Geek blessedg...@gmail.com wrote:

  I went into bikeshed jar in gwt2.1m1 plugin directory in eclipse and
  edited ValueStore.gwt.xml to insert the line

    inherits name='com.google.gwt.requestfactory.RequestFactory'/.

  After which, GWT copiulation proceeded without error and my
  application ran without error or interference from bikeshed demo.

  The question remains, why is the bikeshed app included in my app when
  I enabled GWT 2.1M1.

 Because there's a com.google.gwt.user.User override in gwt-bikeshed
 that adds a dependency (inherits/) on app.App.
 This is now 
 fixed:http://code.google.com/p/google-web-toolkit/source/detail?r=8203

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

-- 
You received 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: FYI: Element .getTagName() returns uppercase tag names, like DIV, LABEL, SPAN

2010-06-23 Thread Thomas Broyer


On 23 juin, 11:05, Paul Schwarz paulsschw...@gmail.com wrote:
 Using 2.1 M1 I noticed that Element has the method hasTagName, which
 looks like this:

   public final boolean hasTagName(String tagName) {
     assert tagName != null : tagName must not be null;
     return tagName.equals(getTagName());
   }

 Almost synonymous with this:
 div.equals(element.getTagName())

 However one gotcha got me, assume element is a div:
 div.equals(element.getTagName())     --- returns false :-(
 DIV.equals(element.getTagName())    --- returns true :-)

 Likewise:
 element.hasTagName(div)    --- returns false :-(
 element.hasTagName(DIV)    --- returns true :-)

 Obviously Java's String .equals() method is case sensitive. But how
 would we know that element.getTagName returns uppercase or otherwise?

Because that's what the DOM says (and what browsers do):
http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-822762427
http://www.w3.org/TR/html5/embedded-content-0.html#apis-in-html-documents

When Firefox 4 will ship with HTML5's support for inlined SVG and
MathML, SVG and MathML elements will however be returned in lower-case
(or camel case for e.g. foreignObject), because they're not in the
HTML namespace.

-- 
You received 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: Why appear OPTIONS instead of POST in my RPC calls?

2010-06-23 Thread enTropy Fragment
Thanks for your comment, it helped me a lot. Indeed that's the problem.

I guess the next step is to create a good response so the RPC works. Or is
there any better solution? (I can't avoid the cross-site situation)

I've overriden the doOptions method in the servlet with the following code:

@Override
protected void doOptions(HttpServletRequest req, HttpServletResponse
res){
res.addHeader(Access-Control-Allow-Methods, POST, GET, OPTIONS);
res.addHeader(Connection, Keep-Alive);
res.addHeader(Keep-Alive, 115);
res.addHeader(Access-Control-Allow-Origin,
req.getHeader(Origin));
res.addHeader(x-gwt-permutation, GWT.getPermutationStrongName());
res.addHeader(x-gwt-module-base, 
http://localhost:8084/AnalisiHeuristic/cat.udl.griho.AnalisiHeuristic.Main/
);
}


But it's not working yet, what am I doing wrong? isn't this the good
approach? :(
GWT: 2.0.3
Tomcat: 6.0.26
OS: Ubuntu 10.04

*Request:*
OPTIONS
/AnalisiHeuristic/cat.udl.griho.AnalisiHeuristic.Main/analisiheuristicservice
HTTP/1.1
Host: localhost:8084
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.9.2.3)
Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: es-es,es;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Origin: http://www.arandomwebsite.is
Access-Control-Request-Method: POST
Access-Control-Request-Headers: x-gwt-module-base,x-gwt-permutation

2010/6/22 Sripathi Krishnan sripathi.krish...@gmail.com

 Probably because you are trying to make cross-domain requests (a different
 port, domain or protocol)

 See this post -
 http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a080757856163097
 http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a080757856163097
 --Sri


 On 22 June 2010 16:19, enTropy Fragment poemcompi...@gmail.com wrote:

 Hello

 Here is my problem:
 When I call my rpc from inside the war everything works well, but when I
 call the same rpc calls from the same GWT javascript client stuff but
 injected into an external web site the rpc makes the call with HTTP OPTIONS
 instead of HTTP POST method.
 I'm very interested in calling the rpc this way...

 How can I make this work?

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


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


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



Re: FYI: Element .getTagName() returns uppercase tag names, like DIV, LABEL, SPAN

2010-06-23 Thread Paul Schwarz
Thanks Thomas. Read and understood. Would it not be helpful to put
that in the comments block of getTagName() just to make it very clear
to the users who haven't come across that section in the HTML spec?

On Jun 23, 1:16 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 23 juin, 11:05, Paul Schwarz paulsschw...@gmail.com wrote:





  Using 2.1 M1 I noticed that Element has the method hasTagName, which
  looks like this:

    public final boolean hasTagName(String tagName) {
      assert tagName != null : tagName must not be null;
      return tagName.equals(getTagName());
    }

  Almost synonymous with this:
  div.equals(element.getTagName())

  However one gotcha got me, assume element is a div:
  div.equals(element.getTagName())     --- returns false :-(
  DIV.equals(element.getTagName())    --- returns true :-)

  Likewise:
  element.hasTagName(div)    --- returns false :-(
  element.hasTagName(DIV)    --- returns true :-)

  Obviously Java's String .equals() method is case sensitive. But how
  would we know that element.getTagName returns uppercase or otherwise?

 Because that's what the DOM says (and what browsers 
 do):http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-822762427http://www.w3.org/TR/html5/embedded-content-0.html#apis-in-html-docum...

 When Firefox 4 will ship with HTML5's support for inlined SVG and
 MathML, SVG and MathML elements will however be returned in lower-case
 (or camel case for e.g. foreignObject), because they're not in the
 HTML namespace.

-- 
You received 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: Safari 5 - (RangeError): Maximum call stack size exceeded

2010-06-23 Thread Thomas Broyer


On 23 juin, 03:52, Pascal zig...@gmail.com wrote:
 Hi,
 Has the workaround been included in the codebase somewhere? Is there a
 chance that there will be a point release soon?

There's been a change at the compiler-level instead:
http://code.google.com/p/google-web-toolkit/source/detail?r=8300

I don't think we'll see a 2.0.4 though, I guess the plan is to just
ship it with 2.1 when it'll be ready.
(remember last year when IE8 finally went out? –there was a workaround
though– or Safari 4 and its expression too deep errors? or Firefox
3.5 and its regression re. mouse events on scrollbars?)
See http://code.google.com/p/google-web-toolkit/issues/detail?id=3455,
http://code.google.com/p/google-web-toolkit/source/detail?r=5641
This was all fixed in the next release, but it took some time between
the report, the fix, and then the release.

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



Re: Unsinking mouse over/out/move events for a CellList/Tree/Table

2010-06-23 Thread Thomas Broyer


On 23 juin, 10:51, Paul Schwarz paulsschw...@gmail.com wrote:
 Summary: in a CellList I want to sink the ONCLICK and ONCONTEXTMENU
 events to be handled by my Cell's onBrowserEvent method, but I don't
 want any mouse over/out/move events, but cannot seem to unsink them.

 In 2.1 M1 we have CellList. If you look at the constructor of CellList
 you'll see on line 139
 sinkEvents(Event.ONCLICK | Event.ONCHANGE | Event.MOUSEEVENTS);

 So the CellList is presuming that these are the events that we're
 interested in. Now I have created my own concrete implementation of an
 AbstractCell.
 Other implementations are TextCell, ButtonCell, CheckboxCell, etc. So
 I have followed those as examples, but have created my own Cell
 implementation.

 One of the methods that can be implemented is:
 public abstract Object onBrowserEvent(Element parent, C value, Object
 viewData, NativeEvent event, ValueUpdaterC valueUpdater);

 ... and in that method I am interested in a Click event and a Context
 menu event. I notice that my CPU usage peaks at 50ish% when I move my
 mouse around. Sure enough GWT is picking up all the mouse over, mouse
 out, mouse move events as well. AND I'm not getting my Context menu
 event (because I haven't explicitly sunk it yet).

 So in my UI class that keeps an instance of this CellList, in the
 constructor I have:
   myCellList.sinkEvents(Event.ONCONTEXTMENU);
   myCellList.unsinkEvents(Event.MOUSEEVENTS);

 ... so now I am getting my Context menu event, but I am still getting
 a flood of mouse events as I wiggle my mouse over the Cells in the
 CellList. I have tried explicitly unsinking Event.ONMOUSEOVER et al.
 but that has no effect either.

 Either this is a bug, or more likely I am unsinking the event on the
 wrong element or unsinking in the wrong order, or I am missing
 something altogether.

 Any ideas?

Widget#sinkEvents defers the call to DOM.sinkEvents until the widget
is attached, but unsinkEvents doesn't, and don't update the
eventsToSink private variable (this could be seen as a bug in
Widget, which should override unsinkEvents too).
The workaround seems to be (not tested) to call unsinkEvents from an
onLoad override.

-- 
You received 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: Unsinking mouse over/out/move events for a CellList/Tree/Table

2010-06-23 Thread Paul Schwarz
Thanks Thomas,

Test and works as suggested. The class owning my CellList extends
Composite and I now have overridden the onLoad method like this:
  @Override
  protected void onLoad() {
myCellListView.unsinkEvents(Event.MOUSEEVENTS);
  }

... and no longer are the mouse over/out/move events flooding into my
console. Interesting I still get a CPU spike when I wiggle my mouse,
but I am in hosted mode, could this have something to do with it?
Could it be that when I compile to javascript these mouse events are
genuinely ignored and have no processing overhead?

It's not a biggie, it's just that I am rendering a non-trivial view of
data in my CellList and performance is essential.



On Jun 23, 1:57 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 23 juin, 10:51, Paul Schwarz paulsschw...@gmail.com wrote:





  Summary: in a CellList I want to sink the ONCLICK and ONCONTEXTMENU
  events to be handled by my Cell's onBrowserEvent method, but I don't
  want any mouse over/out/move events, but cannot seem to unsink them.

  In 2.1 M1 we have CellList. If you look at the constructor of CellList
  you'll see on line 139
  sinkEvents(Event.ONCLICK | Event.ONCHANGE | Event.MOUSEEVENTS);

  So the CellList is presuming that these are the events that we're
  interested in. Now I have created my own concrete implementation of an
  AbstractCell.
  Other implementations are TextCell, ButtonCell, CheckboxCell, etc. So
  I have followed those as examples, but have created my own Cell
  implementation.

  One of the methods that can be implemented is:
  public abstract Object onBrowserEvent(Element parent, C value, Object
  viewData, NativeEvent event, ValueUpdaterC valueUpdater);

  ... and in that method I am interested in a Click event and a Context
  menu event. I notice that my CPU usage peaks at 50ish% when I move my
  mouse around. Sure enough GWT is picking up all the mouse over, mouse
  out, mouse move events as well. AND I'm not getting my Context menu
  event (because I haven't explicitly sunk it yet).

  So in my UI class that keeps an instance of this CellList, in the
  constructor I have:
    myCellList.sinkEvents(Event.ONCONTEXTMENU);
    myCellList.unsinkEvents(Event.MOUSEEVENTS);

  ... so now I am getting my Context menu event, but I am still getting
  a flood of mouse events as I wiggle my mouse over the Cells in the
  CellList. I have tried explicitly unsinking Event.ONMOUSEOVER et al.
  but that has no effect either.

  Either this is a bug, or more likely I am unsinking the event on the
  wrong element or unsinking in the wrong order, or I am missing
  something altogether.

  Any ideas?

 Widget#sinkEvents defers the call to DOM.sinkEvents until the widget
 is attached, but unsinkEvents doesn't, and don't update the
 eventsToSink private variable (this could be seen as a bug in
 Widget, which should override unsinkEvents too).
 The workaround seems to be (not tested) to call unsinkEvents from an
 onLoad override.

-- 
You received 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: compile problems with GWT 2.1

2010-06-23 Thread Jim
When I run bikeshed, I got the following error. I can not fix this
problems by following Eclipse.readme and turorials from DataNucleus.
Can somebody kindly provide the working bikeshed source code in
Eclipse project so I can learn GWT 2.1 without wasting my time on
DataNucleus. I appreciate your kindness.

Found Meta-Data for class
com.google.gwt.sample.expenses.server.domain.Expense but this class is
not enhanced!! Please enhance the class before running DataNucleus.
org.datanucleus.exceptions.NucleusUserException: Found Meta-Data for
class com.google.gwt.sample.expenses.server.domain.Expense but this
class is not enhanced!! Please enhance the class before running
DataNucleus.
at
org.datanucleus.metadata.MetaDataManager.initialiseClassMetaData(MetaDataManager.java:
2225)
at
org.datanucleus.metadata.MetaDataManager.initialiseFileMetaData(MetaDataManager.java:
2176)
at
org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:
881)
at
org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:
794)
at
org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:
488)
at
org.datanucleus.jpa.EntityManagerFactoryImpl.init(EntityManagerFactoryImpl.java:
355)



On Jun 23, 6:13 am, KenJi_getpowered mikael.k...@gmail.com wrote:
 Thanks BlessedGeek,

 It works perfectly with that line   inherits
 name='com.google.gwt.requestfactory.RequestFactory'/

 My app is totally functionnal and I was even able to add the new Data
 Presentation Widget.

 FYI: Correction is not yet included in the GWT 2.1 M1 version

 On 25 mai, 15:34, Thomas Broyer t.bro...@gmail.com wrote:



  On 24 mai, 01:53, Blessed Geek blessedg...@gmail.com wrote:

   I went into bikeshed jar in gwt2.1m1 plugin directory in eclipse and
   edited ValueStore.gwt.xml to insert the line

     inherits name='com.google.gwt.requestfactory.RequestFactory'/.

   After which, GWT copiulation proceeded without error and my
   application ran without error or interference from bikeshed demo.

   The question remains, why is the bikeshed app included in my app when
   I enabled GWT 2.1M1.

  Because there's a com.google.gwt.user.User override in gwt-bikeshed
  that adds a dependency (inherits/) on app.App.
  This is now 
  fixed:http://code.google.com/p/google-web-toolkit/source/detail?r=8203

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

-- 
You received 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: Order in new CellTable

2010-06-23 Thread bond
Thanks very much Jaroslav!!

best regards

Daniele

On 20 Giu, 19:48, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
 The reason why I proposed adding single event-handler on whole table was due
 to performance concerns. I read somewhere in GWT-docs that large number of
 event-handlers might affect responsiveness of your UI. (My UIs are too
 simple so far to test when that becomes an issue though.)

 Cheers
   J. Záruba

 On Sun, Jun 20, 2010 at 7:30 PM, bond daniele.re...@gmail.com wrote:
  Thanks for your reply.
  I had an idea, maybe can be usefull:

  private abstract class MouseOverCell extends AbstractCellString {

                �...@override
                 public void render(String value, Object viewData,
  StringBuilder sb)
  {
                         if (value != null) {
                                 sb.append(value);
                         }
                 }

                �...@override
                 public Object onBrowserEvent(Element parent, String value,
                                 Object viewData, NativeEvent event,
                                 ValueUpdaterString valueUpdater) {
                         String type = event.getType();
                         if (mouseover.equals(type)) {
                                 onMouseOver();
                         }
                         return viewData;
                 }

                 public abstract void onMouseOver();
         }

  I've created a new type of Cell that i've named MouseOverCell where I
  catch the native event 'mouseover' and than call an abstract method.

  So when you add this cell to your table:
  addSortColumn(XX, new MouseOverCell() {

                        �...@override
                         public void onMouseOver() {
                                 Window.alert(ON MOUSE OVER);

                         }
                 }, new GetValueOperatore, String() {
                         public String getValue(Operatore object) {
                                 return object.getNome();
                         }
                 }, new PropertyString(nome, String.class));

  Bye

  On 20 Giu, 19:02, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
   I would consider adding one listener on the whole table and then check
   whether the target is your (one of) your cell(s).
   But I'm not saying this is The One Proper solution, I'm still only
  learning
   to use CellTables.

   On Sun, Jun 20, 2010 at 4:24 PM, bond daniele.re...@gmail.com wrote:
Hi Jaroslav,
thanks for your reply.The google's source code is very usefull.
It's possible add an 'onMouseOver' event on a single cell?

Thanks very much

Best regards

On 17 Giu, 15:56, Jim jim.p...@gmail.com wrote:
 I got all source code from this repository and created a project -
 bikeshed21. I fixed some minor issues because Parser and Render
 classes are duplicated in two packages. Now I got a clean Eclipse
 project without any syntax errors. But I can not run it because there
 are DataNucleus-enhance problems which I have not fixed. I was trying
 to get a working copy of bikeshed from this group. So far I am out of
 luck. I would appreciate it if you can provide us with a working copy
 of bikeshed Eclipse project. Or if you need this half-done project
  I
 finished, I can provide it.

 On Jun 17, 8:09 am, Jaroslav Záruba jaroslav.zar...@gmail.com
  wrote:

  The Expenses demo-app uses ordering columns:
   http://gwt-bikeshed.appspot.com/Expenses.html(seereportdetails)
  source:
   http://code.google.com/p/google-web-toolkit/source/browse/branches/2..
  ..

  On Thu, Jun 17, 2010 at 2:06 PM, bond daniele.re...@gmail.com
  wrote:
   Hi,
   I'm using the new GWT2.1M1. I'm testing CellTable and it seems
  very
   beautiful.
   I've 2 questions:

   -how I can order the data display clicking on the column header?
   -how I can add an onMouseOver event on a single cell?

   Thanks very much

   Best regards

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

--
You received this message because you are subscribed to the Google
  Groups
Google Web Toolkit group.
To post to this group, send email to
  google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to

Re: blank page in IE8

2010-06-23 Thread kais
Hi

actually it was a DOCTYPE options, I removed the -//W3C//DTD HTML
4.01 Transitional//EN and it works.

!DOCTYPE HTML PUBLIC

thanks

On Jun 23, 11:58 am, Asier avsg...@gmail.com wrote:
 El 23/06/2010 7:02, kais blah escribi :

  Hi,

  I have problem on my GWT application. its working correctly under chrome
  and Firefox but not IE.

  can someone help me to troubleshoot it, is it CSS problem or scripts
  problem?

 Perhaps you can try to enable the Compatibility View?

 Regards

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



Grid - controlling pixel sizes

2010-06-23 Thread Magnus
Hello,

I would like to build a Grid (to represent a chess board) with
predictable pixel sizes.

For this I need to know:
Given a single cell has pixel sizes (x, y), what's the pixel size of
the whole grid?

How can I compute this?

In this context I tried to set every cell to an exact pixel size:

for (int y = 0;y  8;y++)
 for (int x = 0;x  8;x++)
 {
  grd.getCellFormatter().setWidth(y,x,50px);
  grd.getCellFormatter().setHeight(y,x,50px);
 }

But I found out that the first inner statement (for the cell's width)
is completely ignored. Whatever I enter for the width, it does not
change anything. The heigth ist set correctly. As a consequence, I
cannot really controll the cell's pixel sizes. What's that?

The code for my component is shown below.

Thank you
Magnus

-

package chess.client;

import com.google.gwt.user.client.*;
import com.google.gwt.user.client.ui.*;

public class Board extends AbsolutePanel
{
 private Grid grd = new Grid (8,8);

 public Board ()
 {
super ();
add(grd);
init ();
 }

 private void init ()
 {
  setPixelSize (400+2,400+2);

grd.setBorderWidth(1);
grd.setCellPadding(0);
grd.setCellSpacing(0);
grd.setPixelSize(402,402);

for (int y = 0;y  8;y++)
for (int x = 0;x  8;x++)
{
grd.getCellFormatter().setWidth(y,x,111px);
grd.getCellFormatter().setHeight(y,x,49px);

}
 }
}

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



JsonpRequestBuilder onFailure

2010-06-23 Thread randasin
I just start using JsonpRequestBuilder.  I understand for the most
part what to return for a successful response,  but under what
circumstances is AsyncCallback.onFailure method invoked?  In other
words, what should I return in my JSON response (on the server side)
to indicate a failure?

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



Pass a method as parameter in GWT

2010-06-23 Thread Thiago Miranda de Oliveira
Hi.
Im building a logic here that a class A instantiate a object of
another class B. B has a specified clickHandler that does a animation.
I want that the class A can pass a method to the class B as a
parameter to do the animation and some extra stuff that I wanna do in
the class A.
So I was thinking in something like that:

class A
Button trigger = new Button();
trigger.addClickHandler(new ClickHandler(){
 //doStuff
 callBack();
}

class B
A a = new A();
a.setCallBack(doThis());

public void doThis(){
 Window.alert(test);
}

How can I do that in GWT?

Thanks for the attention
Cheers

-- 
You received 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: server side entry point to open/close database?

2010-06-23 Thread Magnus
Hello,

after your post I would open/close my db within each service call.

If I would do it with a pool, I would need 2 entry points, one to open
the pool and one to close it. If I would go this way, would these
entry point exist (is there a deinit)?

Thanks
Magnus

On 20 Jun., 15:58, roji rojan...@gmail.com wrote:
 Hi Magnus.

 Your server-side service implementation is a class that extends GWT's
 RemoteServiceServlet, which itself extends the Servlet interface. If
 you need to perform once-only initialization, you can do so by
 overriding the init() method in your class.

 Note, however, that init() is probably a bad place to open database
 connections, as your backend will be accessed concurrently by many
 users and multiple database connections are needed. You should
 probably either open and close database connections inside the RPC
 service calls themselves (using a database connection pool behind the
 scenes), or in some scenarios store some resources in the user's HTTP
 session (acquired by calling
 this.getThreadLocalRequest().getSession()).

 If you need more help, can you send more details about your
 application?

 Shay

 On Jun 20, 5:23 am, Magnus alpineblas...@googlemail.com wrote:



  Hi,

  I wonder where to open and close the database on the server side, and
  where to store the database connection.

  At this point, I only have the server side implementation of my RPC
  services. But there is no place to store my Connection object and no
  entry point like onServerLoad or something like that.

  An alternative way would be to open and close the database on each
  service call.

  How do you do this?

  Thank you
  Magnus- Zitierten Text ausblenden -

 - Zitierten Text anzeigen -

-- 
You received 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: JsonpRequestBuilder onFailure

2010-06-23 Thread randasin
nevermind just found the API

http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/jsonp/client/JsonpRequestBuilder.html#setFailureCallbackParam%28java.lang.String%29

On Jun 23, 9:42 am, randasin r4nd7...@gmail.com wrote:
 I just start using JsonpRequestBuilder.  I understand for the most
 part what to return for a successful response,  but under what
 circumstances is AsyncCallback.onFailure method invoked?  In other
 words, what should I return in my JSON response (on the server side)
 to indicate a failure?

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



Re: UIBinder Benefits?

2010-06-23 Thread Stefan Bachert
Hi,

On Jun 22, 3:36 pm, Andrew Hughes ahhug...@gmail.com wrote:
 Almost all of the problem's listed below are bad advice and I suggest you
 disregard them.

Do you, or others, have any valid arguments (opinions are no valid
arguments)

I am not going to do things the wrong or the poor way just because
most people are doing so.


 The main problem I have with UiBinder is that when you try and use it with
 the MVP architecture best practice, you have to boilerplate all the
 parent/child (view) widget's. Which means you'll see a lot of.

I am explaining the long story about my lessons I learned.

The problem with any pure declarative language is that you reached the
dead end of separation.
Either a dedicated aspect of separation is build in, or you are lost.
There is always a tradeof where declarative languages will become more
complex than an imperative one.

UiBuilder is a pure declarative language.

Let us look at CSS as a simple pure declarative language for example.
Consider there are two aspects/concern defining an value.
aspect 1) general theming. you want a certain padding
aspect 2) behaviour, you want to simulate a pressed state. Therefore
you need to change padding depending on the state

With a imperative language (java) you would just combine/add both
aspects.
With a language like css either this is supported or not. In css it is
not, bad luck.
(CSS3 supports a little imperativity with calc, but only FF is
supporting this somehow)

And the pure declarative language CSS 2.1 still fails to support some
simpliest common needs.
Remember all the time the topic of centering widget is coming up.

UiBinder fails the same way. It limits always your capabilities as a
developer. Either a concept is explicitly supported, or you are lost.

There are other ways to be more declarative. One way is to use fluent
interfaces. Than you use both declarative and imperative approaches,
and can switched to the one which is more appropriate

the way I am currently using is to define interfaces and use
generators.
The input looks like the interfaces at the end of this mail.
It defines a dialog with 2 subdialog.

To create you need just.
LogonDialog logon = GWT.create(LogonDialog.class);
..
logon.layout();
logon.setI18N (..Constants);

Accessing is a easy as
  String text = logon.eingabe.eMail().getText()

Let us compare this approach with UiBinder

generator: only one annotated interface for deferred binding
UiBinder: class and UiBinder.XML with XMTL, CSS and WidgetsTags

generator: layout automatically according css-style and annotations
UiBinder: dialog designer does it manually.

generator: i18n constant change at any time
UiBinder: i18n per compilation

generator: automatic labeling, yes
UiBinder: automatic labeling, no

generator: styles based theming
UiBinder: styles based on accident

generator: widgets, any with a default constructor
UiBinder: some widgets

generator: consistent layout is automatically asured
UiBinder: layout by accident/capability of the designer

generator: debugging: yes, pure java
UiBinder: no chance

Open questions with UiBinder
* how to deal when the themes
* how to use it a input for further code generation (I think no way)

Capabilities with generator approach
* rules are in the generator, one place
* control combined widgets (text + label for example making both
enable/disable/hidden)
* input is usable for further code generation
Ideas
* generate controller code, too (input DialogInterface and an
interface defining a domain/app/session object)
* generate request code, too
* generate client cache code, too
* ...


UiBinder is for the one how like to stay in a death end.

When you want to generate boiler plate code,
you need to get rid of UiBinder.

Stefan Bachert
http://gwtworld.de

-
@SpaceStyle(a1-DialogSpace)
public interface LogonDialog extends DialogInterface {

@OnlyI18N
static interface Eingabe extends DialogInterface {

@Label(eMail)
@NewLine()
public TextBox eMail ();

@Label(kennwort)
@NewLine()
public PasswordTextBox kennwort ();

@Label(kennwortWiederholung)
@NewLine()
public PasswordTextBox kennwortWiederholung ();

public void setI18N (Lokalisierung pI18N);
}

@OnlyI18N
@SpaceStyle(a1-ButtonSpace)
static interface Schaltflaeche extends DialogInterface {

@Text(anmelden)
@NewLine(LineBreak.BREAKEND)
public Button anmelden ();

@Text(kennwortVergessen)
@NewLine(LineBreak.BREAKEND)
public Button kennwortVergessen ();

@Text(registrieren)
@NewLine(LineBreak.BREAKEND)
public Button registrieren ();

public void setI18N (Lokalisierung pI18N);
}

@Placement(horizontal=Alignment.GROW)
public Eingabe eingabe ();

@NewLine (LineBreak.BREAKEND)
public Schaltflaeche schaltflaechen ();


Socket Permissions on GAE

2010-06-23 Thread Big_Ali
Hi,

I'm kinda new to GWT but I've been using Java for a long time. I'm
trying to develop a program that requires talking to sockets. But it
looks like that the application engine does not allow that. I defined
a java policy file and put it in my GAE plugin folder of eclipse but
it does not change any thing. Can any body tell me is there is a way
to define java policies or something to that effect for GWT
application engine? and if yes where should the policy file be copied?

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



How to make a TabBar with images on the tabs (GWT 2.0)

2010-06-23 Thread James Walkup
As a GWT newbie, I struggled with placing images on TabLayoutPanel (or
DecoratedTabPanel?) tabs in place of text labels.  The solution is
elegant and VERY simple.

TabLayoutPanel tabPanel = new TabLayoutPanel( 8.5,
com.google.gwt.dom.client.Style.Unit.EM );
VerticalPanel p1= new VerticalPanel();

p1.add( someContent );   // This is the content of the stuff 
(view)
that a tab control selects.

tabPanel.add( p1, new Image( images/firstTagImg.png ) );   // 
The
second argument centers a image on the tab control.

// Do NOT use RootPanel.get() with LayoutPanels.
RootLayoutPanel.get().add( tabPanel );

Note about file locations:
References like images/firstTagImg.png point to a GWT application's
war/images folder.  I don't know if the GWT Eclipse plugin will copy
such resources from (say) the application's src or src/client folder
(hosted server), so I manually copy them or explicitly make ant do so.

To identify the selected tab by its background, use styles like these:
.gwt-TabLayoutPanelTabs .gwt-TabLayoutPanelTab {
background-color: blue;
}

.gwt-TabLayoutPanelTabs .gwt-TabLayoutPanelTab-selected {
background-color: green;
}
I put those definitions in war/WEB-INF/the project name.css .

Some other posts about images on tabs (also hover images):
 
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/a55b69cbc178435b/24e0457b777c2171?lnk=gstq=image+tabs#24e0457b777c2171
 
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/f57cb42276170ee1/557657e2e739d891?lnk=gstq=image+tabs#557657e2e739d891

Hope this post is helpful.

[seach tags:  image tabs, tab images]

-- 
You received 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: Million access to GWT Appl ??

2010-06-23 Thread Mady
There are many GWT applications handling more then million users like
Gmail, Google Wave, Orkut etc... so can't believe that some one has
raise such concern.



On Jun 21, 1:25 pm, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
 What was such claim based on? It does sound weird to me.
 Client-side, which is where GWT operates mostly, does not care about how
 many users is accessing your website. By providing things like ClientBundle
 or code-splitting I think GWT helps your website handle loads of users
 better.

 On Sun, Jun 20, 2010 at 4:44 AM, manish kumar
 manish.online2...@gmail.comwrote:



  Hi, i have gone through many articles on web and found that GWT is not
  good for an application that has million users access simultaniouly.
  Is that really true? If not then what should i do make it accessible
  by million users?Is that really tough job in GWT?

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

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



Code after History.fireCurrentHistoryState() will execute any more?

2010-06-23 Thread mahesh
hi,

I have an MVP app, on which i'm showing different views on the same
container as per the history token. So one of my view has a context
checking logic, that checks whether the logged in cookie is there or
not. If no cookie, I need to redirect to the login view by changing
the history token. So I wrote a method EnsureUserLoggedin() which will
check the cookie; if cookie not found, the method will add new history
token login and my global history change handler will do the rest.

I'm consuming that method like the following.

{
   EnsureUserLoggedin();

  Do_my_work();
  ---;
  ---;
}

I fear whether this can cause any memory leak? Will this?

If so should i write like the following

{
   if(UserLoggedin()) {

  Do_my_work();
  ---;
  ---;
   }
   else{
  History.newItem(login);
   }
}

or you have any other suggestions on it?

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



Java Preferences API impl. for GWT

2010-06-23 Thread amos
Hello,
is there any suitable implementation of Java Preferences API for GWT?
Or at least some thought about it? I mean mainly considering client
server asynchronous nature of GWT and what could be possible storage
engine for this kind of service. I know there is Cookies class, but
it's bound to a particular browser, but preferences could be used from
any browser on any computer (after user logs in of course).

Thanks

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



Information about PHP + MySQL E-book

2010-06-23 Thread J3p
Hi, I need some Information from you. Someone told me to buy E-book
about PHP + MySQL in
http://php-mysql-ebook.blogspot.com
Does anyone have experience about this?


thanks

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



Re: GWT Application does not work in IE8 at all?

2010-06-23 Thread Jyaif
Hi,
I found your initial post on stackoverflow, and came here hoping for
answers...
I have the exact same problem you have, except it's under IE7. I have
no problem under IE8.
For me, the error comes from:

function entry0(jsFunction, thisObj, arguments_0){
  var initialEntry;
  initialEntry = entryDepth++ == 0;
  try {
return jsFunction.apply(thisObj, arguments_0);
  }
   finally {
initialEntry  $flushFinallyCommands(($clinit_15() , INSTANCE));
--entryDepth;
  }
}

If anyone has an idea about what part of the GWT can generate that
kind of code, it would help me find a work around more quickly.

On Jun 13, 6:48 pm, Xandel xandelf...@gmail.com wrote:
 Hi there,

 Hopefully you guys can help me. I have built a GWT application which
 runs perfectly in Firefox and Chrome.

 When attempting to load it up in Internet Explorer 8 I get the error
 from one of my generated cache.html files:

 Line: 408
 Char: 12
 Error: Exception thrown and not caught.
 Code: 0

 When I locate that line in the generated file (this was all done with
 the -PRETTY argument for easy reading) I find it's on this line where
 the finally is at:

 function entry0(jsFunction, thisObj, arguments_0){
   var initialEntry;
   initialEntry = entryDepth++ == 0;
   try {
     return jsFunction.apply(thisObj, arguments_0);
   }
   finally {
     initialEntry  $flushFinallyCommands(($clinit_16() , INSTANCE));
     --entryDepth;
   }

 }

 The problem is that this is not code generated from my client side
 java - it seems to be GWT's own generated code.

 As a test I added an empty catch block - that now stops Internet
 Explorer from complaining but still doesn't load my application up at
 all. All that loads is the surrounding html and images and a blank
 space where my app should be.

 Has anyone experienced this before? Any ideas on how to tackle this?

 Any information will be greatly appreciated!

 Thanks in advance,

 Xandel

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



Re: unable to lode moduloe entry point class

2010-06-23 Thread Ravi kumar
Can any one help me i am new to the GWT. I just started it 2 days back and
this is my first example tutorial and i am not finding any solution to this
error .
Tnx in advance

Regards,
Ravi Kumar Chaurasia
Dept of Information Technology
NIT,Durgapur




On Tue, Jun 22, 2010 at 11:54 AM, Ravi Kumar
ravikumarchaura...@gmail.comwrote:

 Unable to load module entry point class

 11:29:28.742 [ERROR] [stockwatcher] Unable to load module entry point
 class com.google.gwt.sample.stockwatcher.client.StockWatcher (see
 associated exception for details)
 java.lang.NullPointerException: null
at

 com.google.gwt.sample.stockwatcher.client.StockWatcher.onModuleLoad(StockWatcher.java:
 52)
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.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
 369)
at

 com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
 185)
at

 com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
 380)
at

 com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
 222)
at java.lang.Thread.run(Unknown Source)


 11:29:28.859 [ERROR] [stockwatcher] Failed to load module
 'stockwatcher' from user agent 'Mozilla/5.0 (Windows; U; Windows NT
 6.1; en-US) AppleWebKit/534.1 (KHTML, like Gecko) Chrome/6.0.422.0
 Safari/534.1' at 127.0.0.1:50072


 any idea why is this error?

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



Hiding fully qualified class name sent to the browser

2010-06-23 Thread moorsu
Hi,

Would it be possible to obfuscate the fully qualified class name which
is
visible at the browser if you use firebug?.

I would like to see it as a.b.c.d instead
com.mycompany.myproduct.mypackage.MyClassName.
Also I do not use the same domain object as model but use Lists and
Maps to send data to
browser.

thanks!

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



Is this the correct way to add an Widget directly to DOM ?

2010-06-23 Thread kuku
Heres my example (a custom widget):

public class TestWidget extends Composite {

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

interface TestWidgetUiBinder extends UiBinderWidget, TestWidget {
}

@UiField
Button button;

public TestWidget(String firstName) {
initWidget(uiBinder.createAndBindUi(this));
button.setText(firstName);
super.onAttach();
}

@UiHandler(button)
void onClick(ClickEvent e) {
Window.alert(Hello!);
}
}

And here the code to add the Widget to a Panel:

TestWidget testWidget = new TestWidget(myTestWidget);
RootPanel.getBodyElement().appendChild(testWidget.getElement());
mainPanel.getElement().appendChild(testWidget.getElement());

I know that it is possible to add an Widget directly to an RootPanel
like this:
RootPanel.get(myId).add(testWidget );

However lets say i want to add widgets directly to the DOM. I don't
really understand why i have to call super.onAattch(); to get my
ClickEvent to work. If i don't execute that line it won't fire. I'm
not sure if this is the right way maybe somebody can give me more
information.

-- 
You received 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: TabPanel broken in new Chrome version

2010-06-23 Thread mistermueller
filed a bug at adblockforchrome for the gwt showcase page:
http://code.google.com/p/adblockforchrome/issues/detail?id=3729

On 3 Mai, 08:40, Frank frank.wyna...@gmail.com wrote:
 I starred it and added a reply with my findings about the issue.

 On 30 apr, 15:23, Steve strat...@gmail.com wrote:



  The issue is 4698 - you might want to star it.

  On Apr 30, 9:21 am, Steve strat...@gmail.com wrote:

   I believe I already submitted this as a GWT bug. Was driving me crazy
   about two months ago as well.

   Submitting it to theChrometeam might not be a bad idea either?

   Steve

   On Apr 29, 2:00 pm, Frank frank.wyna...@gmail.com wrote:

I finally found the exact cause of the problem !

Ignore the 64bit story.
It has to do with theadblockplugin. If you install this inChrome
some GWT stuff won't work anymore. I just disabled it and all is
working now...
I also noted more stuff than only theTabPanelwas failing on other
GWT websites...

Now where should I submit a bugreport for this GWT ?Chrome?
Addblock ?


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



unable to lode moduloe entry point class

2010-06-23 Thread Ravi Kumar
Unable to load module entry point class

11:29:28.742 [ERROR] [stockwatcher] Unable to load module entry point
class com.google.gwt.sample.stockwatcher.client.StockWatcher (see
associated exception for details)
java.lang.NullPointerException: null
at
com.google.gwt.sample.stockwatcher.client.StockWatcher.onModuleLoad(StockWatcher.java:
52)
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.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
369)
at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
185)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
380)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
222)
at java.lang.Thread.run(Unknown Source)


11:29:28.859 [ERROR] [stockwatcher] Failed to load module
'stockwatcher' from user agent 'Mozilla/5.0 (Windows; U; Windows NT
6.1; en-US) AppleWebKit/534.1 (KHTML, like Gecko) Chrome/6.0.422.0
Safari/534.1' at 127.0.0.1:50072


any idea why is this error?

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



Re: unable to lode moduloe entry point class

2010-06-23 Thread Ravi kumar
well i don't know what was the reason for this error
I have fixed it...Here is the steps i have done to fix it.
1. i did not set the JAVA_HOME variable and its value. And i forgot to add
the path also
so added the path and set the Java_Home variable and its value now its is
working fine.


Regards,
Ravi Kumar Chaurasia
Dept of Information Technology
NIT,Durgapur




On Tue, Jun 22, 2010 at 12:44 PM, Ravi kumar
ravikumarchaura...@gmail.comwrote:

 Can any one help me i am new to the GWT. I just started it 2 days back and
 this is my first example tutorial and i am not finding any solution to this
 error .
 Tnx in advance

 Regards,
  Ravi Kumar Chaurasia
 Dept of Information Technology
 NIT,Durgapur





 On Tue, Jun 22, 2010 at 11:54 AM, Ravi Kumar ravikumarchaura...@gmail.com
  wrote:

 Unable to load module entry point class

 11:29:28.742 [ERROR] [stockwatcher] Unable to load module entry point
 class com.google.gwt.sample.stockwatcher.client.StockWatcher (see
 associated exception for details)
 java.lang.NullPointerException: null
at

 com.google.gwt.sample.stockwatcher.client.StockWatcher.onModuleLoad(StockWatcher.java:
 52)
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.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:
 369)
at

 com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
 185)
at

 com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
 380)
at

 com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
 222)
at java.lang.Thread.run(Unknown Source)


 11:29:28.859 [ERROR] [stockwatcher] Failed to load module
 'stockwatcher' from user agent 'Mozilla/5.0 (Windows; U; Windows NT
 6.1; en-US) AppleWebKit/534.1 (KHTML, like Gecko) Chrome/6.0.422.0
 Safari/534.1' at 127.0.0.1:50072


 any idea why is this error?




-- 
You received 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: Information about PHP + MySQL E-book

2010-06-23 Thread Jaroslav Záruba
Wrong group?

On Tue, Jun 22, 2010 at 6:16 PM, J3p jeffry.kantawi...@googlemail.comwrote:

 Hi, I need some Information from you. Someone told me to buy E-book
 about PHP + MySQL in
 http://php-mysql-ebook.blogspot.com
 Does anyone have experience about this?


 thanks

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



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



Re: GWT Application does not work in IE8 at all?

2010-06-23 Thread Jyaif
I have exactly the same error, except that it happens in IE7. The
application runs fine in IE8. The application is built with GWT 2.0.3.

For the record, the faulty generated code is:

function entry0(jsFunction, thisObj, arguments_0){
  var initialEntry;
  initialEntry = entryDepth++ == 0;
  try {
return jsFunction.apply(thisObj, arguments_0);
  }
   finally {
initialEntry  $flushFinallyCommands(($clinit_15() , INSTANCE));
--entryDepth;
  }
}

I need to find a work around, so does anyone know what part of the GWT
generates this code?

On Jun 13, 6:48 pm, Xandel xandelf...@gmail.com wrote:
 Hi there,

 Hopefully you guys can help me. I have built a GWT application which
 runs perfectly in Firefox and Chrome.

 When attempting to load it up in Internet Explorer 8 I get the error
 from one of my generated cache.html files:

 Line: 408
 Char: 12
 Error: Exception thrown and not caught.
 Code: 0

 When I locate that line in the generated file (this was all done with
 the -PRETTY argument for easy reading) I find it's on this line where
 the finally is at:

 function entry0(jsFunction, thisObj, arguments_0){
   var initialEntry;
   initialEntry = entryDepth++ == 0;
   try {
     return jsFunction.apply(thisObj, arguments_0);
   }
   finally {
     initialEntry  $flushFinallyCommands(($clinit_16() , INSTANCE));
     --entryDepth;
   }

 }

 The problem is that this is not code generated from my client side
 java - it seems to be GWT's own generated code.

 As a test I added an empty catch block - that now stops Internet
 Explorer from complaining but still doesn't load my application up at
 all. All that loads is the surrounding html and images and a blank
 space where my app should be.

 Has anyone experienced this before? Any ideas on how to tackle this?

 Any information will be greatly appreciated!

 Thanks in advance,

 Xandel

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



NumberFormat on integer

2010-06-23 Thread Patrick Tucker
Why does GWT not have a getIntegerInstance() in NumberFormat??

It seems simple enough to implement and it is part of java...

Is it implemented somewhere else?

Thanks,
Pat

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



Re: Pass a method as parameter in GWT

2010-06-23 Thread Thiago Miranda de Oliveira
Plz, someone?

On Jun 23, 10:45 am, Thiago Miranda de Oliveira thiago...@gmail.com
wrote:
 Hi.
 Im building a logic here that a class A instantiate a object of
 another class B. B has a specified clickHandler that does a animation.
 I want that the class A can pass a method to the class B as a
 parameter to do the animation and some extra stuff that I wanna do in
 the class A.
 So I was thinking in something like that:

 class A
 Button trigger = new Button();
 trigger.addClickHandler(new ClickHandler(){
  //doStuff
  callBack();

 }

 class B
 A a = new A();
 a.setCallBack(doThis());

 public void doThis(){
  Window.alert(test);

 }

 How can I do that in GWT?

 Thanks for the attention
 Cheers

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



Re: Java Preferences API impl. for GWT

2010-06-23 Thread Lothar Kimmeringer
amos schrieb:

 is there any suitable implementation of Java Preferences API for GWT?
 Or at least some thought about it? I mean mainly considering client
 server asynchronous nature of GWT and what could be possible storage
 engine for this kind of service. I know there is Cookies class, but
 it's bound to a particular browser, but preferences could be used from
 any browser on any computer (after user logs in of course).

Any browser can be done by a Flash Cookie that is shared between
the different browsers AfAIR but if it should work for any com-
puter you have to store it on the server side and send it to the
client (after the login would be best). That way you don't have
to cope with the situation that there are more than one users at
a specific machine.


Regards, Lothar

-- 
You received 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: Dynamic Label from database.

2010-06-23 Thread Stefan Bachert
Hi,

String valueFromDatabase = ...;
Label label = new Label ();

label.setText (valueFromDatabase);

What is the problem?


Stefan Bachert
http://gwtworld.de


On Jun 23, 11:25 am, cody lse...@gmail.com wrote:
 Hi,

 Any idea how to create a label which text is retrieve from database?

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



Re: Pass a method as parameter in GWT

2010-06-23 Thread olivier nouguier
keep cool ;)

You can pass a Runnable (Command) as parameter ... like a clikHandler



On Wed, Jun 23, 2010 at 4:29 PM, Thiago Miranda de Oliveira 
thiago...@gmail.com wrote:

 Plz, someone?

 On Jun 23, 10:45 am, Thiago Miranda de Oliveira thiago...@gmail.com
 wrote:
  Hi.
  Im building a logic here that a class A instantiate a object of
  another class B. B has a specified clickHandler that does a animation.
  I want that the class A can pass a method to the class B as a
  parameter to do the animation and some extra stuff that I wanna do in
  the class A.
  So I was thinking in something like that:
 
  class A
  Button trigger = new Button();
  trigger.addClickHandler(new ClickHandler(){
   //doStuff
   callBack();
 
  }
 
  class B
  A a = new A();
  a.setCallBack(doThis());
 
  public void doThis(){
   Window.alert(test);
 
  }
 
  How can I do that in GWT?
 
  Thanks for the attention
  Cheers

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




-- 
Computers are useless. They can only give you answers.
- Pablo Picasso -

-- 
You received 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: Socket Permissions on GAE

2010-06-23 Thread Sripathi Krishnan
You can't open sockets if you are using GAE, and there is no way around it.

But GWT is completely independent of GAE. If you disable GAE, you can use
sockets on your server side.
--Sri


On 22 June 2010 08:25, Big_Ali ali.fatol...@gmail.com wrote:

 Hi,

 I'm kinda new to GWT but I've been using Java for a long time. I'm
 trying to develop a program that requires talking to sockets. But it
 looks like that the application engine does not allow that. I defined
 a java policy file and put it in my GAE plugin folder of eclipse but
 it does not change any thing. Can any body tell me is there is a way
 to define java policies or something to that effect for GWT
 application engine? and if yes where should the policy file be copied?

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



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



right way to create a link handler?

2010-06-23 Thread Vik
Hie

seems the code
final Hyperlink adminLink = new Hyperlink();
adminLink.setText(Admin);
adminLink.addClickHandler(new ClickHandler() {
  public void onClick(ClickEvent event) {
// Instantiate the popup and show it.
 loginPopup =   new LoginPopup();
 loginPopup.showRelativeTo(adminLink);
 loginPopup.show();
  }
});

is deprecated. So what is the right way to do the same?

Thankx and Regards

Vik
Founder
www.sakshum.com
www.sakshum.blogspot.com

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



Re: cursor while server processing

2010-06-23 Thread Stefan Bachert
Hi Ivan,

in general server calls running asynchron in background.
However, i rare situations, where you wont allow to user to doint
anything (for example: after entering credentials)
you may put a glass panel over the browser window.

Stefan Bachert
http://gwtworld.de

On Jun 22, 8:06 pm, Iván Navarro ivan.navarro...@gmail.com wrote:
 hi,
 is there any way to change the cursor (doesn't matter its position on
 screen or if it is over certain widget) during an operation in the
 server side?

 I've tried adding a cursor style to the main panel with addStyleName
 method, but it doesn't work. I don't know if it is for the server call
 (in other situations it works properly) or because I only change the
 cursor for the main panel.

 Thanks in advance!

 Iván

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



Re: GWT Application does not work in IE8 at all?

2010-06-23 Thread Olivier Monaco
Hi,

You added a catch block. What is the caught exception? Can you add a
uncaught exception handler using GWT.setUncaughtExceptionHandler in
the constructor of your EntryPoint? Do you catch an exception? Do you
have a small project with this error?

Olivier

On Jun 13, 6:48 pm, Xandel xandelf...@gmail.com wrote:
 Hi there,

 Hopefully you guys can help me. I have built a GWT application which
 runs perfectly in Firefox and Chrome.

 When attempting to load it up in Internet Explorer 8 I get the error
 from one of my generated cache.html files:

 Line: 408
 Char: 12
 Error: Exception thrown and not caught.
 Code: 0

 When I locate that line in the generated file (this was all done with
 the -PRETTY argument for easy reading) I find it's on this line where
 the finally is at:

 function entry0(jsFunction, thisObj, arguments_0){
   var initialEntry;
   initialEntry = entryDepth++ == 0;
   try {
     return jsFunction.apply(thisObj, arguments_0);
   }
   finally {
     initialEntry  $flushFinallyCommands(($clinit_16() , INSTANCE));
     --entryDepth;
   }

 }

 The problem is that this is not code generated from my client side
 java - it seems to be GWT's own generated code.

 As a test I added an empty catch block - that now stops Internet
 Explorer from complaining but still doesn't load my application up at
 all. All that loads is the surrounding html and images and a blank
 space where my app should be.

 Has anyone experienced this before? Any ideas on how to tackle this?

 Any information will be greatly appreciated!

 Thanks in advance,

 Xandel

-- 
You received 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: Hiding fully qualified class name sent to the browser

2010-06-23 Thread Olivier Monaco
Hi,

If your problem comes from class name included in the JavaScript files
(and affected to some properties of JavaScript object), you can try to
use the following optimization:

http://code.google.com/p/google-web-toolkit/wiki/NoClassMetadataOptimization

Olivier

On Jun 22, 3:55 pm, moorsu moo...@gmail.com wrote:
 Hi,

 Would it be possible to obfuscate the fully qualified class name which
 is
 visible at the browser if you use firebug?.

 I would like to see it as a.b.c.d instead
 com.mycompany.myproduct.mypackage.MyClassName.
 Also I do not use the same domain object as model but use Lists and
 Maps to send data to
 browser.

 thanks!

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



how can I start a HttpServlet in an Eclipse GWT project?

2010-06-23 Thread Ken Yap
I'm using GWT 2.0 with Eclipse Galileo (3.5). Currently the project
works fine, but it's all client side interaction at the moment.

I want to use HTTP as the data transfer method, because that's what
will be used in production, together with JSON. I want a HttpServet
for testing in my Eclipse project because of Single Origin Policy.
Basically I took the Greeting example and replaced the
GreetingServiceImpl servlet with mine that extends HttpServlet. I
edited the names in web.xml.

However when I debug as a web app Jetty cannot find my servlet class:
ClassNotFoundException. I have checked the my Servlet is compiled into
a class file in war/WEB-INF/blah/blah/... The classpath has not been
changed.

How can I get Jetty to load my servlet? Something about needing to
provide a log destination?

Here are the console messages when I debug as web app:

WARNING: EXCEPTION
java.lang.ClassNotFoundException:
org.au.george.nice.server.HistoryServlet
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:
151)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
242)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
185)
at
com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:
146)
at
com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:
222)
at
com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:
86)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:421)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1035)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:783)
at com.google.gwt.dev.DevMode.main(DevMode.java:275)
Jun 23, 2010 2:51:09 PM
com.google.appengine.tools.development.ApiProxyLocalImpl log
SEVERE: [1277304669131000] javax.servlet.ServletContext log:
unavailable
javax.servlet.UnavailableException:
org.au.george.nice.server.HistoryServlet
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:79)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
242)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:
685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1250)
at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:
517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
467)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:
130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:
50)
at
com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:
185)
at

Re: Irony: GWT Showcase demo does not work with Chrome

2010-06-23 Thread mistermueller
filed a bug in adblockforchrome:
http://code.google.com/p/adblockforchrome/issues/detail?id=3729

-- Forwarded message --
From: neshaug nesh...@gmail.com
Date: 10 Apr., 00:10
Subject: Irony: GWT Showcase demo does not work with Chrome
To: Google Web Toolkit


Same for me 5.0.372.0 Ubuntu 9.10, and workes fine with developer
tools.

On Apr 9, 3:27 pm, Michael code...@googlemail.com wrote:

 I see the same with latest 5.0.371.0 on OSX.

 But after opening the Developer Tools, theshowcaseis working - it
 even remembered all the clicks I made before!

 Michael

 On Apr 7, 9:33 pm, Unconquered newintellect...@gmail.com wrote:

  With the latestChrome, running on Mac OS X, the Google Web Toolkit
  Showcaseof Features at

   http://gwt.google.com/samples/Showcase/Showcase.html

  does not work properly. Widgets is expanded but the other main items
  below (e.g. Lists and Menus) will not expand when clicked. The page
  works in Safari.

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



Error in Presentations page on

2010-06-23 Thread vb75
Apologize if this mail is in the wrong ml. Just could not figure out
how to send feedback to webmaster. In the Google Web Toolkit page on
code.google.com, the Presentations Page(link at the bottom left) is
not working. The following is the link to the page.
http://code.google.com/webtoolkit/media_gallery.html

The following is the error I get on the page.

Error parsing module spec:Not a properly formatted file missing xml
header

I thought it was working yesterday night.

Hope someone who knows how to get this corrected reads this mail :-)

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



How to use one service from several GWT-Apps

2010-06-23 Thread newnoise
Hi,

I'm currently trying to add some printing functions to a map-software.
If the user hits the print-button a new browser-window, which's
dimensions fit to a normal sheet of paper, is opened. As the user
usually wants to print stuff like a route or so the new window needs
to use the same services the main-app does.

What I already tried:
First I did the printing stuff on its own and tried to merge the
projects (map and print). There where some problems because of the
web.xml.
Then I added another print.html to the map-root-dir and tried to merge
the source directly in one project. In this scenario the
onModuleLoad()-method of the print.html wasnt fired.

Is there a way to let the print-app use its parents-apps services? I'd
really like to avoid to have the code twice on my server ...

thanks for any advise!
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-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: Safari 5 - (RangeError): Maximum call stack size exceeded

2010-06-23 Thread Chris Ramsdale
On Wed, Jun 23, 2010 at 6:50 AM, Thomas Broyer t.bro...@gmail.com wrote:



 On 23 juin, 03:52, Pascal zig...@gmail.com wrote:
  Hi,
  Has the workaround been included in the codebase somewhere? Is there a
  chance that there will be a point release soon?

 There's been a change at the compiler-level instead:
 http://code.google.com/p/google-web-toolkit/source/detail?r=8300

 I don't think we'll see a 2.0.4 though, I guess the plan is to just
 ship it with 2.1 when it'll be ready.
 (remember last year when IE8 finally went out? –there was a workaround
 though– or Safari 4 and its expression too deep errors? or Firefox
 3.5 and its regression re. mouse events on scrollbars?)
 See http://code.google.com/p/google-web-toolkit/issues/detail?id=3455,
 http://code.google.com/p/google-web-toolkit/source/detail?r=5641
 This was all fixed in the next release, but it took some time between
 the report, the fix, and then the release.

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



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



Re: Safari 5 - (RangeError): Maximum call stack size exceeded

2010-06-23 Thread Chris Ramsdale
Just trying to get some scope around this issue. How many developers are
still on 1.7.x (or prior) and experiencing this problem? Basically, would a
2.0.4 fix a majority (if not all) of the current issues? If not, how
feasible would it be to have you upgrade to 2.0.4 from a 1.x release to fix
this?

Thanks for the feedback...

-- Chris

On Wed, Jun 23, 2010 at 12:42 PM, Chris Ramsdale cramsd...@google.comwrote:



 On Wed, Jun 23, 2010 at 6:50 AM, Thomas Broyer t.bro...@gmail.com wrote:



 On 23 juin, 03:52, Pascal zig...@gmail.com wrote:
  Hi,
  Has the workaround been included in the codebase somewhere? Is there a
  chance that there will be a point release soon?

 There's been a change at the compiler-level instead:
 http://code.google.com/p/google-web-toolkit/source/detail?r=8300

 I don't think we'll see a 2.0.4 though, I guess the plan is to just
 ship it with 2.1 when it'll be ready.
 (remember last year when IE8 finally went out? –there was a workaround
 though– or Safari 4 and its expression too deep errors? or Firefox
 3.5 and its regression re. mouse events on scrollbars?)
 See http://code.google.com/p/google-web-toolkit/issues/detail?id=3455,
 http://code.google.com/p/google-web-toolkit/source/detail?r=5641
 This was all fixed in the next release, but it took some time between
 the report, the fix, and then the release.

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




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



Re: right way to create a link handler?

2010-06-23 Thread Thomas Broyer


On 23 juin, 16:46, Vik vik@gmail.com wrote:
 Hie

 seems the code
 final Hyperlink adminLink = new Hyperlink();
 adminLink.setText(Admin);
 adminLink.addClickHandler(new ClickHandler() {
       public void onClick(ClickEvent event) {
         // Instantiate the popup and show it.
      loginPopup =   new LoginPopup();
      loginPopup.showRelativeTo(adminLink);
      loginPopup.show();
       }
     });

 is deprecated. So what is the right way to do the same?

As per the JavaDoc of the deprecated methods: use another widget,
probably a Label in this case, with the appropriate styling to make it
look like a link if that's what you want.

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



Re: UIBinder Benefits?

2010-06-23 Thread Blessed Geek
Looking at your annotation, I find that I have to learn yet another
language.
I mean learning the annotation style as a language.

UiBinder is in XML and if you are familiar with XML, it's a breeze to
understand what's going on.

For the many many years doing distributed computing in industrial
environment - I find the unfortunate situation that data come in many
formats. There are log sheets that each vendor equipment invented with
their own respective formats. Frequently, the same equipment maker
willy-nilly comes out with a slight variation just because they have a
new line of models. Some are text, some are XML. if you do not strive
to be familiar with XML, you don't get to work.

So, every time I need to write a data loader for a piece of equipment,
should I have complained to management - I have to learn another
language, sir/maam?

Moreover, databases I encountered are of differing schemata of course.
Getting familiarized with an XML schema is similar to encountering yet
another database schema. I am personally guilty of inventing more
database and XML schemata (the plural for schema is schemata,
http://h2g2java.blessedgeek.com/2010/03/data-is-already-plural.html)
and adding to the plethora of new languages people who worked with
me had to learn.

For those of us who've had the misfortune of having to frequently work
with deciphering new XML and database schemata, which in your sense -
frequently having to learn new languages, UiBinder comes as natural as
mother tongue. So my condolences that you find UiBinder difficult for
you due to your less exposure to XML. It is indeed an unfortunate
situation that the people who came out with UiBinder did not take into
consideration that not all people are familiar with XML or are
resonant to data schemata. After all, UiBinder inventors probably made
a high presumption that every and any one using GWT has an industrial
purpose to using it.

Fortunately for me, and to your undue inconvenience  (my apologies
again), there must be a lot of programmers out there who are like-
minded with me about the convenience of UiBinder due to our
inexplicable and mysterious bias towards XML. I think it is safe for
me to say that I am representative of those appreciative of UiBinder -
that our tacit complain are the following mysteries: Having invented
such a wonderous framework,

- why did the UiBinder inventors forgot about the need to provide a
means to register custorm parsers?
- why did they not realise the extreme inconvenience of not being able
extend Uibinderable classes properly?

Once these two issues are settled - hmmm ... there seems to be no
bounds to what my enthusiasm could do with UiBinder.

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



Re: UIBinder Benefits?

2010-06-23 Thread jocke eriksson
Great post!

Jocke

2010/6/23 Blessed Geek blessedg...@gmail.com

 Looking at your annotation, I find that I have to learn yet another
 language.
 I mean learning the annotation style as a language.

 UiBinder is in XML and if you are familiar with XML, it's a breeze to
 understand what's going on.

 For the many many years doing distributed computing in industrial
 environment - I find the unfortunate situation that data come in many
 formats. There are log sheets that each vendor equipment invented with
 their own respective formats. Frequently, the same equipment maker
 willy-nilly comes out with a slight variation just because they have a
 new line of models. Some are text, some are XML. if you do not strive
 to be familiar with XML, you don't get to work.

 So, every time I need to write a data loader for a piece of equipment,
 should I have complained to management - I have to learn another
 language, sir/maam?

 Moreover, databases I encountered are of differing schemata of course.
 Getting familiarized with an XML schema is similar to encountering yet
 another database schema. I am personally guilty of inventing more
 database and XML schemata (the plural for schema is schemata,
 http://h2g2java.blessedgeek.com/2010/03/data-is-already-plural.html)
 and adding to the plethora of new languages people who worked with
 me had to learn.

 For those of us who've had the misfortune of having to frequently work
 with deciphering new XML and database schemata, which in your sense -
 frequently having to learn new languages, UiBinder comes as natural as
 mother tongue. So my condolences that you find UiBinder difficult for
 you due to your less exposure to XML. It is indeed an unfortunate
 situation that the people who came out with UiBinder did not take into
 consideration that not all people are familiar with XML or are
 resonant to data schemata. After all, UiBinder inventors probably made
 a high presumption that every and any one using GWT has an industrial
 purpose to using it.

 Fortunately for me, and to your undue inconvenience  (my apologies
 again), there must be a lot of programmers out there who are like-
 minded with me about the convenience of UiBinder due to our
 inexplicable and mysterious bias towards XML. I think it is safe for
 me to say that I am representative of those appreciative of UiBinder -
 that our tacit complain are the following mysteries: Having invented
 such a wonderous framework,

 - why did the UiBinder inventors forgot about the need to provide a
 means to register custorm parsers?
 - why did they not realise the extreme inconvenience of not being able
 extend Uibinderable classes properly?

 Once these two issues are settled - hmmm ... there seems to be no
 bounds to what my enthusiasm could do with UiBinder.

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



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



Re: Pass a method as parameter in GWT

2010-06-23 Thread Thiago Miranda de Oliveira
Thanks man.
Well I've solved it by creating a interface in the B class and calling
it in the A class.

On Jun 23, 11:36 am, olivier nouguier olivier.nougu...@gmail.com
wrote:
 keep cool ;)

 You can pass a Runnable (Command) as parameter ... like a clikHandler

 On Wed, Jun 23, 2010 at 4:29 PM, Thiago Miranda de Oliveira 





 thiago...@gmail.com wrote:
  Plz, someone?

  On Jun 23, 10:45 am, Thiago Miranda de Oliveira thiago...@gmail.com
  wrote:
   Hi.
   Im building a logic here that a class A instantiate a object of
   another class B. B has a specified clickHandler that does a animation.
   I want that the class A can pass a method to the class B as a
   parameter to do the animation and some extra stuff that I wanna do in
   the class A.
   So I was thinking in something like that:

   class A
   Button trigger = new Button();
   trigger.addClickHandler(new ClickHandler(){
    //doStuff
    callBack();

   }

   class B
   A a = new A();
   a.setCallBack(doThis());

   public void doThis(){
    Window.alert(test);

   }

   How can I do that in GWT?

   Thanks for the attention
   Cheers

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

 --
 Computers are useless. They can only give you answers.
 - Pablo Picasso -

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



Re: UIBinder Benefits?

2010-06-23 Thread Chris Boertien
That has to be the most disturbing use of annotations I have ever
seen... on so many levels...

On Wed, Jun 23, 2010 at 11:52 AM, jocke eriksson jock...@gmail.com wrote:
 Great post!
 Jocke

 2010/6/23 Blessed Geek blessedg...@gmail.com

 Looking at your annotation, I find that I have to learn yet another
 language.
 I mean learning the annotation style as a language.

 UiBinder is in XML and if you are familiar with XML, it's a breeze to
 understand what's going on.

 For the many many years doing distributed computing in industrial
 environment - I find the unfortunate situation that data come in many
 formats. There are log sheets that each vendor equipment invented with
 their own respective formats. Frequently, the same equipment maker
 willy-nilly comes out with a slight variation just because they have a
 new line of models. Some are text, some are XML. if you do not strive
 to be familiar with XML, you don't get to work.

 So, every time I need to write a data loader for a piece of equipment,
 should I have complained to management - I have to learn another
 language, sir/maam?

 Moreover, databases I encountered are of differing schemata of course.
 Getting familiarized with an XML schema is similar to encountering yet
 another database schema. I am personally guilty of inventing more
 database and XML schemata (the plural for schema is schemata,
 http://h2g2java.blessedgeek.com/2010/03/data-is-already-plural.html)
 and adding to the plethora of new languages people who worked with
 me had to learn.

 For those of us who've had the misfortune of having to frequently work
 with deciphering new XML and database schemata, which in your sense -
 frequently having to learn new languages, UiBinder comes as natural as
 mother tongue. So my condolences that you find UiBinder difficult for
 you due to your less exposure to XML. It is indeed an unfortunate
 situation that the people who came out with UiBinder did not take into
 consideration that not all people are familiar with XML or are
 resonant to data schemata. After all, UiBinder inventors probably made
 a high presumption that every and any one using GWT has an industrial
 purpose to using it.

 Fortunately for me, and to your undue inconvenience  (my apologies
 again), there must be a lot of programmers out there who are like-
 minded with me about the convenience of UiBinder due to our
 inexplicable and mysterious bias towards XML. I think it is safe for
 me to say that I am representative of those appreciative of UiBinder -
 that our tacit complain are the following mysteries: Having invented
 such a wonderous framework,

 - why did the UiBinder inventors forgot about the need to provide a
 means to register custorm parsers?
 - why did they not realise the extreme inconvenience of not being able
 extend Uibinderable classes properly?

 Once these two issues are settled - hmmm ... there seems to be no
 bounds to what my enthusiasm could do with UiBinder.

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


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


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



Re: Disable the default contextmenu in richtext editor

2010-06-23 Thread Paul Schwarz
You are on the right track with these:
event.preventDefault();
event.stopPropagation();

But firstly, are you clear about the difference between a Click
event and Event.ONCONTEXTMENU?

You may be trying to suppress the click event, but you really need to
1) sink the context menu event, and 2) prevent default actions...

myElement.sinkEvents(Event.ONCONTEXTMENU)

... followed by...

event.preventDefault();
event.stopPropagation();   (this might not even be necessary)

... should do it.

wild speculation
If not, then another idea is that the rich text area is probably using
an IFrame, am I right? If so it may be the case that the events
belonging to *this* window, and the events belonging to the IFrame are
handled in different places.
/wild speculation




On Jun 22, 4:56 pm, shruti shrutiredd...@gmail.com wrote:
 Hi,

 I have created my own popup menu, which I want to display in
 RichTextArea,
 and it is appearing with right mouse click. my problem is that
 default
 broswer's context menu does also appear along with my menu. is there
 any
 resolution for this?
 I have seen lots of examples and code but all of them were disabling
 broswer's default menu that shows View Source and other options, I do
 not
 want to disable it, rather my point is to disable the context menu
 which
 appears in text fields or rich text areas.

 i tried with different options as specified in the forums:
 event.preventDefault();
 event.stopPropagation();

 I would be grateful, is there anyone help me out

 Thanks  regards,
 Shruti

-- 
You received 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: Is this the correct way to add an Widget directly to DOM ?

2010-06-23 Thread Paul Schwarz
Your question seems a little confusing, but your idea is not quite
right. Firstly you shouldn't have to call super.onAttach(), the real
problem is you are effectively bypassing GWT's widget/event system by
trying to get the widget's element and attach it directly. In effect
you're mixing GWT and Javascipt and it's not being done correctly.

By adding to the DOM I think you mean add to the body element,
rather than adding to a particular element.

You give the example:
RootPanel.get(myId).add(testWidget );

... but if you want to add to the body, just do:
RootPanel.get().add(testWidget );

... and get rid of that super.onAttach()


On Jun 22, 1:03 am, kuku kukuda...@googlemail.com wrote:
 Heres my example (a custom widget):

 public class TestWidget extends Composite {

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

         interface TestWidgetUiBinder extends UiBinderWidget, TestWidget {
         }

         @UiField
         Button button;

         public TestWidget(String firstName) {
                 initWidget(uiBinder.createAndBindUi(this));
                 button.setText(firstName);
                 super.onAttach();
         }

         @UiHandler(button)
         void onClick(ClickEvent e) {
                 Window.alert(Hello!);
         }

 }

 And here the code to add the Widget to a Panel:

 TestWidget testWidget = new TestWidget(myTestWidget);
 RootPanel.getBodyElement().appendChild(testWidget.getElement());
 mainPanel.getElement().appendChild(testWidget.getElement());

 I know that it is possible to add an Widget directly to an RootPanel
 like this:
 RootPanel.get(myId).add(testWidget );

 However lets say i want to add widgets directly to the DOM. I don't
 really understand why i have to call super.onAattch(); to get my
 ClickEvent to work. If i don't execute that line it won't fire. I'm
 not sure if this is the right way maybe somebody can give me more
 information.

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



Re: How to use one service from several GWT-Apps

2010-06-23 Thread Blessed Geek
service?

Printing thro web service that all/any window could call with a single
url? Why would you need to duplicate code when you can call it with a
single url?

Or did you mean you have a specialised GWT window written to handle
printing and you wish to route all printing to that GWT window? And
you wish to deal with the occasionally asked question of how to
perform inter-frame communication for GWT? I don't remember now, but
there is a google code project to expose GWT objects to javascript.
Coupled with GWT Dictionary API, I wonder if that will help.

Of course, you do realise that for two frames to communicate, they
should have the same root Window parentage so that one frame could
refer to another thro the frame hierarchy.

GWT team should seriously look at providing a comprehensive facility
for interframe communication, rather than having us perform
algorithmic contortions and acrobatics - like having to scratch your
own nose thro the route of bending your hand behind your head.

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



One Service, multiple users

2010-06-23 Thread Ralf B
I have a service that instantiates and keeps state (variables in the
back end that is controlled by the service) until the user logs out.
What happens exactly when two users access my GWT service; will there
be one service instance for each user or will one be shared between
them? I try to figure out if my service is actually multi-user or
not...

Ralf

-- 
You received 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: RPC call does not work after upgrading to Safari 5

2010-06-23 Thread TBirch
After further research on the web and directing me to review my
server's logs I believe my problem may be due to my app still being
run as a gwt 1.4. If so, are there any options other than upgrading
the app to a newer gwt version?
Below is from my Tomcat server log:
SEVERE: Exception while dispatching incoming RPC call
javax.servlet.ServletException: Content-Type must be 'text/plain' with
'charset=utf-8' (or unspecified charset)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.readPayloadAsUtf8(RemoteServiceServlet.java:
119)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:
178) ...

Thanks

On Jun 22, 3:39 pm, TBirch tjfbi...@bellsouth.net wrote:
 I have a get app that has been working fine with Safari 4 for some
 time. It appears that my initial RPC call no longer works after
 upgrading today to Safari 5. The app works fine in Chrome, IE, and
 Firefox. I un-installed Safari 5 and re-installed version 4 and the
 app no longer works in that version either. Any suggestions as to why
 the app will not work in the Safari browser?
 Thank You

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



MVP with EventBus question

2010-06-23 Thread Paul Schwarz
Working with the MVP pattern, or more like the VP pattern at this
point, I have:
MainPagePresenter
MainPageView
WidgetA
WidgetB

... so imagine that WidgetA and WidgetB will be attached to
MainPageView.

Using Gin I have an EventBus injected into the MainPagePresenter. I
can then add click handlers that place an event on the EventBus from
within my MainPagePresenter. This might look like:

getMainPageView().getSendButton().addClickHandler(new ClickHandler(){
  public void onClick(ClickEvent event) {
eventBus.fireEvent(new SendEvent());
  }
}

But now let's say that WidgetA and WidgetB actually have quite a few
user interactions, you'll end up with a lot of methods that look like
the one above sitting in your Presenter class.
1. Is this correct?
Or
2. should the Presenter hand the reference to the EventBus through to
its View, who may even hand it through to the Widgets so that they can
talk directly to the EventBus?

If the second option is the better option from an architecture/
separation of concerns point of view, then what is the best way to
hand the reference over to the View in such a way that keeps the
coupling between Presenter and View as loose as possible?

Note, currently my Presenter defines a View interface which my View
implements, so the coupling is loose but based upon this interface.

-- 
You received 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: right way to create a link handler?

2010-06-23 Thread Paul Schwarz
What part of that code is deprecated?

In GWT Hyperlink affects history, Anchor does not.


On Jun 23, 7:52 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On 23 juin, 16:46, Vik vik@gmail.com wrote:

  Hie

  seems the code
  final Hyperlink adminLink = new Hyperlink();
  adminLink.setText(Admin);
  adminLink.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
          // Instantiate the popup and show it.
       loginPopup =   new LoginPopup();
       loginPopup.showRelativeTo(adminLink);
       loginPopup.show();
        }
      });

  is deprecated. So what is the right way to do the same?

 As per the JavaDoc of the deprecated methods: use another widget,
 probably a Label in this case, with the appropriate styling to make it
 look like a link if that's what you want.

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



Re: How to use one service from several GWT-Apps

2010-06-23 Thread newnoise
sorry i meant service.

i try to explain the problem more precisely:
i got a map. users can, for example, use the app to calculate a route-
advise. if the user did so he may want to print the route. but the map
is nearly fullscreen, so if he justs prints it like that it looks
pretty bad. so what i do is to open a new browser window with a
smaller map. and now in this new window the route must be newly
calculated, because you cant give a java object to the new window,
right?

what i want now is that the print page uses the routing servlet of the
main app. what i dont want is that the print page needs all the same
server code again. but i dont get it working. because if i merge the
projects the web.xmls clash.

thanks a lot!
tom


On 23 Jun., 21:47, Blessed Geek blessedg...@gmail.com wrote:
 service?

 Printing thro web service that all/any window could call with a single
 url? Why would you need to duplicate code when you can call it with a
 single url?

 Or did you mean you have a specialised GWT window written to handle
 printing and you wish to route all printing to that GWT window? And
 you wish to deal with the occasionally asked question of how to
 perform inter-frame communication for GWT? I don't remember now, but
 there is a google code project to expose GWT objects to javascript.
 Coupled with GWT Dictionary API, I wonder if that will help.

 Of course, you do realise that for two frames to communicate, they
 should have the same root Window parentage so that one frame could
 refer to another thro the frame hierarchy.

 GWT team should seriously look at providing a comprehensive facility
 for interframe communication, rather than having us perform
 algorithmic contortions and acrobatics - like having to scratch your
 own nose thro the route of bending your hand behind your head.

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



Re: How to use one service from several GWT-Apps

2010-06-23 Thread newnoise
and when i wrote service again, i totally meant servlet. its been a
looong day ...

On 23 Jun., 22:11, newnoise tommmuel...@googlemail.com wrote:
 sorry i meant service.

 i try to explain the problem more precisely:
 i got a map. users can, for example, use the app to calculate a route-
 advise. if the user did so he may want to print the route. but the map
 is nearly fullscreen, so if he justs prints it like that it looks
 pretty bad. so what i do is to open a new browser window with a
 smaller map. and now in this new window the route must be newly
 calculated, because you cant give a java object to the new window,
 right?

 what i want now is that the print page uses the routing servlet of the
 main app. what i dont want is that the print page needs all the same
 server code again. but i dont get it working. because if i merge the
 projects the web.xmls clash.

 thanks a lot!
 tom

 On 23 Jun., 21:47, Blessed Geek blessedg...@gmail.com wrote:

  service?

  Printing thro web service that all/any window could call with a single
  url? Why would you need to duplicate code when you can call it with a
  single url?

  Or did you mean you have a specialised GWT window written to handle
  printing and you wish to route all printing to that GWT window? And
  you wish to deal with the occasionally asked question of how to
  perform inter-frame communication for GWT? I don't remember now, but
  there is a google code project to expose GWT objects to javascript.
  Coupled with GWT Dictionary API, I wonder if that will help.

  Of course, you do realise that for two frames to communicate, they
  should have the same root Window parentage so that one frame could
  refer to another thro the frame hierarchy.

  GWT team should seriously look at providing a comprehensive facility
  for interframe communication, rather than having us perform
  algorithmic contortions and acrobatics - like having to scratch your
  own nose thro the route of bending your hand behind your head.

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



Re: How to use one service from several GWT-Apps

2010-06-23 Thread giuseppe la scaleia

A question what do you use for route on map?? Regards giuseppe

Inviato da iPhone di Giuseppe La  Scaleia

Il giorno 23/giu/2010, alle ore 22.13, newnoise tommmuel...@googlemail.com 
 ha scritto:



and when i wrote service again, i totally meant servlet. its been a
looong day ...

On 23 Jun., 22:11, newnoise tommmuel...@googlemail.com wrote:

sorry i meant service.

i try to explain the problem more precisely:
i got a map. users can, for example, use the app to calculate a  
route-
advise. if the user did so he may want to print the route. but the  
map

is nearly fullscreen, so if he justs prints it like that it looks
pretty bad. so what i do is to open a new browser window with a
smaller map. and now in this new window the route must be newly
calculated, because you cant give a java object to the new window,
right?

what i want now is that the print page uses the routing servlet of  
the

main app. what i dont want is that the print page needs all the same
server code again. but i dont get it working. because if i merge the
projects the web.xmls clash.

thanks a lot!
tom

On 23 Jun., 21:47, Blessed Geek blessedg...@gmail.com wrote:


service?


Printing thro web service that all/any window could call with a  
single
url? Why would you need to duplicate code when you can call it  
with a

single url?



Or did you mean you have a specialised GWT window written to handle
printing and you wish to route all printing to that GWT window? And
you wish to deal with the occasionally asked question of how to
perform inter-frame communication for GWT? I don't remember now, but
there is a google code project to expose GWT objects to javascript.
Coupled with GWT Dictionary API, I wonder if that will help.



Of course, you do realise that for two frames to communicate, they
should have the same root Window parentage so that one frame could
refer to another thro the frame hierarchy.



GWT team should seriously look at providing a comprehensive facility
for interframe communication, rather than having us perform
algorithmic contortions and acrobatics - like having to scratch your
own nose thro the route of bending your hand behind your head.


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



Re: MVP with EventBus question

2010-06-23 Thread Paul Schwarz
To answer my own question:

1. Gin can be used to inject the EventBus into the View as well as the
Presenter, so now our View has a reference to the EventBus

2. In order to give the EventBus to the Widgets owned by the View
those Widgets will require a constructor argument which will be the
EventBus instance. UiBinder will fail if it doesn't find a default
constructor, except that they have provided some nice work arounds.
The appropriate workaround in this case is to provide a widget
factory. Notice the use of @UiFactory in the example below:

public class UserDashboard extends Composite {
  interface MyUiBinder extends UiBinderWidget, UserDashboard;
  private static final MyUiBinder uiBinder =
GWT.create(MyUiBinder.class);

  private final String[] teamNames;

  public UserDashboard(String... teamNames) {
this.teamNames = teamNames;
initWidget(uiBinder.createAndBindUi(this));
  }

  /** Used by MyUiBinder to instantiate CricketScores */
  @UiFactory CricketScores makeCricketScores() { // method name is
insignificant
return new CricketScores(teamNames);
  }
}




On Jun 23, 11:04 pm, Paul Schwarz paulsschw...@gmail.com wrote:
 Working with the MVP pattern, or more like the VP pattern at this
 point, I have:
 MainPagePresenter
 MainPageView
 WidgetA
 WidgetB

 ... so imagine that WidgetA and WidgetB will be attached to
 MainPageView.

 Using Gin I have an EventBus injected into the MainPagePresenter. I
 can then add click handlers that place an event on the EventBus from
 within my MainPagePresenter. This might look like:

 getMainPageView().getSendButton().addClickHandler(new ClickHandler(){
   public void onClick(ClickEvent event) {
     eventBus.fireEvent(new SendEvent());
   }

 }

 But now let's say that WidgetA and WidgetB actually have quite a few
 user interactions, you'll end up with a lot of methods that look like
 the one above sitting in your Presenter class.
 1. Is this correct?
 Or
 2. should the Presenter hand the reference to the EventBus through to
 its View, who may even hand it through to the Widgets so that they can
 talk directly to the EventBus?

 If the second option is the better option from an architecture/
 separation of concerns point of view, then what is the best way to
 hand the reference over to the View in such a way that keeps the
 coupling between Presenter and View as loose as possible?

 Note, currently my Presenter defines a View interface which my View
 implements, so the coupling is loose but based upon this interface.

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



Google Plugin for Eclipse 3.6 is now available

2010-06-23 Thread Jason Parekh
Hey folks,

Google Plugin for Eclipse 1.3.3 is out with support for Eclipse 3.6.
 Install it with Eclipse 3.6's new Eclipse Marketplace feature by going to
Help  Eclipse Marketplace, and search for Google Plugin for Eclipse.

Alternatively, here are the update sites:
- Eclipse Helios (3.6): http://dl.google.com/eclipse/plugin/3.6
- Eclipse Galileo (3.5): http://dl.google.com/eclipse/plugin/3.5
- Eclipse Ganymede (3.4): http://dl.google.com/eclipse/plugin/3.4
- Eclipse Europa (3.3): http://dl.google.com/eclipse/plugin/3.3

Need detailed instructions?  Check out the quick start guide:
http://code.google.com/eclipse/docs/getting_started.html

Enjoy!

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



what large apps use GWT?

2010-06-23 Thread marius.andreiana
Hi,

I'm looking to build a case for using GWT for a large app. The back-
end is not Java.
Besides Wave, AdWords and Lombardi, what large apps use GWT? (couldn't
find more in GWT presentations)

Is GWT suited for large apps, eg Facebook?

Thanks

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



Re: MVP with EventBus question

2010-06-23 Thread Paul Schwarz
I looked into that, and (unless I'm wrong), I think that
@UiField(provided=true) will cause the UiBinder to look in the .ui.xml
file for argument to satisfy Foo. In my case I am trying to inject
an EventBus into the widget, not a visual element.

On Jun 24, 2:18 am, Filipe Sousa nat...@gmail.com wrote:
 I believe you can use @UiField(provided=true):

 @UiField(provided=true)  Foo foo

 @Inject
 UserDashboard(Foo foo) {
   this.foo = foo

 }

 On Jun 23, 10:03 pm, Paul Schwarz paulsschw...@gmail.com wrote:



  To answer my own question:

  1. Gin can be used to inject the EventBus into the View as well as the
  Presenter, so now our View has a reference to the EventBus

  2. In order to give the EventBus to the Widgets owned by the View
  those Widgets will require a constructor argument which will be the
  EventBus instance. UiBinder will fail if it doesn't find a default
  constructor, except that they have provided some nice work arounds.
  The appropriate workaround in this case is to provide a widget
  factory. Notice the use of @UiFactory in the example below:

  public class UserDashboard extends Composite {
    interface MyUiBinder extends UiBinderWidget, UserDashboard;
    private static final MyUiBinder uiBinder =
  GWT.create(MyUiBinder.class);

    private final String[] teamNames;

    public UserDashboard(String... teamNames) {
      this.teamNames = teamNames;
      initWidget(uiBinder.createAndBindUi(this));
    }

    /** Used by MyUiBinder to instantiate CricketScores */
    @UiFactory CricketScores makeCricketScores() { // method name is
  insignificant
      return new CricketScores(teamNames);
    }

  }

  On Jun 23, 11:04 pm, Paul Schwarz paulsschw...@gmail.com wrote:

   Working with the MVP pattern, or more like the VP pattern at this
   point, I have:
   MainPagePresenter
   MainPageView
   WidgetA
   WidgetB

   ... so imagine that WidgetA and WidgetB will be attached to
   MainPageView.

   Using Gin I have an EventBus injected into the MainPagePresenter. I
   can then add click handlers that place an event on the EventBus from
   within my MainPagePresenter. This might look like:

   getMainPageView().getSendButton().addClickHandler(new ClickHandler(){
     public void onClick(ClickEvent event) {
       eventBus.fireEvent(new SendEvent());
     }

   }

   But now let's say that WidgetA and WidgetB actually have quite a few
   user interactions, you'll end up with a lot of methods that look like
   the one above sitting in your Presenter class.
   1. Is this correct?
   Or
   2. should the Presenter hand the reference to the EventBus through to
   its View, who may even hand it through to the Widgets so that they can
   talk directly to the EventBus?

   If the second option is the better option from an architecture/
   separation of concerns point of view, then what is the best way to
   hand the reference over to the View in such a way that keeps the
   coupling between Presenter and View as loose as possible?

   Note, currently my Presenter defines a View interface which my View
   implements, so the coupling is loose but based upon this interface.

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



Re: how can I start a HttpServlet in an Eclipse GWT project?

2010-06-23 Thread Ken Yap
Never mind, it was a silly typo of mine, I transposed the org and au
in the web.xml file. ClassNotFound meant exactly that. Sometimes it
pays to go to bed when tired and look at it with fresh eyes in the
morning.

It really does work to write a class to extend HttpServlet to handle
parts of the URL space for use in development, and also production if
you wish.

-- 
You received 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: compile problems with GWT 2.1

2010-06-23 Thread Faz
I just installed a new copy of Aptana 2.0.4 (Eclipse 3.5.2) and
installed the GWT/Eclipse Plugin/GAE from
http://google-web-toolkit.googlecode.com/svn/2.1.0.M1/eclipse/plugin/3.5

I created a sample GWT project (New Web Application Project) and ran
the html w/o making ANY modifications. It runs fine in my browser but
I see these same msgs in the 'Development Mode' window.

16:05:35.826 [ERROR] [test] Errors in 'jar:file:/E:/Program%20Files/
Aptana/Aptana%20Studio%202.0/plugins/com.google.gwt.eclipse.sdkbundle.
2.1.0_2.1.0.m1-201005191217/gwt-2.1.0.M1/gwt-bikeshed.jar!/com/google/
gwt/valuestore/ui/AbstractRecordEditActivity.java'
   16:05:36.617 [ERROR] [test] Line 37: No source code is available
for type com.google.gwt.requestfactory.shared.RequestFactory; did you
forget to inherit a required module?
   16:05:36.637 [ERROR] [test] Line 81: No source code is available
for type com.google.gwt.requestfactory.shared.ReceiverV; did you
forget to inherit a required module?
   16:05:36.647 [ERROR] [test] Line 81: No source code is available
for type com.google.gwt.requestfactory.shared.SyncResult; did you
forget to inherit a required module?

 this goes on for a few more methods/objects.

Any help with this please? Do I just wait for a refresh on GWT?

On Jun 23, 5:21 am, Jim jim.p...@gmail.com wrote:
 When I run bikeshed, I got the following error. I can not fix this
 problems by following Eclipse.readme and turorials from DataNucleus.
 Can somebody kindly provide the working bikeshedsourcecodein
 Eclipse project so I can learn GWT 2.1 without wasting my time on
 DataNucleus. I appreciate your kindness.

 Found Meta-Data for class
 com.google.gwt.sample.expenses.server.domain.Expense but this class is
 not enhanced!! Please enhance the class before running DataNucleus.
 org.datanucleus.exceptions.NucleusUserException: Found Meta-Data for
 class com.google.gwt.sample.expenses.server.domain.Expense but this
 class is not enhanced!! Please enhance the class before running
 DataNucleus.
         at
 org.datanucleus.metadata.MetaDataManager.initialiseClassMetaData(MetaDataManager.java:
 2225)
         at
 org.datanucleus.metadata.MetaDataManager.initialiseFileMetaData(MetaDataManager.java:
 2176)
         at
 org.datanucleus.metadata.MetaDataManager.initialiseFileMetaDataForUse(MetaDataManager.java:
 881)
         at
 org.datanucleus.metadata.MetaDataManager.loadPersistenceUnit(MetaDataManager.java:
 794)
         at
 org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:
 488)
         at
 org.datanucleus.jpa.EntityManagerFactoryImpl.init(EntityManagerFactoryImpl.java:
 355)

 On Jun 23, 6:13 am, KenJi_getpowered mikael.k...@gmail.com wrote:

  Thanks BlessedGeek,

  It works perfectly with that line   inherits
  name='com.google.gwt.requestfactory.RequestFactory'/

  My app is totally functionnal and I was even able to add the new Data
  Presentation Widget.

  FYI: Correction is not yet included in the GWT 2.1 M1 version

  On 25 mai, 15:34, Thomas Broyer t.bro...@gmail.com wrote:

   On 24 mai, 01:53, Blessed Geek blessedg...@gmail.com wrote:

I went into bikeshed jar in gwt2.1m1 plugin directory in eclipse and
edited ValueStore.gwt.xml to insert the line

  inherits name='com.google.gwt.requestfactory.RequestFactory'/.

After which, GWT copiulation proceeded without error and my
application ran without error or interference from bikeshed demo.

The question remains, why is the bikeshed app included in my app when
I enabled GWT 2.1M1.

   Because there's a com.google.gwt.user.User override in gwt-bikeshed
   that adds a dependency (inherits/) on app.App.
   This is now 
   fixed:http://code.google.com/p/google-web-toolkit/source/detail?r=8203

   --
  Youreceived this message becauseyouare subscribed to the Google Groups 
  Google Web Toolkit group.
   To post to this group, send email to google-web-tool...@googlegroups.com.
   To unsubscribe from this group, send email to 
   google-web-toolkit+unsubscr...@googlegroups.com.
   For more options, visit this group 
   athttp://groups.google.com/group/google-web-toolkit?hl=en.

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



RE: GWT 2.1.0 M1 and Roo development lifecycle. What would you do?

2010-06-23 Thread Joseph Li
Think the whole point of having Roo + GWT is to easily generate pumping
codes like getters and settings and data transfer objects etc without too
much hand coding. I am not an expert on GWT nor Roo, but so far it looks
like it still need some work to iron out some strange issue, like the
generated scaffolding is not as robust as Grails and it doesn't run under
chrome but only runs on firefox.

But as far as the concept goes and I am experimenting it hoping to recommend
it to our next project to use GWT + Roo. I love Roo keep monitor the state
of the project and generate mechanical code on the side away from the src
thru aspect so I don't have to do it and it won't mess my src up. It doesn't
bother me much that it’s a code generator. Grails is actually a runtime code
generator as well and it is very popular, albeit too much black magic and no
decent tool support. I say as long as it doesn't mess with my src, I am good
with it. 

Joseph 




-Original Message-
From: google-web-toolkit@googlegroups.com
[mailto:google-web-tool...@googlegroups.com] On Behalf Of André Moraes
Sent: Saturday, June 19, 2010 11:37 AM
To: Google Web Toolkit
Subject: Re: GWT 2.1.0 M1 and Roo development lifecycle. What would you do?

Jaroslav,

I took a look in the Spring Roo videos and made a little notion on how
you it works.

I wrote some programs when in college with the AspectJ (the base of
the Spring Roo) and it was very nice to have custom aspects around my
java classes.

I think the main problem, at least for me, with the Roo tools is that
it works basically only for the Java Plataform.

I don't found any links on how to use only GWT + Roo whithout any
server code.

Anyway, i uploade some samples using my code template to generate some
GwtEvents (the base for the MVP cool development in GWT).

Thanks for the links, maybe when in a only Java project I consider
using and learning more Spring Roo.

On 18 jun, 19:27, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
 I don't dare teach anyone Roo, I'm yet to try it myself. :) Let me only
tell
 you that I'm having pretty similar concerns to yours whenever I hear code
 generation. And after watching the video I know I will try it, it has
 impressed me enough.

 2010/6/19 André Moraes andr...@gmail.com



  Jaroslav,

  But how can I control the merge process?
  In my case the code is generated, than i can edit make any changes in
  the generated code (which will be preserved by the safe-code-marks)
  and then the GWT compiler (or any other compiler) will compile the
  code that i wrote.

  I don't really know/use Roo, but I used some code generation tools
  before, so excuse me for any noob comment on the Roo subject.

  On 18 jun, 19:08, Jaroslav Záruba jaroslav.zar...@gmail.com wrote:
   2010/6/18 André Moraes andr...@gmail.com

I'm not using the integration with Roo, but I dislike the idea of
having a tool that after generating my code difficult to customize
the
generated code.

   Roo keeps your code untouched. It stores the modifications elsewhere
and
   merges those files at compilation-time.

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

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

-- 
You received 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: enable/disable widgets?

2010-06-23 Thread Magnus
Hello,

I actually needed the functionality in the widget class to let my own
Form class enable/disable all its child widgets at the same time.

However, I made this workaround and it's ok for me at the moment:

 public void setEnabled (boolean e)
 {
  IteratorWidget itr = grd.iterator (); // grd is a FlexTable which
contains my form controls

  while (itr.hasNext ())
  {
   Widget w = itr.next ();

   if (w instanceof TextBox)
   {
TextBox t = (TextBox) w;
t.setEnabled (e);
   }

   if (w instanceof PasswordTextBox)
   {
PasswordTextBox t = (PasswordTextBox) w;
t.setEnabled (e);
   }

  ...
  }
 }

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



GWT Application not working in IE6

2010-06-23 Thread Vikash
I have created a GWT application which is working fine in all browsers
but there is some problem in IE6. When I run it on IE6 crashes giving
some error like cannot read memory.

Can anybody tell me why it is happening.
and what is the solution.

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



Re: One Service, multiple users

2010-06-23 Thread Prakash
GWT Services are nothing but HttpServlets.
And single instance of servlet can serve multiple requests, which can
be from different users.

To store attributes per user, use HttpSession instead of variables in
GWT Service.

HttpSession can be retrieved from GWT service by calling
getThreadLocalRequest().getSession().


Prakash M.






On Jun 24, 12:58 am, Ralf B ralf.bie...@gmail.com wrote:
 I have a service that instantiates and keeps state (variables in the
 back end that is controlled by the service) until the user logs out.
 What happens exactly when two users access my GWT service; will there
 be one service instance for each user or will one be shared between
 them? I try to figure out if my service is actually multi-user or
 not...

 Ralf

-- 
You received 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: server side entry point to open/close database?

2010-06-23 Thread roji
Hi Magnus.

The standard enterprisey way to do this, would be to use a
javax.sql.DataSource as a representation of your database. Your
RemoteServiceServlet would look up this object in JNDI at
initialization time, and create connections by calling
getConnection() on it each time a user connect.

The actual connection pool would be managed outside your application.
For example, when you define a DataSource resource in Tomcat, an
Apache connection pool (DBCP) is created. This way, when your
application asks for a new connection, it will be transparently
reusing pooled connections.

Example servlet:
class MyServlet
   extends RemoteServiceServlet
   implements MyServletService
{
   @Resource(name=jdbc/db)   // This makes your servlet container
inject the JNDI resource found under jdbc/db
   private DataSource db;

   public void myGwtMethod() {
  Connection conn = db.getConnection();
   }
   ...
}

If you're using Tomcat, take a look here for how to manage DataSource
resources: 
http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html.

To answer your specific question, if you want code to run once at init-
time, override init(). If you want code to run once at shutdown time,
override destroy(). But you shouldn't need these, since the @Resource
annotation will cause the container to do the initialization for you.

... and don't forget to close() your connections, even if exceptions
were raised, otherwise you'll have a leak.

Shay

On Jun 23, 9:51 am, Magnus alpineblas...@googlemail.com wrote:
 Hello,

 after your post I would open/close my db within each service call.

 If I would do it with a pool, I would need 2 entry points, one to open
 the pool and one to close it. If I would go this way, would these
 entry point exist (is there a deinit)?

 Thanks
 Magnus

 On 20 Jun., 15:58, roji rojan...@gmail.com wrote:



  Hi Magnus.

  Your server-side service implementation is a class that extends GWT's
  RemoteServiceServlet, which itself extends the Servlet interface. If
  you need to perform once-only initialization, you can do so by
  overriding the init() method in your class.

  Note, however, that init() is probably a bad place to open database
  connections, as your backend will be accessed concurrently by many
  users and multiple database connections are needed. You should
  probably either open and close database connections inside the RPC
  service calls themselves (using a database connection pool behind the
  scenes), or in some scenarios store some resources in the user's HTTP
  session (acquired by calling
  this.getThreadLocalRequest().getSession()).

  If you need more help, can you send more details about your
  application?

  Shay

  On Jun 20, 5:23 am, Magnus alpineblas...@googlemail.com wrote:

   Hi,

   I wonder where to open and close the database on the server side, and
   where to store the database connection.

   At this point, I only have the server side implementation of my RPC
   services. But there is no place to store my Connection object and no
   entry point like onServerLoad or something like that.

   An alternative way would be to open and close the database on each
   service call.

   How do you do this?

   Thank you
   Magnus- Zitierten Text ausblenden -

  - Zitierten Text anzeigen -

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



[gwt-contrib] UiBinder tweaks for GWT Designer

2010-06-23 Thread Konstantin.Scheglov

  To support UiBinder in GWT Designer we need to have several changes
in UiBinder generators, writer and parsers.
  I will describe below these changes as they are done now.
  In real patch I will group as much implementation details as
possible into single class like DesignTimeUtils or GWTDesignerSupport.
It will check for GWT Designer presence and do something only in this
case.

  So, main question is following. Will GWT team accept patch with such
changes?
  This would allow us avoid creating internal patches for 2.0 and each
future version of GWT.


1. Declare in binder implementation interface and field with it.
Something like this:
   public static interface WBPObjectHandler {void handle(String
path, Object object);}
   public WBPObjectHandler wbpObjectHandler;
In method createAndBindUi() directly after creating each Widget
instance (but before applying setX() methods) wbpObjectHandler is
used to notify GWT Designer about new widget and its path in XML. GWT
Designer bind Widget instance to model (using path) and also asks
default values for all properties using getX() methods.

  Path in XML is / separated string of indexes.
  For example in
ui:UiBinder
ui:style/
g:FlowPanel styleName={style.panel}
g:Button text=New Button/
/g:FlowPanel
/ui:UiBinder

  0/1 is FlowPanel
  0/1/0 is Button

2. Declare in binder implementation Map with values of attributes.
   public final java.util.Map wbpAttributes = new
java.util.HashMap();
  and fill it, here is example if code generated for ui.xml above

if (wbpObjectHandler != null) wbpObjectHandler.handle(0/1/0,
f_Button2);
f_Button2.setText(New Button);
wbpAttributes.put(0/1/0 text, New Button);
f_FlowPanel1.add(f_Button2);
if (wbpObjectHandler != null) wbpObjectHandler.handle(0/1,
f_FlowPanel1);
f_FlowPanel1.setStyleName( + style.panel() + );

  GWT Designer needs to know attribute values to show them to user in
properties table. Not all properties have getter, so we can not get
these values for existing Widget object.


3. In special parsers for panels, remember also values of attributes
for artificial elements. For example Cell in CellPanelParser (and
Dock in DockPanel).

// Parse horizontal and vertical alignment attributes.
if (cellElem.hasAttribute(HALIGN_ATTR)) {
  String value = cellElem.consumeAttribute(HALIGN_ATTR,
hAlignConstantType);
  writer.addStatement(%1$s.setCellHorizontalAlignment(%2$s,
%3$s);,
  fieldName, childFieldName, value);
  //XXX Instantiations
  writer.addStatement(wbpAttributes.put(\%s\, %s);,
widgetElem.getPath() +  Cell. + HALIGN_ATTR, value);
  //XXX Instantiations
}



4. To allow quick updates of design canvas as user changes properties,
without reloading GWT context each time, we should:
4.1. Generate Binder implementation class with new name each time, so
be able to define each time new class in same ClassLoader. Right now
we just add current time to the name of class.
//XXX Instantiations
// generate class with new name each time, to allow refresh in
same ClassLoader
implName += _wbp + System.currentTimeMillis();
//XXX Instantiations
4.2. To parse/render UI.XML file content without saving, i.e. from
memory/editor, generate should try to read document from memory.
Something like this:
  private Document getW3cDoc(MortalLogger logger, String templatePath)
  throws UnableToCompleteException {
//XXX Instantiations
{
  String content = System.getProperty(wbp.gwt.UiBinder  +
templatePath);
  if (content != null) {
Document doc = null;
try {
  doc = new
W3cDomHelper(logger.getTreeLogger()).documentFor(content);
} catch (SAXParseException e) {
  logger.die(Error parsing XML (line  + e.getLineNumber() +
): 
  + e.getMessage() +   + content, e);
} catch (Throwable e) {
  logger.die(Error parsing XML   + content, e);
}
return doc;
  }
}
//XXX Instantiations

URL url =
UiBinderGenerator.class.getClassLoader().getResource(templatePath); //
this is default implementation

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


[gwt-contrib] [google-web-toolkit] r8303 committed - Added Hilbrand Bouwkamp for gwt-google-apis contribution

2010-06-23 Thread codesite-noreply

Revision: 8303
Author: zun...@google.com
Date: Wed Jun 23 05:53:44 2010
Log: Added Hilbrand Bouwkamp for gwt-google-apis contribution

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

Modified:
 /CLA-SIGNERS

===
--- /CLA-SIGNERSFri Apr  9 16:47:56 2010
+++ /CLA-SIGNERSWed Jun 23 05:53:44 2010
@@ -6,6 +6,7 @@
 btay...@rackspace.com (Bryan Taylor)
 dannydaemo...@gmail.com (Daniel Valenzuela)
 fredsa (Fred Sauer)
+...@bouwkamp.com (Hilbrand Bouwkamp)
 ispeters (Ian Shane Petersen)
 james.strachan (James Strachan)
 jason.essington (Jason Essington)

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


Re: [gwt-contrib] UiBinder tweaks for GWT Designer

2010-06-23 Thread Joel Webber
Konstantin,

I've not gone over these proposals in great detail, but it does seem like a
reasonable idea to build design time hooks into UiBinder-generated code.
One very important caveat would be that it must be possible for the compiler
to strip them out completely in production mode (this seems likely, but we'd
have to be very careful to make sure it happens in practice).

I'm going to have to defer to Ray on the architectural details (I haven't
touched this generator in a while), and I suspect he'd want to make sure the
proposed mechanisms would be generally useful for other kinds of design
tools. He's on vacation this week, so I doubt he'll be able to look into it
until next week at the earliest.

@rjrjr: Please do have a look at this when you have a moment, and if you'd
like me to look at anything in particular, I'd be happy to.

Cheers,
joel.

Le 23 juin 2010 06:40, Konstantin.Scheglov konstantin.scheg...@gmail.com a
écrit :


  To support UiBinder in GWT Designer we need to have several changes
 in UiBinder generators, writer and parsers.
  I will describe below these changes as they are done now.
  In real patch I will group as much implementation details as
 possible into single class like DesignTimeUtils or GWTDesignerSupport.
 It will check for GWT Designer presence and do something only in this
 case.

  So, main question is following. Will GWT team accept patch with such
 changes?
  This would allow us avoid creating internal patches for 2.0 and each
 future version of GWT.


 1. Declare in binder implementation interface and field with it.
 Something like this:
   public static interface WBPObjectHandler {void handle(String
 path, Object object);}
   public WBPObjectHandler wbpObjectHandler;
In method createAndBindUi() directly after creating each Widget
 instance (but before applying setX() methods) wbpObjectHandler is
 used to notify GWT Designer about new widget and its path in XML. GWT
 Designer bind Widget instance to model (using path) and also asks
 default values for all properties using getX() methods.

  Path in XML is / separated string of indexes.
  For example in
 ui:UiBinder
ui:style/
g:FlowPanel styleName={style.panel}
g:Button text=New Button/
/g:FlowPanel
 /ui:UiBinder

  0/1 is FlowPanel
  0/1/0 is Button

 2. Declare in binder implementation Map with values of attributes.
   public final java.util.Map wbpAttributes = new
 java.util.HashMap();
  and fill it, here is example if code generated for ui.xml above

if (wbpObjectHandler != null) wbpObjectHandler.handle(0/1/0,
 f_Button2);
f_Button2.setText(New Button);
wbpAttributes.put(0/1/0 text, New Button);
f_FlowPanel1.add(f_Button2);
if (wbpObjectHandler != null) wbpObjectHandler.handle(0/1,
 f_FlowPanel1);
f_FlowPanel1.setStyleName( + style.panel() + );

  GWT Designer needs to know attribute values to show them to user in
 properties table. Not all properties have getter, so we can not get
 these values for existing Widget object.


 3. In special parsers for panels, remember also values of attributes
 for artificial elements. For example Cell in CellPanelParser (and
 Dock in DockPanel).

// Parse horizontal and vertical alignment attributes.
if (cellElem.hasAttribute(HALIGN_ATTR)) {
  String value = cellElem.consumeAttribute(HALIGN_ATTR,
 hAlignConstantType);
  writer.addStatement(%1$s.setCellHorizontalAlignment(%2$s,
 %3$s);,
  fieldName, childFieldName, value);
  //XXX Instantiations
  writer.addStatement(wbpAttributes.put(\%s\, %s);,
 widgetElem.getPath() +  Cell. + HALIGN_ATTR, value);
  //XXX Instantiations
}



 4. To allow quick updates of design canvas as user changes properties,
 without reloading GWT context each time, we should:
 4.1. Generate Binder implementation class with new name each time, so
 be able to define each time new class in same ClassLoader. Right now
 we just add current time to the name of class.
//XXX Instantiations
// generate class with new name each time, to allow refresh in
 same ClassLoader
implName += _wbp + System.currentTimeMillis();
//XXX Instantiations
 4.2. To parse/render UI.XML file content without saving, i.e. from
 memory/editor, generate should try to read document from memory.
 Something like this:
  private Document getW3cDoc(MortalLogger logger, String templatePath)
  throws UnableToCompleteException {
//XXX Instantiations
{
  String content = System.getProperty(wbp.gwt.UiBinder  +
 templatePath);
  if (content != null) {
Document doc = null;
try {
  doc = new
 W3cDomHelper(logger.getTreeLogger()).documentFor(content);
} catch (SAXParseException e) {
  logger.die(Error parsing XML (line  + e.getLineNumber() +
 ): 
  + e.getMessage() +   + content, e);
} catch (Throwable e) {
  logger.die(Error parsing XML   + content, e);
}
return doc;
  

[gwt-contrib] Re: UiBinder. Parser for TextAlignConstant (issue612803)

2010-06-23 Thread Joel Webber
@rjrjr: What say ye? Have you considered doing something like this before,
and perhaps found a way to generalize it such that we don't have to create a
separate attribute parser for every enum?

Le 22 juin 2010 07:14, konstantin.scheg...@gmail.com a écrit :

 Reviewers: jgw,

 Description:
 It uses friendly names.

 I will post patch with adding support for names like this for
 horizontal/vertical alignments (in addition, not replace to keep
 compatibility with existing code) later.

 Please review this at http://gwt-code-reviews.appspot.com/612803/show

 Affected files:
  user/src/com/google/gwt/uibinder/attributeparsers/AttributeParsers.java

  
 user/src/com/google/gwt/uibinder/attributeparsers/TextAlignConstantParser.java
  user/test/com/google/gwt/uibinder/UiBinderJreSuite.java

  
 user/test/com/google/gwt/uibinder/attributeparsers/TextAlignConstantParser_Test.java
  user/test/com/google/gwt/uibinder/test/UiJavaResources.java




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

Re: [gwt-contrib] Re: UiBinder. Code style for constant parsers.

2010-06-23 Thread Joel Webber
Le 22 juin 2010 07:03, Konstantin.Scheglov konstantin.scheg...@gmail.com a
écrit :


  Pretty much everything we've done so far has been limited to
 automatically
  exposing the Java-level APIs in all their ugliness. The h/v alignment
 values
  are implemented somewhat manually, but for things like enums I really
 like
  the idea that they can be exposed completely automatically.
 
  On the other hand, it would be nice to have prettier names. Perhaps we
 could
  find some sort of convention for exposing prettier names for
 [pseudo-]enums.
  What about a shortName() method on the enum itself?

   Hm...
  Yes, I think that it is possible to create some generic parser for
 enum-like constants.
  However because they are not real enums, following things come to
 mind:

 1. During registration in AttributeParsers we will need to pass list
 of values;
 2. To check for shortName() using reflection;
 3. To test that each such constant parser instance works correctly, I
 would write special ui.xml file.

  Also one more thing worries me. Do you think that it is OK to add
 into GWT classes on this level information which is used only by some
 presentation of GWT? I mean that parsing ui.xml files is part of
 UiBinder, so it should be problem of UiBinder how to parse it.


It *does* seem a little odd to have to add a UiBinder-specific short name
to every enum (or enum-alike) used as a widget property (especially if they
somehow end up in the compiled output). On the other hand, it would also
kind of suck to have to put them in a completely separate place, which most
widget authors would simply forget to do.

On second thought, maybe we can actually get away with just convention. Most
enums (e.g., Style.Unit) have names that are upper-case by convention, but
we could allow UiBinder to specify them in a case-insensitive manner without
ambiguity. That would leave only a handful of special cases (like the
TextAlignmentParser patch you just sent).

@rjrjr, konstantin: How does that sound to you both?

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

[gwt-contrib] [google-web-toolkit] r8304 committed - Adding a null check to ShowcaseGenerator so that we don't try to write...

2010-06-23 Thread codesite-noreply

Revision: 8304
Author: gwt.mirror...@gmail.com
Date: Wed Jun 23 08:52:39 2010
Log: Adding a null check to ShowcaseGenerator so that we don't try to write  
to a public resource that has already been created.  This fixes a bug when  
multiple examples reference the same raw source files.


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

Review by: j...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=8304

Modified:
  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java


===
---  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java	 
Thu Oct 30 09:17:17 2008
+++  
/trunk/samples/showcase/src/com/google/gwt/sample/showcase/generator/ShowcaseGenerator.java	 
Wed Jun 23 08:52:39 2010

@@ -33,8 +33,10 @@
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
+import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Set;

 /**
  * Generate the source code, css styles, and raw source used in the  
Showcase

@@ -66,6 +68,12 @@
*/
   private TreeLogger logger = null;

+  /**
+   * The set of raw files that have already been generated. Raw files can  
be

+   * reused by different examples, but we only generate them once.
+   */
+  private SetString rawFiles = new HashSetString();
+
   @Override
   public String generate(TreeLogger logger, GeneratorContext context,
   String typeName) throws UnableToCompleteException {
@@ -115,15 +123,22 @@
* @param partialPath the path to the file relative to the public  
directory

* @param contents the file contents
*/
-  private void createPublicResource(String partialPath, String contents) {
+  private void createPublicResource(String partialPath, String contents)
+  throws UnableToCompleteException {
 try {
   OutputStream outStream = context.tryCreateResource(logger,  
partialPath);

+  if (outStream == null) {
+String message = Attempting to generate duplicate public  
resource: 

++ partialPath
++ .\nAll generated source files must have unique names.;
+logger.log(TreeLogger.ERROR, message);
+throw new UnableToCompleteException();
+  }
   outStream.write(contents.getBytes());
   context.commitResource(logger, outStream);
-} catch (UnableToCompleteException e) {
-  logger.log(TreeLogger.ERROR, Failed while writing, e);
 } catch (IOException e) {
-  logger.log(TreeLogger.ERROR, Failed while writing, e);
+  logger.log(TreeLogger.ERROR, Error writing file:  + partialPath,  
e);

+  throw new UnableToCompleteException();
 }
   }

@@ -146,6 +161,13 @@
 // Generate each raw source file
 String[] filenames = type.getAnnotation(ShowcaseRaw.class).value();
 for (String filename : filenames) {
+  // Check if the file has already been generated.
+  String path = pkgName + filename;
+  if (rawFiles.contains(path)) {
+continue;
+  }
+  rawFiles.add(path);
+
   // Get the file contents
   String fileContents = getResourceContents(pkgPath + filename);

@@ -230,7 +252,7 @@
* @param outDir the output directory
*/
   private void generateStyleFiles(JClassType type, String styleDefs,
-  String outDir) {
+  String outDir) throws UnableToCompleteException {
 // Look for annotation
 if (!type.isAnnotationPresent(ShowcaseStyle.class)) {
   return;

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


[gwt-contrib] Re: Adding a null check to ShowcaseGenerator so that we don't try to write to a public resource that... (issue646802)

2010-06-23 Thread jlabanca

committed as r8304

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

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


[gwt-contrib] Column should not use a singleton FieldUpdater because the Cell may hang on to the FieldUpdater.... (issue620803)

2010-06-23 Thread jlabanca

Reviewers: Dan Rice,

Description:
Column should not use a singleton FieldUpdater because the Cell may hang
on to the FieldUpdater. We now create a new instance each time.


Please review this at http://gwt-code-reviews.appspot.com/620803/show

Affected files:
  M user/src/com/google/gwt/user/cellview/client/Column.java


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


[gwt-contrib] Finishing implementation of ListViewAdapter. An extensive test class will be submitted in a lat... (issue636802)

2010-06-23 Thread jlabanca

Reviewers: jgw,

Description:
Finishing implementation of ListViewAdapter.  An extensive test class
will be submitted in a later change because the rest relies on API
changes that haven't been submitted yet.


Please review this at http://gwt-code-reviews.appspot.com/636802/show

Affected files:
  M user/src/com/google/gwt/view/client/ListViewAdapter.java


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


[gwt-contrib] Fix external issue 5052 - JSONParser.parse exceptions with some unicode characters (issue659801)

2010-06-23 Thread rice

Reviewers: jat,

Description:
Fix external issue 5052 - JSONParser.parse exceptions with some unicode
characters


Please review this at http://gwt-code-reviews.appspot.com/659801/show

Affected files:
  M user/src/com/google/gwt/json/client/JSONParser.java
  M user/test/com/google/gwt/json/client/JSONTest.java


Index: user/src/com/google/gwt/json/client/JSONParser.java
===
--- user/src/com/google/gwt/json/client/JSONParser.java (revision 8304)
+++ user/src/com/google/gwt/json/client/JSONParser.java (working copy)
@@ -48,6 +48,11 @@
   throw new IllegalArgumentException(empty argument);
 }
 try {
+  // Escape Unicode characters that are legal in a JSON string but
+  // illegal in JavaScript. When we use JSON.parse() instead of eval(),
+  // this won't be necessary.
+  jsonString = jsonString.replace(\u2028, \\u2028);
+  jsonString = jsonString.replace(\u2029, \\u2029);
   return evaluate(jsonString);
 } catch (JavaScriptException ex) {
   throw new JSONException(ex);
Index: user/test/com/google/gwt/json/client/JSONTest.java
===
--- user/test/com/google/gwt/json/client/JSONTest.java  (revision 8304)
+++ user/test/com/google/gwt/json/client/JSONTest.java  (working copy)
@@ -237,7 +237,7 @@
 + \c36\:\\\n\, \c37\:\\\r\, \c38\:\\\t\, 
 + \c39\:\/\, \c40\:\\\u2028\, \c41\:\\\u2029\},  
o.toString());

   }
-
+
   public void testLargeArrays() {
 JSONArray arr = null;
 for (int j = 1; j  500; j *= 2) {
@@ -473,6 +473,52 @@
 assertNull(array.get(0));
   }

+  public void testUnicodeSeparators() {
+/*
+ * ECMAScript 5 allows unescaped U+2028 (line separator) and U+2029
+ * (paragraph separator) characters to occur inside strings.
+ */
+String jsonString  
= { 'name': 'miles\u2028da\u2029vis', 'ins\u2028tru\u2029ment': 'trumpet'  
};

+try {
+  JSONValue parsed = JSONParser.parse(jsonString);
+  JSONObject result = parsed.isObject();
+  assertNotNull(result);
+
+  JSONValue nameValue = result.get(name);
+  assertNotNull(nameValue);
+  JSONString nameJsonString = nameValue.isString();
+  assertNotNull(nameJsonString);
+  String nameString = nameJsonString.stringValue();
+  assertEquals(miles\u2028da\u2029vis, nameString);
+  String nameStringQuoted = nameJsonString.toString();
+  assertEquals(\miles\\u2028da\\u2029vis\, nameStringQuoted);
+
+  JSONValue instrumentValue = result.get(ins\u2028tru\u2029ment);
+  assertNotNull(instrumentValue);
+  JSONString instrumentJsonString = instrumentValue.isString();
+  assertNotNull(instrumentJsonString);
+  String instrumentString = instrumentJsonString.stringValue();
+  assertEquals(trumpet, instrumentString);
+} catch (JSONException e) {
+  fail();
+}
+
+// U+2028 and U+2029 should not appear outside a string
+jsonString = { 'name': 'miles davis',\u2028'instrument': 'trumpet' };
+try {
+  JSONParser.parse(jsonString);
+  fail();
+} catch (JSONException e) {
+}
+
+jsonString = { 'name':\u2029'miles davis', 'instrument': 'trumpet' };
+try {
+  JSONParser.parse(jsonString);
+  fail();
+} catch (JSONException e) {
+}
+  }
+
   public void testWidget() {
 JSONObject v = (JSONObject) JSONParser.parse(widgetTest);
 JSONObject widget = (JSONObject) v.get(widget);


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


[gwt-contrib] Re: Finishing implementation of ListViewAdapter. An extensive test class will be submitted in a lat... (issue636802)

2010-06-23 Thread jgw

On 2010/06/23 18:29:32, jlabanca wrote:


LGTM.

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

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


[gwt-contrib] Re: DefaultSelectionModel#setSelected currently adds an exception even if the default selection stat... (issue658801)

2010-06-23 Thread jgw

On 2010/06/23 18:28:32, jlabanca wrote:


Is there a test suite to which tese should be added?

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

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


[gwt-contrib] Re: Fix external issue 5052 - JSONParser.parse exceptions with some unicode characters (issue659801)

2010-06-23 Thread jat


http://gwt-code-reviews.appspot.com/659801/diff/1/2
File user/src/com/google/gwt/json/client/JSONParser.java (right):

http://gwt-code-reviews.appspot.com/659801/diff/1/2#newcode55
user/src/com/google/gwt/json/client/JSONParser.java:55: jsonString =
jsonString.replace(\u2029, \\u2029);
Are you sure these are the only ones?  When I looked at this before for
JSONString, there were many other characters that had to be handled
specially.

http://gwt-code-reviews.appspot.com/659801/diff/1/3
File user/test/com/google/gwt/json/client/JSONTest.java (right):

http://gwt-code-reviews.appspot.com/659801/diff/1/3#newcode240
user/test/com/google/gwt/json/client/JSONTest.java:240:
Spaces.

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

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


[gwt-contrib] Re: Fix external issue 5052 - JSONParser.parse exceptions with some unicode characters (issue659801)

2010-06-23 Thread rice


http://gwt-code-reviews.appspot.com/659801/diff/1/2
File user/src/com/google/gwt/json/client/JSONParser.java (right):

http://gwt-code-reviews.appspot.com/659801/diff/1/2#newcode55
user/src/com/google/gwt/json/client/JSONParser.java:55: jsonString =
jsonString.replace(\u2029, \\u2029);
No, I'm not sure.  But note that these characters are called out
specifically in the ECMAScript 5 spec, section 15.12.2 (describing
JSON.parse):

JSON uses a more limited set of white space characters than WhiteSpace
and allows Unicode code points U+2028 and U+2029 to directly appear in
JSONString literals without using an escape sequence.

What other characters do you have in mind?

On 2010/06/23 18:54:37, jat wrote:

Are you sure these are the only ones?  When I looked at this before

for

JSONString, there were many other characters that had to be handled

specially.

http://gwt-code-reviews.appspot.com/659801/diff/1/3
File user/test/com/google/gwt/json/client/JSONTest.java (right):

http://gwt-code-reviews.appspot.com/659801/diff/1/3#newcode240
user/test/com/google/gwt/json/client/JSONTest.java:240:
Fixed.
On 2010/06/23 18:54:37, jat wrote:

Spaces.


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

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


[gwt-contrib] Re: Fix external issue 5052 - JSONParser.parse exceptions with some unicode characters (issue659801)

2010-06-23 Thread jat


http://gwt-code-reviews.appspot.com/659801/diff/1/2
File user/src/com/google/gwt/json/client/JSONParser.java (right):

http://gwt-code-reviews.appspot.com/659801/diff/1/2#newcode55
user/src/com/google/gwt/json/client/JSONParser.java:55: jsonString =
jsonString.replace(\u2029, \\u2029);
On 2010/06/23 19:02:01, Dan Rice wrote:

No, I'm not sure.  But note that these characters are called out

specifically in

the ECMAScript 5 spec, section 15.12.2 (describing JSON.parse):



JSON uses a more limited set of white space characters than

WhiteSpace and

allows Unicode code points U+2028 and U+2029 to directly appear in

JSONString

literals without using an escape sequence.



What other characters do you have in mind?


Mostly other control characters.  I would prefer to see the test
actually generate strings with all these characters and verify that they
come through ok.  It doesn't have to be as thorough as the RPC unicode
escaping test, but something along those lines would be better.

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

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


  1   2   >