Re: Driver Best Practices with CheckBox and RadioButtons

2010-11-14 Thread Craigo
I'm also confused as to why ListBox wasn't updated to work with the
Editor.

I can't see how ValueListBox would ever be able to take g:item, or
anything else, as it doesn't have a zero arg constructor, so it needs
@UiField(provided=true).

The only way I've managed to give it values is in code, by calling
setAcceptableValues.


On Nov 12, 10:40 pm, Jerome C. jerome.ca...@gmail.com wrote:
 I'm confused with thisValueListBox.

 I don't understand differences between ListBox andValueListBox.

 Moreover, why ListBox is not editable directly with Editor mechanism ?

 I've got a ListBox working with uibinder but I can't make it work with
 Editor (because it does not implement Editor).
 I can't makeValueListBoxwork with uibinder.

 How can we bindValueListBoxwith g:item in uibinder ?

 Lot of questions but the new GWT editor feature is not very clear in
 documentation...

 On 11 nov, 13:50, Geraldo Lopes geraldo...@gmail.com wrote:







  Thomas,

  Thanks for the information. That was my 1st shoot with Editor
  framework.

  Regards,

  Geraldo

  On 11 nov, 10:35, Thomas Broyer t.bro...@gmail.com wrote:

   On 10 nov, 14:42, Geraldo Lopes geraldo...@gmail.com wrote:

will0,

Thanks for the code piece. I used it to make an extension ofListBox.

public class MyListBox extendsListBoximplements
LeafValueEditorString {

   I think you basically 
   reinventedValueListBox:http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...

   (and if you want to use a CellList, you can use ValuePicker)

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

2010-11-14 Thread Craigo
FYI:  I'm using Geraldo solution above (minus the @Override
statements), as it is much easier to integrate it with the UIBinder
then the ValueListBox.  Thanks Geraldo!


On Nov 15, 10:51 am, Craigo craig...@gmail.com wrote:
 I'm also confused as to why ListBox wasn't updated to work with the
 Editor.

 I can't see how ValueListBox would ever be able to take g:item, or
 anything else, as it doesn't have a zero arg constructor, so it needs
 @UiField(provided=true).

 The only way I've managed to give it values is in code, by calling
 setAcceptableValues.

 On Nov 12, 10:40 pm, Jerome C. jerome.ca...@gmail.com wrote:







  I'm confused with thisValueListBox.

  I don't understand differences between ListBox andValueListBox.

  Moreover, why ListBox is not editable directly with Editor mechanism ?

  I've got a ListBox working with uibinder but I can't make it work with
  Editor (because it does not implement Editor).
  I can't makeValueListBoxwork with uibinder.

  How can we bindValueListBoxwith g:item in uibinder ?

  Lot of questions but the new GWT editor feature is not very clear in
  documentation...

  On 11 nov, 13:50, Geraldo Lopes geraldo...@gmail.com wrote:

   Thomas,

   Thanks for the information. That was my 1st shoot with Editor
   framework.

   Regards,

   Geraldo

   On 11 nov, 10:35, Thomas Broyer t.bro...@gmail.com wrote:

On 10 nov, 14:42, Geraldo Lopes geraldo...@gmail.com wrote:

 will0,

 Thanks for the code piece. I used it to make an extension ofListBox.

 public class MyListBox extendsListBoximplements
 LeafValueEditorString {

I think you basically 
reinventedValueListBox:http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...

(and if you want to use a CellList, you can use ValuePicker)

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: Help: Development of large App with GWT

2010-10-04 Thread Craigo
AJAX!  Make a whole bunch of client / server calls, and tell people
you didn't write a single line of JavaScript.  It was all generated!

On Oct 3, 11:37 pm, Noor baken...@gmail.com wrote:
 Thanks Craigo,
 what u said is true. However, I need some features which I can place
 in my applications to show how GWT makes things easy and speedy and
 most important what makes it different when it is finally deployed on
 the server.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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: Help: Development of large App with GWT

2010-10-03 Thread Craigo
This sums it up nicely:  http://code.google.com/webtoolkit/overview.html

...with an emphasis on not needing to know JavaScript (in particular
AJAX).  GWT = Awesome!


On Oct 3, 11:10 am, Noor baken...@gmail.com wrote:
 Hi to all, I want some help from u. Many times, I have posted this
 topic on google discussion and many have helped me. Thanks for this.

 The fact is that I got a dissertation in which I have to demonstrate
 the power of GWT. To demonstrate this, I must create an application.
 So the question, which part of GWT should I exploit the most to show
 this?? Because on the market, there are many other frameworks for
 developing rich internet application. How can I make GWT standout of
 these existing frameworks.

 Please, if u've got any idea, just place it on the discussion, this
 would greatly help me

 Regards to all
 Noor

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

2010-07-29 Thread Craigo
With 6 developers, we used GWT to develop on online lending
application.  GWT was used as the front end, and it seamlessly plugged
into the back end software via Spring.  The developers were already
skilled in Java, so the uptake of GWT was painless.  Development was
completed within a few weeks, and is now up and running without any
problems.  Everyone is happy, developers, business, and users.

As a side project, I'm also using GWT to create a AJAX VNC viewer.
Which shows just how flexible GWT is.


On Jul 29, 12:56 pm, sakesun roykiatisak sake...@gmail.com wrote:
 Besides praising, could anybody please give some short story of your
 experience with GWT ?
 What kind of project are you working on ? How large is the project  team?
 What is the typical work process ? What tool do you find essential in
 working with GWT ?
 Does GWT compile speed cause you any inconvenience ?

 I'm merely a antique desktop application developer who looking for a sane
 method to develop
 boring, enterprise-like, web-based, database application. I've tried a lot
 of stuffs, but none seem
 to convince me that my quality of life will be better than using my age old
 tools.

 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: Mouse Over Image

2010-07-22 Thread Craigo
The PopupPanel.showRelativeTo(UIObject) method is handy for this.

On Jul 22, 3:10 pm, abhiram wuntakal abhir...@gmail.com wrote:
 Hi,

   I had implemented a very similar functionality, where I had to display a
 label as soon as there is a mouse-over on the image and where there a
 mouse-out, the label had to disappear. This is what I did.

   defined an image at a position fixed Rootpanel.
   defined a html(instead of a label) at the centre of the image (as per x,y
 coordinates)
   initially made it setvisible(false) just the was u did
   for a mouse-over set the html visibility true
   for a mouse-out set the html visibility false.

 This worked perfectly fine for me. i guess the trick is to use the HTML
 widget instead of the label, although u will get all the properties of the
 label with that. use this and it will work fine.

 let me know if u need any other info

 ~ Abhiram



 On Thu, Jul 22, 2010 at 9:41 AM, nacho vela.igna...@gmail.com wrote:
  Hi, thanks both.

  The problem was that i was using this javascript library
 http://www.netzgesta.de/reflex/with that image and the reflection
  script was modifing the image widget html generated by gwt.

  On the other hand i'm using a label because i'm building a gwt-apple-
  like-dock so the simple title of an image wasn't be usefull for me.

  On 21 jul, 18:11, cokol eplisc...@googlemail.com wrote:
   as lineman already written, you first have to add the label widget to
   the DOM ,you could do it just after setting label to hidden. Then
   you also have to give the widget the property position: absolute
   in your case you could also use tooltips over widgets, they are better
   fitted since they know where to show if, i.e. the target widget (like
   your bin) is near to the edge of the screen, then the tooltip would be
   placed in a position that is readible.

   in its simplest way you could use the setTitle() on any control, which
   would popup a simple text after a user holds with a mouse, a tooltip
   (in GWT vanilla its called PopupPanel) can take any widget, like HTML
   or image or whatsoever...

   br,

   On 21 Jul., 22:22, lineman78 linema...@gmail.com wrote:

I believe you need to use the add(Widget, x, y) method on root panel
when you add it in the first place so that it sets it as position
absolute.  Why not just use the alt text on an image(setTitle)?  It is
a lot less work and is accessable, meaning the alt text is what screen
readers look to in order to describe an image for a blind person.

On Jul 21, 2:16 pm, nacho vela.igna...@gmail.com wrote:

 Hi, i want to do the following, i want to display a label when the
 user passes the mouse over the image and i want to hide the label
  when
 the user takes out the mouse from the image. Just like a toolkit.

 What i did is the following, what am i missing?

 final Label lblRecyclerBin = new Label(Recycler Bin);
                 lblRecyclerBin.setVisible(false);

                 RootPanel.get().add(lblRecyclerBin);

                 final Image imgRecyclerBin = new
  Image(images/icons/trashcan.png);
                 imgRecyclerBin.setHeight(40px);
                 imgRecyclerBin.setWidth(40px);
                 imgRecyclerBin.setStylePrimaryName(reflex);

                 imgRecyclerBin.addMouseOverHandler(new
  MouseOverHandler() {
                         public void onMouseOver(MouseOverEvent arg0)
  {
                                 lblRecyclerBin.setVisible(true);

  RootPanel.get().setWidgetPosition(lblRecyclerBin,
 imgRecyclerBin.getAbsoluteLeft(), imgRecyclerBin.getAbsoluteTop());
                         }
                 });

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post 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: How to vertically center content inside an HTMLPanel

2010-07-22 Thread Craigo
http://lmgtfy.com/?q=vertical+align+page  :-)

On Jul 22, 2:01 pm, David Vree david.h.v...@gmail.com wrote:
 Newbie here -- struggling to get my HTML text and button to be
 vertically centered within my HTMLPanel.  I am using UI binder and
 tried applying a style:

 vertical-align: middle;

 But to no avail!

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

2010-07-20 Thread Craigo
Hi all,

Want to add a Menu Item Separator to a Menu Bar using the UiBinder?
Here is a workaround.

It is not possible to do this:
g:MenuBar vertical=true
  g:MenuItemFirst Menu Bar Item/g:MenuItem
  g:MenuItemSeparator/g:MenuItemSeparator
  g:MenuItemLast Menu Bar Item/g:MenuItem
/g:MenuBar

As only MenuItems are allowed in the MenuBar, however, a cheeky
workaround is to make a MenuItem look like a MenuItemSeparator, like
this:

g:MenuItem styleName=gwt-MenuItemSeparatordiv
class=menuSeparatorInner/div/g:MenuItem

So your code will be this:
g:MenuBar vertical=true
  g:MenuItemFirst Menu Bar Item/g:MenuItem
  g:MenuItem styleName=gwt-MenuItemSeparatordiv
class=menuSeparatorInner/div/g:MenuItem
  g:MenuItemLast Menu Bar Item/g:MenuItem
/g:MenuBar


If anyone has a better way, please post.

Thanks.

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



How to add a MenuItemSeparator using the UiBinder

2010-07-20 Thread Craigo
Hi all,

Only MenuItems are allowed in the MenuBar, so it is not possible to do
this:
g:MenuBar vertical=true
  g:MenuItemFirst Menu Bar Item/g:MenuItem
  g:MenuItemSeparator/g:MenuItemSeparator
  g:MenuItemLast Menu Bar Item/g:MenuItem
/g:MenuBar

However, a cheeky workaround is to make a MenuItem look like a
MenuItemSeparator, like this:
g:MenuItem styleName=gwt-MenuItemSeparatordiv
class=menuSeparatorInner/div/g:MenuItem

So your code will be this:
g:MenuBar vertical=true
  g:MenuItemFirst Menu Bar Item/g:MenuItem
  g:MenuItem styleName=gwt-MenuItemSeparatordiv
class=menuSeparatorInner/div/g:MenuItem
  g:MenuItemLast Menu Bar Item/g:MenuItem
/g:MenuBar

If anyone has a better way, please post.

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: How to add a MenuItemSeparator using the UiBinder

2010-07-20 Thread Craigo
FYI:  The GWT menus don't seem to work on Android phones (and possibly
others).  Probably better to go with standard CSS menus like these
ones:  http://www.lwis.net/free-css-drop-down-menu/


On Jul 21, 10:14 am, Craigo craig...@gmail.com wrote:
 Hi all,

 Only MenuItems are allowed in the MenuBar, so it is not possible to do
 this:
 g:MenuBar vertical=true
   g:MenuItemFirst Menu Bar Item/g:MenuItem
   g:MenuItemSeparator/g:MenuItemSeparator
   g:MenuItemLast Menu Bar Item/g:MenuItem
 /g:MenuBar

 However, a cheeky workaround is to make a MenuItem look like a
 MenuItemSeparator, like this:
 g:MenuItem styleName=gwt-MenuItemSeparatordiv
 class=menuSeparatorInner/div/g:MenuItem

 So your code will be this:
 g:MenuBar vertical=true
   g:MenuItemFirst Menu Bar Item/g:MenuItem
   g:MenuItem styleName=gwt-MenuItemSeparatordiv
 class=menuSeparatorInner/div/g:MenuItem
   g:MenuItemLast Menu Bar Item/g:MenuItem
 /g:MenuBar

 If anyone has a better way, please post.

 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: Synchronous Calls with RPC??

2010-06-09 Thread Craigo
+1.

When the user presses load / submit / ... on my app, I enable the
glass pane, and they have to wait until the submit has completed
successfully.  I see nothing wrong with this approach:

PopupPanel loadingDialog = new PopupPanel();
loadingDialog.setWidget(loadingImageAnimation);
loadingDialog.setGlassEnabled(true);
loadingDialog.center();

.. do the work

onSuccess and onFailure callback
loadingDialog.hide();



On Jun 10, 9:28 am, Carl Pritchett bogusggem...@gmail.com wrote:
  Your proposal is interesting. But as a user, if I have to wait, I
  leave... So many be an application needing some wait a minute popup
  is not a good approach for the future.

 I wouldn't popup (block user interaction) over the whole page! Just
 the component that needs to load. In fact you don't even need to block
 user interaction. I just do it in my application because (for example)
 the user has clicked refresh on a component and any interaction with
 the refreshing component would be invalid. So in my case partial
 blocking the UI is better for the user - they can go on interacting
 with other parts of the app (we have a multiple portal like windows)

 Carl.

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

2010-05-23 Thread Craigo
Thanks Chi H.  That was exactly my problem (I was only using images in
my tables).  And, as the article states, when using images, adding td
img {display: block;} removes the gaps.

Cheers.

On May 22, 2:52 am, Chi H c...@chi.ca wrote:
 It sounds like this 
 -https://developer.mozilla.org/en/Images,_Tables,_and_Mysterious_Gaps
 is what you're experience,

 On May 20, 11:14 pm, Craigo craig...@gmail.com wrote:





  When creating a Grid, FlexTable, VerticalPanel, or any other type of
  table, I couldn't get rid of the gaps in the rows.  The gaps would
  only appear in Chrome and FF, but not in IE6.  They were very small
  gaps (about 3 pixels high).  Nothing seemed to work, setCellPadding,
  setCellSpacing, css with padding, margin, border-collapse, ...

  Finally figured out changing the doctype solved it.

  The default was:
  !doctype html

  When I changed it to:
  !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
  http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

  The row gaps disappeared!

  If there is a better way, please post.  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 
  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 
 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.



Table Row Gaps

2010-05-20 Thread Craigo
When creating a Grid, FlexTable, VerticalPanel, or any other type of
table, I couldn't get rid of the gaps in the rows.  The gaps would
only appear in Chrome and FF, but not in IE6.  They were very small
gaps (about 3 pixels high).  Nothing seemed to work, setCellPadding,
setCellSpacing, css with padding, margin, border-collapse, ...

Finally figured out changing the doctype solved it.

The default was:
!doctype html

When I changed it to:
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

The row gaps disappeared!

If there is a better way, please post.  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: Hide/Show Table Row with UIBinder

2010-05-11 Thread Craigo
Thanks Bufferings.  UIObject.setVisible works a treat!  Cheers.

On May 9, 1:33 am, bufferings bufferi...@gmail.com wrote:
 hi Craigo
 I think the following is better.

 // show
 UIObject.setVisible(myTableRow, true);

 // hide
 UIObject.setVisible(myTableRow, false);

 This is what UIObjects#setVisible(boolean) uses.

 hope this helps
 --
 bufferings

 --
 You received this message because you are subscribed to the Google Groups 
 Google Web Toolkit group.
 To post to this group, send email to google-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: Hide/Show Table Row with UIBinder

2010-05-07 Thread Craigo
Some browsers don't like:
myTableRow.getStyle().setDisplay(Style.Display.BLOCK);

This seems to work much better:
myTableRow.getStyle().setProperty(display, );

Strange there isn't a constant value in Style.Display for blank.
O'well.


On May 7, 12:23 pm, Craigo craig...@gmail.com wrote:
 Couldn't see any doco on how to hide/show table rows with the
 UIBinder, so here is how:

 1. Give the row a ui:field id in your HTML:
 tr ui:field=myTableRow
   tdSome stuff/td
   tdmore stuff/td
 /tr

 2. Show/Hide it in your Java code:
 // Declare it
 @UiField TableRowElement myTableRow;

 // Show it
 myTableRow.getStyle().setDisplay(Style.Display.BLOCK);

 // Hide it
 myTableRow.getStyle().setDisplay(Style.Display.NONE);

 If anyone has a better way, please post.
 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 
 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: Mixing Projects

2010-04-10 Thread Craigo
Not sure if this is helpful, but if you don't want to put your
testharness in with your main project (for build reasons or whatever),
you will need to run multiple instances of GWT.  When you do this, you
need to give them different ports.  Eg:  In the program arguments add:
-codeServerPort 9998 -port 8082
or something different to the default 9997 and .


On Apr 10, 11:50 pm, John nesre...@gmail.com wrote:
 I'm getting totally confused about dependent projects, and other
 stuff.  After much Googling I find lots of references, all confusing.
 (gwt 2.03, linux, galileo eclipse)

 Confusion 1:  people talk about main project and dependent
 project.  In my case, I have a project that is the main thing and I
 have a different project where I developed a widget.   This second
 is a standalone project because it has a host page and all, just so
 I could test it.

 I want to use this widget in my main project.  In that case, won't my
 MAIN project also be the DEPENDENT one?  It depends on the widget,
 right?  So which Project.gwt.xml has to be modified?

 Confusion 2:  people talk about setting the output of one project to
 be the same as the other project. How?  Looks to me like outputs can
 only be moved around inside their own project.

 Confusion 3:  After much screwing around, I broke something and the
 project that used to work, now doesn't.  This took me into the area of
 Run Configuration.  I appreciate that the developers took the trouble
 to initially put settings into all the right places, but what's the
 point of letting users change the settings if the beast just puts
 things back as they were?  I am using -noserver, ie my own Xampp php
 server.  Specifically, on the arguments page, it starts with:

 -remoteUI ${gwt_remote_ui_server_port}:${unique_id} -startupUrl
 /GfBegin/GfBegin.php -war /home/john/workspace/GfBegin/war -noserver
 -logLevel INFO com.axxessible.gfbegin.gfbegin
 com.axxessible.gfbegin.GfBegin

 I have Googled to try to find out what
  -remoteUI ${gwt_remote_ui_server_port}:${unique_id} is supposed
 to do, and I can see that other people have asked the same question,
 but I never found a clear answer.  Furthermore, I did find on a
 previous occasion that I could make things work by taking it out!  But
 I am now finding that every time I delete that portion, some helpful
 spirit living in that dialog puts it back.

 Sure, probably I'm wrong, and stupid, but I'm having a very
 frustrating time with this.  I've been using gwt since 1.4 or 1.5 or
 thereabouts, but I never had the need to merge different projects.

 Any advice or links (geared for dummies) would be very much appreciated.

 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: UiBinder with background-image and ImageResource

2010-03-16 Thread Craigo
I'm using ui:with ... like this:

ui:with field=res type=MyResources/ui:with
g:Anchor ui:field=myField styleName={res.css.myAnchor}Some Text/
g:Anchor

And it all works.


On Mar 16, 9:23 pm, Thomas Broyer t.bro...@gmail.com wrote:
 On Mar 16, 12:27 am, Michael Guyver michael.guy...@gmail.com wrote:

  Hi Craigo - does the @url work within a ui:style section?

 As I said:
 I know it works if your DataResoruce is created with a ui:data,
 I
 don't know when it comes from a separate ClientBundle imported with
 ui:with...

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

2010-03-15 Thread Craigo
Just like to reiterate what Thomas Broyer said:

Use DataResource with @url.  It works a treat and, IMO, is a much
easier solution.

http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.html#References_to_Data_Resources


On Mar 15, 3:33 pm, davidroe roe.da...@gmail.com wrote:
 yes, sorry, I missed that line.

 StyleInjector.inject(Resources.INSTANCE.whateverCss().getText(),true);

 On Mar 14, 4:04 pm, Michael michael.guy...@gmail.com wrote:

  Ah... simply calling the .ensureInjected method from the EntryPoint is
  enough - got it. Thanks!

  Mike

  On Mar 14, 10:46 pm, MH mhaligow...@googlemail.com wrote:

   Found the solution. The problem is that the style is _not_ injected. I
   solved this by adding the proper ensureInjected in the widget's class.

   2010/3/14 Michael michael.guy...@gmail.com

I've also tried this approach and while theCSSis compiled and the
obfuscated selector-name is used in the generated HTML, the the
selector definition is not included in the page. You could access the
definition by calling the .getText() method of the generated
ClientBundle implementation - but surely GWT should do the inclusion
for you?

On Mar 11, 8:30 am, MH mhaligow...@googlemail.com wrote:
 Well, the problem does not seem to be the image.

 The CssResource interface I wrote is compiled properly, the XML I made
for
 thew widget works fine as well. It look like if the ui:with does not
throw
 ensureInjected or something. The styles are applied, but they are 
 empty.

 Regards,
 mh

 2010/3/11 davidroe roe.da...@gmail.com

  I forgot this part - does that help?

        �...@source(com/whoever/client/resources/myImage.png)
         publicImageResourcemyImage();

  On Mar 10, 2:16 pm, MH mhaligow...@googlemail.com wrote:
   I'm afraid this one does not work for me.

   I did exactly as mentioned, and my widget seems to be not using 
   style
at
   all. Shall I also add anything to the class itself?

   2010/3/10 davidroe roe.da...@gmail.com

this is how I did it.

in whatever.css:

@sprite .myClass {
 gwt-image: myImage;
 width: auto; height: auto;
 background-repeat: repeat;
 background-position: 0% 0%;
}

in Resources.java:

public interface Resources extends ClientBundle {

 ...

 public interface WhateverCss extends CssResource {
   String myClass();
 }

�...@source(com/whoever/client/resources/whatever.css)
 public WhateverCss whateverCss();

}

in WhateverClass.ui.xml:

 ui:with field=res 
type=com.whoever.client.resources.Resources
/

 div class={res.whateverCss.myClass}

HTH,
/dave

On Mar 10, 8:52 am, Michael michael.guy...@gmail.com wrote:
 Hi there,

 I'm having a go at using the declarative layout and was 
 wondering
if
 there's a way of using an image declared in a ClientBundle as 
 a
 background-image in the ui:style section, thus:

 ui:UiBinder
   xmlns:ui=urn:ui:com.google.gwt.uibinder
   xmlns:g=urn:import:com.google.gwt.user.client.ui
         ui:with field=res
type=com.mycompany.MyClientBundle/

         ui:style
                 .banner {

background-image:url('res.menuBackground');
                 }
         /ui:style
 /ui:UiBinder

 If not, how are you supposed to do that?

 Cheers

 Mike

--
You received this message because you are subscribed to the 
Google
  Groups
Google Web Toolkit group.
To post to this group, send email to
  google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs
 cr...@googlegroups.com
google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252Bu
 nsubscr...@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
  google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2Bunsubs
   cr...@googlegroups.com
google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252Bu
 nsubscr...@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 

Re: UiBinder with background-image and ImageResource

2010-03-15 Thread Craigo
I imagine it would.  I have my css in a separate file referenced by my
ClientBundle:
@Source(my.css) ResourcesCSS css();
@Source(button.gif) DataResource menuButtonResource();

And in the css file it works great.  Eg:
@url menuButtonUrl menuButtonResource;
.my-anchor {
float: left;
width: 149px;
height: 39px;
background: menuButtonUrl 0 0 no-repeat;
text-align: left;
cursor: pointer;
border: none;
}


On Mar 16, 10:27 am, Michael Guyver michael.guy...@gmail.com wrote:
 Hi Craigo - does the @url work within a ui:style section?

 On 15 March 2010 23:16, Craigo craig...@gmail.com wrote:

  Just like to reiterate what Thomas Broyer said:

  Use DataResource with @url.  It works a treat and, IMO, is a much
  easier solution.

 http://code.google.com/webtoolkit/doc/latest/DevGuideClientBundle.htm...

  On Mar 15, 3:33 pm, davidroe roe.da...@gmail.com wrote:
  yes, sorry, I missed that line.

  StyleInjector.inject(Resources.INSTANCE.whateverCss().getText(),true);

  On Mar 14, 4:04 pm, Michael michael.guy...@gmail.com wrote:

   Ah... simply calling the .ensureInjected method from the EntryPoint is
   enough - got it. Thanks!

   Mike

   On Mar 14, 10:46 pm, MH mhaligow...@googlemail.com wrote:

Found the solution. The problem is that the style is _not_ injected. I
solved this by adding the proper ensureInjected in the widget's class.

2010/3/14 Michael michael.guy...@gmail.com

 I've also tried this approach and while theCSSis compiled and the
 obfuscated selector-name is used in the generated HTML, the the
 selector definition is not included in the page. You could access the
 definition by calling the .getText() method of the generated
 ClientBundle implementation - but surely GWT should do the inclusion
 for you?

 On Mar 11, 8:30 am, MH mhaligow...@googlemail.com wrote:
  Well, the problem does not seem to be the image.

  The CssResource interface I wrote is compiled properly, the XML I 
  made
 for
  thew widget works fine as well. It look like if the ui:with does 
  not
 throw
  ensureInjected or something. The styles are applied, but they are 
  empty.

  Regards,
  mh

  2010/3/11 davidroe roe.da...@gmail.com

   I forgot this part - does that help?

         �...@source(com/whoever/client/resources/myImage.png)
          publicImageResourcemyImage();

   On Mar 10, 2:16 pm, MH mhaligow...@googlemail.com wrote:
I'm afraid this one does not work for me.

I did exactly as mentioned, and my widget seems to be not 
using style
 at
all. Shall I also add anything to the class itself?

2010/3/10 davidroe roe.da...@gmail.com

 this is how I did it.

 in whatever.css:

 @sprite .myClass {
  gwt-image: myImage;
  width: auto; height: auto;
  background-repeat: repeat;
  background-position: 0% 0%;
 }

 in Resources.java:

 public interface Resources extends ClientBundle {

  ...

  public interface WhateverCss extends CssResource {
    String myClass();
  }

 �...@source(com/whoever/client/resources/whatever.css)
  public WhateverCss whateverCss();

 }

 in WhateverClass.ui.xml:

  ui:with field=res 
 type=com.whoever.client.resources.Resources
 /

  div class={res.whateverCss.myClass}

 HTH,
 /dave

 On Mar 10, 8:52 am, Michael michael.guy...@gmail.com wrote:
  Hi there,

  I'm having a go at using the declarative layout and was 
  wondering
 if
  there's a way of using an image declared in a ClientBundle 
  as a
  background-image in the ui:style section, thus:

  ui:UiBinder
    xmlns:ui=urn:ui:com.google.gwt.uibinder
    xmlns:g=urn:import:com.google.gwt.user.client.ui
          ui:with field=res
 type=com.mycompany.MyClientBundle/

          ui:style
                  .banner {

 background-image:url('res.menuBackground');
                  }
          /ui:style
  /ui:UiBinder

  If not, how are you supposed to do that?

  Cheers

  Mike

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

Re: How to cache DTD in Eclipse for GWT 2.0

2010-01-10 Thread Craigo
Thanks Olivier.  I downloaded the xsd files and added them into
Preferences  XML  XML Catalog.  Eclipse no longer hangs when
trying to d/l the xsd files, and editing the ui.xml files is now super
fast.

On Jan 9, 2:46 am, olivier nouguier olivier.nougu...@gmail.com
wrote:
 In eclipses:
 Preferences  XML  Catalog
 In User part you can add your custom catalog.



 On Fri, Jan 8, 2010 at 4:10 PM, Sagar sagar.i...@gmail.com wrote:
  Hi

  I just installed fresh copy of eclipse and gwt plugin on it. but now
  the problem is each time i am doing something in ui.xml file, eclipse
  is trying to fetch the dtd.

  i am behind proxy which is 1000 miles away

  is there any way to cache thehttp://dl.google.com/gwt/DTD/xhtml.ent
  in eclipse, so it dosent try to fetch it every time.

  i read somewhere that i can use XML Catalog feature, but dont know how
  it works, also in that XML Catalog window i see red mark next to
  following two entries.

  Location:
 http://dl.google.com/gwt/dtd/com.google.gwt.user.client.ui.xsd
  URI:    http://dl.google.com/gwt/dtd/com.google.gwt.user.client.ui.xsd
  Key Type:       Namespace Name
  Key:            urn:import:com.google.gwt.user.client.ui

  Location:      http://dl.google.com/gwt/dtd/uibinder.xsd
  URI:    http://dl.google.com/gwt/dtd/uibinder.xsd
  Key Type:       Namespace Name
  Key:            urn:ui:com.google.gwt.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.

 --
 A coward is incapable of exhibiting love; it is the prerogative of the
 brave.
 --
 Mohandas Gandhi
-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email 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 Eclipse Breakpoint Not Working

2009-12-09 Thread Craigo
I had this problem too.  It only asked for the Firefox plugin after I
deleted my projects compiled javascript under the war directory.

Also, after the FireFox plugin did get installed, I then restarted
everything, and Firefox froze and asked me if I wanted to terminate
the current script.  I said yes, and breakpoints worked, but code
updating didn't.  Restarted again, and said continue when Firefox
asked if I wanted to terminate the script.  Everything is working
great now!  :-)


On Dec 10, 10:41 am, Nick powers.n...@gmail.com wrote:
 I just updated my Eclipse plugin from GWT 1.7 to GWT 2.0. I got my
 application to run in a separate browser, however, it does not ask me
 to install a plugin, nor does it stop on breakpoints.

 Can anyone help me convert my 1.7 Eclipse GWT/App Engine project to
 GWT 2.0?

 What I've done:
 -Updated my Eclipse Plugin
 -Changed my GWT version to 2.0
 -Changed my App Engine version to 1.2.8
 -Deleted by current launch configurations
 -I launch by Right Click--Debug As--Web Application (the one with
 the 'G' on it).
 -I copy the URL give in the Development Mode tab in Eclipse and paste
 that into Chrome (I've tried FF and IE 7 as well).
 -My App appears and seems to work properly, but no question to install
 a plugin nor does it pay attention to breakpoints.

 If I can avoid creating a new project and copying it into that, I'd
 prefer it.

 I appreciate any help.

 -Nick

--

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




Window.open to include gwt.codesvr parameter

2009-12-09 Thread Craigo
When Window.open(url, _blank, ); is called, it opens a new window
without the gwt.codesvr parameter.

Is there an option to tell it to include the gwt.codesvr parameter if
running in debug mode?

It is possible to code around it with something like this:
  String devMode = Window.Location.getParameter(gwt.codesvr);
  if (devMode != null) {
url += gwt.codesvr= + devMode;
  }

however, I would rather not have to do that.

--

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

2009-12-09 Thread Craigo
I got this error as soon as I tried to use the UiBinder on Java 5,
WinXP.  When I switched to Java 6, it all worked (or if I removed the
UiBinder).


On Dec 10, 6:40 am, Chris Ramsdale cramsd...@google.com wrote:
 While we are in the process of determining what exactly within the Mail
 sample isn't playing nicely with Java 5, is your application throwing the
 same error? If so, would you mind adding a code snippet to the issue that
 was linked within this thread?

 Thanks,
 Chris

 On Tue, Dec 8, 2009 at 12:03 PM, Thad thad.humphr...@gmail.com wrote:
  I'm seeing the problem on my Linux box running 1.5.0_17.  So long as
  the gold standard here is running on Macs, I don't want to develop in
  1.6 for fear of something that won't target 1.5 properly (I've been
  bitten on this before).

  On Dec 8, 11:32 am, Chris Ramsdale cramsd...@google.com wrote:
   This was only an issue on Windows for me, so I haven't had to upgrade to
   Java 6 on my Mac in order to run the Mail sample. Are you seeing it on
  Mac's
   with Java  6 installed?

   On Tue, Dec 8, 2009 at 10:52 AM, Thad thad.humphr...@gmail.com wrote:
The problem with Java 6 is that I still have to support some older Mac
servers with OS X 10.4.  They only run Java 1.5 or 1.4.2.

On Dec 7, 3:01 pm, Chris Ramsdale cramsd...@google.com wrote:
 Try upgrading to Java 6. More info is available here:

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

  --

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

2009-12-09 Thread Craigo
A little more information:  I am able to compile using Java 5 (with
the UiBinder code) and run it on Tomcat running on Java 6 (Tomcat
running on Java 5 throws the error).


On Dec 10, 4:01 pm, Craigo craig...@gmail.com wrote:
 I got this error as soon as I tried to use the UiBinder on Java 5,
 WinXP.  When I switched to Java 6, it all worked (or if I removed the
 UiBinder).

 On Dec 10, 6:40 am, Chris Ramsdale cramsd...@google.com wrote:

  While we are in the process of determining what exactly within the Mail
  sample isn't playing nicely with Java 5, is your application throwing the
  same error? If so, would you mind adding a code snippet to the issue that
  was linked within this thread?

  Thanks,
  Chris

  On Tue, Dec 8, 2009 at 12:03 PM, Thad thad.humphr...@gmail.com wrote:
   I'm seeing the problem on my Linux box running 1.5.0_17.  So long as
   the gold standard here is running on Macs, I don't want to develop in
   1.6 for fear of something that won't target 1.5 properly (I've been
   bitten on this before).

   On Dec 8, 11:32 am, Chris Ramsdale cramsd...@google.com wrote:
This was only an issue on Windows for me, so I haven't had to upgrade to
Java 6 on my Mac in order to run the Mail sample. Are you seeing it on
   Mac's
with Java  6 installed?

On Tue, Dec 8, 2009 at 10:52 AM, Thad thad.humphr...@gmail.com wrote:
 The problem with Java 6 is that I still have to support some older Mac
 servers with OS X 10.4.  They only run Java 1.5 or 1.4.2.

 On Dec 7, 3:01 pm, Chris Ramsdale cramsd...@google.com wrote:
  Try upgrading to Java 6. More info is available here:

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

   --

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

2009-12-09 Thread Craigo
I was trying to do this also.  Then I slapped myself in the head and
realised, with the UiBinder, we can now just use plain html.

So we can do stuff like this:
g:HTMLPanel
table
trtdInfo:/tdtdg:TextBox ui:field=infoTextBox//
td/tr
/table
/g:HTMLPanel

...there maybe a good reason you want to use a FlexTable in
the .ui.xml file, but I can't think of it.


On Dec 10, 1:40 pm, FKereki fker...@gmail.com wrote:
 Hi! Is it possible to include a FlexTable or Grid with UiBinder? How
 do you specify each cell? And, for FlexTables, how can you join cells
 together?

--

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




DatePicker Custom MonthSelector CSS

2009-11-11 Thread Craigo

Hello,

I wanted to add year selection to my date picker, so I extended
MonthSelector and added the extra buttons.  Everything worked
great.  ...except the setStyleName.

I wanted to do this:
  yearBack.setStyleName(css().previousButton());

However, the method css() returns a class DatePicker.StandardCss which
only has package level visibility.  So I couldn't use it.

I worked around it by hard coding the values:
  yearBack.setStyleName(datePickerPreviousButton);

But that is bad coding.

Does anyone know how I can use the same CSS styles without hard coding
the values?

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



Code to change the DateBox to be day / month / year

2009-10-29 Thread Craigo

Just some code to switch the DateBox from a U.S. date into a dd/mm/
 format (for countries like Australia).

Set the format in the date box:
myDateBox.setFormat(new AustralianDateFormat());

--- And here is the formatter ---

import java.util.Date;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.user.datepicker.client.DateBox;
import com.google.gwt.user.datepicker.client.DateBox.Format;

/**
 * Uses the default formatter, except swaps the day and month around
when entering.
 * Eg: 5/1/80 = 5 Jan 1980
 *
 * @author Craig Mitchell
 * @date 29 Oct 2009
 */
public class AustralianDateFormat implements Format {
private DateBox.DefaultFormat defaultFormatter;

public AustralianDateFormat() {
defaultFormatter = new 
DateBox.DefaultFormat(DateTimeFormat.getFormat
(d MMM, ));
}

public Date parse(DateBox dateBox, String text, boolean reportError)
{
// Swap the day and month around before parsing
if (text != null) {
String[] parts = text.split(/);

if (parts.length == 3) {
text = parts[1] + / + parts[0] + / + 
parts[2];
}
}

return defaultFormatter.parse(dateBox, text, reportError);
}

public String format(DateBox dateBox, Date date) {
return defaultFormatter.format(dateBox, date);
}

public void reset(DateBox dateBox, boolean abandon) {
defaultFormatter.reset(dateBox, abandon);
}
}

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