Light weight collections

2011-07-18 Thread jd
Just curious what the status of the light weight collections is?  Currently, 
when I use a single Anchor element the whole bloody Java collections 
framework needs to be loaded in my initial fragment so I try to do as much 
as possible without using the built in Widgets.

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



Re: aaaarrrgh, them layout panels are driving me bonkers!!

2011-07-18 Thread jd
Also, make sure you are in standards mode with a DOCTYPE of !DOCTYPE html

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/bE3IU4eWoh0J.
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.



Is it possible to add widgets as MenuItems?

2011-02-28 Thread JD
Knowing MenuItem extends UIObject (which can not receive events) keeps
my hopes low, but I would like to know if one can add widgets as menu
items, something like new MenuItem(new Slider()) for example.

Thanks,
JD

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



Re: chrome - prompting me to install gwt plugin but already installed

2011-01-26 Thread jd
Thanks Craig! Fixed it for me

On Jan 27, 9:28 am, Craig Mitchell craig...@gmail.com wrote:
 Downgrading theplugingets it working again:

 1:  Uninstall the currentplugin(Tools - Extensions)
 2.  Install the 
 olderplugin https://dl-ssl.google.com/gwt/plugins/chrome/1.0.9521/gwt-dev-plugin.crx

 On Jan 27, 12:25 pm,

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



Integrating ContentFlow with GWT

2010-08-04 Thread jd
I'm looking for a few pointers/tips on how to integrate the
ContentFlow Javascript library into my GWT application.

For reference and clarification ( I see there are a number of
ContentFlow-like libs running around) here, the link to the specific
js library I have in mind - http://www.jacksasylum.eu/ContentFlow/index.php.

I have read the JSNI documents and understand the basic idea, but my
lack of javascript specific knowledge is causing me grief.

More specifically, here's what I would like to do:

1) Create a GWT ContentFlow widget that effectively proxies the
ContentFlow Javascript object such that I can create 1 or more GWT
ContentFlow instances like this:

ContentFlow myContentFlow = new ContentFlow();

2) The Javascript ContentFlow object can take one or more
ContentFlowOptions that govern its behavior and funcitonality, thus
I'd like to be able to set/get these options with typical getter/
setter methods on my GWT ContentFlow widget like this:

ContentFlow myContentFlow = new ContentFlow();

ContentFlowOptions options = myContentFlow.getOptions(); // getter

... modify the options or create new ones

myContentFlow.setOptions(options); // setter

Note, ContentFlowOptions also appears to be a name/value pair
abstraction found in the ContentFlow js library.

3) Create and add 1 or more ContentFlowItem, where an item is a simple
abstraction taking an image url, label, and caption

myContentFlow.add(new ContentFlowItem(images/image1.png, my-
caption1, my-label1);
myContentFlow.add(new ContentFlowItem(images/image2.png, my-
caption2, my-label2);
myContentFlow.add(new ContentFlowItem(images/image3.png, my-
caption3, my-label3);
...

4) Register for selection events. When an ContentFlowItem is
selected, have it callback to my GWT application with information
regarding which item was selected.

5) Set the Style of my GWT ContentFlow abstractions for controlling
the widgets look-n-feel.

In a nutshell, I'd like to turn the ContentFlow js library of objects/
methods into a full-fledge general purpose GWT widget that can be used
for a variety of purposes.

Lastly, in the event that someone has already gone thru this work, I'd
much appreciate getting access to the resulting work and if not, I'd
be happy to share the results of the effort with the rest of the
community once I've got a working example.

Thanks in advance for your thoughts and help.

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



Re: Default Custom Field Serializer

2010-06-10 Thread jd
Further to this - I have tried creating a Generator that creates
CustomFieldSerializer source code for any class with a certain
annotation but these generated serializers are not found and used.

How can I generate CustomFieldSerializers so that they are picked up
by the RPC mechanism?  Is it due to the RPC generators being called
before mine?

Thanks

John

On May 29, 9:02 pm, jd jdpatter...@gmail.com wrote:
 Hi,

 I want to make the RPC mechanism call GWT.create() to instantiate
 certain classes when they are deserialized on the client.  I know I
 can do this with a custom fieldserializerfor each class but I want a
 a more automatic solution.

 Any ideas?

 Thanks,

 John

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



Default Custom Field Serializer

2010-05-29 Thread jd
Hi,

I want to make the RPC mechanism call GWT.create() to instantiate
certain classes when they are deserialized on the client.  I know I
can do this with a custom field serializer for each class but I want a
a more automatic solution.

Any ideas?

Thanks,

John

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



[gwt-contrib] Re: LayoutImplIE6 and onResize()

2010-03-31 Thread jd
Does anyone think this is a bug?  Or is it expected behaviour?

On Mar 23, 10:40 pm, jd jdpatter...@gmail.com wrote:
 Something else related to this problem:  when a DockLayoutPanel is
 animated to resize its children, onResize() is called *before* the
 resize but my child component was expecting to examine its new size.

 The JavaDoc for onResize says This method must be called whenever the
 implementor's size has been modified.

 Has been modified signifies that it should be called *after* the
 resize has occurred which would definitely be more useful and
 expected.

 Currently, onResize is not called at the end of the animation because
 the animations onComplete() calls Layout.layout() and not
 Layout.layout(0, callback).  i.e. if the callback was passed then
 onResize() should also get called at the end of the animation.

 John

 On Mar 20, 12:31 pm, jd jdpatter...@gmail.com wrote:



  Hi,

  I am experiencing a problem using a DockLayoutPanel with IE6 where a
  child widgets RequiresResize.onResize() is fired before the
  LayoutImplIE6 has updated the widgets width and height with new
  values.

  I have a child widget that needs to know when it is resized so it can
  resize a nested MapWidget.  I must do this because setting the maps
  height to 100% does not work inside a DockLayoutPanel child in IE7
  because the element is positioned absolutely using top, bottom, left,
  right.  Using this same absolute positioning for the child map does
  work in IE7 but obviously not in IE6.

  My current solution is to implement RequiresResize and explicitly
  resize the map to the dimensions of the container.  This works well in
  all browsers except IE6 because the container element has not yet been
  resized by LayoutImplIE6

  It looks like this is due to the RootLayoutPanel registering its
  window resize handler before the LayoutImplIE6 registers its handler.

  I could work around this problem by either making the map a direct
  child of the DockLayoutPanel which means that the browser specific
  resize problems are handled by the Layout.

  Alternatively, I could use another nested LayoutPanel or implement
  browser specific resize logic myself.

  But it seems that onResize() is designed for situations like this?

  Thanks,

  John

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

To unsubscribe, reply using remove me as the subject.


Re: panel set width with percentage

2010-03-27 Thread JD
anyone?

On Mar 20, 3:04 pm, JD j_ste...@encs.concordia.ca wrote:
 Hi,

 I have a series of panels as follows:

 HorizontalSplitPanel whose right widget is a VerticalSplitPanel
 (creating three panes in total). The HorizontalSplitPanel is placed
 inside a DecoratorPanel.

 I would like to set the total width and height of this whole thing to
 stretch 100% of the available browser window size. I tried setting the
 size of the horizontal panel to 100% but it didnt work. Neither did
 setting the DecoratorPanel sizes.
 The only sizing that works is fixed sizing using px.

 How can I make it a percentage?

 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.



[gwt-contrib] Re: LayoutImplIE6 and onResize()

2010-03-23 Thread jd
Something else related to this problem:  when a DockLayoutPanel is
animated to resize its children, onResize() is called *before* the
resize but my child component was expecting to examine its new size.

The JavaDoc for onResize says This method must be called whenever the
implementor's size has been modified.

Has been modified signifies that it should be called *after* the
resize has occurred which would definitely be more useful and
expected.

Currently, onResize is not called at the end of the animation because
the animations onComplete() calls Layout.layout() and not
Layout.layout(0, callback).  i.e. if the callback was passed then
onResize() should also get called at the end of the animation.

John

On Mar 20, 12:31 pm, jd jdpatter...@gmail.com wrote:
 Hi,

 I am experiencing a problem using a DockLayoutPanel with IE6 where a
 child widgets RequiresResize.onResize() is fired before the
 LayoutImplIE6 has updated the widgets width and height with new
 values.

 I have a child widget that needs to know when it is resized so it can
 resize a nested MapWidget.  I must do this because setting the maps
 height to 100% does not work inside a DockLayoutPanel child in IE7
 because the element is positioned absolutely using top, bottom, left,
 right.  Using this same absolute positioning for the child map does
 work in IE7 but obviously not in IE6.

 My current solution is to implement RequiresResize and explicitly
 resize the map to the dimensions of the container.  This works well in
 all browsers except IE6 because the container element has not yet been
 resized by LayoutImplIE6

 It looks like this is due to the RootLayoutPanel registering its
 window resize handler before the LayoutImplIE6 registers its handler.

 I could work around this problem by either making the map a direct
 child of the DockLayoutPanel which means that the browser specific
 resize problems are handled by the Layout.

 Alternatively, I could use another nested LayoutPanel or implement
 browser specific resize logic myself.

 But it seems that onResize() is designed for situations like this?

 Thanks,

 John

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

To unsubscribe from this group, send email to 
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this 
email with the words REMOVE ME as the subject.


Re: update widget on panel

2010-03-21 Thread JD
I just tried something with interesting results.

In the updateButton anonymous clickhandler class, I tried a
Window.alert attempting to output the index of the widget object w on
its containing panel. It came back -1, meaning w is not to be found.
Does this have something to do with how anonymous inner classes use
the external classes objects? Maybe a clone or something? If so, how
can i handle this?

thanks.



On Mar 20, 10:30 pm, JD j_ste...@encs.concordia.ca wrote:
 I have an AbsolutePanel with dynamically added widgets. When I click
 on one of these widgets, another panel will display some properties of
 that widget. On this property panel there are elements to change some
 of the textual info displayed on the widget and a button to update it.
 The event of the button gets called and I change the data in the
 widget object but it does not get reflected visually. Any reason why?
 Is there some kind of redraw that has to be done? Perhaps remove the
 widget and redraw it? If so, how do you remove? I tried
 panel.remove(widget) but nothing happens. Below is the method that
 gets called when a widget is clicked.

     private void displayProps(final MyWidget w) {
         propsTable = new FlexTable();
         propsTable.setCellSpacing(3);
         propsTable.setCellPadding(3);

         // Add some standard form options
         propsTable.setHTML(0, 0, Name);
         final TextBox name = new TextBox();
         propsTable.setWidget(0, 1, name);
         Button updateButton = new Button(Update,
                 new ClickHandler() {
                     public void onClick(ClickEvent event) {
                         w.setName(name.getText());
                     }
                 });
         propsTable.setWidget(0, 3, updateButton);
     }

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: New LayoutPanels (DockLayoutPanel) need Standard Mode ???

2010-03-20 Thread jd


On Mar 19, 9:30 pm, pau2bk i...@dpaul.de wrote:
 Using GWT 3.0.1

The problem is that you are writing to us from the future but we are
still in 2010.

I think you probably have an error in your html that stops you page
working in standards mode.  It works for me and others with the
doctype:

!DOCTYPE html

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



panel set width with percentage

2010-03-20 Thread JD
Hi,

I have a series of panels as follows:

HorizontalSplitPanel whose right widget is a VerticalSplitPanel
(creating three panes in total). The HorizontalSplitPanel is placed
inside a DecoratorPanel.

I would like to set the total width and height of this whole thing to
stretch 100% of the available browser window size. I tried setting the
size of the horizontal panel to 100% but it didnt work. Neither did
setting the DecoratorPanel sizes.
The only sizing that works is fixed sizing using px.

How can I make it a percentage?

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.



update widget on panel

2010-03-20 Thread JD
I have an AbsolutePanel with dynamically added widgets. When I click
on one of these widgets, another panel will display some properties of
that widget. On this property panel there are elements to change some
of the textual info displayed on the widget and a button to update it.
The event of the button gets called and I change the data in the
widget object but it does not get reflected visually. Any reason why?
Is there some kind of redraw that has to be done? Perhaps remove the
widget and redraw it? If so, how do you remove? I tried
panel.remove(widget) but nothing happens. Below is the method that
gets called when a widget is clicked.


private void displayProps(final MyWidget w) {
propsTable = new FlexTable();
propsTable.setCellSpacing(3);
propsTable.setCellPadding(3);

// Add some standard form options
propsTable.setHTML(0, 0, Name);
final TextBox name = new TextBox();
propsTable.setWidget(0, 1, name);
Button updateButton = new Button(Update,
new ClickHandler() {
public void onClick(ClickEvent event) {
w.setName(name.getText());
}
});
propsTable.setWidget(0, 3, updateButton);
}

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



[gwt-contrib] Re: Multiple inheritance in Widget hierarchy

2010-03-19 Thread jd
Thanks for all the responses guys.  So far it hasn't been so difficult
to change the hierarchy of the elements I need.  I was mainly just
curious as to why such a setup existed - quite an ingenious solution
to your problem!

Ajax crawling looks very cool indeed but I suspect my site will have
too many generated permutations for it to be practical.  I'm also
running on App Engine and I have read that HttpUnit doesn't like that.

I'll keep this thread posted as I take the experiment further in a
couple of weeks.  Would be fantastic to share the same rendering,
templating and i18n code on the server at JVM speeds.

Thanks again

John

On Mar 19, 10:16 am, Katharina Probst kpro...@google.com wrote:
 Hi John,

 if your ultimate goal is to get an crawlable/indexable GWT app, you may also
 want to look athttp://code.google.com/web/ajaxcrawling- you can use
 HtmlUnit or another headless browser technology to create an HTML snapshot
 server-side and pass that to the crawler.

 kathrin

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

To unsubscribe from this group, send email to 
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this 
email with the words REMOVE ME as the subject.


[gwt-contrib] DockLayoutPanel addLayoutCompleteHandler

2010-03-19 Thread jd
Hi, I use DockLayoutPanel with Google maps and there is a known issue
where any component inside a DockLayoutPanel that depends on the size
of its container must be initialized like this:

root.animate(0, new AnimationCallback()
{
  public void onLayout(Layer layer, double progress)
  {
  }

  public void onAnimationComplete()
  {
  // init internal widget
  }
}

I was thinking it might be more obvious to include a handler after the
layout is complete?

addLayoutCompleteHandler()?

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

To unsubscribe from this group, send email to 
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this 
email with the words REMOVE ME as the subject.


[gwt-contrib] LayoutImplIE6 and onResize()

2010-03-19 Thread jd
Hi,

I am experiencing a problem using a DockLayoutPanel with IE6 where a
child widgets RequiresResize.onResize() is fired before the
LayoutImplIE6 has updated the widgets width and height with new
values.

I have a child widget that needs to know when it is resized so it can
resize a nested MapWidget.  I must do this because setting the maps
height to 100% does not work inside a DockLayoutPanel child in IE7
because the element is positioned absolutely using top, bottom, left,
right.  Using this same absolute positioning for the child map does
work in IE7 but obviously not in IE6.

My current solution is to implement RequiresResize and explicitly
resize the map to the dimensions of the container.  This works well in
all browsers except IE6 because the container element has not yet been
resized by LayoutImplIE6

It looks like this is due to the RootLayoutPanel registering its
window resize handler before the LayoutImplIE6 registers its handler.

I could work around this problem by either making the map a direct
child of the DockLayoutPanel which means that the browser specific
resize problems are handled by the Layout.

Alternatively, I could use another nested LayoutPanel or implement
browser specific resize logic myself.

But it seems that onResize() is designed for situations like this?

Thanks,

John

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

To unsubscribe from this group, send email to 
google-web-toolkit-contributors+unsubscribegooglegroups.com or reply to this 
email with the words REMOVE ME as the subject.


[gwt-contrib] Multiple inheritance in Widget hierarchy

2010-03-18 Thread jd
Hi,

I am reposting this question here as the user list got no reply and I
guess it is more a dev question:

I am experimenting with compiling GWT code with a standard JDK so I
can use the same code to generate HTML on both the client and the
server.  So far it seem to be working OK but will only be practical if
I can also get UIBinder and i18n working.

My goal is to create HTML pages that can be crawled and indexed and
also allow GWT code to add, load and modify the page.  Others have
recommended building two parallel sites - an html one and a GT one
which seems a bit redundant.

My experiement has put a real w3c Node inside every GWT Node and
replace native methods with ones that manipulate the w3c node.  Then
finally I take the full w3c node from any element and convert it into
html.

I found that the object hierarchy needed to be changed to be valid
Java.  An example of the issue is with the Anchor widget:

  public Anchor() {
setElement(Document.get().createAnchorElement());
setStyleName(gwt-Anchor);
  }

com.google.gwt.dom.client.AnchorElement extends
com.google.gwt.dom.client.AnchorElement but setElement expects a
com.google.gwt.user.client.Element so AnchorElement must extend both
classes which is impossible.


I have modified AnchorElement and friends to extends
com.google.gwt.user.client.Element instead which seems to have
worked.


My question is:  Is this impossible inheritance hierarchy intentional
to stop this kind of messing about?

Cheers,

John

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


Re: Debugging IP address

2010-03-17 Thread jd
You too!  There really should be an alert to warn about this

On Feb 7, 10:59 pm, Aladdin alaamu...@gmail.com wrote:
 Thanks a lot guys  and GWT team , come on people I was up until 4:00
 AM because of this , I reconfigured my ips like 100 times. :(

 Any way GWT is a great product ... thanks Google :)

 On Feb 7, 4:06 am, Jeff Chimene jchim...@gmail.com wrote:



  On Sat, Feb 6, 2010 at 5:06 PM, Aladdin alaamu...@gmail.com wrote:
   Hi ,

   This is used to work, I'm not sure if it's the upgrade to 2.0.1 or
   something else.

  It's the upgrade. From 2.01 onwards, the GWT debugger will no longer bind to
  all IP addresses by default.

  To get that prevous behavior, add the following to your dev mode command
  line:
  -bindAddress 0.0.0.0

  Please search this group's archives for the 2.01 announcement by Miguel
  Mendez for a link to the GWT issue discussing this change.

   When I run the debugger, the debugger runs in 127.0.0.1 , I do have
   static IP in my box (192.168.1.100).  but it will not connect to it !
   (http://192.168.1.100/wordpress/?gwt.codesvr=192.168.1.100:9997) .

   When I do Port scanning to this ip I do NOT get any 9997 port (I get
   all the other ports) .
   if I do port scanning for 127.0.0.1 ,I'll see the port open .

   I'm trying to connect to my gwt from vmware Windows to test IE. (but
   the static ip will not work even at my locale machine  )

   is this a bug ? the ip should be 192.168.1.100=127.0.0.1 , but only
   for gwt debug server it's not !!!

   Any ideas ?

   Aladdin

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



Multiple inheritance in Widget hierarchy

2010-03-15 Thread jd
Hi,

I am experimenting with compiling GWT code with a standard JDK so I
can use the same code to generate HTML on both the client and the
server.  So far it seem to be working OK but will only be practical if
I can also get UIBinder and i18n working.

My goal is to create HTML pages that can be crawled and indexed and
also allow GWT code to add, load and modify the page.  Others have
recommended building two parallel sites - an html one and a GT one
which seems a bit redundant.

My experiement has put a real w3c Node inside every GWT Node and
replace native methods with ones that manipulate the w3c node.  Then
finally I take the full w3c node from any element and convert it into
html.

I found that the object hierarchy needed to be changed to be valid
Java.  An example of the issue is with the Anchor widget:

  public Anchor() {
setElement(Document.get().createAnchorElement());
setStyleName(gwt-Anchor);
  }

com.google.gwt.dom.client.AnchorElement extends
com.google.gwt.dom.client.AnchorElement

but setElement expects a com.google.gwt.user.client.Element so
AnchorElement must extend both classes which is impossible.

I have modified AnchorElement and friends to extends
com.google.gwt.user.client.Element instead which seems to have worked.

My question is:  Is this impossible inheritance hierarchy intentional
to stop this kind of messing about?

Cheers,

John

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



Using GWT code on server

2010-02-03 Thread jd
Hi,

I was wondering if there exists already a way to share the same code
for building HTML on the server and on the client?  If not I was
thinking about making a mock DOM object which simply built an in
memory model and then spat out html.

Has this already been done?  Or do people generally rewrite UI code
for server/client?

Thanks,

John

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



addWindowClosingHandler firing when frame loads in IE

2010-01-07 Thread jd
Hi,

I use Window.addWindowClosingHandler() to warn the user when they are
about to leave my app and loose their current state.  It works in
Chrome and Firefox but in IE the handler is fired every time my app
calls History.add().  Im not sure if its related to the fact that I
have a Frame on the page.

Any suggestions?
-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: addWindowClosingHandler firing when frame loads in IE

2010-01-07 Thread jd
I have found that I could avoid the problem by using Button's (or
probably other widgets) instead of Anchor widgets for my internal
navigation.  Perhaps it is due to the default href javascript:; ?
Maybe IE7/8 does not recognise this as an internal link.

On Jan 8, 12:15 pm, jd jdpatter...@gmail.com wrote:
 Hi,

 I use Window.addWindowClosingHandler() to warn the user when they are
 about to leave my app and loose their current state.  It works in
 Chrome and Firefox but in IE the handler is fired every time my app
 calls History.add().  Im not sure if its related to the fact that I
 have a Frame on the page.

 Any suggestions?
-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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 Screen in IE8 but Normal in FF3.5

2009-12-30 Thread jd
I am having exactly the same problem with 2.0.  Yes I am in standards
IE8 standards mode and the problem is fixed by changing to IE7
standards mode with the tag

meta http-equiv=X-UA-Compatible content=IE=7/

However, I have tested a simple DockLayoutPanel including a map (which
I thought could be the problem) and it all seems to work fine in IE8
standards mode - so there must be some other factor in my code that
prevents the DockLayoutPanel from displaying.  I am happy for now with
the meta tag but will try to figure out what the cause is some 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.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.




Re: Blank Screen in IE8 but Normal in FF3.5

2009-12-30 Thread jd
and to clarify... you mean they appear in FF and not IE right?

On Dec 26, 3:32 pm, Nomis nomis...@gmail.com wrote:
 Dear all,

 Just figured it out the problem was caused by using RootLayoutPanel.

 When I put all my content into RootLayoutPanel.get(), they appear only
 in IE but not Firefox.
 If I use RootPanel.get() instead, they appear in both browsers.

 Tho I don't quite understand the reasonale, but the problem is
 solved.  Thanks.

 Regards,
 Nomis

 On Dec 26, 2:18 pm, Nomis nomis...@gmail.com wrote:



  Hi,

  I am developing a project that contain just a single simple class.  I
  have been working on it with GWT 2.0 and FF3.5.  Today, I just wanna
  try it out inIE8.  After downloading the plugin and solve a problem
  of the plugin (http://code.google.com/p/google-web-toolkit/issues/
  detail?id=4358), I just got a blank screen inIE8

  Please help.

  Thanks,
  Nomis

--

You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: New layouts not playing nicely with Maps

2009-12-29 Thread jd
I had this problem a few months ago

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

and solved it with a callback which is more reliable than a timer
because it cancels any existing animation which might run past your
timeout.


root.animate(0, new AnimationCallback()
{
public void onLayout(Layer layer, double progress)
{
}

public void onAnimationComplete()
{
map.checkResizeAndCenter();
}
});

On Dec 22, 10:13 pm, Stuart stuartmoff...@gmail.com wrote:
 I am using UI binding to setup my app, so I needed a little extra
 tweak to Eric's code.

 If I placed the timer either before or after the createAndBindUi call
 in my widget containing the map, I was still experiencing the map UI
 rash Jeff and Andrew had.

 However, since my app also uses event handling (via gwt-dispatch), I
 was able to fire a custom RetrievedMap event at a place in the code
 when I know the app has completely finished UI binding (ie, the user
 clicks on a nav item to fetch map data, the app retrieves a success
 from the server, the app then fires the RetrievedMap event ). My
 docker widget containing the MapWidget listens for the RetrievedMap
 event, and so I tucked in Eric's timer code to the method handling the
 RetrievedMap event and it worked wonderfully.

 Phew. What I am trying to say is: if you are using UI binding, a plain
 Timer fix may not work because of arbitrary times that your UI may
 complete binding. Best to fire an event when you know the UI is
 completely loaded, and in handling the event run Eric's timer code.

 Stuart

 On Dec 21, 11:06 am, Andrew Winter andrewwinte...@gmail.com wrote:



  Thanks, Eric. The timer thing does exactly what I wanted.

  Andrew.

  On Dec 21, 12:54 pm, Eric Ayers zun...@google.com wrote:

   On Mon, Dec 21, 2009 at 6:19 AM, Andrew Winter andrewwinte...@gmail.com 
   wrote:
Hi,

I have the exact same problem as Jeff. One difference between Jeff's
case and Eric's case is that in Jeff's case, the dimensions of the map
are not known; in Eric's case the map is 400px by 500px. It seems this
problem occurs when the dimensions of the map are not known at build-
time.

I want my map to occupy the bottom-right corner of my UI (like Google
   Maps). When I use setSize(100%,100%), theMapWidgetis given the
correct size (the Google logo etc appear in the right place) but the
tiles don't cover the whole of the widget.

   The trick I used to schedule checkResizeAndCenter() in a timer
   callback solved that issue for me

When I provide an explicit
size, or resize the browser, the tiles are displayed correctly.

I don't really want to provide dimensions in pixels if I don't have
to. Is this the only way?

   In the past I've always recommended dimensions in pixels for best
   results.  You could hack around this by hooking into the resize event
   listener.

Thanks

Andrew.

On Dec 17, 6:44 pm, Eric Ayers zun...@google.com wrote:
Hi Jeff,

I played around with this and got it to work with these panels:

privateMapWidgetmap;

// GWT module entry point method.
 public void onModuleLoad() {
   Maps.loadMapsApi(null, null, false, new Runnable() {
 public void run() {
LatLng cawkerCity = LatLng.newInstance(39.509, -98.434);
 // Open a map centered on Cawker City, KS USA

map = newMapWidget(cawkerCity, 2);
 map.setSize(100%, 100%);
map.setUIToDefault();

   DockLayoutPaneldock = newDockLayoutPanel(Unit.PX);
dock.setHeight(600px);
 dock.setWidth(400px);
SplitLayoutPanel split = new SplitLayoutPanel();
 dock.add(split);
split.addNorth(map, 500);
split.setWidth(100%);
 split.setHeight(100%);
// Add the map to the HTML host page
 RootPanel.get().add(dock);
new Timer() {
public void run() {
 map.checkResizeAndCenter();

}
}.schedule(1);
 }
});
}
On Sat, Dec 12, 2009 at 3:51 AM, Jeff Schnitzer j...@infohazard.org 
wrote:
 Does anyone have the GWT Googlemapsworking inside the new Layout
 panels?

 My page is basically aDockLayoutPanelwhose main element is a
 SplitLayoutPanel whose main element is aMapWidget.  TheMapWidgetis
 set to 100% size.

 On startup, the map tiles are sized to a very small part of the area,
 although the grey background does seem to cover the entire space:

http://www.infohazard.org/~jeff/mapnolayout.png

 If I resize the browser window, the map quickly covers the whole area
 and starts to work normally.

 I've tried callingMapWidget.checkResize() and the LayoutPanel's
 forceLayout() methods but neither have an effect.  Any idea what I'm
 doing wrong?

 The code is super-simple:


Attaching an event handler to existing element

2009-12-28 Thread jd
Hi,

I have a page that contains a header div containing some anchors
defined in the html page.  My GWT code finds the header with
RootPanel.get(String) and adds it to a DockLayoutPanel.  I have tried
to attach click handlers to the links in the header like this:


header = RootPanel.get(header);
NodeListcom.google.gwt.dom.client.Element aes = 
header.getElement
().getElementsByTagName(a);
com.google.gwt.dom.client.Element item = aes.getItem(0);
Anchor anchor = Anchor.wrap(item);
anchor.addClickHandler(new ClickHandler()
{
public void onClick(ClickEvent event)
{
Window.alert(hi);
}
});

but get this exception


java.lang.AssertionError: A widget that has an existing parent widget
may not be added to the detach list
at com.google.gwt.user.client.ui.RootPanel.detachOnWindowClose
(RootPanel.java:136)
at com.google.gwt.user.client.ui.Anchor.wrap(Anchor.java:59)

Can anyone suggest how I should be approaching this situation?

Thanks,

John

--

You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: Development mode crashes Safari 4.0.4 in OS X 10.4

2009-12-10 Thread jd
I found the the Safari crash only occurs when the Inspector window is
open.  If you close it before reloading the page it does not crash on
my system.

On Dec 11, 12:17 pm, zinkronz network zinkr...@gmail.com wrote:
 yes.. i also face this problem ff and safari also crashed.. i just
 format my imac.. but still problem..

 i can view from another pc  Windows XP(in the same network LAN). looks like
 imac 10.4 have this problem... please help us in this matter



 On Thu, Dec 10, 2009 at 5:40 PM, Alex Reid alxs...@googlemail.com wrote:
  It also seems the Firefox plugin crashes, but Firefox now doesn't load
  at all with the plug-in enabled.

  On Dec 10, 10:21 am, Alex Reid alxs...@googlemail.com wrote:
   Hi,

   Is anyone running the new development mode successfully on OS X 10.4
   or is an upgrade to 10.5 or 10.6 needed? I know this machine is
   overdue at update.

   Unfortunately Safari is crashing with the following:

   Date/Time:      2009-12-10 10:17:11.037 +
   OS Version:     10.4.11 (Build 8S2167)
   Report Version: 4

   Command: Safari
   Path:    /Applications/Safari.app/Contents/MacOS/Safari
   Parent:  WindowServer [89]

   Version:        4.0.4 (4531.21.10)
   Build Version:  1
   Project Name:   WebBrowser
   Source Version: 45312110

   PID:    508
   Thread: Unknown

   Link (dyld) error:

   Symbol not found: _pthread_mutexattr_destroy$UNIX2003
     Referenced from: /Library/Internet Plug-Ins/gwt-dev.webplugin/
   Contents/MacOS/gwt-dev
     Expected in: /usr/lib/libSystem.B.dylib

   Model: MacPro1,1, BootROM MP11.005C.B04, 4 processors, Dual-Core Intel
   Xeon, 2.66 GHz, 2 GB
   Graphics: NVIDIA GeForce 7300 GT, NVIDIA GeForce 7300 GT, PCIe, 256
   MB 

   and Eclipse shows:

   Connection received from . :49498
      [WARN] Client connection lost
   java.io.EOFException
           at java.io.DataInputStream.readByte(DataInputStream.java:243)
           at
  com.google.gwt.dev.shell.BrowserChannel$Message.readMessageType
   (BrowserChannel.java:1131)
           at
  com.google.gwt.dev.shell.BrowserChannelServer.processConnection
   (BrowserChannelServer.java:248)
           at com.google.gwt.dev.shell.BrowserChannelServer.run
   (BrowserChannelServer.java:222)
           at java.lang.Thread.run(Thread.java:613)

   Would be interested to hear if anyone has worked around this on 10.4?

   Alex

  --

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




Anchor.wrap with GQuery

2009-12-08 Thread jd
Hi,

I am using GQuery to return elements that I want to attach
ClickHandlers to like this:


GQuery h2s = $(#header  h2  a);
Anchor lowestPriceAnchor = Anchor.wrap(h2s.get(0));

But I am getting an exception:


java.lang.AssertionError: A widget that has an existing parent widget
may not be added to the detach list
at com.google.gwt.user.client.ui.RootPanel.detachOnWindowClose
(RootPanel.java:136)
at com.google.gwt.user.client.ui.Anchor.wrap(Anchor.java:59)

Does anyone know what I am going wrong here?

Cheers,

John

--

You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: Very slow DevMode on Mac Leopard with GWT 2.0 RC2

2009-12-04 Thread jd
I am also using Leopard and the hang is over a minute before
anything starts to happen.

On Dec 4, 4:45 am, jvictor jeffvic...@gmail.com wrote:
 DevMode starts up quickly as you would expect inside the new eclipse
 console window and I receive the url to copy and paste into the
 browser.  The issue occurs as soon as I connect to DevMode from any
 browser.  Specifically, the browser seems to hang for about 20
 seconds and will then come back to life and my app performs normally
 from that point on.  If I do a reload of the browser I experience the
 same hanging for the same duration.  I have looked at the system
 activity monitor during this time and a java process is consuming all
 cpu.  Once the hanging is over, the java process returns to normal
 usage.

 I experience this issue with several different modules / projects
 including the default skeleton application created by GWT.

 At work I use a vanilla Ubuntu 9.04 installation and my experience
 with RC2 on that machine has shown that DevMode is very fast.
 Therefore, I suspect this has something to do with macs and java.

 On Dec 4, 5:36 am, Chris Ramsdale cramsd...@google.com wrote:



  Where are you seeing the slowness? Is it confined to initial module load (of
  a specific app maybe) or are you experiencing speed degradation across the
  board?

  On Thu, Dec 3, 2009 at 7:02 AM, jvictor jeffvic...@gmail.com wrote:
   Is anyone else experiencing *extremely* slow DevMode on a mac?  I'm
   using Leopard 10.5.8 with all of the updates and running DevMode with
   64 bit Java 6.  I experience the same slowness when using 32 bit Java
   5 as well.  I'm using 2.0 RC 2 and experience the problem using
   firefox 3.5.5 and 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.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.




Re: Very slow DevMode on Mac Leopard with GWT 2.0 RC2

2009-12-04 Thread jd
Also, the slowdown for me seems to be across the board.

Right now my CPU is very high and the busy thread is doing this:

Daemon Thread [Code server for rooms from Mozilla/5.0 (Macintosh; U;
Intel Mac OS X 10.5; en-US; rv:1.9.0.15) Gecko/2009101600 Firefox/
3.0.15 on http://localhost:/?gwt.codesvr=localhost:9997
@ :twjON0ofi:u+0] (Suspended)
Thread.currentThread() line: not available [native method]
ThreadLocalT.get() line: 124
StringCoding.deref(ThreadLocal) line: 49
StringCoding.encode(String, char[], int, int) line: 361
String.getBytes(String) line: 812
BrowserChannel.writeUtf8String(DataOutputStream, String) line: 1583
BrowserChannel$InvokeOnClientMessage.send() line: 866
BrowserChannelServer.invokeJavascript(CompilingClassLoader,
JsValueOOPHM, String, JsValueOOPHM[], JsValueOOPHM) line: 164
ModuleSpaceOOPHM.doInvoke(String, Object, Class?[], Object[]) line:
120
ModuleSpaceOOPHM(ModuleSpace).invokeNative(String, Object, Class?
[], Object[]) line: 507
ModuleSpaceOOPHM(ModuleSpace).invokeNativeInt(String, Object, Class?
[], Object[]) line: 240
JavaScriptHost.invokeNativeInt(String, Object, Class?[], Object[])
line: 75
Element$.getPropertyInt$(Element, String) line: not available
ResizableWidgetCollection.checkWidgetSize() line: 216
ResizableWidgetCollection$1.run() line: 125
ResizableWidgetCollection$1(Timer).fire() line: 141
GeneratedMethodAccessor36.invoke(Object, Object[]) line: not
available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 592
MethodAdaptor.invoke(Object, Object...) line: 103
MethodDispatch.invoke(JsValue, JsValue[], JsValue) line: 71
OophmSessionHandler.invoke(BrowserChannel, BrowserChannel$Value, int,
BrowserChannel$Value[]) line: 157
BrowserChannelServer
(BrowserChannel).reactToMessagesWhileWaitingForReturn(BrowserChannel
$SessionHandler) line: 1713
BrowserChannelServer.invokeJavascript(CompilingClassLoader,
JsValueOOPHM, String, JsValueOOPHM[], JsValueOOPHM) line: 165
ModuleSpaceOOPHM.doInvoke(String, Object, Class?[], Object[]) line:
120
ModuleSpaceOOPHM(ModuleSpace).invokeNative(String, Object, Class?
[], Object[]) line: 507
ModuleSpaceOOPHM(ModuleSpace).invokeNativeObject(String, Object,
Class?[], Object[]) line: 264
JavaScriptHost.invokeNativeObject(String, Object, Class?[], Object
[]) line: 91
Impl.apply(Object, Object, Object) line: not available
Impl.entry0(Object, Object, Object) line: 188
GeneratedMethodAccessor29.invoke(Object, Object[]) line: not
available
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
Method.invoke(Object, Object...) line: 592
MethodAdaptor.invoke(Object, Object...) line: 103
MethodDispatch.invoke(JsValue, JsValue[], JsValue) line: 71
OophmSessionHandler.invoke(BrowserChannel, BrowserChannel$Value, int,
BrowserChannel$Value[]) line: 157
BrowserChannelServer(BrowserChannel).reactToMessages(BrowserChannel
$SessionHandler) line: 1668
BrowserChannelServer.processConnection() line: 401
BrowserChannelServer.run() line: 222
Thread.run() line: 613


On Dec 4, 3:14 pm, jd jdpatter...@gmail.com wrote:
 I am also using Leopard and the hang is over a minute before
 anything starts to happen.

 On Dec 4, 4:45 am, jvictor jeffvic...@gmail.com wrote:



  DevMode starts up quickly as you would expect inside the new eclipse
  console window and I receive the url to copy and paste into the
  browser.  The issue occurs as soon as I connect to DevMode from any
  browser.  Specifically, the browser seems to hang for about 20
  seconds and will then come back to life and my app performs normally
  from that point on.  If I do a reload of the browser I experience the
  same hanging for the same duration.  I have looked at the system
  activity monitor during this time and a java process is consuming all
  cpu.  Once the hanging is over, the java process returns to normal
  usage.

  I experience this issue with several different modules / projects
  including the default skeleton application created by GWT.

  At work I use a vanilla Ubuntu 9.04 installation and my experience
  with RC2 on that machine has shown that DevMode is very fast.
  Therefore, I suspect this has something to do with macs and java.

  On Dec 4, 5:36 am, Chris Ramsdale cramsd...@google.com wrote:

   Where are you seeing the slowness? Is it confined to initial module load 
   (of
   a specific app maybe) or are you experiencing speed degradation across the
   board?

   On Thu, Dec 3, 2009 at 7:02 AM, jvictor jeffvic...@gmail.com wrote:
Is anyone else experiencing *extremely* slow DevMode on a mac?  I'm
using Leopard 10.5.8 with all of the updates and running DevMode with
64 bit Java 6.  I experience

[gwt-contrib] Bugs reported

2009-12-04 Thread jd
Hi All,

Over the last couple of months I've reported a few bugs to do with the
new Layout system that have got no comments or action.  I was just
wondering if it is enough to report them or if I need to raise them
here on this list too.

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

Cheers,

John

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


[gwt-contrib] Re: Bugs reported

2009-12-04 Thread jd
Nice one Joel!  Appreciate all the hard work.

On Dec 5, 1:19 am, Joel Webber j...@google.com wrote:
 Thanks, John. Reporting them should be enough, but bringing them up on this
 list is really helpful, especially as we're heads-down trying to finish 2.0.
 I'll have a look at these momentarily.



 On Fri, Dec 4, 2009 at 12:51 PM, jd jdpatter...@gmail.com wrote:
  Hi All,

  Over the last couple of months I've reported a few bugs to do with the
  new Layout system that have got no comments or action.  I was just
  wondering if it is enough to report them or if I need to raise them
  here on this list too.

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

  Cheers,

  John

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

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


RC2 and Eclipse Plugin

2009-12-03 Thread jd
Hi,

Can someone please post a definitive procedure to get RC2 working?  I
have tried many different pieces of advice from many different threads
and none have worked for me on my mac with Eclipse.

1 - Is it possible to use the Google Plugin's Web Application launch?

2 - Is it really necessary to install both RC1 and RC2 plugins Above
each other?

Thanks,

John

--

You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: RC2 and Eclipse Plugin

2009-12-03 Thread jd
Also,

3 - If I must create a normal launch what parameters are required?

4 - What should my workspace be set to to run both GWT and App Engine?

--

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

2009-11-20 Thread jd
One more thing of note is that DevMode in Eclipse then starts to take
close to 100% CPU.

--

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




Re: GWT 2.0 Javascript IE Crash

2009-11-20 Thread jd
I wonder if this is the bug that I am also seeing.  I am running
2.0RC2 and in IE6 also get an Illegal Argument error when I run it as
compiled JS.  From hosted mode this exception is thrown


com.google.gwt.core.client.JavaScriptException: (Error): Invalid
argument. number: -2147024809 description: Invalid argument. at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39) at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27) at
java.lang.reflect.Constructor.newInstance(Constructor.java:501) at
com.google.gwt.dev.shell.ModuleSpace.createJavaScriptException
(ModuleSpace.java:64) at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript
(BrowserChannelServer.java:157) at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke
(ModuleSpaceOOPHM.java:120) at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
509) at


stepping through the code my problem occurs in LayoutImplIE6 on the
line with the *


  public Element attachChild(Element parent, Element child, Element
before) {
if (!isIE6) {
  return super.attachChild(parent, child, before);
}

DivElement container = Document.get().createDivElement();
*container.insertBefore(child, before);


It works fine in IE7, 8, Safari and Firefox

--

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




[gwt-contrib] Re: DockLayoutPanel and Maps

2009-11-19 Thread jd
Just wanted to update this example by noting that with the recent
changes this workaround no longer works.  This is because the calls to
layout() are now delayed and scheduled after the current code
executes.  I had to do this to get the map to layout correctly:


root.animate(0, new AnimationCallback()
{
public void onLayout(Layer layer, double progress)
{
}

public void onAnimationComplete()
{
map.checkResizeAndCenter();
}
});


John


On Oct 6, 2:09 am, Joel Webber j...@google.com wrote:
 Thanks for letting me know about this. I'll follow up on that thread.



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


Re: Help - laying out contents on a page

2009-11-18 Thread jd
You can also just use a FlowPanel with gives you a div which you can
then style using css.  i.e. create 3 divs for each column and float
each to the left to stack them horizontally.

On Nov 18, 1:16 pm, nick_name acharya@gmail.com wrote:
 Hi,
 I am a noob and am trying to draw something like below on the screen.

 FIRST                           SECOND                             THIRD

 String1         : String        String1          : String          String1    
           : String
 String2         : String        String2               : String     String2    
           : String
 String_long3      : String      String3_long     : String          String3    
           :
 String

 There are 3 columns of data and each column has 3 rows each. The thing
 is, I am not able to get the alignment between columns. Should I use
 HTMLTable or something else? plz help.

 Thanks.

--

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




Re: Problem inserting Widget in DockLayoutPanel

2009-11-17 Thread jd
I filed a report and included the fix.

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

On Nov 7, 3:51 pm, jd jdpatter...@gmail.com wrote:
 Hi,

 I insert and widget into a DockLayoutPanel but the other widgets are
 not redrawn correctly.  I can see that this is because the inserted
 widget is added to the end of the child widget collection and during
 layout() its dimensions are not considered until last.

 Should this line:

   protected void insert(Widget widget, Direction direction, double
 size,  Widget before) {

 ...

     // Logical attach.
     getChildren().add(widget);

 be an insert() instead of an add()?

--

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




Problem inserting Widget in DockLayoutPanel

2009-11-07 Thread jd

Hi,

I insert and widget into a DockLayoutPanel but the other widgets are
not redrawn correctly.  I can see that this is because the inserted
widget is added to the end of the child widget collection and during
layout() its dimensions are not considered until last.

Should this line:


  protected void insert(Widget widget, Direction direction, double
size,  Widget before) {

...

// Logical attach.
getChildren().add(widget);

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



Re: how to resize a DockLayoutPanel pane using gwt 2.0 and uibinder

2009-11-07 Thread jd

Here is a subclass I made to expose some functionality that might help
you

class ResizableDockLayoutPanel extends DockLayoutPanel
{
public ResizableDockLayoutPanel(Unit unit)
{
super(unit);
}

public double getWidgetSize(Widget widget)
{
return ((LayoutData) widget.getLayoutData()).size;
}

public void setWidgetSize(Widget widget, double size)
{
((LayoutData) widget.getLayoutData()).size = size;
}

@Override
public void insert(Widget widget, Direction direction, double 
size,
Widget before)
{
super.insert(widget, direction, size, before);
}
}

On Nov 6, 8:00 pm, gkb gkb...@gmail.com wrote:
 Hello all.

 I have a question concerning how to access/modify the size of a
 DockLayoutPanel's widget outside of the *.ui.xml file in the java
 code.

 For instance, say I have a DockLayoutPanel with a West widget and a
 Center widget as follows:
 {{{
 g:DockLayoutPanel unit='EM'
     g:west size='20'
        layouts:WestWidget ui:field='westWidget' /
     /g:west
     g:center
       layouts:CenterWidget ui:field='centerWidget' /
     /g:center
   /g:DockLayoutPanel}}}

 Is it possible to dynamically change the width of the westWidget
 somewhere in the associated java code, or can it only by modified in
 the *.ui.xml file.

 The problem is, I would like to be able to hide/show the westWidget
 and have the centerWidget fill the remaining space dynamically when
 the app is running,
 but changing the width of westWidget in the java code has no effect on
 the width of the West Pane of the DockLayoutPanel that was hard-coded
 in, there is a disconnect between them.

 Any help would be greatly appreciated.

 Sincerely,

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



DockLayoutPanel and YUI

2009-10-04 Thread jd

Hi,

I am using DockLayoutPanel and have found that it seems to be
imcompatible with YUI Grids.

Specifically, when I include this on my page:

link rel=stylesheet type=text/css href=http://yui.yahooapis.com/
2.8.0r4/build/grids/grids-min.css

The page does not layout correctly in IE6.  In Safari 4.0 it seems to
work fine.

The internal layers appear to be offset of the right or not visible
at all.

This is not a big issue for me as I don't need to use YUI grids now
anyway... it was just a left over from using reset-fonts-grids of
which I only want the reset and fonts part.  Just thought I would
mention it.

Cheers

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



Re: DockLayoutPanel and YUI

2009-10-04 Thread jd

... and while I am bashing IE6 - I found another issue:

When DockLayoutPanel is set to use Unit.EM I found that a child in the
east overlapped with the centre child by about 10 px.  When I changed
to Unit.PX it works OK.  Again, in Safari Unit.EM worked fine.

Bring on Chrome Frame!

On Oct 4, 2:42 pm, jd jdpatter...@gmail.com wrote:
 Hi,

 I am using DockLayoutPanel and have found that it seems to be
 imcompatible with YUI Grids.

 Specifically, when I include this on my page:

         link rel=stylesheet type=text/css href=http://yui.yahooapis.com/
 2.8.0r4/build/grids/grids-min.css

 The page does not layout correctly in IE6.  In Safari 4.0 it seems to
 work fine.

 The internal layers appear to be offset of the right or not visible
 at all.

 This is not a big issue for me as I don't need to use YUI grids now
 anyway... it was just a left over from using reset-fonts-grids of
 which I only want the reset and fonts part.  Just thought I would
 mention it.

 Cheers

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



[gwt-contrib] Re: DockLayoutPanel and Maps

2009-10-04 Thread jd

I found an issue using DockLayoutPanel with YUI grids.

Just double posting here as Joel is listening...

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/56eae8aff7502287

On Sep 29, 8:52 pm, Joel Webber j...@google.com wrote:
 That makes sense. RequiresResize was created for precisely this kind of
 scenario, where a widget simply can't work properly without knowing when it
 has been resized. It doesn't actually cause the widget to be any *more* broken
 if you fail to call onResize(), but it serves as a hint to the developer
 that this is required, and will cause panels that implement ProvidesResize
 to automatically call onResize() for their children that require it.



 On Tue, Sep 29, 2009 at 6:49 AM, Eric Ayers zun...@google.com wrote:

  I'll look into implementing RequiresResize, I created an issue:

   http://code.google.com/p/gwt-google-apis/issues/detail?id=308

  The problem with the map not refreshing properly and having to call
  checkResizeAndCenter() immediately after creating it has been around a
  long time and there is a FAQ up for it.  I hope this works. Having a
  way to automatically compensate would take some pain out of creating
  maps applications!

  On Sep 29, 12:29 am, Joel Webber j...@google.com wrote:
   Having MapWidget implement RequiresResize would seem to be the right
   approach. I can see how the maps code would need to be informed when it
  is
   resized, as it needs to create the appropriate number of tiles on each
  axis.
   Does this sound reasonable to you, Eric?

   On Mon, Sep 28, 2009 at 9:18 PM, jd jdpatter...@gmail.com wrote:

Yeah sorry I was not sure if this was more of a development topic or
typical user problem.

I tried your suggestion of map.checkResizeAndCenter() and it works
perfectly.  It also seems a better solution than my original
SimplePanel place holder.

It seems that the Google map object initializes its size as soon as it
is added to the document.  Perhaps MapWidget could also implement
RequiresResize?

So now a working example is:

       public void onModuleLoad()
       {
               DockLayoutPanel p = new DockLayoutPanel(Unit.PX);
               p.addNorth(new HTML(north), 100);
               p.addSouth(new HTML(south), 100);
               p.addEast(new HTML(east), 100);
               p.addWest(new HTML(west), 100);

               MapWidget map = new MapWidget(LatLng.newInstance(-41.1,
174.8), 5);
               p.add(map);

               p.layout();

               RootLayoutPanel rp = RootLayoutPanel.get();
               rp.add(p);

                rp.layout();

               map.checkResizeAndCenter();
       }

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



Extending DatePicker

2009-10-03 Thread jd

Hi,

I have extended DatePicker so that a date range can be selected on one
widget.  The current range is between the last two date selections and
when a date is highlighted all dates between the last selection and
the current highlighted date are emphasized.

It almost works.  The problem I am having is that HighligtEvents are
sent twice for every date, mouse-over and mouse-out, EXCEPT when a
date from another month is chosen (i.e. a date in November when the
current month is October).  In this case the HighlightEvent for the
mouse-out are missed and the also the event for the highlight of the
current date in the new month is missed.

What would help me is:

1 - if there were a way to know if the HighlightEvent was caused by
mouseover or mouseout (or separate events)
2 - when the month is changed (by clicking on a filler date) the
HighlightEvent should be fired for the new date that the mouse happens
to hover above.

For reference here is my code:

public class RangeDatePicker extends Composite
{
private static final String RANGE_STYLE = range;
private static final String POTENTIAL_STYLE = potential;
private static final long DAY = 1000 * 60 * 60 * 24;
private Date first;
private Date second;

public RangeDatePicker()
{
final DatePicker picker = new DatePicker();
picker.addHighlightHandler(new HighlightHandlerDate()
{
private Date last;

public void onHighlight(HighlightEventDate event)
{
GWT.log(Highlight  + event.getHighlighted() + 
  +
picker.getHighlightedDate(), null);
if (second != null)
{
// normally the same date is fires 
twice - for mouse-over and
mouse-out
RangeDate range = new 
RangeDate(second, event.getHighlighted
());
if (last != null  
last.equals(event.getHighlighted()))
{
// this is a mouse-out so 
remove highlights

picker.removeStyleFromDates(POTENTIAL_STYLE, newDateRangeIterable
(range));
}
else
{
// this is a mouse-over so add 
the highlights

picker.addStyleToDates(POTENTIAL_STYLE, newDateRangeIterable
(range));
}

last = event.getHighlighted();
}
}
});

picker.addValueChangeHandler(new ValueChangeHandlerDate()
{
public void onValueChange(ValueChangeEventDate event)
{
RangeDate range = getDateRange();
if (range != null)
{

picker.removeStyleFromDates(RANGE_STYLE, newDateRangeIterable
(range));
}

// this will change the date range
addSelectedDate(event.getValue());

range = getDateRange();
if (range != null)
{

picker.removeStyleFromDates(POTENTIAL_STYLE, newDateRangeIterable
(range));
picker.addStyleToDates(RANGE_STYLE, 
newDateRangeIterable(range));
}
}
});

initWidget(picker);
}


protected IterableDate newDateRangeIterable(RangeDate range)
{
ArrayListDate iterable = new ArrayListDate();
for (Date d = range.getFrom(); !d.after(range.getTo()); d = new 
Date
(d.getTime() + DAY))
{
iterable.add(d);
}
return iterable;
}

protected void addSelectedDate(Date value)
{
first = second;
second = value;
}

public RangeDate getDateRange()
{
if (first != null)
{
return new RangeDate(first, second);
}
else
{
return null;
}
}
}

Thanks,

John

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.

Re: GWT state management across multiple page/modules.

2009-10-03 Thread jd

Hi,

I believe what you are after is Code Splitting
http://code.google.com/p/google-web-toolkit/wiki/CodeSplitting

This is in trunk now and will be included in the upcoming 2.0
release.  I am using it in trunk now and it seems very stable.

If you're not willing to move to trunk or wait for the 2.0 release you
could try using the window name hack where you can store large
amounts of data between pages serialized in the window name.

John

On Oct 2, 11:51 pm, AndrewG andrew.g...@rcrt.co.uk wrote:
 I tried posing this before - no luck - so I am trying again.

 I am looking at modifying a (largely) JSF-based web application to use
 GWT. I have done some preliminary experiments which have been quite
 successful so far - in providing a richer UI and better user
 experience.

 The main issue that I see at the moment is that the current
 application has approx 100 pages of one sort of another (many are
 light-weight - but not always simple - 'popup' editor forms for back-
 end data).

 The structure of the UI - redesigned for GWT - would be a bit
 different - making use of being able to dynamically switch page
 content - rather than using a reasonably big web page hierarchy.

 Given the number of features to migrate - the final structure and
 migration path are a bit of a concern.

 Common sense suggests that it may not be a good idea to try to produce
 a gwt 'monster app' module containing the whole UI - but instead make
 it more modular. Current thinking is that the new design should
 consist of a number of different pages - each containing the
 equivalent functionality of perhaps 5-10 of the original web pages. A
 horizontal main menu at the top would allow switching between these
 pages - each of which would correspond to a different set of app
 functionality - built into a gwt module.

 Each gwt 'mini app' module would run on its own web page - so none of
 these would be too large - and they could be developed one at a time -
 and integrated into the existing app - replacing the corresponding set
 of old jsf-based web pages.

 I have tested this for two of these 'mini-apps' modules - and it works
 quite nicely. The obvious problem going forward is how to track/manage
 state in each of these modules when users navigate between them. For
 example, the 'current' page might contain a series of trees/tables etc
 - and the user navigates away from the web page hosting that app/
 module - and then back again - it will not be in the state that he
 left it (but in its fresh state).

 There are obviously a number of different ways to tackle this (from
 client side cookies to server side backing beans, etc) - but is there
 a 'proper' way to do it within the context of gwt - ie one that the
 gwt framework is designed to support easily ? - I suspect that there
 ought to be - but I have only just started with gwt - so not sure
 myself.

 Any informed opinions would be appreciated.

 thx

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



Hosted Mode very slow on Mac

2009-09-30 Thread jd

Hi,

I am using gwt trunk with Eclipse on a os x leopard and find that the
hosted mode is almost too slow to use.  For example, clicking on a
StackLayoutPanel header to change panels causes both Firefox and
Safari to freeze and the CPU pegs close to 100% for about 10 seconds.

Is this unusual or related to the hosted mode UI freezing up due to
the -XStartOnFirstThread bug?  I haven't profiled it yet to see where
the issue is but the fact that it occurs on the stack panel switch
shows it is not related to RPC.

Thanks,

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



[gwt-contrib] Re: DockLayoutPanel and Maps

2009-09-28 Thread jd

I have found the issue and am not sure how to fix it using the current
API.  After setting 100% height and width on both the DockLayoutPanel
and RootLayoutPanel the map still reported a span of 0 and did not
render correctly.  In Safari's Inspector I could see that the only
element without 100% height and width was the generated layout
parent element but after changing this in using the inspector it
worked.

So I think I need to be able to access the Layout.parentElem to modify
its style.

On Sep 28, 5:43 pm, jd jdpatter...@gmail.com wrote:
 Hi,

 I am trying to use the new DockLayoutPanel with a Google map in the
 center panel which takes up what ever space remains.  The map does not
 render properly due to not being able to figure out its dimensions.  I
 have modified the sample below to demonstrate this by adding a map
 with 100% height and width.

 public class DockLayoutPanelExample implements EntryPoint {

   public void onModuleLoad() {
     // Attach five widgets to a DockLayoutPanel, one in each
 direction. Lay
     // them out in 'em' units.

           final MapWidget map = new MapWidget(LatLng.newInstance(50, 50), 8);
           map.setWidth(100%);
           map.setHeight(100%);

           map.addMapMoveEndHandler(new MapMoveEndHandler()
           {
                 public void onMoveEnd(MapMoveEndEvent event)
                 {
                         Window.alert(map.getBounds().toString());
                 }
           });

     DockLayoutPanel p = new DockLayoutPanel(Unit.EM);
     p.addNorth(new HTML(north), 2);
     p.addSouth(new HTML(south), 2);
     p.addEast(new HTML(east), 2);
     p.addWest(new HTML(west), 2);
     p.add(map);

     // Note the explicit call to layout(). This is required for the
 layout to
     // take effect.
     p.layout();

     // Attach the LayoutPanel to the RootLayoutPanel. The latter will
 listen for
     // resize events on the window to ensure that its children are
 informed of
     // possible size changes.
     RootLayoutPanel rp = RootLayoutPanel.get();
     rp.add(p);

     // The RootLayoutPanel also requires that its layout() method be
 explicitly
     // called for the initial layout to take effect.
     rp.layout();
   }

 }

 I believe the map needs to be able to figure out its exact height and
 width in pixels.

 Can anyone suggest an approach to get around this problem?

 Thanks,

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



[gwt-contrib] Re: DockLayoutPanel and Maps

2009-09-28 Thread jd

Actually I think that was a red herring - setting the parentElem style
just forced a re-render and changing the map size had the same effect.

I think the problem is due to the map trying to initialize itself
before layout() is called.  If I add a holder panel like this:

SimplePanel holder = new SimplePanel();
p.add(holder);

and then add the map after layout() like:

p.layout();

MapWidget map = new MapWidget(LatLng.newInstance(50, 50), 8);
map.setWidth(100%);
map.setHeight(100%);
holder.add(map);

it works.

I have one question about threading in the browser - I have used YUI
LayoutManager which is very similar to DockLayoutPanel.

http://developer.yahoo.com/yui/examples/layout/nested_layout.html

If you want to nest layouts or use a map inside a layout you need to
register a listener for an onrender event. When I asked why, Dave
Glass said that although the JS is single threaded, the DOM elements
will not be created by serially so you must wait until the event fires
before you can safely layout nested items that depend on the parent
layout.

Could this be a problem here also?

Thanks,

John

On Sep 28, 7:06 pm, jd jdpatter...@gmail.com wrote:
 I have found the issue and am not sure how to fix it using the current
 API.  After setting 100% height and width on both the DockLayoutPanel
 and RootLayoutPanel the map still reported a span of 0 and did not
 render correctly.  In Safari's Inspector I could see that the only
 element without 100% height and width was the generated layout
 parent element but after changing this in using the inspector it
 worked.

 So I think I need to be able to access the Layout.parentElem to modify
 its style.

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



StatusCodeException with no message

2009-09-22 Thread jd

Hi,

I am getting a StatusCodeException caught on the client in hosted mode
but the message is an empty string.  I have put a breakpoint in the
servlet in doUnexpectedFailure but it is never hit and nothing is
logged in the Eclipse console or the hosted mode console.

Thanks,

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



Serverside html generation with GWT Panels

2009-08-17 Thread jd

Hi,

I was wondering if anyone has looked into whether it is possible to
replace the com.google.gwt.user.client.DOM implementation so that the
same client side code could be used to generate static html on the
server?

Cheers,

John

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



[gwt-contrib] Re: Async interface black magic

2009-08-03 Thread jd

I can see that allowing the above would still not solve the async,
single threaded  nature of ajax calls.

But there must be some way to reuse the Service interface on the
client.

Perhaps compiling a call to a Service interface could be implemented
in JavaScript like this:

Java:
StockPrice[] prices = stockPriceSvc.getPrices();
Window.alert(first bit done);
try {
  MyResult result = anotherService.doSomehingWithPrices(prices);
  Window.alert(all done + result);
}
catch (RemoteException re) {
  Window.alert(Oops  + re.getMessage());
}

JavaScript:
function firstBit() {
  callAsync(stockPrice, secondBit);
}

function secondBit(var prices) {
  alert(first bit done);
  try {
callAsync(anotherService, thirdBit);
  }
  catch (e) {
alert(Opps + e.description);
  }
}

function thirdBit(var result) {
  alert(all done + result);
}


This would give the appearance of multi-threaded code.

I am interested to hear why this would never work in practice ;)

Cheers,

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



[gwt-contrib] Async interface black magic

2009-08-02 Thread jd

Hi,

I am just getting started on GWT and one of the things that strikes me
is the amount of error prone black magic involved in creating an Async
interface.  Sure tools can help you keep it in sync with your Service
interface but something seems wrong with it.

This may be naive but I was wondering if something like the new
GWT.runAsync might be useful here?  You could completely remove the
need for the Async interface with code like this:

GWT.runAsync(new Runnable()
{
public void run()
{
try
{
StockPrice[] prices = stockPriceSvc.getPrices
(stocks.toArray(new String[0]));
usePrices(prices);
}
catch (RemoteException re)
{
Window.alert(oops);
}
});

The stockPriceSvc would implement StockPriceService rather than
StockPriceServiceAsync.  You also would not need the onFailure and
onSuccess

I imagine I am overlooking something!

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



RPC Serialization Issue - Enumerated Types (GWT 1.5.3)

2009-05-29 Thread JD

I recently added an attribute to a class (model) that gets serialized
as part of an RPC call.

The attribute I added (with setters and getters) is a java.util.List
containing my enum type.

The List gets put into a Map similar to myMap.put(SomeKey,
ListMyEnumType);

When I make the RPC call I get serialization errors.  I've scoured the
net looking for solutions but haven't found any ones that directly
address this issue.

I think the issue is that the List is nested inside a Map and GWT (at
least the 1.5.x branch) doesn't support this correctly.

Other than moving to the 1.6.x branch of GWT, which I cannot do right
now, does anybody know what is going on and if this is a known issue
off of the 1.5.x branch of GWT?

Thanks,

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