Re: Competitor for world's most useless JavaDoc comment

2011-05-17 Thread Greg Dougherty
Hi Jeff,

 It may not be completely obvious what is going on here

Congratulations, you win understatement of the day. :-)

And that's my point.  The purpose of a JavaDoc comment is to make it
so people CAN understand what's going on.  Those comments say
nothing.  They don't say this is a locale dependent format, go here
to figure out what that format will be in your locale, they don't say
ANYTHING.

 that format changes based on the locale

If that format changes with the locale, why am I getting an entirely
non-US format?

 While it probably makes sense to you to put the format into US standards, it
 would totally trip up people writing GWT in french or some other standard.

If it's locale dependent, then, since I'm writing in a US locale,
that's what I should be seeing.  If it's not locale dependent, I don't
see why defaulting to a non-US representation is better than
defaulting to a US one.

 The short answer is, it isn't a useless javadoc comment, it is a
 non-existent comment.

Well, I don't know how anyone else codes, but from my perspective, an
undocumented constant in a library is a useless constant, since the
amount of time and effort spent figuring out what it is and what it
does could better be spent just making my own constant that does what
I want.  Which is what I've now done in this case.

 As always, you're welcome to submit a patch with javadoc.

Well, my understanding is that I can't do that w/o writing to the GWT
Coding Standards.  They require you to write hideously ugly code,
and I only do that when someone pays me, extra.  So I don't foresee
myself ever writing anything for GWT.

Aside from that, I'd have to spend a fair amount of time trying to
figure out what each of those constants MEAN.  Presumably the person /
people who wrote those comments did that in the first place.  Which
leaves me with the question of why they didn't write that information
down, instead of writing down that some day they needed to do that?
And the other question of why the GWT Team allowed them to submit the
code when it was so obviously incomplete.  Yes, I know that there's a
lot of volunteer labor that goes into GWT.  But I would expect that
the pride and professionalism of all involved would demand that things
be done right, or not at all.

Greg

On May 16, 1:12 pm, Jeff Larsen larse...@gmail.com wrote:
 It may not be completely obvious what is going on here, but that format
 changes based on the locale, so it isn't exactly easy or maintainable to
 actually specify what each format is doing for each locale.

 While it probably makes sense to you to put the format into US standards, it
 would totally trip up people writing GWT in french or someother standard.

 While this does add to the complexity, it also removes problems of if you're
 writing an i18n application, you can just use datetimeformat and get the
 desired results in the formats that you want.

 Also, if you look at the code, there is a TODO there to get the formats
 documented. So they are already aware that they need documentation.

 The short answer is, it isn't a useless javadoc comment, it is a
 non-existent comment.

 As always, you're welcome to submit a patch with javadoc.  

-- 
You received 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: Competitor for world's most useless JavaDoc comment

2011-05-17 Thread Greg Dougherty
Hi John,

Actually, I must entirely disagree with you.  The CLDR
{SHORT,MEDIUM,LONG,FULL} format, as defined here (give URL to the
definition) would be a perfectly valid comment.  Most importantly, it
would tell users where to go when they need more information, rather
than requiring us to guess.

Now, it would be nice if you included that it was locale specific, or
what some useful date (like Jan 5, 2002 (month name w/ more than three
characters in it, month, day and year w/ only 1 significant digit when
in 2 digit format) looked like under the format if it isn't locale
specific.  But if you don't want to write in all the details, telling
users exactly where to go to find the details is a perfectly valid
second choice.  (Note that means a URL that gets the user to the
definition of interest.  Saying go to the W3C specification doesn't
count.  Since you were presumably looking at the specification of
interest while writing the constant, I don't think it's unreasonable
to expect you to pass on that specific URL.)

 The other predefined formats, which are also derived from CLDR data via
 ICU4J, seem self-explanatory.  Is there really much value in a Javadoc for
 the HOUR_MINUTE_SECOND format that says A format containing the hour,
 minute, and second?

Is there really much COST to writing /** A format containing the hour,
minute, and second, in the form hh:mm:ss */?  Especially considering
that you had to write SOMTHING, or else there wouldn't have been a
JavaDoc entry in the first place.  If you're going to write something,
why not take an extra 15 seconds, and write the right thing?

For that matter, doesn't Code Tools Pro default to putting the value
of the constant in the auto-generated JavaDoc?  If you can have some
code generation tool generate a more useful comment for no effort, why
spend person time to generate a less useful comment?

  As always, there is a limited amount of hours in the day and decisions must
 be made on where to spend that time.

Of course.  But, ESPECIALLY in an open source project, there's no
point in writing something unless people can use it.  If you want
people to use your code, they've got to be able to figure out what it
does, and how they should use it.  If you're not willing to document
something well enough so that other people can use it, why are you
wasting your time writing it in the first place?  (This is not a
rhetorical question.  When I writing code that I want other people to
use, I make sure that everything I want them to use is clearly
documented.  If the writers of open source code aren't writing code
because they want other people to use it, why ARE they writing it?)

Personally, I don't use any of the PredefinedFormats. I don't
understand them, and it wasn't clear to me that it would take me less
time to figure them out, than it would take me to write my own.  Were
those formats written for internal GWT use only, and any external use
considered gravy?  Or were they written for GWT users to use them?
Because if it's teh second, the JavaDoc is the most important thing
about those constants.  Since that's going to be the major deciding
point WRT whether or not the constants actually get used.

Greg

On May 16, 3:48 pm, John A. Tamplin j...@google.com wrote:
 On Monday, May 16, 2011 1:22:43 PM UTC-4, Greg Dougherty wrote:

  It's too bad that there a 2 valid comments, and 34 worthless ones.

  Might I suggest that the GWT Coding Standards would do well to focus
  on requiring people to write readable and understandable code (which
  means having comments that explain what you're doing and why), rather
  than merely obsessing on whether people use tabs or spaces?

 See the TODO at the beginning of PredefinedFormat -- patches welcome.

 The *_{SHORT,MEDIUM,LONG,FULL} formats are harder to describe the other
 formats like the ISO_8601 and RFC_2822 formats, since they will vary
 significantly across locales.  Basically, for these we just use whatever
 those are defined as in CLDR.  AFAIK, there is no documentation on exactly
 what the criteria are for those lengths, which means the Javadoc that would
 go there would be either A short date format or The CLDR short date
 format, which doesn't seem more useful than the name itself which is why it
 hasn't been written yet.

 The other predefined formats, which are also derived from CLDR data via
 ICU4J, seem self-explanatory.  Is there really much value in a Javadoc for
 the HOUR_MINUTE_SECOND format that says A format containing the hour,
 minute, and second?

 Regarding the overall quality of doc in the GWT codebase, my personal
 experience is that it is far better than most open-source projects -- of
 course it can always be improved and anyone can submit such improvements.
  As always, there is a limited amount of hours in the day and decisions must
 be made on where to spend that time.

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

Competitor for world's most useless JavaDoc comment

2011-05-16 Thread Greg Dougherty
I was looking through com.google.gwt.i18n.client : Enum
DateTimeFormat.PredefinedFormat, because I wanted to figure out why my
dates were coming out in such a useless format (sorry, but while -
mm-dd is a lovely format if you want dates that can be textually
sorted by a computer, it's a crappy format if you want the dates read
by a human).  So I clicked on the JavaDoc for DATE_SHORT.  What did I
get?

public static final DateTimeFormat.PredefinedFormat DATE_SHORT

Wow, thank you.  How completely useless.  That doesn't even rise to
the lovel of phoning it in.

I know the person responsible for DateTimeFormat.PredefinedFormat
knows how to write a reasonable JavaDoc, because it includes this:

RFC_2822

public static final DateTimeFormat.PredefinedFormat RFC_2822

RFC 2822 date format, fixed across all locales.
Example: Thu, 20 May 2010 17:54:50 -0700
http://tools.ietf.org/html/rfc2822#section-3.3

It's too bad that there a 2 valid comments, and 34 worthless ones.

Might I suggest that the GWT Coding Standards would do well to focus
on requiring people to write readable and understandable code (which
means having comments that explain what you're doing and why), rather
than merely obsessing on whether people use tabs or spaces?

Greg

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



Hover text / Help Text for a Cell Tables

2011-05-05 Thread Greg Dougherty
The user interface for my current app is built around a Cell Table.
I'd like to put hover text over the elements in several of my
columns.  If they were UIObjects, I'd simply call setTitle ().  What
do I call to do this for Cell columns (I'm perfectly fine with the
text being the same for every cell in the column, I'd just like to be
able to put SOMETHING up to explain t ousers why they might click on
that cell, and what they need to do first).

TIA,

Greg

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



Can not export to IE 7

2011-05-05 Thread Greg Dougherty
I have a web app that mostly works with IE 7.  However, when I try to
export results to IE, I get the following error message:


Internet Explorer cannot download (URL name) from (web address).

Internet Explorer was not able to open this internet site.  The
requested web site is either unavailable or cannot be found.  Please
try again later.


Export works by having a frame with a URL.  That part works, because
my servlet gets called.  My servlet calls
response.setContentType (text/tsv);  and
response.addHeader (Content-Disposition, attachment; filename=\ +
fileName + \);

gets the response Writier, wraps the writer with a BufferedWriter,
writes some data to it, and then calls flush on the BufferedWriter,
which gets to the download dialog to pop up for IE.  However, at some
point while I'm sending it data over that BufferedWriter (and it's
pretty early in the process, because it never gives me a chance to
specify where I want to save the file), IE gives me the above error
message.

Any suggestions for what's going on, and how to fix it?

TIA,

Greg

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



Re: Can not export to IE 7

2011-05-05 Thread Greg Dougherty
Nope.  It works just fine for Firefox and Sea Monkey,  it's just with
IE that there's a problem.

On May 5, 2:37 pm, Juan Pablo Gardella gardellajuanpa...@gmail.com
wrote:
 Checkhttp://code.google.com/webtoolkit/doc/latest/FAQ_Server.html#What_is_...

 http://code.google.com/webtoolkit/doc/latest/FAQ_Server.html#What_is_...Is
 relate to this?

 2011/5/5 Greg Dougherty dougherty.greg...@mayo.edu

  I have a web app that mostly works with IE 7.  However, when I try to
  export results to IE, I get the following error message:

  Internet Explorer cannot download (URL name) from (web address).

  Internet Explorer was not able to open this internet site.  The
  requested web site is either unavailable or cannot be found.  Please
  try again later.
  

  Export works by having a frame with a URL.  That part works, because
  my servlet gets called.  My servlet calls
  response.setContentType (text/tsv);  and
  response.addHeader (Content-Disposition, attachment; filename=\ +
  fileName + \);

  gets the response Writier, wraps the writer with a BufferedWriter,
  writes some data to it, and then calls flush on the BufferedWriter,
  which gets to the download dialog to pop up for IE.  However, at some
  point while I'm sending it data over that BufferedWriter (and it's
  pretty early in the process, because it never gives me a chance to
  specify where I want to save the file), IE gives me the above error
  message.

  Any suggestions for what's going on, and how to fix it?

  TIA,

  Greg

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

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

2011-04-25 Thread Greg Dougherty
Thank you.

On Apr 20, 5:32 pm, Jens jens.nehlme...@gmail.com wrote:
 Take a look
 at:http://code.google.com/intl/de-DE/webtoolkit/doc/latest/tutorial/RPC

 J.

-- 
You received 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 does my servlet cleanly throw an exception

2011-04-20 Thread Greg Dougherty
No.  Because doPost, which is what calls all our RPC code, throws
ServletException or IOException, and if you try to throw anything
else, Tomcat reports an error to its log about an unexpected
exception.  Which is one of the things I dont' want.

Greg

On Apr 12, 12:04 pm, Christien Lomax thecatwhispe...@gmail.com
wrote:
 I created an exception that my app uses (eg: MyAppException) that extends
 serializable.  Then when I need to throw an exception, I catch any other
 exceptions and throw MyAppException instead, passing in the message from the
 caught exception(s).

 Make sense?

-- 
You received 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: CellTable Dynatable SimplePager last Button

2011-04-14 Thread Greg Dougherty
Great!  Thanks, that worked.

Even better, I now have two simple pagers, one above my table, the
other below, that play nice' with each other (hit an arrow on one,
both update).

Greg

On Apr 13, 10:46 am, Ahmed Mohammed ahmedmohiud...@gmail.com wrote:
 Create instance of simplepager resources and pass to the SimplePager
 Constructor. Try below lines.
 SimplePager.Resources pagerResources =
 GWT.create(SimplePager.Resources.class);
  SimplePager pager= new CustomSimplePager(TextLocation.CENTER,
 pagerResources, false, 0, true);

 P.S : From GWT Showcase example CwCellTable, if you want to take a
 look at it.

 gwt-2.2.0\samples\Showcase\src\com\google\gwt\sample\showcase\client
 \content\cell\CwCellTable.java

 Hope this helps.
 -Ahmed
 On Apr 12, 12:47 pm, Metronome  Basic

 metronome.ba...@worldonline.fr wrote:
  It was already constructed that way !
  but () is disabled and (| ) is hidden

  may be you somehow have to tell the pager what is the last page ?

  thanks

  Patrick

    - Original Message -
    From: John LaBanca
    To: google-web-toolkit@googlegroups.com
    Sent: Tuesday, April 12, 2011 5:45 PM
    Subject: Re: CellTable Dynatable SimplePager last Button

    The  is a fast forward button that defaults to 1000 rows.  Use the 
  overloaded SimplePager constructor to specify that you want to use a last 
  page button instead of a fast forward button.

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

    On Tue, Apr 12, 2011 at 11:41 AM, Metronome  Basic 
  metronome.ba...@worldonline.fr wrote:

      I've a CellTable using the example code in DynaTable

      but as in DynaTable the last () Button of th Pager is disabled

      in my case , as I know the row count , is there anyway to enable the 
  button

      thanks

      Patrick

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

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

  --- 
  ---

  --- 
  ---

    Aucun virus trouvé dans ce message.
    Analyse effectuée par AVG -www.avg.fr
    Version: 10.0.1209 / Base de données virale: 1500/3568 - Date: 12/04/2011

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



How does my servlet cleanly throw an exception

2011-04-12 Thread Greg Dougherty
I'm trying to throw an exception from my servlet back to the client
without breaking anything along the way, and having no success.

First I was throwing an InvocationException, but this created an error
it was an unrecognized exception.

So I threw a ServletException.  This is acceptable on the Servlet
side, because doPost is specified to throw ServletException.  But on
the Client side it creates a problem, because ServletException is not
IsSerializable.  And I can't create a Shared Exception that
IsSerializable and inherits from ServletException, because
ServletException is not defined on the Client side.

So, how DOES my RPC code pass an exception back to the client without
generating any errors for the servlet code?

TIA,

Greg

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



IE v Firefox

2011-03-28 Thread Greg Dougherty
So, I have a quirks mode web app using GWT 2.1.2.  It runs just fine
under Firefox, Sea Monkey (Mozilla derivative), and even Safari (on my
iPhone).  On IE, however, it pops up the password dialog box, accepts
a user id and password, then gives a completely blank screen.  On
errors on the server side.

How do I go about debugging this sort of problem?

TIA,

Greg

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

2011-03-28 Thread Greg Dougherty
 One more thing - why are you using quirks mode?
Because I'm utterly uninterested in trying to figure out what the
dimensions of my panels should be, so I don't ever use any of the
*LayoutPanels.

Every web app I've ever written has had its size dependent upon the
user's input.  I can write a lot of code to try to figure out how big
things should be, and then resize everything appropriately, or I can
use Quirks mode and have the Panels do that for me, while I focus on
the issues that are specific to my app.

Which do you think is a better use of my time?

I've never seen an explanation of why the *LayoutPanels are the way
they are (just the bald statement can't give you Swing like sizing in
Standards mode), but even if it's a really good reason, it wouldn't
really matter.  Because as long as I can simply focus my efforts on
the problems important to me, that's what I'm going to do.

Greg

On Mar 28, 10:04 am, Jeff Chimene jchim...@gmail.com wrote:
 One more thing - why are you using quirks mode?

-- 
You received 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: IE v Firefox

2011-03-28 Thread Greg Dougherty
- Install firebug-lite
Well, I've taken a look at it, and maybe after I figure out what a
bookmarklet is I might feel more comfortable using it.  But thanks
for the pointer.

- Use development mode to step through your code after the login process
completes.

Yeah, 30 seconds after I posted this it occurred to me that I COULD
test this under development mode, not just as a deployed app. :-(

What's worse, is that I found the problem, and it's one I'd previously
discovered on Dec 8: IE 7 throws an exception when you try to add
something to a HorizontalPanel whose horizontal alignment is set to
ALIGN_JUSTIFY.

Ah, well, at least this time I submitted a bug report.

Thanks Jeff,
Greg

On Mar 28, 10:03 am, Jeff Chimene jchim...@gmail.com wrote:
 On Mon, Mar 28, 2011 at 7:41 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  So, I have a quirks mode web app using GWT 2.1.2.  It runs just fine
  under Firefox, Sea Monkey (Mozilla derivative), and even Safari (on my
  iPhone).  On IE, however, it pops up the password dialog box, accepts
  a user id and password, then gives a completely blank screen.  On
  errors on the server side.

  How do I go about debugging this sort of problem?

 A few ideas:

    - Install firebug-lite
    - Use development mode to step through your code after the login process
    completes.
    - Are you using Gin? If so, create a mock login authentication module to
    save yourself that step
    - Which version of IE? Six? Good luck.
    - JSNI code? I'd start there.
    - Custom attribute settings? element.setAttribute... Review those.
    - GWT.log or logger is your friend

-- 
You received 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: Part III of RequestFactory article

2011-03-28 Thread Greg Dougherty
Would it really be too much to expect you to post what language the
article is in (since, unlike the post announcing the article, the
article's not in English)?

Greg

On Mar 28, 10:30 am, Luca luca.mas...@gmail.com wrote:
 Hi, on our Google Tech User group blog:

 http://firenze-gtug.blogspot.com/2011/03/requestfactory-framework-par...

 Hope can be useful for someone.
 Ciao.

-- 
You received 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: One GWT WebApp but more than one WAR files

2011-03-28 Thread Greg Dougherty
The question is, why do you want to do it that way?

You can develop separate modules, and include all those modules in one
project / war file.  You can build multiple libraries, and include
them in multiple projects / war files.

What are you doing that requires you to have multiple war files?

Greg

On Mar 28, 8:49 am, deejay j.plessm...@googlemail.com wrote:
 Sorry i think the question was unclear. Of course, we need a shared
 repository.

 The main question was, how to develop a GWT application which is
 splitted in MULTIPLE war files which could be deployed separately in
 the webapp server...

 On 28 Mrz., 15:39, Juan Pablo Gardella gardellajuanpa...@gmail.com
 wrote:

  You can use a SCM repository, for ex. SVN, Mercurial

  Juan

  2011/3/28 deejay j.plessm...@googlemail.com

   Is it possible to create one Webapp which is splitted into multiple
   WAR files (e.g. every module in one WAR file)?
   Is this a bad approach?
   How to develop a gwt application with more than one developer?

   Thanks,
   Jay

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

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



Re: How can I put Hyperlinks inside a CellTable, which behave the same as the Hyperlink widget?

2011-03-14 Thread Greg Dougherty
Does that allow for right-clicking?  Because high on my list of HTML
Tricks the piss me off is when websites have javascript links
rather than real links that I can select, and do an Open New Tab /
Open New Window.

Greg

On Mar 14, 9:58 am, John LaBanca jlaba...@google.com wrote:
 You can render an anchor tag with a no-op href:
 a href=javascript:;Click Me/a

 In your Cell, catch the click event and call History.newItem(myToken).
  This is basically what the Hyperlink Widget does.

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

 On Sat, Mar 12, 2011 at 1:07 PM, Jake carolinespe...@yahoo.com wrote:
  I want to create a CellTable with a column of Hyperlinks.
  I'm trying to get the same behavior as the Hyperlink widget - e.g.: If
  you click it, it'll call History.newItem(), but a user is also able to
  do 'right-click, open link in new window'.

  The two possibilities seem to be
  1) put plain text into a column, and implement the selection model to
  trigger History.newItem.  Unfortunately, if you do this, 'right click,
  open link in new window' does not work, as it is not a 'true'
  hyperlink
  2) Put HTML into a column, using a a tag with a # URL.
  Unfortunately, this causes a page reload in IE, as per Issue #2152 in
  GWT's issue tracker.

  Has anyone found a solution to this?

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

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Upgrading from 2.1 to 2.2 and changing environment

2011-03-14 Thread Greg Dougherty
3. Does GWT support running on an embedded web server on Linux ? The only
choice I get is run as a web application on external server ?

If you want to run on your own server, turn off AppEngine.

Greg

On Mar 14, 4:34 pm, BobbyGrace oskare...@gmail.com wrote:
 I've had my project running on a Windows computer using Eclipse 3.6 and GWT
 2.1

 This day I set up Eclipse 3.5 and GWT 2.2 on my Ubuntu comp, using the
 Eclipse version from official repositories and the GWT plugin from the
 update site (http://dl.google.com/eclipse/plugin/3.5). First time I checked
 out the project from SVN on my Ubuntu comp and compiled it I noticed that
 the entire war/WEB-INF/lib directory has changed,

 New items:
 appengine-api-1.0-sdk-1.4.2.jar
 appengine-api-labs-1.4.2.jar
 appengine-jsr107cache-1.4.2.jar
 Deleted items:
 datanucleus-appengine-1.0.8.final.jar
 datanucleus-core-1.1.5.jar
 datanucleus-jpa-1.1.5.jar
 geronimo-jpa_3.0_spec-1.1.1.jar
 geronimo-jta_1.1_spec-1.1.1.jar
 gwt-servlet.jar
 jdo2-api-2.3-eb.jar
 jsr107cache-1.1.jar

    1. Don't know if these changes are from the 2.2 upgrade or environment
    change ?
    2. Is it necesarry to put libraries (except from manual added ones) in
    SVN, will GWT recreate them at compile time ?
    3. Does GWT support running on an embedded web server on Linux ? The only
    choice I get is run as a web application on external server ?

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



Jetty Context v. Tomcat Context

2011-03-10 Thread Greg Dougherty
The production version of my GWT app runs under Tomcat, with the
following settings:
context.xml:
Context path=/AppName docBase=webapps/AppName debug=5
reloadable=true
 crossContext=true
Resource
  type=javax.sql.DataSource
  auth=Container
  name=jdbc/Exome
  factory=org.apache.commons.dbcp.BasicDataSourceFactory
  maxActive=100
  maxIdle=30
  maxWait=1
  username=username
  password=password
  driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
  url=ServerURL
  removeAbandoned=true
  removeAbandonedTimeout=3600
  logAbandoned=true/
/Context

This allows my app to connect to a SQL Server database maintained by
IT.

I would like to be able to debug client side code in my app, which
means I need to get this working in development mode w/ Jetty.  I
wrote the following jetty-web.xml file.
?xml version=1.0  encoding=ISO-8859-1?
!DOCTYPE Configure PUBLIC -//Mort Bay Consulting//DTD Configure//
EN
  http://jetty.mortbay.org/configure.dtd;

Configure class=org.mortbay.jetty.webapp.WebAppContext
New class=org.mortbay.jetty.plus.naming.Resource
Argjava:/comp/env/Arg
Arg
New
class=org.apache.commons.dbcp.BasicDataSourceFactory
 Set name =
driverClassNamecom.microsoft.sqlserver.jdbc.SQLServerDriver/Set
 Set name = urlServerURL/Set
 Set name = usernameusername/Set
 Set name = passwordpassword/Set
 Set name = namejdbc/Exome/Set
/New
/Arg
/New
/Configure

I added Apache commons-dbcp-1.4.jar and commons-pool-1.5.5.jar to
Tomcat (and to my classpath) to get JDBC 4 DataSource (I have the SQL
Server JDBC 4 driver).  I added jetty-naming-6.1.11.jar and jetty-
plus-6.1.11.jar to my classpath.  When I launch my app, I get the
following error:


Starting Jetty on port 
   [WARN] Config error at Set
name=driverClassNamecom.microsoft.sqlserver.jdbc.SQLServerDriver/
Set
   [WARN] Config error at New
class=org.mortbay.jetty.plus.naming.ResourceArgjava:/comp/env/
ArgArg
New
class=org.apache.commons.dbcp.BasicDataSourceFactorySet
name=driverClassNamecom.microsoft.sqlserver.jdbc.SQLServerDriver/
SetSet name=urlServerURL/SetSet name=usernameusername/
SetSet name=passwordpassword/SetSet name=namejdbc/Exome/
Set/New
/Arg/New
   [WARN] Failed startup of context
com.google.gwt.dev.shell.jetty.JettyLauncher
$WebAppContextWithReload@180b22e{/,C:\Path\war}
java.lang.NoSuchMethodException: class
org.apache.commons.dbcp.BasicDataSourceFactory.setDriverClassName(class
java.lang.String)
at org.mortbay.xml.XmlConfiguration.set(XmlConfiguration.java:416)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:
240)
...
at
org.mortbay.jetty.webapp.JettyWebXmlConfiguration.configureWebApp(JettyWebXmlConfiguration.java:
109)
at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:
1217)
...

Any suggestions as to what's going wrong / what I've done wrong?

Thanks!

Greg

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

2011-03-01 Thread Greg Dougherty
Graham,

From isn't your email account, From is which half of your
application, the client, or the server?

You can NOT send email from the client, but that so0und't like what
you're trying to do.

Greg

On Feb 28, 8:27 pm, Graham Haroldson gharold...@gmail.com wrote:
 Again,  im not quite sure what im trying to send emails from,  i can
 probably use my email, which is a gmail account.  I tried that and i also
 tried adding my account and password to the properties but it still does
 nothing

 On Mon, Feb 28, 2011 at 3:04 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

   When i GWT Compile i get no errors at all.

  GWT Compile is client side.  What you're doing is done, and can only
  be done, on the server.  Where are you trying to send the mail from?

  Greg

  On Feb 28, 4:28 pm, GrahamH gharold...@gmail.com wrote:
   Hi all,

   Im trying to set up my GWT app so that it can send emails.

   I have the code to send the email in a server-side servlet class.  I
   have downloaded the Java Mail API and the JAF and included both the
   mail.jar and the activation.jar files to the external jars.

   Here is my Code:

   import java.util.Properties;

   import javax.mail.Message;
   import javax.mail.MessagingException;
   import javax.mail.Session;
   import javax.mail.Transport;
   import javax.mail.Message.RecipientType;
   import javax.mail.internet.AddressException;
   import javax.mail.internet.InternetAddress;
   import javax.mail.internet.MimeMessage;
   import javax.activation.*;

   import com.google.gwt.user.server.rpc.RemoteServiceServlet;

   import cs.ubc.ca.cs310.HockeyPool.client.EmailService;

   public class EmailServiceImpl extends RemoteServiceServlet implements
   EmailService  {
           /**
            *
            */
           private static final long serialVersionUID = 1L;

           public void sendEmail(String email){
                   Properties props = System.getProperties();
                   props.put(mail.smtp.host, smtp.gmail.com);
                   props.put(mail.smtp.port, 465);

                   Session mailSession = Session.getDefaultInstance(props);
                   Message simpleMessage = new MimeMessage(mailSession);

                   InternetAddress fromAddress = null;
                   InternetAddress toAddress = null;
                   try {
                           fromAddress = new InternetAddress(
  gharold...@gmail.com);
                           toAddress = new InternetAddress(email);
                   } catch (AddressException e) {
                           // TODO Auto-generated catch block
                           e.printStackTrace();
                   }

                   try {
                           simpleMessage.setFrom(fromAddress);
                           simpleMessage.setRecipient(RecipientType.TO,
  toAddress);
                           simpleMessage.setSubject(HockeyPool PoolAdmin
  Invitation);
                           simpleMessage.setText(Hello,br /br /You have
  been added as a
   Pool Administrator for our Hockey Pool System);

                           Transport.send(simpleMessage);
                           System.out.println(email sent);
                   } catch (MessagingException e) {
                           // TODO Auto-generated catch block
                           e.printStackTrace();
                   }
           }

   }

   When i GWT Compile i get no errors at all.
   Even when i debug the program it executes all of this code just fine
   and never hits an exception but the email is NEVER sent.

   Another thing is every single post about using Java Mail tells me i
   need the activation.jar but the following line gives me a warning that
   the activiation is never used anywhere in my class

   import javax.activation.*;

   Any help is much appreciated
   Thanks

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

-- 
You received 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: help sending emails in GWT

2011-03-01 Thread Greg Dougherty
Yep, it's easy to forget the difference.

On Mar 1, 2:10 pm, Hilco Wijbenga hilco.wijbe...@gmail.com wrote:
 On 1 March 2011 19:38, Dougherty, Gregory T. dougherty.greg...@mayo.edu 
 wrote:

  Wow, so you're saying you think that randomly picked up bits of
  JavaScript should be able to take over your computer and send emails
  from your computer to whomever they want?

  Every spammer in the world must love you.

  Fortunately, the browser makers disagree.

 Sigh, yes of course. I saw client and wasn't thinking browser + SOP. :-)

-- 
You received 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: Upadate Data of CellList

2011-02-28 Thread Greg Dougherty
Well, I haven't looked at the Showcase example, but I'd bet good money
that those null pointers are the result of your actions, not anything
in GWT.

Are you disposing of the data you got from the server after your call
to updateRow?  Remember, YOU are providing the data to the renderer.
That means you have to keep a copy of the data around for the renderer
whenever it wants it.

Greg

On Feb 25, 9:59 am, Andreas koebe...@gmail.com wrote:
  If you're only adding to the end of the list, then keep track of how
  many items you've already added, and call updateRowData (prevNumAdded
  - 1, newData);

 Unfortunately this works only on initial filling. The second time I
 call this I've got nullPointers in my cell.render method for the first
 items added. This is another thing I dont understand: why is the
 render method call for my whole list and not only for the one that
 I've added in the updateRowData method and why the first 10 are null.

 Also I dont understand which method forces the list to re render?

  If you're changing things / adding things in the middle, you can do
  all sorts of complicated things to figure out where the changes are,
  and only give your CellList the changes, but you're probably better
  off simply replacing everything and letting CellList worry about it.

 Draw the whole list is not that good cause you have a short delay
 where the list disappears. And there must be  a way to get it work, as
 shown in the showcase example.

-- 
You received 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: help sending emails in GWT

2011-02-28 Thread Greg Dougherty
 When i GWT Compile i get no errors at all.

GWT Compile is client side.  What you're doing is done, and can only
be done, on the server.  Where are you trying to send the mail from?

Greg

On Feb 28, 4:28 pm, GrahamH gharold...@gmail.com wrote:
 Hi all,

 Im trying to set up my GWT app so that it can send emails.

 I have the code to send the email in a server-side servlet class.  I
 have downloaded the Java Mail API and the JAF and included both the
 mail.jar and the activation.jar files to the external jars.

 Here is my Code:

 import java.util.Properties;

 import javax.mail.Message;
 import javax.mail.MessagingException;
 import javax.mail.Session;
 import javax.mail.Transport;
 import javax.mail.Message.RecipientType;
 import javax.mail.internet.AddressException;
 import javax.mail.internet.InternetAddress;
 import javax.mail.internet.MimeMessage;
 import javax.activation.*;

 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 import cs.ubc.ca.cs310.HockeyPool.client.EmailService;

 public class EmailServiceImpl extends RemoteServiceServlet implements
 EmailService  {
         /**
          *
          */
         private static final long serialVersionUID = 1L;

         public void sendEmail(String email){
                 Properties props = System.getProperties();
                 props.put(mail.smtp.host, smtp.gmail.com);
                 props.put(mail.smtp.port, 465);

                 Session mailSession = Session.getDefaultInstance(props);
                 Message simpleMessage = new MimeMessage(mailSession);

                 InternetAddress fromAddress = null;
                 InternetAddress toAddress = null;
                 try {
                         fromAddress = new 
 InternetAddress(gharold...@gmail.com);
                         toAddress = new InternetAddress(email);
                 } catch (AddressException e) {
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                 }

                 try {
                         simpleMessage.setFrom(fromAddress);
                         simpleMessage.setRecipient(RecipientType.TO, 
 toAddress);
                         simpleMessage.setSubject(HockeyPool PoolAdmin 
 Invitation);
                         simpleMessage.setText(Hello,br /br /You have 
 been added as a
 Pool Administrator for our Hockey Pool System);

                         Transport.send(simpleMessage);
                         System.out.println(email sent);
                 } catch (MessagingException e) {
                         // TODO Auto-generated catch block
                         e.printStackTrace();
                 }
         }

 }

 When i GWT Compile i get no errors at all.
 Even when i debug the program it executes all of this code just fine
 and never hits an exception but the email is NEVER sent.

 Another thing is every single post about using Java Mail tells me i
 need the activation.jar but the following line gives me a warning that
 the activiation is never used anywhere in my class

 import javax.activation.*;

 Any help is much appreciated
 Thanks

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



Re: can we print page without open print dialog

2011-02-25 Thread Greg Dougherty
Would you want some random web page to be able to start your printer
going, printing out whatever the writer of that web page wants,
without any warning to you, or any way to stop it?

No?

Then no, you can't print from a web application running in a properly
functioning web browser w/o first putting up a print dialog that lets
teh user control what you're doing.  :-)

Greg

On Feb 25, 3:53 am, Neel neel.3.ka...@gmail.com wrote:
 Hi

 Is it possible  to print page without open Print Dialog.

-- 
You received 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 implement Enter Key Submit Form in GWT

2011-02-25 Thread Greg Dougherty
Search for EnterButton in this group.  At the top is a class
everyone should have.  Below that is a discussion of using sinkEvents
to get key down events from Widgets that normally don't pass them.

Greg

On Feb 25, 7:59 am, El Mentecato Mayor rogelio.flo...@gmail.com
wrote:
 If you want to do it when a PasswordTextBox is on focus for example
 (this is from my sign-in page):

 passwordTextBox.addKeyPressHandler(new KeyPressHandler() {
          public void onKeyPress(KeyPressEvent event) {
             if (((int)event.getCharCode()) == 13) {  // User hit
 Enter key
                submitForm();
             }
          }

 });

 On Feb 24, 4:55 pm, Néstor Boscán nesto...@gmail.com wrote:

  Hi

  I need to simulate the Enter Key submit form in GWT where hay hit the
  enter key and the form is submitted. Any ideas on how to acomplish this?

  Regards,

  Néstor Boscán

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

2011-02-24 Thread Greg Dougherty
If you're only adding to the end of the list, then keep track of how
many items you've already added, and call updateRowData (prevNumAdded
- 1, newData);

If you're changing things / adding things in the middle, you can do
all sorts of complicated things to figure out where the changes are,
and only give your CellList the changes, but you're probably better
off simply replacing everything and letting CellList worry about it.

Greg

On Feb 24, 4:57 am, Andreas koebe...@gmail.com wrote:
 I have a celllist where I want add data loading from server and the
 list should show all data. I use a AnsyncProvider and when I
 succecfully get my data from the server I want to add the data to the
 celllist. The only way I got this work is to hold a list of the data
 I've got from the  server, where I add incoming data and then calling
 updateRowData with the list of all incoming data:
 ListResponse list;
 onSuccess(Response response){
 list.addAll(response.getItems());
       list.addAll(response);
       display.setVisibleRange(0, list.size());
       asyncDataProvider.updateRowData(0, list);

 }

 But this force the CellList to redraw the the list with the whole
 dataset not only the new one. Like in the showcase example of cellList
 (http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList).

 So my question how can I show all data and only the new one will be
 added to the view.

-- 
You received 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: Image element will hang test execution

2011-02-24 Thread Greg Dougherty
Right before this object's constructor, try to create the image object
on its own.  If that doesn't work, try to create the image as the
first think your app does.  If that does work, you've got something in
your app breaking the image.  If that doesn't work, you have a bad
image.  If they both work, then you've got a problem somewhere in your
object, so try allocating the Image at different points of the
constructor, until you've found the command that breaks the Image
loading process.

You can also try a different Image, to see if the SPECIFIC Image is
the problem there, or if any image is a problem.

IOW, at this point we have no idea whether or not it's a GWT problem,
and (since you haven't given us the code necessary to replicate the
problem) noway to help you if it IS a GWT problem.

Greg

On Feb 24, 5:54 am, Alex D. alex.dobjans...@gmail.com wrote:
 Still no idea guys?

 On Feb 23, 6:19 pm, Alex D. alex.dobjans...@gmail.com wrote:

  Hi,
  The code below will not finish (gets hanged in the Image constructor):

  public class ATest extends GWTTestCase {
         // . init code  //

          public void testShouldNotHang () {
                  // Create an empty image
                  final Image img = new Image();
          }

  }

  The hang happens on Image:237 =
  Event.sinkEvents(image.getElement(), Event.ONLOAD);

  Now, I'm not trying to test the Image constructor, but I have complex
  components that cannot be modified for testing purposes, and the
  happen to have Image inside. I have searched but I couldn't find any
  answer ... nobody else had this issue?

  Thanks

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

2011-02-24 Thread Greg Dougherty
Why?  What are you trying to accomplish?

On Feb 24, 7:44 am, ryan T ryanro...@gmail.com wrote:
 Hi all,

 Is there any way to replace Enter key by Shift + Enter for a widget such as
 RichTextArea?

 Thanks,

 ryan

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



Where do I put the Tomcat Context.xml file?

2011-02-24 Thread Greg Dougherty
I'm starting to use JNDI with my Servlet, for which I need to place a
context.xml file in /META-INF/context.xml for my .war file?  Where is
that in the GWT file hierarchy?  war?  war/WEB-INF?

TIA,

Greg

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Where do I put the Tomcat Context.xml file?

2011-02-24 Thread Greg Dougherty
Thank you Alan.

On Feb 24, 3:57 pm, Alan Chaney a...@mechnicality.com wrote:
 war/META-INF/context.xml

 just create the dir and pop in the context.xml.

 You should check carefully the tomcat docs w.r.t context.xml - the spec. has 
 changed a lot between
 different versions of tomcat.

 HTH

 Alan

 On 2/24/2011 1:44 PM, Greg Dougherty wrote:

  I'm starting to use JNDI with my Servlet, for which I need to place a
  context.xml file in /META-INF/context.xml for my .war file?  Where is
  that in the GWT file hierarchy?  war?  war/WEB-INF?

  TIA,

  Greg

 --
 Alan Chaney
 CTO and Founder, Mechnicality, Inc.www.mechnicality.com

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: TabLayoutPanel + dynamic tab content + DialogBox = ?

2011-02-23 Thread Greg Dougherty
Good idea.  I've created such a request.
http://code.google.com/p/google-web-toolkit/issues/detail?id=6069q=TabPanelsort=-idcolspec=ID
Type Status Owner Milestone Summary Stars

On Feb 23, 2:42 am, Thomas Broyer t.bro...@gmail.com wrote:
 Maybe you could file a bug? They'll be undeprecating DockPanel in 2.3, and
 maybe TabPanel should be undeprecated 
 too:http://code.google.com/p/google-web-toolkit/issues/detail?id=5888

-- 
You received 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: Sorting CellTable, AsyncData but Sort Locally

2011-02-23 Thread Greg Dougherty
Well, I'd start out by trying:
public MySortHandler(ListBook BOOKS, CellTable myCellTable,
Column columnA,  you get the picture) {
 thisList = new ArrayList (BOOKS);
 ..
}

On Feb 23, 9:56 am, Josh K kendrick.j...@gmail.com wrote:
 Ok, I got something working using the example you provided, but I
 don't like how I implemented it. It wasn't hard, but everything I've
 wanted to do in GWT so far has been easy, so this seems kind of
 messy..

 But, I guess trying to implement sorting using a ListSortHandler would
 have been just as messy since I would have had to setComparator for
 every column still right?

 Also, this is probably a stupid Java error, but I'm trying to re-use
 my SortHandler so I broke it into it's own class. In each composite
 I've got a list of what is displayed in the tables, call it BOOKS.
 What I've been trying to do is instantiate the SortHandler:

 new MySortHandler (BOOKS, myCellTable, columnA, columnB, columnC,
 etc..)

 And in class I've got something like
 public class MySortHandler {
     private ListBook thisList;

     public MySortHandler(ListBook BOOKS, CellTable myCellTable,
 Column columnA,  you get the picture) {
          thisList = BOOKS;
          ..
     }

 Down below I sort thisList, and at the end, I assign it back to BOOKS
 and do cellTable.setRowData(BOOKS);

 When I go to sort though, nothing happens. I think I narrowed it down
 to understand for some reason the list isn't getting copied over or
 something like that? If I have MySortHandler as an internal private
 class to my composite and I use the original List BOOKS, it sorts, but
 when I try to do like I was doing above, it doesn't work.

 Can anyone explain why, and give me an idea of how to fix it. I'll be
 alright without code, just don't even know how to get around this. I'd
 hate to have to stick an internal SortHandler at the end of each
 composite.

 On Feb 14, 12:19 pm, Josh K kendrick.j...@gmail.com wrote:

  What I was getting confused about doing it this way though is if I'm
  allowing the data to be sorted by 4 or 5 different columns, would I
  have to say something like:

  if (event.isSortAscending  nameColumn) {
      Collections.sort(newData, nameAscComparator)} else if (nameColumn) {

      Collections.sort(newData, nameDescComparator)} else if 
  (event.isSortAscending  timeRequestedColumn) {

      Collections.sort(newData, timeRequestedAscComparator)

  } 

  ya know where I have to have a different asc and desc comparator for
  each column and figure out which column was selected before I sort?

  I'm thinking that I'll have a small enough set of rows (probably max
  100 rows at a time), that if I just make the columns sortable, it will
  be fine if I don't use paging. So maybe I should do what Greg
  mentioned and download all the data and use a ListDataProvider. What I
  liked about the AsyncDataProvider though is that people can change the
  value of a cell and hit enter and it's updated in the database because
  this will be an application a couple are using at one time all dealing
  with the same data so I need changes to show up on what other people
  are seeing.

  BTW, thanks a lot guys!

  On Feb 14, 10:00 am, John LaBanca jlaba...@google.com wrote:

   If you are supporting paging, then a local sort will only sort the current
   page, whereas a database sort would sort the data return the results for 
   the
   current page.  For example, if you are on the first page and do a reverse
   sort, do you want to see all the names that start with z (database sort), 
   or
   do you want to see all of the names that start with a in reverse order
   (local sort of the current page).

   That being said, you can cache the values locally in a list and use
   ListSortHandler.  Alternatively, you can add a ColumnSortEvent.Handler to
   CellTable and copy and sort the return of CellTable#getVisibleItems().  
   The
   code would be something like the following:

   cellTable.addColumnSortHandler(new ColumnSortEvent.Handler() {
     public void onColumnSort(ColumnSortEvent event) {
       ListT newData = new ArrayList(cellTable.getVisibleItems()); // Copy
   the data
       if (event.isSortAscending) {
         Collections.sort(newData, myAscComparator); // Sort ascending.
       } else {
         Collections.sort(newData, myDescComparator); // Sort descending.
       }
       cellTable.setRowData(cellTable.getVisibleRange(), newData);
     }

   });

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

   On Mon, Feb 14, 2011 at 12:53 AM, Josh K kendrick.j...@gmail.com wrote:
I've been developing an application in GWT that has data I've been
displaying in a CellTable. I've set it up with a few TextColumns and a
few EditTextColumns. I've got it set up to where if someone changes
the data in an EditText cell, it sends an asynchronous request to the
database and updates that row in the DB table. In short, I've got all
this working 

Re: TabLayoutPanel + dynamic tab content + DialogBox = ?

2011-02-22 Thread Greg Dougherty
You've discovered the reason why I never use TabLayoutPanel, and why
I'll need a really good reason to keep on upgrading GWT once support
for TabPanel goes away.

So it's deprecated.  Block deprication warnings, and use TabPanel.

Greg

On Feb 21, 2:30 pm, jscheller jschel...@csoftware.com wrote:
 So... I've got a TabLayoutPanel I'm trying to embed in a DialogBox,
 where the contents of the tabs are generated at runtime. I've seen the
 discussion about making sure DOCTYPE is right and that I'm pulling in
 CSS for the tabs. I've actually got another similar instance of
 TabLayoutPanel working fine as part of my main (LayoutPanel based)
 layout, but if I pop up a DialogBox with a TabLayoutPanel in it, I'm
 missing the actual tab content (the tabs themselves show up fine,
 styled just like my working instance.)

 If I explicitly set the height of the TabLayoutPanel to something, I
 can see the content fine. My problem is all my tab content is
 dynamically generated, and ideally I'd like to see the TabLayoutPanel
 (and the containing DialogBox) resize itself. Lots of gnashing of
 teeth today over this.

 And so, it occurs to me that DialogBox isn't descended from a
 LayoutPanel and I'm wondering if TabLayoutPanel is really destined to
 work in a DialogBox at all when resizing might be concerned...
 TabPanel is deprecated, and there's no LayoutDialogBox or anything
 around so I'm wondering how best to proceed.

 Is there a clean recipe for adding a bunch of content to a
 TabLayoutPanel and then explicitly getting it to resize itself (and
 it's non-Layout derived enclosures?). I tried adding all my panel
 contents and then just calling TabLayoutPanel.OnResize(), but didn't
 get anything different. Or is my best bet going back to TabPanel and
 wait for the day that blocks a GWT upgrade?

 Thoughts or insights appreciated...

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



Trying to search but nothing's happening

2011-02-22 Thread Greg Dougherty
Well, not nothing, but when I click on my profile (and other people's
profiles) I don't see any messages after Feb 1.  If I search for my
name I get the same thing.

Why can't I use Search to find my recent messages?

-- 
You received 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: Feedback Requested: Preview of new GWT Style Theme

2011-02-22 Thread Greg Dougherty
Overall UI principle:
Good UI is unconscious UI.  If the user has to stop and think about
something (is A really different from B?), then the UI has failed.
A quick glance should, immediately and without any conscious thought,
tell the user essentially everything about the interface.  This is
disabled, that is not.  This is the foreground object, these are
background objects, and that is the overall background.  Three very
differnt things, which therefore should always LOOK very different.

Sometimes you do a good job of this (check boxes, radio buttons),
other times you do a very poor job (basic button, Tab Layout Panel).

And remember: big targets are good (and fast) targets.  Small targets
are bad (and slow) targets.

Lighting:
Your text boxes have the top bar of the box black, and the other three
gray.  it looks wrong to my eyes,  If you're trying for a 3D effect, I
can't see it.  Depth takes more than one pixel / line.  I'm perfectly
happy with 2D UI objects (which would mean all for lines being the
same color).  I'm willing to live w/ 3D.  Right now, you have a 2.5D
look that just doesn't work.  I urge you to pick one look, and stick
to it.

1: Basic Button:
It's very hard to tell the disabled and enabled buttons apart.  I
suggest either changing the background more when it's disabled, or
bolding the text when it's enabled.  (Compare with Custom Button,
where it's quick and easy to tell if it's enabled or not.)

2: Hyperlinks:
Is there a difference between followed and never visited
Hyperlinks?  Because if there is, I can't see it.  If there isn't, and
it's possible to add it, I think it should be added.

3: ListBox:
It would be good to have enough entries for one of the selections so
we can see what it looks like when the Box has to scroll its data.

5: Tree
A: While the +/- works, I certainly prefer the triangle that turns to
the side or down based on the disclosure state.
B: The disclosure box is a rather small target to hit (I missed it
several times).  It would be nice to make it bigger, and / or make it
so double-clicking on the text of the line opens / closes the
disclosure.

6: Menu Bar:
It's nice, but it COMPLETELY clashes with the menu bar on my web
browser (Sea Monkey on Windows XP).

I know you're trying to develop your own theme, but the apps created
with this theme have to live inside web browsers.  Violently clashing
with the surrounding UI is inherently bad UI, no matter how pretty the
UI might be in isolation.

7: Disclosure Panel:
When I click on the Disclosure Panel, the text of the title gets
surrounded by a gray box.  This looks OK when it closes, but looks
really ugly when it opens.

8: Tab Layout Panel:
Put me in the hate it column.  Dark Blue on Slightly Less Dark Blue
is IMO a really bad color combination (and I say this as someone who
really likes blue).  The unselected Tabs are different from the
background.  Therefore, they need to have a different, easily
distinguishable, color than the background.

9: Cell Browser
It's Browse through dynamic data, NOT BrowseR through dynamic
data :-)

Other than that it's fairly good.  But I didn't notice anything that
caused me to think hey, that's great, i want that!

Greg

On Feb 16, 12:12 pm, John LaBanca jlaba...@google.com wrote:
 The GWT team is happy to (pre)announce that we will introduce a new, more
 modern CSS style theme in GWT 2.3 called Clean.  The new theme makes
 existing widgets look cleaner (more business-like) than the standard
 theme, and replaces the thick light blue borders with thin gray borders.  We
 worked under the constraint that we would not modify the DOM structure of
 the existing widgets because we didn't want to break existing apps, so this
 new theme is purely a CSS overhaul.

 You can preview the new Clean style theme at the link 
 below:http://gwt-showcase-clean.appspot.com/

 Please let us know what you like and dislike about the new theme, and if you
 are interested in switching your app to it.  Once we release the theme, it
 becomes very difficult to change it without affecting existing apps, so
 early feedback is helpful.

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

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

2011-02-16 Thread Greg Dougherty
Thanks, it worked!

Greg

On Feb 11, 10:19 pm, Jim Douglas jdou...@basis.com wrote:
 public class FileDownloadServlet extends HttpServlet
 {
     @Override
     protected void doGet(HttpServletRequest p_request,
                          HttpServletResponse p_response)
         throws ServletException, IOException
     {
         String filename = /* ... */;
         File file = /* ... */;
         long length = file.length();
         FileInputStream fis = new FileInputStream(file);
         p_response.addHeader(Content-Disposition,
                              attachment; filename=\ + filename +
 \);
         p_response.setContentType(application/octet-stream);
         if (length  0  length = Integer.MAX_VALUE);
             p_response.setContentLength((int)length);
         ServletOutputStream out = p_response.getOutputStream();
         p_response.setBufferSize(32768);
         int bufSize = p_response.getBufferSize();
         byte[] buffer = new byte[bufSize];
         BufferedInputStream bis = new BufferedInputStream(fis,
 bufSize);
         int bytes;
         while ((bytes = bis.read(buffer, 0, bufSize)) = 0)
             out.write(buffer, 0, bytes);
         bis.close();
         fis.close();
         out.flush();
         out.close();
     }

 }

 On Feb 11, 9:12 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  So I have a way to get a Save As Dialog box to come up for the file
  I'm downloading from my servlet (user hits the Export Button, I
  create an invisible frame that points to my servlet with the
  parameters necessary for the servlet to generate the export file).
  Unfortunately, the file comes up with the name of my servlet.

  How do I give the Save As Dialog a better default name for the file?
  The file is generated on the fly, so putting a file name in the URL
  wouldn't work.

  TIA,

  Greg

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Problem with AsyncCallback onSuccess result is null

2011-02-15 Thread Greg Dougherty
Is there some reason why you're implementing Serializable rather than
IsSerializable?  Have you taken care of all the fiddly bits you have
to deal with to get Serializable to work with GWT?

http://code.google.com/webtoolkit/doc/trunk/FAQ_Server.html#Does_the_GWT_RPC_system_support_the_use_of_java.io.Serializable

Greg

On Feb 12, 5:14 pm, Bastian bastian.la...@hotmail.de wrote:
 Hello,

 I hope everyone is fine. I have started to use RPC’s with GWT. I have
 worked through the examples and tutorials and I believe understand how
 it works. Now, I have created my own class to serialize and use in an
 asynchronous callback so that the client can receive data about a
 purchase from a server. Everything compiles properly and the onSuccess
 method gets executed, but when I try to read the received data, it
 only is “Null”. Does anyone have an idea what might be wrong with my
 code?

 Thanks a lot.

 Best regards,

 Bastian

 Here is my code:

 Class to store the data in client package:

 import java.io.Serializable;

 @SuppressWarnings(serial)
 public class Purchase implements Serializable {

           private String username;
           private String headline;
           private String description;

           public Purchase()
           {

           }

           public String getUsername(){
                 return username;
           }

           public String getHeadline(){
                   return this.headline;
           }

           public String getDescription(){
                   return description;
           }

           public void setUsername(String username){
                   this.username = username;
           }

           public void setHeadline(String headline){
                   this.username = headline;
           }

           public void setDescription(String description){
                   this.description = description;
           }

 }

 Service Interface in client package:

 import com.google.gwt.user.client.rpc.RemoteService;
 import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

 @RemoteServiceRelativePath(collectivePurchase)
 public interface CollectivePurchaseService extends RemoteService {
   Purchase getCollectivePurchase(String username);

 }

 Async Interface in the client package:

 import com.google.gwt.user.client.rpc.AsyncCallback;

 public interface CollectivePurchaseServiceAsync {

   void getCollectivePurchase(String username, AsyncCallbackPurchase
 callback);

 }

 Server implementation:

 import com.google.gwt.user.server.rpc.RemoteServiceServlet;

 @SuppressWarnings(serial)
 public class CollectivePurchaseServiceImpl extends
 RemoteServiceServlet implements CollectivePurchaseService {

 public Purchase getCollectivePurchase(String username) {

 com.biddrocket.secretrocket.client.Purchase collective = new
 com.biddrocket.secretrocket.client.Purchase();
                 collective.setUsername(brian);
                 collective.setHeadline(motor bike);
                 collective.setDescription(most amazing bike);

                 return collective;

         }

 }

 Client entry point:

 CollectivePurchaseServiceAsync collectivePurchaseService =
 (CollectivePurchaseServiceAsync)
 GWT.create(CollectivePurchaseService.class);

 collectivePurchaseService.getCollectivePurchase(brian ley, new
 AsyncCallbackPurchase() {
                                                 public void 
 onFailure(Throwable caught) {
                                                         
 Window.alert(caught.getLocalizedMessage());
                                                 }
                                                 @Override
                                                 public void 
 onSuccess(Purchase result) {
                                                          update(result);

                                                 }
                                         });

                   //Make the call to the RPC to get the headline for the 
 gallery
 showcase
                   //collectivePurchaseService.getHeadline(brian, callback);
           }
           public void update(Purchase collective){
                   Window.alert(collective.getHeadline());
           }

-- 
You received 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: Sorting CellTable, AsyncData but Sort Locally

2011-02-14 Thread Greg Dougherty
Here's the question you want to ask yourself: Why am I using an
AsyncDataProvider and data paging?

Because I use one in my app with sortable columns.  And I'm using one
because I've got thousands to tens of thousands of rows of data to
display.  And since I don't want to try to download all that data in
one go, I sort things on the server (actually, I sort the data within
the database, and get a scrollable results set with everything in the
right order).

If you really have a little enough data that you want to sort it on
the client, do yourself a favor, and just download all the data and
don't use the AsyncDataProvider at all.

Greg

On Feb 13, 11:53 pm, Josh K kendrick.j...@gmail.com wrote:
 I've been developing an application in GWT that has data I've been
 displaying in a CellTable. I've set it up with a few TextColumns and a
 few EditTextColumns. I've got it set up to where if someone changes
 the data in an EditText cell, it sends an asynchronous request to the
 database and updates that row in the DB table. In short, I've got all
 this working using AsyncCallbacks and an AsyncDataProvider.

 Since 2.2 came out, I want to implement column sorting, kind of like
 is seen in this 
 example:http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellTable
 , but with an AsyncDataProvider. I want to sort the columns locally
 because I think it'd be faster than making an Async DB call again each
 time someone clicks to sort (which is the impression of what was
 supposed to happen if I used an AsyncHandler.

 So I THINK what I'm looking for is some way to use a ListHandler with
 an AsyncDataProvider?

 Can anyone shed some light on this? Maybe done it before or know the
 direction I'm supposed to? If it's even do-able?

-- 
You received 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: Create an Image from received bytes on client side - possible?

2011-02-14 Thread Greg Dougherty
I could not find any way to build an Image other than by sending one
from the server, when I tried to solve a similar problem two months
ago.

On Feb 14, 3:16 am, MJ zuti...@gmail.com wrote:
 Hey guys.

 I did some researching on this matter but besides ClientBundle I
 failed to find something that would help me here. ClientBundle would
 work OK in case I would have the images as static references, but what
 I am trying to do (just playing around, getting to know this GWT) is
 similar to file explorer. A tree on the left side of my workspace
 shows folders with files inside them. For my purposes, picture files.
 And these folders can be anywhere on the HDD. Now, how would I go
 about sending selected image (or complete folder content) to client
 side?

 What I had in mind is that I would create a widget that would hold an
 Image object on it + perhaps a label or two. Nothing fancy. This
 widget would call a asnyc service to get the picture data from the
 server. Bytes. But, once I would get the data to the client side, how
 can I create an Image object out of it? I did not find a way.

 Alternative I could probably make browsing only possible on such
 folders that are accessible over the internet (virtual folders I think
 is the correct term) and just send over appropriate URLs, since Image
 does accept such parameter. But I would really like to know if
 original idea is feasible. ImageResource from received bytes?

 Thank you all.

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



Setting the name of a downloaded file

2011-02-11 Thread Greg Dougherty
So I have a way to get a Save As Dialog box to come up for the file
I'm downloading from my servlet (user hits the Export Button, I
create an invisible frame that points to my servlet with the
parameters necessary for the servlet to generate the export file).
Unfortunately, the file comes up with the name of my servlet.

How do I give the Save As Dialog a better default name for the file?
The file is generated on the fly, so putting a file name in the URL
wouldn't work.

TIA,

Greg

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



Frame not refreshing when call setURL

2011-02-10 Thread Greg Dougherty
So, I have a hidden frame, and I set its URL to download a file from
my server.  The first time I do this, it works like a charm.

Any subsequent times I do it, my server never gets the call.  I am
changing at least one of the parameters of the URL each time, so I
don't believe that Firefox would be caching the call (and, even if it
was, shouldn't it give me the file to save again?).

Firefox 3.6.13, on Windows XP.

-- 
You received 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: What is the correct way for CellTable cells to communicate ?

2011-02-08 Thread Greg Dougherty
What I do is make a change to the data for the row (the class T
object), then tell the data provider to refresh.

Greg

On Feb 3, 11:10 pm, zixzigma zixzi...@gmail.com wrote:
 I have a CellTable.

 when an event occurs in Cell A,
 I would like to take action and modify Cell B.
 (user clicks on Cell A, I would like to modify Cell B, in the same row to
 keep things simple)

 could you please provide some pointers on how this can be correctly
 implemented ?

 do you think we need to use DOM events or GWTEvents,
 and do you think it has to be handled at Cell level, or Table level ?

 any ideas are really appreciated.

 Thank You

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



Re: Announcing GPE/GWT 2.2 RC1

2011-02-08 Thread Greg Dougherty
Well, leaving aside the question of why HAVEN'T you upgraded to Java
6, the various isEmpty () methods are quite cool, and wrth an upgrade
just for that.

Greg

On Feb 8, 1:47 am, stuckagain david.no...@gmail.com wrote:
 What features in Java 6 would be so fundamental to GWT that 1.5 becomes
 deprecated ?

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



Re: Announcing GPE/GWT 2.2 RC1

2011-02-08 Thread Greg Dougherty
The other thing to remember is that if they claim to support Java 5,
then they have to test against it.  Given limited testing ability,
where would you have them spend their resources:
1: Making sure Java 1.5 still works
2: Making sure Java 6 works even better?

Greg

On Feb 8, 1:47 am, stuckagain david.no...@gmail.com wrote:
 What features in Java 6 would be so fundamental to GWT that 1.5 becomes
 deprecated ?

-- 
You received 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: Selecting and disabling elements in CellTable

2011-02-04 Thread Greg Dougherty
Hi Jeff,

I ended up writing my own version of CheckboxCell (rather, taking the
code for it, and making my own class with modifications).

First change: I added a boolean field disabled, and a setEnabled
call.
Second change: I redid render so it has 4 options (checked | unchecked
x enabled | disabled)
Third change: removed all the code for keeping track of its value,
since my getValue and FieldUpdater take care of that.

Result, a disable able CheckboxCell that behaves the way I expect it
to.

(The purpose of the graphic was to show how hiding col 2, the checkbox
column, moves col 3, a non-checkbox column, since you didn't seem to
understand why I consider the show / hide to be a bad thing.)

Greg

On Feb 1, 2:59 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 On Tue, Feb 1, 2011 at 3:38 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Jeff:

  Column 1 : Column 2 ; Column 3
  Column 1 :Column 3
  Column 1 : Column 2 ; Column 3

  I thought you said column, Geg, not an individual row's cells and naturally

 I took that then to mean all check boxes within a column. Is that what you
 said or do I have a pencil sticking out of my head :)?

 In any case it's now obvious what your intention is so here's one way to do
 this but it is by no means the only way:

 Iterate row by row through your cell table and for each row iterate through
 each of its cells. If a cell contains a checkbox that needs to be disabled
 then get the cell's inner html which will be a checkbox. Once you have the
 checkbox just set it's enabled property to false or better yet hide the
 checkbox by setting its display attribute to none.

 There are numerous GWT methods that can assist you in iterating over the DOM
 and in particular a table. For instance, I use TableElement often,
 especially TableElement.as which assert that the given Element is compatible
 with a TableElement and automatically typecast it. Once I have a valid
 TableElement reference I can then get a reference to its rows by calling its
 getRows method - just remember to compensate for any table header rows you
 may have. Once you have a NodeListTableRowElement use its TableRowElements
 to obtain the cells by calling it getCells method. Once you have the cells
 you can then iterate over each one and do with them as you like.

 Jeff

 Jeff

-- 
You received 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: TabPanel and Lazy load

2011-02-04 Thread Greg Dougherty
I just looked at it and it seems like it's all still valid (you might
want to see if you're willing to use TabLayoutPanels, rather than
TabPanels, since the later are deprecated).

What is it that you think doesn't work?

Greg

On Feb 4, 6:41 am, András Csányi sayusi.a...@gmail.com wrote:
 Hi All,

 I would like to build an application and there is and tabPanel which
 has 2 tabs. I know there is a good thing to use at different tabs. I
 search on it the internet and I found this 
 article:http://googlewebtoolkit.blogspot.com/2008/11/improving-performance-wi...

 Which is good just old a little bit. Is there a fresher article
 regarding lazy load and tabPanel with example? Basically I would like
 to see how can I place a clicklistener because I'm very new in GWT
 world.

 I'm using (Ok, I would like to use :) ) gwt-2.1.1 and gwtDesigner.

 Thanks is advance for any help!

 András

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

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

2011-02-01 Thread Greg Dougherty
Jeff,

 Don't move the check boxes, just don't render them.

So, you're saying when the user selects a group they do not own, I
should make the checkboxes disappear, leaving me with an empty column
(that, somehow, I'm going to tell to take up EXACTLY as much space as
it would if it had checkboxes in it), and that having controls appear
and disappear in the middle of a table is a superior interface to
having the controls enable and disable?

Or am I just totally not understanding you?

Greg

On Jan 28, 3:53 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Don't move the check boxes, just don't render them. If all user interfaces
 we're as rigid as that we wouldn't need a dom api to manipulate and render
 html on the client. A ui principle you didn't mention is don't expose
 useless info/ui to users.

 Look, its your site so I'm just giving you something to think about.
 On Jan 28, 2011 3:19 PM, Greg Dougherty dougherty.greg...@mayo.edu
 wrote:

  Well, If they create a group, or select a group that they can modify,
  then they need the checkboxes. Having them disappear and reappear
  (rather than be disabled and enabled) violates the principles of UI
  design that I know and agree with. Starting with the belief that the
  UI should be stable and solid, and that controls should not move
  (muscle memory being key to accomplishing things quickly, a UI that
  moves targets around is a bad UI).

  Now, about your question
  which requires a question: Did you extend ColumnT,C to use check boxes
 in
  your cell table? If you did you can extend your implementation's api even
  further by providing it with methods to enable and disable the
 checkboxes.

  public class UserColumn extends ColumnString, Boolean implements
  FieldUpdaterString, Boolean

  My Cell is a CheckboxCell. I don't see any routines in either class
  for enabling or disabling the checkbox. So, what do I override /
  call?

  Thanks,

  Greg

  On Jan 28, 11:29 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
  From a UI designer's perspective why display a column of check boxes if
 the
  user isn't allowed to click them? I wouldn't personally as a designer nor
  would I like that if I were a user.

  If the checkbox column is in a cell table that is being rendered in
 response
  to the user having selected something from somewhere else in the view
 then
  I'd first determine if the user can or cannot check the boxes and then I
  would render the table accordingly.

  But that is just me and the way I would do it. Now, about your question
  which requires a question: Did you extend ColumnT,C to use check boxes
 in
  your cell table? If you did you can extend your implementation's api even
  further by providing it with methods to enable and disable the
 checkboxes.

  Jeff

  On Fri, Jan 28, 2011 at 11:59 AM, Greg Dougherty 

 dougherty.greg...@mayo.edu



   wrote:
   Hi Jeff,

   Thank you.  I added a SingleSelectionModel to my CellTable, and now I
   can force selection of rows.

   Any idea how I tell a column of CheckBoxes that they can't accept any
   clicks?

   Greg

   On Jan 28, 10:11 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
You can use one of the concrete implementations of

 AbstractSelectionModel  to
select rows and respond to row selection. CellTables and
AbstractSelectionModel instances work hand-in-hand.

You connect the selection model to the cell table by calling the
 table's
setSelectionModel method passing an instance of a selection model.

You select rows by calling the selection model's setSelected method
   passing
an instance of the data object being displayed by the table. The row
displaying that instance of the data object will then be selected

You respond to row selection by adding a

 SelectionChangeEvent.Handler()

   to
the selection model by calling the selection model's
addSelectionChangeHandler method. You can use this event, for
 instance,
   to
load a detailed view of the selected data object such as more
   information,
data from its children data objects, etc. etc.

Jeff

On Fri, Jan 28, 2011 at 10:49 AM, Greg Dougherty 
   dougherty.greg...@mayo.edu

 wrote:
 I am trying to use three CellTables to make a Users and Groups
 panel
 in my current application.  Its purpose is so users can give other
 users access to resources that they control (in this particular
 case,
 choosing which people can see the information you've uploaded to a
 database).

 The first table is the Groups table.  Groups can be added and
 selected.  If you are the owner of the current Group then you can
 modify its settings, if not, you can't.

 The second table is Users.  It has two columns, a text field with
 the
 name of the user, and a checkbox reporting whether or not the user
 is
 a member of the selected group.

 The third table is Resources.  It lists the information available
 to
 members of the current

Re: CellTable elements not updating correctly

2011-02-01 Thread Greg Dougherty
So, should I take it that this is a bug in GWT?

On Jan 28, 12:11 pm, Greg Dougherty dougherty.greg...@mayo.edu
wrote:
 // Making the cell I click on to change what Group i'm seeing:
         ClickableTextCell               groupCell = new ClickableTextCell ();
         FieldUpdaterGroupInfo, String   updater = new 
 FieldUpdaterGroupInfo,
 String () {
                 @Override
                 public void update (int index, GroupInfo theInfo, String 
 value)
                 {
                         boolean isOwner = (theInfo != null)  
 theInfo.getOwner
 ().equalsIgnoreCase (userName);

                         currentGroup = theInfo;
                         addUser.setEnabled (isOwner);

                         userProvider.refresh ();
                 }
         };

         GroupColumn     groupColumn = new GroupColumn (groupCell);
         groupColumn.setFieldUpdater (updater);

         theTable.addColumn (groupColumn, Name);

 public class UserColumn extends ColumnString, Boolean implements
 FieldUpdaterString, Boolean
 {
         private static GroupInfo        groupInfo = null;
         private static boolean          groupOwner = false;

         /* (non-Javadoc)
          * @see
 com.google.gwt.user.cellview.client.Column#getValue(java.lang.Object)
          */
         @Override
         public Boolean getValue (String user)
         {
                 if (groupInfo == null)
                         return false;

                 return groupInfo.hasUser (user);
         }

 }

 On Jan 28, 11:31 am, Jeff Schwartz jefftschwa...@gmail.com wrote:

  Code?

  On Fri, Jan 28, 2011 at 12:28 PM, Greg Dougherty dougherty.greg...@mayo.edu

   wrote:
   I have two CellTables that are logically connected together.  When I
   change the selection of the first one, I need to change the data
   representation in the second one.  When I first create the two tables,
   this works.  I call refresh on the DataProvider for the second table,
   it calls getValue for the column of check boxes, and the boxes are
   checked correctly.

   However, when I change the selection in the first table, and then call
   refresh on the DataProvider, the getValue calls are made, but their
   results are ignored.

   Is this a bug in GWT, or am I doing something wrong?

   TIA,

   Greg

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

  --
  *Jeff Schwartz*

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Sharing objects between several windows to enable interaction

2011-02-01 Thread Greg Dougherty
The first problem you face is that each browser window represents a
separate GWT application.  The second one you face is that, to the
best of my knowledge, there are only two ways those applications can
communicate with each other: via the server, and via cookies.  A third
problem you face is that you're going to run into a fair number of
users like me, who hate it when web sites try to take over their
machines and create new windows, and have their preferences set so
that you can't do that.

You can deal with the third problem by making sure that all your
window creation is done with actual HTTP links (so the user can right-
click on the link, and then tell it to open in a new window / tab).
This pretty much requires you to implement History (which is a good
thing in and of itself).

The only way I can see to deal with the first two problems is to have
a session cookie on the users machine that can be shared among
multiple running applications, and then have REALLY chatty apps that
are constantly sending updates to the server, and (by way of a Timer
task set to go off every second or so) constantly checking with the
server to see if anything has changed.

If you have few users and a server with a good network connection,
that might work.  But it's not a solution that will scale very well.

Greg

On Feb 1, 9:20 am, Terje Andre Johansen
terje.andre.johan...@gmail.com wrote:
 As far as I can see this would force me to re-render each view on
 change and also make it harder for a user to compare the different
 views. Further if the user has multiple screens, I think using several
 Windows is better than using only one. Your idea is good, however its
 not what I want to do if it is possible to do it the way I described.

 If am not mistaken, if the user is using Chrome I would actually be
 able to use several cores in the CPU for rendering if the application
 is split between different Windows? Correct me if I am mistaken.

 On 1 Feb, 15:17, Jeff Schwartz jefftschwa...@gmail.com wrote:

  Have you considered using GWT tabs or some other ui feature (roll your own
  if you have to) that would provide multiple views other than opening
  multiple browser windows or tabs? I really don't like it when applications
  open multiple browser windows or tabs and consider that a UI faux pas :).

  On Tue, Feb 1, 2011 at 8:44 AM, Terje Andre Johansen 

  terje.andre.johan...@gmail.com wrote:
   I am working on a project where I am using GWT to visualize biological
   data in several ways. This is done by searching for a gene by name,
   and what I want to happen is for each visualization to get its own
   window to display its data. The reason for this is that there is huge
   amounts of data, and trying to fit more than one visualization in one
   page is not a ideal way to do it.

   One of the goals for the project is to enable interaction between
   these visualization. In short this means that if a user clicks on a
   gene in one view, a similar event/method should be invoked in the
   other views as well. The newly opened windows will have the same
   parent and be in the same domain.

   I have looked at the GWT API, and so far only found the static void
   method Window.open(url, name, features). As far as I understand this
   means that I cannot get hold of the new window as an object to invoke
   methods on. Neither did I find the equivalent to the JS method
   window.opener() to get hold of the parent object in the newly opened
   window.

   I am wondering if anyone has worked with a similar problem and got
   some an idea of how to enable Window interaction using GWT.

   Help is appreciated.

   --
   You received 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.comgoogle-web-toolkit%2Bunsubs­cr...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-web-toolkit?hl=en.

  --
  *Jeff Schwartz*

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

2011-02-01 Thread Greg Dougherty
Ok, I've got two checkbox columns interspersed between other columns.
If I add and delete the checkbox columns based on the current user
selection in the first table, then other columns are going to be
jumping around.  No?

Which takes us back to controls moving around, destroying ability to
use muscle memory.  Which is I find that solution unacceptable.

So, is it possible for me to enable or disable controls in a column in
a CellTable?  Or does GWT lack that feature?

Greg

On Feb 1, 10:20 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 On Tue, Feb 1, 2011 at 11:06 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Jeff,

   Don't move the check boxes, just don't render them.

  So, you're saying when the user selects a group they do not own, I
  should make the checkboxes disappear, leaving me with an empty column

 Hi Greg,

 We all have very strong beliefs when it comes to UI so I hope you understand
 that I am not trying to convert you over to my point of view. But to answer
 your question, no, I am not saying leave an empty column. I am saying don't
 display the column.

 Jeff

-- 
You received 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: Selecting and disabling elements in CellTable

2011-02-01 Thread Greg Dougherty
Jeff:

Column 1 : Column 2 ; Column 3
Column 1 :Column 3
Column 1 : Column 2 ; Column 3

Column 3 has just jumped around.  It was at an X offset of 300, then
200, then 300

If I disable column 2, column 3 doesn't move.  If I hide column 2,
column 3 does move.  This makes hiding column 2 a BAD thing to do.

Column 2 is related to column 1.  It is NOT related to column 3.
Therefore, we cannot switch the order of columns 2 and 3 without
damaging the user's understanding of the data being presented by the
columns.

I do not, and will not, hard code the positions of user interface
elements.  I make a great deal of use of HorizontalPanel, and do not
use Standard doctype for anything (if / when GWT stops supporting
Quirks mode, I'll most likely stop upgrading GWT, because I can't
think of anything they might add that could be worth having to
explicitly tell everything where to go).

I've got three tables in an align left HorizontalPanel.  The center
table has one of the checkbox Column's that I'm concerned about.
Hiding / deleting / removing / not rendering that column causes the
table to its right to move.

All these things are the kind of reason why disabling controls was
invented way back in the early dawn of the GUI.  The question is does
GWT support that basic feature in CellTables?

Do you know the answer to that question?  If so, could you impart that
answer to the rest of us?

Greg


On Feb 1, 1:13 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 On Tue, Feb 1, 2011 at 1:15 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Ok, I've got two checkbox columns interspersed between other columns.
  If I add and delete the checkbox columns based on the current user
  selection in the first table, then other columns are going to be
  jumping around.  No?

 Greg,

 Use GWT's Ajax abilities to dynamically render the other cell tables with or
 without the columns in question or instead just hide and show the columns
 accordingly . It is quite simple and I don't understand what you mean by
 'then other columns are going to be jumping around. No? No, they wont.

 Good luck.

 Jeff

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



Selecting and disabling elements in CellTable

2011-01-28 Thread Greg Dougherty
I am trying to use three CellTables to make a Users and Groups panel
in my current application.  Its purpose is so users can give other
users access to resources that they control (in this particular case,
choosing which people can see the information you've uploaded to a
database).

The first table is the Groups table.  Groups can be added and
selected.  If you are the owner of the current Group then you can
modify its settings, if not, you can't.

The second table is Users.  It has two columns, a text field with the
name of the user, and a checkbox reporting whether or not the user is
a member of the selected group.

The third table is Resources.  It lists the information available to
members of the current group, and any information you control that is
not available to the current group (so you can give access to that
information to the members of the group).  It also has two fields, the
name of the resource, and a checkbox.

Issues I'm trying to solve:
1: How do I programmatically select a row in a table?  When a user
creates a new group, I wish to select it.  When the user first brings
up the panel, I'd like to select the first group (or, maybe, the first
group the person owns).

2: How do I disable a checkbox?  If the user doesn't own the group,
they shouldn't be able to change anything.

TIA,

Greg

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

2011-01-28 Thread Greg Dougherty
Hi Jeff,

Thank you.  I added a SingleSelectionModel to my CellTable, and now I
can force selection of rows.

Any idea how I tell a column of CheckBoxes that they can't accept any
clicks?

Greg

On Jan 28, 10:11 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 You can use one of the concrete implementations of AbstractSelectionModel to
 select rows and respond to row selection. CellTables and
 AbstractSelectionModel instances work hand-in-hand.

 You connect the selection model to the cell table by calling the table's
 setSelectionModel method passing an instance of a selection model.

 You select rows by calling the selection model's setSelected method passing
 an instance of the data object being displayed by the table. The row
 displaying that instance of the data object will then be selected

 You respond to row selection by adding a SelectionChangeEvent.Handler() to
 the selection model by calling the selection model's
 addSelectionChangeHandler method. You can use this event, for instance, to
 load a detailed view of the selected data object such as more information,
 data from its children data objects, etc. etc.

 Jeff

 On Fri, Jan 28, 2011 at 10:49 AM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  I am trying to use three CellTables to make a Users and Groups panel
  in my current application.  Its purpose is so users can give other
  users access to resources that they control (in this particular case,
  choosing which people can see the information you've uploaded to a
  database).

  The first table is the Groups table.  Groups can be added and
  selected.  If you are the owner of the current Group then you can
  modify its settings, if not, you can't.

  The second table is Users.  It has two columns, a text field with the
  name of the user, and a checkbox reporting whether or not the user is
  a member of the selected group.

  The third table is Resources.  It lists the information available to
  members of the current group, and any information you control that is
  not available to the current group (so you can give access to that
  information to the members of the group).  It also has two fields, the
  name of the resource, and a checkbox.

  Issues I'm trying to solve:
  1: How do I programmatically select a row in a table?  When a user
  creates a new group, I wish to select it.  When the user first brings
  up the panel, I'd like to select the first group (or, maybe, the first
  group the person owns).

  2: How do I disable a checkbox?  If the user doesn't own the group,
  they shouldn't be able to change anything.

  TIA,

  Greg

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

 --
 *Jeff Schwartz*

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



CellTable elements not updating correctly

2011-01-28 Thread Greg Dougherty
I have two CellTables that are logically connected together.  When I
change the selection of the first one, I need to change the data
representation in the second one.  When I first create the two tables,
this works.  I call refresh on the DataProvider for the second table,
it calls getValue for the column of check boxes, and the boxes are
checked correctly.

However, when I change the selection in the first table, and then call
refresh on the DataProvider, the getValue calls are made, but their
results are ignored.

Is this a bug in GWT, or am I doing something wrong?

TIA,

Greg

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

2011-01-28 Thread Greg Dougherty
// Making the cell I click on to change what Group i'm seeing:
ClickableTextCell   groupCell = new ClickableTextCell ();
FieldUpdaterGroupInfo, String updater = new FieldUpdaterGroupInfo,
String () {
@Override
public void update (int index, GroupInfo theInfo, String value)
{
boolean isOwner = (theInfo != null)  theInfo.getOwner
().equalsIgnoreCase (userName);

currentGroup = theInfo;
addUser.setEnabled (isOwner);

userProvider.refresh ();
}
};

GroupColumn groupColumn = new GroupColumn (groupCell);
groupColumn.setFieldUpdater (updater);

theTable.addColumn (groupColumn, Name);

public class UserColumn extends ColumnString, Boolean implements
FieldUpdaterString, Boolean
{
private static GroupInfogroupInfo = null;
private static boolean  groupOwner = false;

/* (non-Javadoc)
 * @see
com.google.gwt.user.cellview.client.Column#getValue(java.lang.Object)
 */
@Override
public Boolean getValue (String user)
{
if (groupInfo == null)
return false;

return groupInfo.hasUser (user);
}
}


On Jan 28, 11:31 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Code?

 On Fri, Jan 28, 2011 at 12:28 PM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  I have two CellTables that are logically connected together.  When I
  change the selection of the first one, I need to change the data
  representation in the second one.  When I first create the two tables,
  this works.  I call refresh on the DataProvider for the second table,
  it calls getValue for the column of check boxes, and the boxes are
  checked correctly.

  However, when I change the selection in the first table, and then call
  refresh on the DataProvider, the getValue calls are made, but their
  results are ignored.

  Is this a bug in GWT, or am I doing something wrong?

  TIA,

  Greg

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

 --
 *Jeff Schwartz*

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

2011-01-28 Thread Greg Dougherty
Well, If they create a group, or select a group that they can modify,
then they need the checkboxes.  Having them disappear and reappear
(rather than be disabled and enabled) violates the principles of UI
design that I know and agree with.  Starting with the belief that the
UI should be stable and solid, and that controls should not move
(muscle memory being key to accomplishing things quickly, a UI that
moves targets around is a bad UI).

 Now, about your question
 which requires a question: Did you extend ColumnT,C to use check boxes in
 your cell table? If you did you can extend your implementation's api even
 further by providing it with methods to enable and disable the checkboxes.

public class UserColumn extends ColumnString, Boolean implements
FieldUpdaterString, Boolean

My Cell is a CheckboxCell.  I don't see any routines in either class
for enabling or disabling the checkbox.  So, what do I override /
call?

Thanks,

Greg

On Jan 28, 11:29 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 From a UI designer's perspective why display a column of check boxes if the
 user isn't allowed to click them? I wouldn't personally as a designer nor
 would I like that if I were a user.

 If the checkbox column is in a cell table that is being rendered in response
 to the user having selected something from somewhere else in the view then
 I'd first determine if the user can or cannot check the boxes and then I
 would render the table accordingly.

 But that is just me and the way I would do it. Now, about your question
 which requires a question: Did you extend ColumnT,C to use check boxes in
 your cell table? If you did you can extend your implementation's api even
 further by providing it with methods to enable and disable the checkboxes.

 Jeff

 On Fri, Jan 28, 2011 at 11:59 AM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  Hi Jeff,

  Thank you.  I added a SingleSelectionModel to my CellTable, and now I
  can force selection of rows.

  Any idea how I tell a column of CheckBoxes that they can't accept any
  clicks?

  Greg

  On Jan 28, 10:11 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
   You can use one of the concrete implementations of AbstractSelectionModel
  to
   select rows and respond to row selection. CellTables and
   AbstractSelectionModel instances work hand-in-hand.

   You connect the selection model to the cell table by calling the table's
   setSelectionModel method passing an instance of a selection model.

   You select rows by calling the selection model's setSelected method
  passing
   an instance of the data object being displayed by the table. The row
   displaying that instance of the data object will then be selected

   You respond to row selection by adding a SelectionChangeEvent.Handler()
  to
   the selection model by calling the selection model's
   addSelectionChangeHandler method. You can use this event, for instance,
  to
   load a detailed view of the selected data object such as more
  information,
   data from its children data objects, etc. etc.

   Jeff

   On Fri, Jan 28, 2011 at 10:49 AM, Greg Dougherty 
  dougherty.greg...@mayo.edu

wrote:
I am trying to use three CellTables to make a Users and Groups panel
in my current application.  Its purpose is so users can give other
users access to resources that they control (in this particular case,
choosing which people can see the information you've uploaded to a
database).

The first table is the Groups table.  Groups can be added and
selected.  If you are the owner of the current Group then you can
modify its settings, if not, you can't.

The second table is Users.  It has two columns, a text field with the
name of the user, and a checkbox reporting whether or not the user is
a member of the selected group.

The third table is Resources.  It lists the information available to
members of the current group, and any information you control that is
not available to the current group (so you can give access to that
information to the members of the group).  It also has two fields, the
name of the resource, and a checkbox.

Issues I'm trying to solve:
1: How do I programmatically select a row in a table?  When a user
creates a new group, I wish to select it.  When the user first brings
up the panel, I'd like to select the first group (or, maybe, the first
group the person owns).

2: How do I disable a checkbox?  If the user doesn't own the group,
they shouldn't be able to change anything.

TIA,

Greg

--
You received this message because you are subscribed to the Google
  Groups
Google Web Toolkit group.
To post to this group, send email to
  google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to
google-web-toolkit+unsubscr...@googlegroups.comgoogle-web-toolkit%2bunsubscr...@googlegroups.com
  google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web

Re: is calling RequestFactory a blocking call ? when to update the View upon return of RequestFactory?

2011-01-18 Thread Greg Dougherty
You REALLY need to read up on GWT RPC.

 requestFactory
   .employeeRequest()
   .findAllEmployees()
   .fire(new ReceiverListEmployeeProxy() {
 @Override
 public void onSuccess(ListEmployeeProxy response) {

 # A  when to update the View ?
 panel.setWidget(view.asHasData().setRowData(0, response);
}
 });

This creates an object, which is passed to the RPC handling code.
OnSuccess is called On Success, i.e. when the RPC call has
successfully finished and returned the data.

Greg

On Jan 17, 7:00 pm, zixzigma zixzi...@gmail.com wrote:


 public class EmployeeListActivity extends AbstractActivity {

 EmployeeListView view;
 ListEmployeeProxy tempResultHolder = new ArrayListEmployeeProxy();
 .

 public void start(AcceptsOneWidget panel, EventBus eventBus)

 requestFactory
                   .employeeRequest()
                   .findAllEmployees()
                   .fire(new ReceiverListEmployeeProxy() {
                     @Override
                     public void onSuccess(ListEmployeeProxy
 response) {

                     # A  when to update the View ?
                     panel.setWidget(view.asHasData().setRowData(0,
 response);
                 or

                 ##B1 tempResultHolder.addAll(response);

                    }
                 });

  does it block here ? --- do we get past this line only after
 RF returns ?
             when do we get here ?
                      # B2 
                     panelSetWidget(view.asHasData().setRowData(0,
 tempResultHolder);

 }//Activity start method end

-- 
You received 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: Displaying one-line summary when dealing with list of long paragraphs. What would YOU do ?

2011-01-18 Thread Greg Dougherty
How big are your paragraphs?  Are we talking 10K here, total?  1K?
100K?

How long does it take to send 10K over your network?  How many people
are going to be requesting data simultaneously?

The first rule of optimization is you find out where things are
actually bogging down.  Unless your users are on really slow dialup,
AND you're sending more than 10K data per request (under version 1),
or # simultaneous requests * data size  1 MB / second, I think you're
going to find your bottlenecks elsewhere.

Greg

On Jan 18, 12:31 am, zixzigma zixzi...@gmail.com wrote:
 Take GMail for example.
 in the Inbox, you have a list of received emails,

 in addition to the mail Subject, there is a sentence from the opening
 of the email.
 in other words we have Subject + MAIL_BODY.substring(0, LENGTH)

 what is the best way to implement this feature ?

 if we were dealing with non-String objects, it made sense to just
 fetch the fields that are necessary,
 like a summary view, and provide detail as user required. making it two
 + step process.

 but in this particular case, we have a list of paragraphs, and want to
 provide a one line summary of each.
 to prepare this one-line summary, we need to retrieve the entire text,
 and then call substring, to get the one line summary.

 I have 3 solutions, but appreciate if you weigh in on how you would
 implement this particular usecase.

 Solution #1

 1- get the text from the DB
 2- extract the first X characters (one-line summary) [do this on the
 server]
 3- send this one-line summary to the client
 4-when client decides to see full text, sends a request
 5-this time send the full text

 Pros: - less data over the wire (instead of pargraphs after
 paragraphs, only one line is sent)
 Cons: - subsequent client requests would result in additional network
 roundtrip
           - string manipulation/extraction to produce the one line
 summary results in delay

 Solution #2

 1-get the text from DB
 2-send the entire text to the client
 3-when displaying, show only the first sentence,
 do this by extracting first X characters, doing this on the client

 Cons: transfering so much data can cause delay
 Pros: - after initial load, fewer network roundtrip to fetch more data
          - text manipulation on the client,
          means no delay as a result of waiting for the server to do
 the manipulation

 Solution #3

 having a bit of redundancy,
 add an additional field/column to hold the one-line summary.
 in other words instead of making one-line summary derivative attribute
 (which can be extracted by processing the entire text), we do it once
 and store it in the Datastore.
 upon user request, we grab this one-line summary column/field.
 if user required complete paragraph, we get the column/field
 containing the full text.

 Cons: redundancy might result in inconsistency, additional work to
 keep data consistent
           - when user requests for full paragraph, this results in a
 server call, which
            is not going to happen with Solution #2
 Pros: - no repeated processing overhead (text extraction/manipulation)
          - best use of bandwith, never sending anything thats going to
 waste.

 I am thinking of chosing Solution#3,
 based on an advice by Google,
 that basically stated Storage is cheap, but Bandwith is not,
  and user attention span is short therefore no delay ! : )

 have you implemented this functionality ?
 whats your thought on this,
 what would you do ?

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



Re: FormPanel.SubmitEvent cancel not working

2011-01-07 Thread Greg Dougherty
Ah, because under 2.0 it worked for me, too.

On Jan 5, 4:09 pm, Jim Douglas jdou...@basis.com wrote:
 Hmm, I would hope it wouldn't matter, but 2.0.3; we need to coordinate
 several developers and build systems to move to 2.1.1, and everyone's
 been away for Christmas  New Years.

 On Jan 5, 1:15 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  GWT 2.0 or 2.1?

  On Jan 5, 2:41 pm, Jim Douglas jdou...@basis.com wrote:

   I'm doing pretty much exactly that with my FileUpload widget, and it
   works ok here:

       /*
        * User clicked the Chooser OK button.
        */
       public void onSubmit(SubmitEvent p_event)
       {
           if (m_progressUpdateTimer != null)
           {
               // Upload is already in progress
               p_event.cancel();
               return;
           }
            several more validation checks 
       }

   On Jan 5, 12:27 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote:

I have the following code in a GWT 2.1.0 project:

public void onSubmit (FormPanel.SubmitEvent event)
{
        // This event is fired just before the form is submitted. We 
can take
        // this opportunity to perform validation.
        String filename = gDataFileUploader.getFilename ();
        if (filename.length () == 0)
        {
                showAlert (Need a valid File Name in before we can 
upload a
file!);
                event.cancel ();
        }

}

Unfortunately, although it is called, the cancel () call doesn't stop
the submit from happening, and doesn't stop onSubmitComplete from
being called.  Is this a GWT bug or a browser bug?  (FireFox 3.6)

TIA,

Greg

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



Re: Where do KeyPress Events go?

2011-01-05 Thread Greg Dougherty
Currently, I'm using a SubmitButton, and forcing the user to click on
the button to have anything happen.

I'd like for the user to be able to hit Enter, and have the button
fire (IOW, I want it to behave like a real application, rather than
like a web application).  Unfortunately, I can't find any way to catch
key events in that form.

I'm using Apache FileUpload, which essentially requires me to have the
file as the last item in the form (file size is in the hundreds of MB,
so I read it a line at a time and toss the line when I'm done with
it.  FileUpload only lets you keep a reader for one form element at a
time, so I can't get data for anything after the file).  This means
the average user is going to fill in that field last.  Which means
that if I want to support the Enter key, I need to be able to do it
after the user has selected a file using the FileUpload.  But
FileUpload doesn't generate Key events.

So, WHO gets those KeyPress Events?

Greg

On Jan 5, 8:08 am, jaybose onyeje.b...@gmail.com wrote:
 OK, what does the button do, at the moment?

 Do you have your EnterButton's handler call submit() on the form?
 If so, are you seeing any errors?

 On Jan 4, 8:53 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  Yes, but it doesn't do the upload when I hit Enter.  Which is what I'm
  trying to figure out how to get it to do.

  Greg

  On Jan 4, 8:20 am, jaybose onyeje.b...@gmail.com wrote:

  http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload

   Look at the source of the ShowCase example above.
   The uploadButton it uses is not a SubmitButton either.

   Just make sure the handler of your EnterButton submits the form.

   On Jan 3, 8:57 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

So, now that I have an EnterButton class, I'd like to use it. :-)  I
have a form panel with a FileUpload.  I'd like to let the user select
a file, then hit enter to fire the form submit button (which is an
EnterButton, not a SubmitButton).

Unfortunately, FileUpload does not have an addKeyPressHandler
routine.  So, who gets any key events I generate while in the text
field part of a FileUpload?  What is the call chain for events that
aren't captured by the Widget where the event happens?

Sorry if this is an FAQ, and in the docs.  I took a (quick) look, and
couldn't find anything.  Please point me to the correct docs if it is
in there.

Thanks!

Greg

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



Re: EnterButton

2011-01-05 Thread Greg Dougherty
Hi Jeff,

You've got things backwards for my concerns.  I want to fire off a
Submit event when the user hits Enter, I don't want to do something
special once the user has clicked on the button.

To do that, I need to figure out how to catch a KeyPress Event when
the last thing selected was a FileUpload (which doesn't have a
KeyPress Event Handler).  Any ideas?

As for using UIBinder:
1: I'm building the UI, and I'm a programmer. I LIKE building the UI
programmatically.
2: When I looked at it (July - August 2010), the documentation was
opaque, and singularly lacking in useful examples.  So avoiding
UIBuilder is faster than using it.
3: I build WebApps where the height and width of the UI is dependent
upon the data returned in response to user actions.  Which means that
the *LayoutPanels are a HUGE step backward in functionality for me.
To the extent that when I have to choose between upgrading GWT, and
losing the non-Layout Panels, I'll probably stop upgrading GWT.  (Yes,
I know that the change was a deliberate choice.  I just think it was a
horrible mistake.)

Greg

On Jan 4, 10:49 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Using UiBinder declare a SubmitButton 
 (http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/g...)
 within a qwt FormPannel. If you want to react to the user submitting the
 form then assign a field name to the submit button and attach an event
 handler to the submit button. The following is an example of how to setup
 the event handler code when using UiBinder:

 @UiHandler(yourButtonFieldName)
 void onSubmitBtnClicked(ClickEvent e) {
     doSomething();

 }

 On Tue, Jan 4, 2011 at 10:36 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  Hi Jeff,

  I don't see any place to attach a KeyPressHandler to a FormPanel.
  Were you thinking of something else?

  Greg

  On Jan 3, 6:27 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
   I haven't tried it but I think if you wrap your input widgets in a gwt
  form
   widget your button would respond appropriately.

   On Mon, Jan 3, 2011 at 9:57 AM, Greg Dougherty
   dougherty.greg...@mayo.eduwrote:

I have a couple of places where I want the user to be able to hit
enter, and have a button clicked.  So I created the class EnterButton,
which has all the default constructors, and the following bit of code:

       public void onKeyPress (KeyPressEvent event)
       {
               int     keyCode = event.getNativeEvent ().getKeyCode
();

               if (keyCode == KeyCodes.KEY_ENTER)
                       click ();
       }

Is there a reason why some such class isn't part of GWT already?  Is
there something in this code that will turn around and bite me in the
tush?

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

.
For more options, visit this group at
   http://groups.google.com/group/google-web-toolkit?hl=en.

   --
   *Jeff Schwartz*

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

 --
 *Jeff Schwartz*

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



FormPanel.SubmitEvent cancel not working

2011-01-05 Thread Greg Dougherty
I have the following code in a GWT 2.1.0 project:

public void onSubmit (FormPanel.SubmitEvent event)
{
// This event is fired just before the form is submitted. We can take
// this opportunity to perform validation.
String filename = gDataFileUploader.getFilename ();
if (filename.length () == 0)
{
showAlert (Need a valid File Name in before we can upload a
file!);
event.cancel ();
}
}

Unfortunately, although it is called, the cancel () call doesn't stop
the submit from happening, and doesn't stop onSubmitComplete from
being called.  Is this a GWT bug or a browser bug?  (FireFox 3.6)

TIA,

Greg

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



Re: Where do KeyPress Events go?

2011-01-05 Thread Greg Dougherty
Thanks Ian!

Both solutions work, but I prefer the sinkEvents one, since it seems
more broadly applicable.

Thank you,

Greg

On Jan 5, 9:28 am, Ian Bambury ianbamb...@gmail.com wrote:
 Or, if you want to be fed keyup events when the FU has focus (or anyt other
 event you choose)

         fu.sinkEvents(Event.ONKEYUP);
         fu.addHandler(new KeyUpHandler()
         {

             @Override
             public void onKeyUp(KeyUpEvent event)
             {
                 Window.alert(Hi!);
             }
         }, KeyUpEvent.getType());

 On 5 January 2011 15:20, Ian Bambury ianbamb...@gmail.com wrote:



          fu.addChangeHandler(new ChangeHandler()
          {

              @Override
              public void onChange(ChangeEvent event)
              {
                  button.setFocus(true);
              }
          });

  would put the focus on the button - any good?

  or there's always 'DOM.addEventPreview' - problem is, you probably want
  enter to move your user from input area to input area.
  firstname-lastname-fileuploadCV or something, rather than submit every time
  the user presses enter.

  Ian

  On 5 January 2011 14:50, Greg Dougherty dougherty.greg...@mayo.eduwrote:

  Currently, I'm using a SubmitButton, and forcing the user to click on
  the button to have anything happen.

  I'd like for the user to be able to hit Enter, and have the button
  fire (IOW, I want it to behave like a real application, rather than
  like a web application).  Unfortunately, I can't find any way to catch
  key events in that form.

  I'm using Apache FileUpload, which essentially requires me to have the
  file as the last item in the form (file size is in the hundreds of MB,
  so I read it a line at a time and toss the line when I'm done with
  it.  FileUpload only lets you keep a reader for one form element at a
  time, so I can't get data for anything after the file).  This means
  the average user is going to fill in that field last.  Which means
  that if I want to support the Enter key, I need to be able to do it
  after the user has selected a file using the FileUpload.  But
  FileUpload doesn't generate Key events.

  So, WHO gets those KeyPress Events?

  Greg

  On Jan 5, 8:08 am, jaybose onyeje.b...@gmail.com wrote:
   OK, what does the button do, at the moment?

   Do you have your EnterButton's handler call submit() on the form?
   If so, are you seeing any errors?

   On Jan 4, 8:53 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

Yes, but it doesn't do the upload when I hit Enter.  Which is what I'm
trying to figure out how to get it to do.

Greg

On Jan 4, 8:20 am, jaybose onyeje.b...@gmail.com wrote:

http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload

 Look at the source of the ShowCase example above.
 The uploadButton it uses is not a SubmitButton either.

 Just make sure the handler of your EnterButton submits the form.

 On Jan 3, 8:57 am, Greg Dougherty dougherty.greg...@mayo.edu
  wrote:

  So, now that I have an EnterButton class, I'd like to use it. :-)
   I
  have a form panel with a FileUpload.  I'd like to let the user
  select
  a file, then hit enter to fire the form submit button (which is an
  EnterButton, not a SubmitButton).

  Unfortunately, FileUpload does not have an addKeyPressHandler
  routine.  So, who gets any key events I generate while in the text
  field part of a FileUpload?  What is the call chain for events
  that
  aren't captured by the Widget where the event happens?

  Sorry if this is an FAQ, and in the docs.  I took a (quick) look,
  and
  couldn't find anything.  Please point me to the correct docs if it
  is
  in there.

  Thanks!

  Greg

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

2011-01-05 Thread Greg Dougherty
Hi Jeff,

My fields ARE wrapped in a FormPanel (which I assume is what you mean
by a form.  If not, please enlighten me), and hitting Enter after
selecting a file most certainly did NOT cause the Form to submit,
because if it did, I wouldn't need to spend time making a button to
accomplish that behavior.

Happily, Ian Bambury pointed me to sinkEvents and addHandler, which
let me do what I want to do.

As for the off topic:
1: I don't think I've EVER used HTMLPanel.  If my UI gets bogged down,
I'll keep it in mind, but my performance issues generally involve
waiting for the server to finish queries.  How many items do you need
on screen to get client performance to bog down?
2: I spent (wasted?) several hours (probably over a day, spread out
over a week) trying to make sense of UIBuilder.  The documentation
made no sense to me, and was totally lacking in worthwhile examples
that I could play with to try to figure things out.  (No, go look at
the rewritten Mail Application doesn't qualify as a worthwhile
example.  A small working application that I can fiddle with, modify,
and see what the changes do is what you need for a worthwhile
example.)
3: Much more readable to whom?  A UI Designer who doesn't read
code?  Great.  But I'm not one of those, and I'm not working with one
of those.  For me, I go to the method that creates the Panel, and can
quickly see what is where, and with who.  Since my Widgets tend to
have names like dataFileUploaderForm, I generally know what's in
them w/o having to look farther than the name, but if I do, a quick
search on the name of any widget in the panel takes me to the method
where it's put together.  What does UIBuilder offer that's better than
that?  (Serious question.  I'm a big fan of visual UI builders, but
I've never understood the benefits of a textual one.)

4: My (half-remembered) impression of UIBuilder was that it was
supposed to encourage you to move to the 2.0 LayoutPanels, rather
than the 1.x Panels.  No?

Greg

On Jan 5, 11:36 am, Thomas Broyer t.bro...@gmail.com wrote:
 On Wednesday, January 5, 2011 4:14:47 PM UTC+1, Greg Dougherty wrote:

  Hi Jeff,

  You've got things backwards for my concerns.  I want to fire off a
  Submit event when the user hits Enter, I don't want to do something
  special once the user has clicked on the button.

 I think Jeff got it right, but explained it badly: if you wrap you fields
 inside a form, then when hitting Enter, the *browser* will submit the form.
 So all you have to do is to listen to the SubmitEvent on the FormPanel (and
 not the ClickEvent on the SubmitButton, which I believe not all browsers do
 dispatch in this case).

 To do that, I need to figure out how to catch a KeyPress Event when

  the last thing selected was a FileUpload (which doesn't have a
  KeyPress Event Handler).  Any ideas?

 I just saw that Widget#addDomHandler is public, so this should work (for any
 widget provided the browser actually dispatches the event):
    fileUpload.addDomHandler(enterbutton, KeyPressevent.getType());

 Now, let's go off topic:

 As for using UIBinder:

  1: I'm building the UI, and I'm a programmer. I LIKE building the UI
  programmatically.
  2: When I looked at it (July - August 2010), the documentation was
  opaque, and singularly lacking in useful examples.  So avoiding
  UIBuilder is faster than using it.

 Probably because you:
  - don't use HTMLPanel enough (reminder: it helps for performance)
  - and haven't spent the necessary hour (half-hour?) to learn how to use it
 and understand how much time it can actually save you (mainly by making your
 UI code much more readable as to which widget contains what).

  3: I build WebApps where the height and width of the UI is dependent
  upon the data returned in response to user actions.  Which means that
  the *LayoutPanels are a HUGE step backward in functionality for me.
  To the extent that when I have to choose between upgrading GWT, and
  losing the non-Layout Panels, I'll probably stop upgrading GWT.  (Yes,
  I know that the change was a deliberate choice.  I just think it was a
  horrible mistake.)

 I don't see the relationship between layout panels and UiBinder.

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



Re: FormPanel.SubmitEvent cancel not working

2011-01-05 Thread Greg Dougherty
GWT 2.0 or 2.1?

On Jan 5, 2:41 pm, Jim Douglas jdou...@basis.com wrote:
 I'm doing pretty much exactly that with my FileUpload widget, and it
 works ok here:

     /*
      * User clicked the Chooser OK button.
      */
     public void onSubmit(SubmitEvent p_event)
     {
         if (m_progressUpdateTimer != null)
         {
             // Upload is already in progress
             p_event.cancel();
             return;
         }
          several more validation checks 
     }

 On Jan 5, 12:27 pm, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  I have the following code in a GWT 2.1.0 project:

  public void onSubmit (FormPanel.SubmitEvent event)
  {
          // This event is fired just before the form is submitted. We can 
  take
          // this opportunity to perform validation.
          String filename = gDataFileUploader.getFilename ();
          if (filename.length () == 0)
          {
                  showAlert (Need a valid File Name in before we can upload a
  file!);
                  event.cancel ();
          }

  }

  Unfortunately, although it is called, the cancel () call doesn't stop
  the submit from happening, and doesn't stop onSubmitComplete from
  being called.  Is this a GWT bug or a browser bug?  (FireFox 3.6)

  TIA,

  Greg

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



Re: Where do KeyPress Events go?

2011-01-04 Thread Greg Dougherty
Yes, but it doesn't do the upload when I hit Enter.  Which is what I'm
trying to figure out how to get it to do.

Greg

On Jan 4, 8:20 am, jaybose onyeje.b...@gmail.com wrote:
 http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload

 Look at the source of the ShowCase example above.
 The uploadButton it uses is not a SubmitButton either.

 Just make sure the handler of your EnterButton submits the form.

 On Jan 3, 8:57 am, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  So, now that I have an EnterButton class, I'd like to use it. :-)  I
  have a form panel with a FileUpload.  I'd like to let the user select
  a file, then hit enter to fire the form submit button (which is an
  EnterButton, not a SubmitButton).

  Unfortunately, FileUpload does not have an addKeyPressHandler
  routine.  So, who gets any key events I generate while in the text
  field part of a FileUpload?  What is the call chain for events that
  aren't captured by the Widget where the event happens?

  Sorry if this is an FAQ, and in the docs.  I took a (quick) look, and
  couldn't find anything.  Please point me to the correct docs if it is
  in there.

  Thanks!

  Greg

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



Re: EnterButton

2011-01-04 Thread Greg Dougherty
So why hasn't this kind of Widget made it into the GWT code base?

Greg

On Jan 3, 5:53 pm, A. Stevko andy.ste...@gmail.com wrote:
 I've used this pattern throughout my code base with no problem.

 On Mon, Jan 3, 2011 at 6:57 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  I have a couple of places where I want the user to be able to hit
  enter, and have a button clicked.  So I created the class EnterButton,
  which has all the default constructors, and the following bit of code:

         public void onKeyPress (KeyPressEvent event)
         {
                 int     keyCode = event.getNativeEvent ().getKeyCode
  ();

                 if (keyCode == KeyCodes.KEY_ENTER)
                         click ();
         }

  Is there a reason why some such class isn't part of GWT already?  Is
  there something in this code that will turn around and bite me in the
  tush?

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post 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. Stevko
 ===
 If everything seems under control, you're just not going fast enough. M.
 Andretti

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

2011-01-04 Thread Greg Dougherty
Hi Jeff,

I don't see any place to attach a KeyPressHandler to a FormPanel.
Were you thinking of something else?

Greg

On Jan 3, 6:27 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 I haven't tried it but I think if you wrap your input widgets in a gwt form
 widget your button would respond appropriately.

 On Mon, Jan 3, 2011 at 9:57 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  I have a couple of places where I want the user to be able to hit
  enter, and have a button clicked.  So I created the class EnterButton,
  which has all the default constructors, and the following bit of code:

         public void onKeyPress (KeyPressEvent event)
         {
                 int     keyCode = event.getNativeEvent ().getKeyCode
  ();

                 if (keyCode == KeyCodes.KEY_ENTER)
                         click ();
         }

  Is there a reason why some such class isn't part of GWT already?  Is
  there something in this code that will turn around and bite me in the
  tush?

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

 --
 *Jeff Schwartz*

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



EnterButton

2011-01-03 Thread Greg Dougherty
I have a couple of places where I want the user to be able to hit
enter, and have a button clicked.  So I created the class EnterButton,
which has all the default constructors, and the following bit of code:

public void onKeyPress (KeyPressEvent event)
{
int keyCode = event.getNativeEvent ().getKeyCode
();

if (keyCode == KeyCodes.KEY_ENTER)
click ();
}

Is there a reason why some such class isn't part of GWT already?  Is
there something in this code that will turn around and bite me in the
tush?

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



Where do KeyPress Events go?

2011-01-03 Thread Greg Dougherty
So, now that I have an EnterButton class, I'd like to use it. :-)  I
have a form panel with a FileUpload.  I'd like to let the user select
a file, then hit enter to fire the form submit button (which is an
EnterButton, not a SubmitButton).

Unfortunately, FileUpload does not have an addKeyPressHandler
routine.  So, who gets any key events I generate while in the text
field part of a FileUpload?  What is the call chain for events that
aren't captured by the Widget where the event happens?

Sorry if this is an FAQ, and in the docs.  I took a (quick) look, and
couldn't find anything.  Please point me to the correct docs if it is
in there.

Thanks!

Greg

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



Re: How to get a widget from another panel

2011-01-03 Thread Greg Dougherty
Well, assuming both panels are in the same web application, save the
widget in a global variable, and access that when you want
information.

Greg

On Jan 3, 8:49 am, Néstor Boscán nesto...@gmail.com wrote:
 Hi

 Thanks for the quick reply.

 I don't want to add the widget I want to get the value of a widget
 that is in another panel

 On 1/3/11, nacho vela.igna...@gmail.com wrote:

  Just add the widget to the panel that you want.

  panel.add(widget);

  On 3 ene, 00:29, Néstor Boscán nesto...@gmail.com wrote:
  Hi

  I have a GWT application with two panels. How to I get a Widget from one
  panel from the other panel?.

  Regards,

  Néstor Boscán

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

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



EnterButton

2010-12-23 Thread Greg Dougherty
I have a couple of places where I want the user to be able to hit
enter, and have a button clicked.  So I created the class EnterButton,
which has all the default constructors, and the following bit of code:

public void onKeyPress (KeyPressEvent event)
{
int keyCode = event.getNativeEvent ().getKeyCode ();

if (keyCode == KeyCodes.KEY_ENTER)
click ();
}


Is there a reason why some such class isn't part of GWT already?  Is
there something in this code that will turn around and bite me in the
tush?

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



Where do KeyPress Events go?

2010-12-23 Thread Greg Dougherty
So, now that I have an EnterButton class, I'd like to use it. :-)  I
have a form panel with a FileUpload.  I'd like to let the user select
a file, then hit enter to fire the form submit button (which is an
EnterButton, not a SubmitButton).

Unfortunately, FileUpload does not have an addKeyPressHandler
routine.  So, who gets any key events I generate while in the text
field part of a FileUpload?  What is the call chain for events that
aren't captured by the Widget where the event happens?

Sorry if this is an FAQ, and in the docs.  I took a (quick) look, and
couldn't find anything.  Please point me to the correct docs if it is
in there.

Thanks!

Greg

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



Re: HTML Link Cell

2010-12-22 Thread Greg Dougherty
Hi John,

Why SafeHtmlCell rather than AbstractCell?  I did it in AbstractCell,
and it works, but I'm certainly happy to hear how it could work
better.

Thanks for the pointer to SafeHtmlTemplates.  I'll have to look in to
them.

Greg

On Dec 22, 8:17 am, John LaBanca jlaba...@google.com wrote:
 I recommend that you use SafeHtmlCell, and be careful to ensure that the
 link is in fact safe.  Check out
 SafeHtmlTemplateshttp://google-web-toolkit.googlecode.com/svn-history/r9089/javadoc/2
 to
 generate a SafeHtml string from a potentially unsafe URL and user text.

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

 On Tue, Dec 21, 2010 at 10:57 PM, GregD gre...@gmail.com wrote:
  I would like to create a Column of Cells (for a CellTable) where each
  cell displays an HTML link (the link will send information to an
  application running on the user's machine (the app is IGV)) that it
  gets from the row data.

  Can SafeHtml be used for such a link?

  Should I extend SafeHtmlCell, or do I need to extend AbstractCell?

  TIA,

  Greg

  --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.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: Sort on Column in CellTable

2010-12-13 Thread Greg Dougherty
Hi Jeff,

As I'm dealing with unpublished research data, Google App Engine is
not an option.  That said, I'm all in favor of offloading as much work
to the client as possible. :-)

I'm doing all my filtering on the server.  We're defining the filters
the users can use (not my choice, oh, well), so I have a shared class
where the client side tells it what filters to use, then passes it to
the server, where the class creates the SQL SELECT commands the server
side classes use.  The server keeps the result set of the search open,
and retrieves records as the client requests them.

So far, even a tightly filtered search gets 4000+ results, so I'm not
going to make the user wait to download all the data before seeing any
of it.  OTOH, I suppose I could have a background thread downloading
records while the user is looking at the current ones.

Is there any way to tell how much memory is available for my app, so
that I can spend a reasonable amount of it holding data from the
server?

Thanks,

Greg

On Dec 10, 12:26 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 You are absolutely right about the async data provider. With large data sets
 then this is absolutely the way to go. I thought though that you were
 talking about how to sort the data once it was being viewed in the client
 which you still might want to do  even if you are using the async data
 provider.

 For instance, if you provide the user with the ability to view subsets of
 data based on a filter and you bring down all the data matching the filter
 you still might need or want to provide the user with ability to sort the
 data on the client as opposed to having to call back to the server again.

 This is especially convenient to use if you are targeting App Engine's
 Datastore because the less you do on App Engine's servers (the faster your
 request is) the better it is due to App Engine response time quotas. I am
 currently crafting an application for App Engine with GWT and I am using
 this technique a lot. I use an initial ordering when I query the Datastore,
 bring down the data and if the user alters the data or adds to it I sort it
 locally in the client. Though I haven't implemented it yet, I will also use
 this same technique to allow the user to do cell table sorting with the
 data.

 My mantra for dealing with the tight quota limits imposed by App Engine is
 lean and mean on the server and thick client where I have all the breathing
 room I need to perform data manipulation.

 Jeff

 On Fri, Dec 10, 2010 at 12:20 PM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  Hi Jeff,

  Thanks.  Of course I'm need this for an AsyncDataProvider (the data's
  on the server, not the client.  At 78,000+ rows I'm only bring over
  the ones I need).  So my comparator classes provide SQL command
  strings to the server to sort the data.

  I must admit, I am curious: Do people actually use a CellTable to
  display local data?  I thought the whole point of them was to let you
  download subsets of your data from the server.  No?  (Note: this isn't
  a why aren't you making code that I can use whine, since even if you
  did an AsyncDataProvider example, it would be using an ORM, and I
  don't use those).

  Greg

  On Dec 10, 9:48 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
   When the user clicks on a column header you would get the list of data
  via
   the ListDataProvider associated with the table and sort the list as per
  the
   needs of your application. You can maintain state for the current
  ordering
   and a second click on the column header can reverse the ordering of the
   sort. Once the sort is done you then just refresh the DataProvider and
  the
   table will refresh to reflect the changes to the list. It is quite
  simple.

   Jeff

   On Thu, Dec 9, 2010 at 11:17 AM, Greg Dougherty
   dougherty.greg...@mayo.eduwrote:

My users would like to be able to sort my CellTable by clicking on a
Column title.  Is there an existing GWT widget for putting a downward
or upward pointing triangle in a CellTable Column title?  For that
matter, what do I have to do to get a mouse click IN a Column title?

Thanks,
Greg

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

.
For more options, visit this group at
   http://groups.google.com/group/google-web-toolkit?hl=en.

   --
   *Jeff Schwartz*

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

Re: Sort on Column in CellTable

2010-12-13 Thread Greg Dougherty
Hi Jeff,

While I'd definitely be sorting the data on the server side, what I
was thinking of doing was downloading records in the background, so
that they'd already be on the client by the time the user clicked to
go to the next page (and saving records that have already been
downloaded, so if the user goes forward and backwards things are only
downloaded once).  The concerns being:

1: Not wanting to overload the server with data requests that the user
will never actually look at.
2: Not wanting to overload the client storing vast amounts of data
that the user will never actually look at.

I'm thinking perhaps grabbing the next two pages of data (when one
download ends, check to see where the user is, and what's been
downloaded, and if the next two pages (from the user's perspective)
aren't already down, request the next one that isn't local.  (I.E. if
page 2 comes back, and the user is on page 1, then save the results,
and fire off a request for page 3.)

Reasonable?  Workable?

Thanks,

Greg

On Dec 13, 11:10 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 On Mon, Dec 13, 2010 at 11:08 AM, Greg Dougherty dougherty.greg...@mayo.edu



  wrote:
  Hi Jeff,

  As I'm dealing with unpublished research data, Google App Engine is
  not an option.  That said, I'm all in favor of offloading as much work
  to the client as possible. :-)

  I'm doing all my filtering on the server.  We're defining the filters
  the users can use (not my choice, oh, well), so I have a shared class
  where the client side tells it what filters to use, then passes it to
  the server, where the class creates the SQL SELECT commands the server
  side classes use.  The server keeps the result set of the search open,
  and retrieves records as the client requests them.

  So far, even a tightly filtered search gets 4000+ results, so I'm not
  going to make the user wait to download all the data before seeing any
  of it.  OTOH, I suppose I could have a background thread downloading
  records while the user is looking at the current ones.

 That depends on, of course, if that fits your use-case. With such a large
 result set I'd provide the option to sort to the user but I would do the
 actual sorting on the server using the data store's sorting capabilities . I
 know this contradicts what I said before but the line has to be drawn
 somewhere and I'd draw the line as far as client vs. server sorting at a few
 hundred records max for client side sorting; over that I'd opt to do it on
 the server.



  Is there any way to tell how much memory is available for my app, so
  that I can spend a reasonable amount of it holding data from the
  server?

 I assume you are asking about the size of client-side memory available to
 the javascript run time, correct? If so then I believe that for arrays the
 max number of elements is  2^32 - 1 or 4294967295 and the max length for any
 item also cannot be greater than that. These numbers are provided along with
 a caveat -- I don't believe these numbers are always or even ever obtainable
 due to the variations of the amount of client memory, browsers, the max
 amount of actual memory made available to the browser, etc.

 Jeff



  Thanks,

  Greg

  On Dec 10, 12:26 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
   You are absolutely right about the async data provider. With large data
  sets
   then this is absolutely the way to go. I thought though that you were
   talking about how to sort the data once it was being viewed in the client
   which you still might want to do  even if you are using the async data
   provider.

   For instance, if you provide the user with the ability to view subsets of
   data based on a filter and you bring down all the data matching the
  filter
   you still might need or want to provide the user with ability to sort the
   data on the client as opposed to having to call back to the server again.

   This is especially convenient to use if you are targeting App Engine's
   Datastore because the less you do on App Engine's servers (the faster
  your
   request is) the better it is due to App Engine response time quotas. I am
   currently crafting an application for App Engine with GWT and I am using
   this technique a lot. I use an initial ordering when I query the
  Datastore,
   bring down the data and if the user alters the data or adds to it I sort
  it
   locally in the client. Though I haven't implemented it yet, I will also
  use
   this same technique to allow the user to do cell table sorting with the
   data.

   My mantra for dealing with the tight quota limits imposed by App Engine
  is
   lean and mean on the server and thick client where I have all the
  breathing
   room I need to perform data manipulation.

   Jeff

   On Fri, Dec 10, 2010 at 12:20 PM, Greg Dougherty 
  dougherty.greg...@mayo.edu

wrote:
Hi Jeff,

Thanks.  Of course I'm need this for an AsyncDataProvider (the data's
on the server, not the client.  At 78,000+ rows

Re: Sort on Column in CellTable

2010-12-10 Thread Greg Dougherty
Unfortunately, the project does not build. :-)

On Dec 9, 2:53 pm, Thomas Broyer t.bro...@gmail.com wrote:
 I believe there's a README file that explains that, though I only
 looked at the code in the online SVN browser, and the online sample.

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



Expenses sample does not build

2010-12-10 Thread Greg Dougherty
I downloaded releases/2.1/samples from SVN, and tried to build the
Expenses project (importing an existing Maven project).  I get ~80
compiler errors.

For example:
import com.google.gwt.cell.client.Cell.Context;

The compiler can't find this.  Given that it's not in the JavaDoc, I'm
not surprised the compiler can't find this, but I AM surprised that
it's in multiple files.

Greg

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



Re: FlowPanel vs. HorizontalPanel

2010-12-10 Thread Greg Dougherty
Hi Brian,

Thanks for the reply.  (I solved the initial problem by biting the
bullet, and switching to a table.  But I'm still curious about this.)

So, if I understand you correctly, I could have an HTMLPanel Cell that
acts as a FlowPanel, and a Container Widget that added 'new HTML
(span white-space:nowrap)' to that Cell, then added the elements
it wanted to keep together, then added 'new HTML (/span)', and
those items would all stay together within the Cell.  Yes?

Thanks!

Greg

On Nov 30, 1:55 pm, Brian Reilly br...@ireilly.com wrote:
 First, let's separate two concepts. You suggested using a custom widget to
 bundle two things together. While that may bundle them together from a
 source code point of view, that custom widget it ultimately rendered as
 HTML. Therefore, HTML ultimately defines the rules for how your content will
 be rendered. When composing GWT widgets together to create specific layouts,
 it's always good to understand at least superficially what the resulting
 HTML will be (e.g., to know when to use InlineLabel instead of Label).

 Now, to answer your question... if you have a bunch of inline elements, you
 can keep them together by wrapping them in a span styled with
 white-space:nowrap;.

 If your form elements aren't dynamic and you're using UiBinder, this is
 pretty easy to do by wrapping everything in an HTMLPanel (which will
 effectively behave like a FlowPanel, except that you can also mix in HTML
 with your widgets). If you're doing this all from java, you can still do it,
 but you have to use HTMLPanel.add() or HTMLPanel.addAndReplaceElement()
 yourself. As far as I know, GWT doesn't provide any container widgets that
 render as span elements; all Panel widgets render as divs.

 If that doesn't work for you, you can look into using block elements and
 float:left;, but that comes with its own complications (and you also don't
 get nice text alignment across blocks.

 -Brian

 On Tue, Nov 30, 2010 at 2:10 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Inserting block-level elements (div, p, etc.) cause exactly what
  you're seeing in terms of wrapping, so there isn't any bug there. 

  So you're saying there's no way to have two elements (say a label and
  the thing it's labeling) always stay together within an operable
  FlowPanel, since all the ways of binding them together involve Block
  Elements?  (Or is there a way of sticking two Widgets together (other
  than a custom widget), that doesn't use a block element?)

  Greg

  On Nov 30, 12:06 pm, Brian Reilly br...@ireilly.com wrote:
   On Tue, Nov 30, 2010 at 12:41 PM, Greg Dougherty 
  dougherty.greg...@mayo.edu

wrote:
I have created a FlowPanel that contains 4 ListBoxes and a button.  I
wanted to put some space between the items, so I added empty
HorizontalPanels (with padding: 3px;) as spacers in between each
item.  FlowPanel responded by placing each item (including each of the
HorizontalPanels), on its own line (IOW, it's now acting like a
VerticalPanel).

If I remove some of the spacers, then the items that don't have
spacers between them share a line with each other, and the ones with
spacers each go on a separate line.

Is this a bug?  Is this supposed to happen?  How do I fix it?

   HorizontalPanel and VerticalPanel are implemented as an HTML table.
  Tables
   are block-level elements whereas your form elements are inline elements.
   Inserting block-level elements (div, p, etc.) cause exactly what you're
   seeing in terms of wrapping, so there isn't any bug there.

   That said, you'd probably be better off using CSS to add margins to your
   form elements. At any rate, inserting empty tables is a pretty
  heavy-weight
   and unpredictable way of managing layout. Alternately, if you really want
   those items to be in a row, just put them inside of a single
   HorizontalPanel.

While I'm asking, if you resize the panel that a FlowPanel is in, does
it automatically reflow its items?

   Yes, items will reflow to the extent possible within the constraints of
   any explicit widths that may be set. Note that if you put things in a
   HorizontalPanel as I suggested above, that will not reflow since it
  renders
   as an HTML table.

   -Brian

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

Re: Sort on Column in CellTable

2010-12-10 Thread Greg Dougherty
Hi Jeff,

Thanks.  Of course I'm need this for an AsyncDataProvider (the data's
on the server, not the client.  At 78,000+ rows I'm only bring over
the ones I need).  So my comparator classes provide SQL command
strings to the server to sort the data.

I must admit, I am curious: Do people actually use a CellTable to
display local data?  I thought the whole point of them was to let you
download subsets of your data from the server.  No?  (Note: this isn't
a why aren't you making code that I can use whine, since even if you
did an AsyncDataProvider example, it would be using an ORM, and I
don't use those).

Greg

On Dec 10, 9:48 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 When the user clicks on a column header you would get the list of data via
 the ListDataProvider associated with the table and sort the list as per the
 needs of your application. You can maintain state for the current ordering
 and a second click on the column header can reverse the ordering of the
 sort. Once the sort is done you then just refresh the DataProvider and the
 table will refresh to reflect the changes to the list. It is quite simple.

 Jeff

 On Thu, Dec 9, 2010 at 11:17 AM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  My users would like to be able to sort my CellTable by clicking on a
  Column title.  Is there an existing GWT widget for putting a downward
  or upward pointing triangle in a CellTable Column title?  For that
  matter, what do I have to do to get a mouse click IN a Column title?

  Thanks,
  Greg

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

 --
 *Jeff Schwartz*

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



Re: Sort on Column in CellTable

2010-12-10 Thread Greg Dougherty
Hi John,

Expenses uses a SortedHeader Class that overrides HeaderString, then
adds the arrow via HTML.  If I could actually run the code (it doesn't
compile), I'd tell you how well it works.

Is your API going to be strictly UI, or will it also involve getting
the data?  If the latter, I STRONGLY encourage you NOT to build it
around ListDataProvider.  Local data is easy to sort, it's the data on
a server that's interesting.

Greg

On Dec 10, 10:15 am, John LaBanca jlaba...@google.com wrote:
 We plan to formalize an API for column sorting in GWT 2.2.  In the meantime,
 can you use IconCellDecorator to add a sort icon to the column headers?

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

 On Fri, Dec 10, 2010 at 10:48 AM, Jeff Schwartz 
 jefftschwa...@gmail.comwrote:

  When the user clicks on a column header you would get the list of data via
  the ListDataProvider associated with the table and sort the list as per the
  needs of your application. You can maintain state for the current ordering
  and a second click on the column header can reverse the ordering of the
  sort. Once the sort is done you then just refresh the DataProvider and the
  table will refresh to reflect the changes to the list. It is quite simple.

  Jeff

  On Thu, Dec 9, 2010 at 11:17 AM, Greg Dougherty 
  dougherty.greg...@mayo.edu wrote:

  My users would like to be able to sort my CellTable by clicking on a
  Column title.  Is there an existing GWT widget for putting a downward
  or upward pointing triangle in a CellTable Column title?  For that
  matter, what do I have to do to get a mouse click IN a Column title?

  Thanks,
  Greg

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

  --
  *Jeff Schwartz*

   --
  You received this message because you are subscribed to the Google Groups
  Google Web Toolkit group.
  To post to this group, send email to google-web-tool...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-web-toolkit+unsubscr...@googlegroups.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: Expenses sample does not build

2010-12-10 Thread Greg Dougherty
Hi David,

Nope.  I followed the directions in README-MAVEN.txt.  If that's in
those directions, or in the directions at 
http://m2eclipse.sonatype.org/installing-m2eclipse.html.
I know that maven did install its own version of GWT 2.1.

Where would I find the directions for doing that?  For that matter,
what is the tools I have to download in order to get that script?

Greg

On Dec 10, 9:39 am, David Chandler drfibona...@google.com wrote:
 Hi Greg,

 Did you run tools/scripts/maven_script.sh first to install 2.1.1-rc1
 in your local maven repo?

 /dmc

 On Fri, Dec 10, 2010 at 10:26 AM, Greg Dougherty



 dougherty.greg...@mayo.edu wrote:
  I downloaded releases/2.1/samples from SVN, and tried to build the
  Expenses project (importing an existing Maven project).  I get ~80
  compiler errors.

  For example:
  import com.google.gwt.cell.client.Cell.Context;

  The compiler can't find this.  Given that it's not in the JavaDoc, I'm
  not surprised the compiler can't find this, but I AM surprised that
  it's in multiple files.

  Greg

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

 --
 David Chandler
 Developer Programs Engineer, Google Web 
 Toolkithttp://googlewebtoolkit.blogspot.com/

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



Re: GWT + MySQL

2010-12-09 Thread Greg Dougherty
Here's the important part of your bug:

Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'com.mysql.jdbc.exceptions.jdbc4.CommunicationsException' was not
included in the set of types which can be serialized by this
SerializationPolicy or its Class object could not be loaded

Your code is trying to send a
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException via RPC, which
it can NOT do.  My guess is that your servlet code is throwing that
exception, but that is just a guess.  But step 1 is to check all your
RPC routines, and make sure none of them have a throws clause.

On Dec 6, 9:30 am, du.hahn du.h...@gmail.com wrote:
 Hi, I get this error when i connect to a mysql database with eclipse
 debug.

 Starting Jetty on port 
    [WARN] Exception while dispatching incoming RPC call
 com.google.gwt.user.client.rpc.SerializationException: Type
 'com.mysql.jdbc.exceptions.jdbc4.CommunicationsException' was not
 included in the set of types which can be serialized by this
 SerializationPolicy or its Class object could not be loaded. For
 security purposes, this type will not be serialized.: instance =
 com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:
 Communications link failure

 The last packet sent successfully to the server was 0 milliseconds
 ago. The driver has not received any packets from the server.
         at
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
 614)
         at
 com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
 126)
         at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
 $ValueWriter$8.write(ServerSerializationStreamWriter.java:152)
         at
 com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:
 534)
         at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:609)
         at
 com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
 383)
         at
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
 581)
         at
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
 207)
         at
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
 243)
         at
 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
 62)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 487)
         at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
 362)
         at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
 216)
         at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
 181)
         at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
 729)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 405)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
         at
 org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:
 49)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
         at org.mortbay.jetty.Server.handle(Server.java:324)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 505)
         at org.mortbay.jetty.HttpConnection
 $RequestHandler.content(HttpConnection.java:843)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
         at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
 395)
         at org.mortbay.thread.QueuedThreadPool
 $PoolThread.run(QueuedThreadPool.java:488)
 [ERROR] 500 - POST /dbmind/greet (127.0.0.1) 57 bytes
    Request headers
       Host: localhost:
       Connection: keep-alive
       Referer:http://localhost:/
       Accept: */*
       User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/
 534.7 (KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
       Accept-Encoding: gzip,deflate,sdch
       Accept-Language: en-US,en;q=0.8
       Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
       Content-Length: 184
       Origin:http://localhost:
       X-GWT-Module-Base:http://localhost:/dbmind/
       Content-Type: text/x-gwt-rpc; charset=UTF-8
       X-GWT-Permutation: 35D485F388E45FAF93FBD6C114AF0A90
    Response headers
       Content-Type: text/plain

 Anybody can help me?

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

Sort on Column in CellTable

2010-12-09 Thread Greg Dougherty
My users would like to be able to sort my CellTable by clicking on a
Column title.  Is there an existing GWT widget for putting a downward
or upward pointing triangle in a CellTable Column title?  For that
matter, what do I have to do to get a mouse click IN a Column title?

Thanks,
Greg

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



Re: Sort on Column in CellTable

2010-12-09 Thread Greg Dougherty
Thomas,

Thanks.  How do I get the Expenses sample to build in Eclipse?  Are
there directions somewhere?

On Dec 9, 11:23 am, Thomas Broyer t.bro...@gmail.com wrote:
 Have a look at the Expenses sample, all the code you're looking for is
 available there.

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



IE7 and ALIGN_JUSTIFY

2010-12-08 Thread Greg Dougherty
I'm working on a new app using GWT 2.1.  If I create a
HorizontalPanel, and set the horizontal alignment to ALIGN_JUSTIFY,
then when I try to add anything to that panel, I get the following
exception.  This only happens in IE, and I have to actually try to
added something to the panel (creating the panel, setting its
alignment, and then adding it (empty) to another panel does NOT cause
a problem):

15:51:05.169 [ERROR] [exometablebrowser] Uncaught exception escaped
com.google.gwt.core.client.JavaScriptException: (Error): Could not get
the align property. Invalid argument.
 number: -2147024809
 description: Could not get the align property. Invalid argument.
at
com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:
237)
at
com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
126)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
561)
at
com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
269)
at
com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:
91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at
com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at
com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:
157)
at
com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:
281)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
531)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
352)
at java.lang.Thread.run(Thread.java:619)

I searched the group and did not see this mentioned.  Any idea why
this happens?

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



Re: GWT JavaDoc failures KeyPress v. KeyDown

2010-12-07 Thread Greg Dougherty
Jeff,

My point is, why isn't that stuff in the JavaDoc?  Assigns a Handler
for a KeyPressEvent.  It is fired, once, whenever a key is pressed
down and then released. With, perhaps, a link to the W3C definition
of a KeyPress.

The person writing that code needs to know that, yes?  And probably
has that link to the W3C definition sitting there while writing the
code.  So, instead of making users go hunt that down, why not make the
documentation actually useful, and include it?

I'm trying to find a way to say this that doesn't come across as
sarcastic, rude, or hostile, so if I fail at that, you have my
apologies in advance:  I can understand if a bunch of Google and other
engineers working on a web application toolkit think that reading W3C
documents is a valuable way to spend their time, but most of the rest
of us don't feel that way.  I've got lots of interesting problems to
solve, and none of them involve anything from the W3C (my current
project involves taking a 100+ column, 130,000+ row spreadsheet, and
turning the data in that spreadsheet into information that a human
being can understand and use).  I'm using GWT so that I can focus on
the problems I find interesting, and leave the W3C crap to people who
find THAT interesting.

If you're writing a piece of code for other people to use, then the
job's not done until you've documented the code well enough so that
other people actually CAN use it.  If you can't explain what it is
your routine does, and why a user should want to use it, then you
don't understand it yourself, and shouldn't be writing it.  If you
WON'T explain that, I seriously don't understand why you're writing it
in the first place.

Greg

On Dec 4, 8:19 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 You are welcome, Greg. In the future, whenever you are unsure about an event
 type, check the documentation out at W3C's site for a starter as many GWT
 events map 1 to 1 to DOM javascript events. By reading up on the javascript
 event it will shed light on the GWT side of things. There are other sites as
 well besides the W3C but I always hit them first because they are the
 standards body.

 Jeff

 On Fri, Dec 3, 2010 at 2:50 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  Jeff,

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

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

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

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

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

  Greg

  On Dec 3, 1:09 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
   KeyPress - triggered when the user presses a key and releases it (key
  down
   and then key up)
   KeyDown - triggered when the user presses the key (key down)

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

   Jeff

   On Fri, Dec 3, 2010 at 1:47 PM, Greg Dougherty
   dougherty.greg...@mayo.eduwrote:

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

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

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

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

The first place most people are going to look to answer these
questions is the JavaDoc.  If you're programming in Eclipse

Re: GWT JavaDoc failures KeyPress v. KeyDown

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

 No.

 Abstractions do not work for these kind of things.

It's not a matter of abstractions, it's a matter of explanations.
IMAO, the JavaDoc for a KeyPressEvent should tell you exactly what
that event IS.  And what's the difference between it and the other
Key*Events.  It shouldn't be that hard, after all the person writing
the code had better know the answer to that question, no?

Google has detailed requirements for the format of any code submitted
to be part of GWT.  How about a requirement that the documentation
attached to the code actually has to provide some value, too?

And I think you're confusing this post (about trying to figure out
which event to use) with my other post (where the tutorial code for
getting an enter key doesn't work).

The point of THIS thread is that the people writing documentation
for a lot of the GWT routines seem to assume that everyone using GWT
spends as much time reading W3C documentation as the doc writers do,
and as such they end up writing documentation that is worthless until
you go read the W3C docs (or come here and beg for information).  The
further point is that this is a bad assumption on their part, and that
it would be good if they stopped writing docs that way.

Greg

On Dec 4, 6:11 am, Thomas Broyer t.bro...@gmail.com wrote:
 On 3 déc, 20:50, Greg Dougherty dougherty.greg...@mayo.edu wrote:

  Jeff,

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

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

 No.

 Abstractions do not work for these kind of things. GWT is no different
 from jQuery, Prototype.js and others in this respect: it tries to hide
 browser discrepancies, but that doesn't mean you're freed from knowing
 them (or least that they exist).
 What GWT gives you that JavaScript doesn't is that it's Java, i.e. you
 can reuse some code between your (Java) server and client, you benefit
 from Java's static typing (which among other things make refactoring
 efficient), you benefit from the tools from the Java world.
 (don't put words in my mouth though: there are drawbacks to using Java
 compared to JavaScript, they're two different languages, each with
 their own strengths)

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

 The problem is that key/char event is a real mess!
 All browsers behave differently (though WebKit is really close to IE).
 Different successive versions of a given browser don't behave the
 same. The same version of a given browser behave different on
 different platforms.
 It's hard (if ever possible!) to build an API with a consistent
 behavior.
 See for instance, and amongst 
 many:http://code.google.com/p/google-web-toolkit/issues/detail?id=72http://code.google.com/p/google-web-toolkit/issues/detail?id=1061http://code.google.com/p/google-web-toolkit/issues/detail?id=1529http://code.google.com/p/google-web-toolkit/issues/detail?id=4092

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



Re: GWT JavaDoc failures KeyPress v. KeyDown

2010-12-07 Thread Greg Dougherty
Hi Jeff,

If it ever comes to be the situation that the only way I can do
programming is on the web, then I'll waste the time to learn the
current iteration of web programming.  But life is currently not so
dim or dreary, and doesn't look to be that way any time soon.  (And if
I am going to take the time to read, read, read on new programming
ideas, it'll be on the Android (where there's a decent job market, and
worthwhile development tools) or the iPhone (I've got one iPhone app
out, but I'd like to learn more networking, and some of the newer
technologies, not on a constantly changing standards body heavily
influenced by Microsoft and Internet Explorer.)  I have a finite
supply of learn time, and I have thigns that, for me, are far better
ways to spend it than reading W3C documents.

Let me put it another way: I have absolutely NO desire to be a master
Web applications developer.  If I wanted to be one of those, I
wouldn't be using GWT.  I'd be rolling my own.

I took a look at SpringToolsSuite and Spring Roo.  Their documentation
sucks, their tutorials are out of date, their integration with Eclipse
is poor, and the support on the forums is weak.  So, since I AM a good
SQL developer, I said the heck with that, and rolled my own for my
current project.  And do not regret the choice at all.  The difference
is that I find SQL a lot more interesting than JavaScript.

Look, I'm glad that there are people out there who WANT to dig into
the arcana of web programming.  I'm not one of them.  I'm someone who
wants to solve other problems.  It was my impression that GWT exists
to serve the people who want to solve those other problems, and don't
want to have to dig in to that web BS (like worrying about IE vs.
FF).  If that IS GWT's purpose, then their documentation sucks, and is
not in line with their purpose.

If that ISN'T GWTs purpose, what is?

Greg

On Dec 7, 11:24 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Hi Greg,

 I have been in IT for a very long time. You see, I am what the youngins
 sometimes refer to as an ol' fart :). As a matter of fact, I've been a
 developer in one form or another for so long that everything else prior to
 that seems to me to be prehistory - a vague sense of something there but not
 having much substance (oh GOD, help me lol).

 My point is that as technologies advance I try to stay current and for those
 technologies that I have or will chose to base a career on I've tried to
 master them to the best of my ability. That means giving up lots of personal
 time to read up on everything I can get my hands on. Why the story? Because
 I am trying to convey to you that there are no shortcuts or free lunches. If
 you want to be a master Web applications developer then you will have to
 read and learn everything you can about Web development that you can get
 your hands on. It is that simple, I am afraid. The benefits are obvious, as
 the current limitations you perceive there to be in the GWT documents serve
 to exemplify.

 I'm afraid that comparing Google to other companies, even if only for their
 quality of documentation, isn't going to be very productive and will just
 serve to frustrate you even more. Take the time and go and read, read, read,
 and play with all the different things you do read up on. One day soon you
 will have what can only be described as an epiphany, that moment when it all
 gels and at that moment you will have a big smile on your face - a Kodak
 moment!

 Jeff

 On Tue, Dec 7, 2010 at 12:08 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



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

   No.

   Abstractions do not work for these kind of things.

  It's not a matter of abstractions, it's a matter of explanations.
  IMAO, the JavaDoc for a KeyPressEvent should tell you exactly what
  that event IS.  And what's the difference between it and the other
  Key*Events.  It shouldn't be that hard, after all the person writing
  the code had better know the answer to that question, no?

  Google has detailed requirements for the format of any code submitted
  to be part of GWT.  How about a requirement that the documentation
  attached to the code actually has to provide some value, too?

  And I think you're confusing this post (about trying to figure out
  which event to use) with my other post (where the tutorial code for
  getting an enter key doesn't work).

  The point of THIS thread is that the people writing documentation
  for a lot of the GWT routines seem to assume that everyone using GWT
  spends as much time reading W3C documentation as the doc writers do,
  and as such they end up writing documentation that is worthless until
  you go read the W3C docs (or come here and beg for information).  The
  further point is that this is a bad assumption on their part, and that
  it would be good if they stopped writing docs

GWT JavaDoc failures KeyPress v. KeyDown

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

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

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

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

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

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

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



Re: GWT JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Greg Dougherty
Jeff,

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

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

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

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

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

Greg

On Dec 3, 1:09 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
 KeyPress - triggered when the user presses a key and releases it (key down
 and then key up)
 KeyDown - triggered when the user presses the key (key down)

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

 Jeff

 On Fri, Dec 3, 2010 at 1:47 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



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

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

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

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

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

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

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

 --
 *Jeff Schwartz*

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



Getting a user Enter key

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

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

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

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

TIA,

Greg

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



Re: GWT JavaDoc failures KeyPress v. KeyDown

2010-12-03 Thread Greg Dougherty
Hi David,

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

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

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

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

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

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

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

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

Respectfully,

Greg

On Dec 3, 2:05 pm, David Chandler drfibona...@google.com wrote:
 Hi Greg,

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

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

 /dmc

 On Fri, Dec 3, 2010 at 2:50 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:



  Jeff,

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

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

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

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

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

  Greg

  On Dec 3, 1:09 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:
   KeyPress - triggered when the user presses a key and releases it (key
  down
   and then key up)
   KeyDown - triggered when the user presses the key (key down)

   Perhaps the documentation assumes some prior knowledge

Re: Getting a user Enter key

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

Greg

On Dec 3, 2:54 pm, David Chandler drfibona...@google.com wrote:
 Also seehttp://code.google.com/p/google-web-toolkit/issues/detail?id=5558for
 a workaround.

 /dmc

 On Fri, Dec 3, 2010 at 3:36 PM, Brian Reilly brian.irei...@gmail.comwrote:



  Greg,

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

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

  -Brian

  On Fri, Dec 3, 2010 at 3:21 PM, Greg Dougherty dougherty.greg...@mayo.edu
   wrote:

  Ok, the tutorial says that to get a user pressing an enter key in a
  TextBox you should write something like the following:

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

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

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

  TIA,

  Greg

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

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

 --
 David Chandler
 Developer Programs Engineer, Google Web 
 Toolkithttp://googlewebtoolkit.blogspot.com/

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



Re: Changing ActionCell Title

2010-12-02 Thread Greg Dougherty
Hi John,

Just wanted to say I implemented this last night, and it worked
exactly the way I wanted it to.

Thanks!

Greg

On Dec 1, 3:00 pm, John LaBanca jlaba...@google.com wrote:
 Everything you said sounds correct.

 Here is a code snippet that should work:
 ButtonCell cell = newButtonCell();
 // Create a column using the ButtonCell.
 ColumnRowObject, String column = new ColumnRowObject, String(cell) {
   public String getValue(RowObject object) {
     return Show  + object.getListSize(); // Get a String from the object.
   }};

 // Set a fieldupdater.
 column.setFieldUpdater(new FieldUpdaterRowObject, String() {
   public void update(int index, RowObject object, String value) {
     Window.alert(You clicked  + object.toString());
   }});

 myCellTable.addColumn(column);

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

 On Wed, Dec 1, 2010 at 3:33 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Hi John,

  I'm pretty sure I'm not following you.  Here's my understanding:

  I currently have an ActionCell in an IdentityColumn.  You're saying I
  can replace the ActionCell with a ButtonCell.
  I need to have a class implement FieldUpdaterT, C, and pass that to
  the IdentityColumn that holds my ButtonCell.  T is the class of my row
  object.  C is ???
  So you're saying that clicking on the button will fire a ValueChange
  call that will cause my FieldUpdater to have update (int, T, C)
  called, which can then use the T parameter to fire off my command?

  Other problem: ButtonCell implements CellString.  But I need to pass
  it my row object, so that it can change its title based on non-string
  information in the row.  (i.e. I want one button that will say Show
  'x', where x is the number of items in a list in the row object, or
  to disable the button and put Nothing as the title if the list is
  empty.  I don't see how I can do that with a ButtonCell.  Am I missing
  something?

  Thanks,

  Greg

  On Dec 1, 1:43 pm, John LaBanca jlaba...@google.com wrote:
   ButtonCell triggers a ValueChangeHandler when it is clicked.  Add a
   FieldUpdater to your Column and FieldUpdater#update() will be called.

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

   On Wed, Dec 1, 2010 at 2:29 PM, Greg Dougherty
   dougherty.greg...@mayo.eduwrote:

What, then, do I have to implement so that the button will fire an
action when it's clicked.  Does this require me to extend ButtonCell?

Thanks,
Greg

On Dec 1, 12:48 pm, John LaBanca jlaba...@google.com wrote:
 You can use a ButtonCell instead.  ButtonCell takes a String to
  display
in
 the Button, but otherwise it looks just like ActionCell.

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

 On Wed, Dec 1, 2010 at 12:30 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Is it possible to change teh title of an ActionCell based on the
  contents of the row it's in?

  It looks like the answer is no, but I figured I'd check here before
  I
  gave up.

  Greg

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

google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com
  google-web-toolkit%252bunsubscr...@googlegroups.comgoogle-web-toolkit%25252bunsubscr...@googlegroups.com

  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

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

.
For more options, visit this group at
   http://groups.google.com/group/google-web-toolkit?hl=en.

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

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

Changing ActionCell Title

2010-12-01 Thread Greg Dougherty
Is it possible to change teh title of an ActionCell based on the
contents of the row it's in?

It looks like the answer is no, but I figured I'd check here before I
gave up.

Greg

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



Re: Changing ActionCell Title

2010-12-01 Thread Greg Dougherty
What, then, do I have to implement so that the button will fire an
action when it's clicked.  Does this require me to extend ButtonCell?

Thanks,
Greg

On Dec 1, 12:48 pm, John LaBanca jlaba...@google.com wrote:
 You can use a ButtonCell instead.  ButtonCell takes a String to display in
 the Button, but otherwise it looks just like ActionCell.

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

 On Wed, Dec 1, 2010 at 12:30 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Is it possible to change teh title of an ActionCell based on the
  contents of the row it's in?

  It looks like the answer is no, but I figured I'd check here before I
  gave up.

  Greg

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

2010-12-01 Thread Greg Dougherty
Hi John,

I'm pretty sure I'm not following you.  Here's my understanding:

I currently have an ActionCell in an IdentityColumn.  You're saying I
can replace the ActionCell with a ButtonCell.
I need to have a class implement FieldUpdaterT, C, and pass that to
the IdentityColumn that holds my ButtonCell.  T is the class of my row
object.  C is ???
So you're saying that clicking on the button will fire a ValueChange
call that will cause my FieldUpdater to have update (int, T, C)
called, which can then use the T parameter to fire off my command?

Other problem: ButtonCell implements CellString.  But I need to pass
it my row object, so that it can change its title based on non-string
information in the row.  (i.e. I want one button that will say Show
'x', where x is the number of items in a list in the row object, or
to disable the button and put Nothing as the title if the list is
empty.  I don't see how I can do that with a ButtonCell.  Am I missing
something?

Thanks,

Greg

On Dec 1, 1:43 pm, John LaBanca jlaba...@google.com wrote:
 ButtonCell triggers a ValueChangeHandler when it is clicked.  Add a
 FieldUpdater to your Column and FieldUpdater#update() will be called.

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

 On Wed, Dec 1, 2010 at 2:29 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  What, then, do I have to implement so that the button will fire an
  action when it's clicked.  Does this require me to extend ButtonCell?

  Thanks,
  Greg

  On Dec 1, 12:48 pm, John LaBanca jlaba...@google.com wrote:
   You can use a ButtonCell instead.  ButtonCell takes a String to display
  in
   the Button, but otherwise it looks just like ActionCell.

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

   On Wed, Dec 1, 2010 at 12:30 PM, Greg Dougherty
   dougherty.greg...@mayo.eduwrote:

Is it possible to change teh title of an ActionCell based on the
contents of the row it's in?

It looks like the answer is no, but I figured I'd check here before I
gave up.

Greg

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

.
For more options, visit this group at
   http://groups.google.com/group/google-web-toolkit?hl=en.

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

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



Re: Changing ActionCell Title

2010-12-01 Thread Greg Dougherty
Hi John,

Thanks for all your help.  I take it I won't be able to disable the
button?  (Not a big deal if so, it's a nice to have not a must
have.)

Again, Thanks!

Greg

On Dec 1, 3:00 pm, John LaBanca jlaba...@google.com wrote:
 Everything you said sounds correct.

 Here is a code snippet that should work:
 ButtonCell cell = newButtonCell();
 // Create a column using the ButtonCell.
 ColumnRowObject, String column = new ColumnRowObject, String(cell) {
   public String getValue(RowObject object) {
     return Show  + object.getListSize(); // Get a String from the object.
   }};

 // Set a fieldupdater.
 column.setFieldUpdater(new FieldUpdaterRowObject, String() {
   public void update(int index, RowObject object, String value) {
     Window.alert(You clicked  + object.toString());
   }});

 myCellTable.addColumn(column);

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

 On Wed, Dec 1, 2010 at 3:33 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Hi John,

  I'm pretty sure I'm not following you.  Here's my understanding:

  I currently have an ActionCell in an IdentityColumn.  You're saying I
  can replace the ActionCell with a ButtonCell.
  I need to have a class implement FieldUpdaterT, C, and pass that to
  the IdentityColumn that holds my ButtonCell.  T is the class of my row
  object.  C is ???
  So you're saying that clicking on the button will fire a ValueChange
  call that will cause my FieldUpdater to have update (int, T, C)
  called, which can then use the T parameter to fire off my command?

  Other problem: ButtonCell implements CellString.  But I need to pass
  it my row object, so that it can change its title based on non-string
  information in the row.  (i.e. I want one button that will say Show
  'x', where x is the number of items in a list in the row object, or
  to disable the button and put Nothing as the title if the list is
  empty.  I don't see how I can do that with a ButtonCell.  Am I missing
  something?

  Thanks,

  Greg

  On Dec 1, 1:43 pm, John LaBanca jlaba...@google.com wrote:
   ButtonCell triggers a ValueChangeHandler when it is clicked.  Add a
   FieldUpdater to your Column and FieldUpdater#update() will be called.

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

   On Wed, Dec 1, 2010 at 2:29 PM, Greg Dougherty
   dougherty.greg...@mayo.eduwrote:

What, then, do I have to implement so that the button will fire an
action when it's clicked.  Does this require me to extend ButtonCell?

Thanks,
Greg

On Dec 1, 12:48 pm, John LaBanca jlaba...@google.com wrote:
 You can use a ButtonCell instead.  ButtonCell takes a String to
  display
in
 the Button, but otherwise it looks just like ActionCell.

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

 On Wed, Dec 1, 2010 at 12:30 PM, Greg Dougherty
 dougherty.greg...@mayo.eduwrote:

  Is it possible to change teh title of an ActionCell based on the
  contents of the row it's in?

  It looks like the answer is no, but I figured I'd check here before
  I
  gave up.

  Greg

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

google-web-toolkit%2bunsubscr...@googlegroups.comgoogle-web-toolkit%252bunsubscr...@googlegroups.com
  google-web-toolkit%252bunsubscr...@googlegroups.comgoogle-web-toolkit%25252bunsubscr...@googlegroups.com

  .
  For more options, visit this group at
 http://groups.google.com/group/google-web-toolkit?hl=en.

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

.
For more options, visit this group at
   http://groups.google.com/group/google-web-toolkit?hl=en.

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

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

Re: GWT + MySQL

2010-11-30 Thread Greg Dougherty
I've used MySQL in just about every GWT app I've written, so it's
quite possible to use it.  Including during development running Jetty.

1: All JDBC calls MUST come from the server.  The client code can NOT
see any jar files, ever.

2: You can NOT reference com.mysql.jdbc.Driver, or any other package
that comes from a jar file, in any class that will end up in the
client.  It doesn't matter if that code is only called from the
server.  Any class that imports anything from a jar file (or from any
of the classes that aren't on the client use whitelist) MUST be in the
server package.

My guess is that you have one or more classes in *.shared that are
importing com.mysql.jdbc.Driver.  Move those classes to *.server, or
move all the MySQL functionality out of them and into classes that are
in *.server.

Greg

On Nov 30, 2:54 am, mgm gabor.mundru...@gmail.com wrote:
 I am having the same issue.. I am using MySQL on the server side
 (server source package only) and there is the run-time error of:

   java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

 I do have the mysql package (mysql-connector-java.jar) in the eclipse
 class path (in Project / Properties / Java Build Path) and still it
 does not work.

 Does anyone know how to configure correctly? perhaps there are other
 settings to make...

 thanks
 Gabor

 On Nov 5, 2:23 pm, Ross McKinnon r.mckinno...@googlemail.com wrote:

  Hi there,

  I've spent numerous hours this week trying to get my existing GWT
  application to connect with an existing MySQL database with no luck.

  I've created my code to connect to the database using JDBC and is kept
  in the server package to ensure it remains as java code.  Also i have
  included the mySQL jar file in the build path for the project but
  still get an error

  java.lang.ClassNotFoundException:com.mysql.jdbc.Driver...

  I have tried numerous ways of getting the database and have ran out of
  ideas now so thought I would consult the experts to see if any kind
  person can lend a hang..

  Thanks for any help,

  Ross

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

2010-11-30 Thread Greg Dougherty
So, how do we use the Closure widgets w/ a GWT app.

Because if I wanted to be writing JavaScript, I wouldn't be using
GWT.  No?

Greg

On Nov 30, 6:25 am, Matt H matt2...@gmail.com wrote:
 Yes, the UI widgets are all terrible. Google Closure has much better
 widgets.

 On Nov 30, 10:10 am, Baloe nielsba...@gmail.com wrote:

  Hi all,

  I'm using a tabLayoutPanel with three tabs. However, the total width
  is now dynamicly created by the width of the content of the current
  tab. But, my first and second tabs are not that wide, so the third tab
  always hangs a bit outside of the tab. How can I set the width of the
  TabLayoutPanel?

  I tried several things, but I can't seem to set the width.
  tabLayoutPanel.setWidth(700px);
  tabLayoutPanel.setSize(700px, 500px);
  tabLayoutPanel.setPixelSize(700, 500);
  with and without tabLayoutPanel.onResize();

  uibinder file:
          g:FlowPanel
                  g:TabLayoutPanel ui:field=tabLayoutPanel
                          barHeight=50 height=600px
                  /g:TabLayoutPanel
                  g:Button ui:field=buttonAdd text={i18n.save} /
          /g:FlowPanel

  I'm adding the tabs in java code after binding.
          tabGeneral = new FlexTable();
          .
          tabLayoutPanel.add(tabGeneral, i18nGeneral.name());

  I really like GWT a lot, but I must say that the ui pieces are really
  quite bad. You can't use certain widgets because it's standard mode
  (or not) without warnings, setting sizes and other basic stuff doesn't
  always work, examples often work in java code but not in the uibinder,
  etc. It would be nice if the widgets themselves were better. It feels
  like temporary broken, or just beta sourcecode. If you can make such a
  good java2javascript compiler, why not create proper widgets as well?

  Thanks!
  Niels

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



  1   2   >