Re: FileUpload and IE8

2011-10-06 Thread Ben Imp
Not that this helps you resolve your issue, but the GWT applications I 
maintain have no issues when uploading files in IE8 land.  Something about 
how you are handling things is likely unique.  Post some code and, as others 
have mentioned, a bit more detail about what exactly is happening.

-Ben

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

2011-09-13 Thread Ben Imp
While I'm not sure GWT allows you to do exactly what you are asking, you 
should be able to use a ui binder template to accomplish the same goal.

http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html

-Ben

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/gzVbqbbgn0oJ.
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: SuggestBox popup Z-Index issue (appears behind everything)

2011-08-15 Thread Ben Imp
One of the SuggestBox constructors lets you pass in a custom 
SuggestionDisplay.  You should be able to just extend the 
DefaultSuggestionDisplay, override the decorateSuggestionList method, and 
set the z-index of the widget it makes.

-Ben

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ZS9bvxltQIMJ.
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: SuggestBox popup Z-Index issue (appears behind everything)

2011-08-15 Thread Ben Imp
I suppose you could also use CSS, too.  That would seem to be a bit less 
hacky.

-Ben

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

2011-07-29 Thread Ben Imp
An resourceful user could probably still watch the value, via a javascript 
debugging tool like Firebug, as its being set into those input fields.  
Assuming you are still sending the financial data to the client from the 
server, of course.

This is also assuming the reason you want to use a password field is to hide 
the value from the user.  If that isn't the use case, then ignore my 
ramblings.

-Ben

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

2011-07-27 Thread Ben Imp
You appear to be missing a period in your CSS, in front of headerRow.

-Ben

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

2011-07-26 Thread Ben Imp
You can tell the dialogs to be non-modal (ie. setModal(false)).  That should 
allow you to have multiple dialogs up and interact with all of them.

-Ben

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

2011-07-18 Thread Ben Imp
You could store the value in some kind of persistent application model.  
That model would be passed into your presenter on creation, and it could 
check to see if an existing value has been saved there.  Alternatively, you 
could hang onto your presenters for re-use later.  I usually opt for the 
former, as I find its easier to make throwaway presenters.

I suppose you could also chuck it into a cookie.

-Ben

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

2011-06-29 Thread Ben Imp
GWT only emulates a subset of the JRE.  AWT is not part of that subset.

http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html

-Ben

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

2011-06-24 Thread Ben Imp
Check out the Anchor widget.  That should let you navigate anywhere you 
want.

-Ben

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

2011-06-24 Thread Ben Imp
The answer to that depends on which server you are using.  If its Tomcat, 
there should be a conf subdirectory with a catalina.out file in there, 
unless yours is configured differently.

-Ben

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

2011-06-10 Thread Ben Imp
I use an object called ApplicationModel, that is passed to every presenter 
on creation.  It stores application state, as its name might suggest.  It 
also fires off events whenever any of the presenters modifies one of its 
values, which helps keep the application in sync.  Things like user roles 
and what the user has currently selected are stored in there.

I should also mention that the ApplicationModel is actually handed off to 
the presenter as part of an ApplicationBundle, which is basically just a 
parameter object.  It holds the model, the ApplicationNavigationControl, 
ApplicationEventBus, ApplicationFactory, etc.  Wrapping it all up in the 
parameter object makes it really easy to add new application-wide bits.

-Ben

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

2011-06-10 Thread Ben Imp
The bundle is presenter-agnostic.  It only contains application-wide state 
and control objects.

I do have two classes of presenters in my application, however.  Those that 
get passed the ApplicationBundle are page presenters, and control the whole 
screen (or at least the central content portion of it anyway).  They are 
created in response to navigation events.  These, in turn, may create 
component presenters and pass them specific bits of information, like an 
instance of their view that was retrieved from somewhere in the main page 
view interface, or a specific implementation of their model interface that 
will play well with the rest of the page.

Something like this:

public XxxPagePresenter(ApplicationBundle bundle, XxxPageView view) {
this.bundle = bundle;
this.view = view;
this.model = new XxxPageModelImpl();
this.yyyComponentPresenter1 = new 
YyyComponentPresenter(model.getYyyComponentModel(), 
view.getYyyComponentView());
...
}

-Ben

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

2011-05-25 Thread Ben Imp
I believe if you can add a handler (via addAttachHandler) that will fire 
when it is removed.  However, at that point I'm not sure you can really 
prevent the panel from being removed, if that is your goal.

-Ben

-- 
You received 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 unit test case on GWT server side class methods and how mock up the session inside the methods.

2011-05-23 Thread Ben Imp
I do all of my server side work in little action objects.  This allows you 
to remove your dependency on RemoteServiceServlet, and test only your code.

So basically all of your server methods would look like:

return new MyAction(getThreadLocalRequest(), 
clientArgumentBundle).perform();

Then you can mock out the request, session, etc, in your unit test, since 
they will just be arguments instead of class methods.

-Ben

-- 
You received 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: HTML rendering in GWT

2011-05-23 Thread Ben Imp
Yes, it is possible.  However, you should probably be using CSS and a span 
tag.

Why not take a tour through the samples and see what GWT can do.

http://code.google.com/webtoolkit/examples/

-Ben

-- 
You received 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: Development mode cross site RPC requests

2011-05-20 Thread Ben Imp
You could create a server side component for your GWT app, and delegate 
fetching the XML data to that.

-Ben

-- 
You received 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: Development mode cross site RPC requests

2011-05-20 Thread Ben Imp
I would think that the servlet would increase the performance of the 
application by a bit.  XML parsing in JS can't be fun, or fast, for that 
matter.  This assumes the latency between wherever you would run your 
application server and the target C++ backend isn't too high, though.  
Otherwise you are making a big triangle of a route, as opposed to simply 
back and forth.  Probably still worth it, since then you can leverage 
awesome java XML parsing libraries.

You may see some performance penalty for switching servers, I suppose.  I 
seem to recall that Tomcat wasn't quite as zippy as Apache.

-Ben

-- 
You received 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 reposition the popup when window gets resized

2011-05-02 Thread Ben Imp
I believe the center() method on the dialog will re-center a dialog even if 
its already visible.  Stick that into a resize handler and you should be 
good to go.

-Ben

-- 
You received 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: using SuggestBox with special Oracle and Suggestion - how to keep view humble

2011-04-26 Thread Ben Imp
Most of the GWT widgets have predefined interfaces that will work just 
fine.  HasValue, HasText, HasClickHandlers, etc.  I rarely bother to extend 
these.  Ideally, you wont need to generate too many of these extra 
interfaces.  I think the only additional interface I have created is 
HasClickHandlersAndEnableable, which lets me have greater control over 
buttons without adding more methods to the main view interface.

-Ben

-- 
You received 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 update specific area

2011-04-25 Thread Ben Imp
There should be plenty of this kind of behavior for you to look at in the 
examples section.

http://code.google.com/webtoolkit/examples/

-Ben

-- 
You received 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: Have each element have its own unique id automatically

2011-04-25 Thread Ben Imp
While it would cut down on the amount of line noise in the code, I see this 
as being somewhat fragile and I would avoid it in my code.  Introducing a 
dependency between your code structure and your CSS would make it much more 
difficult to change things and refactor without breaking.  I tend to hate 
anything that makes refactoring difficult, as I find the maintenance phase 
of an application is by far the lengthiest part.

We actually did something similar to this in our codebase.  We had CSS names 
auto-generating from the class name of the view/widget.  While it did reduce 
some line noise, I found out that it made refactoring break all of the CSS.  
This made me not want to refactor things, which is evil.  I've almost gotten 
rid of all of it by now, and will never go back.

My current way of reducing this overhead is a simple Widget factory object.

VerticalPanel mainPanel = new 
WidgetUtility().createVerticalPanel(cssClassOne);

Not really auto-generated or anything, but it cleans up the code, and 
doesn't rely on any magic.

-Ben

-- 
You received 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: Internet Explorer

2011-04-25 Thread Ben Imp
IE has a built-in JS debugger.  Tools-Developer Tools.  The Script tab 
should have your debugging controls.

There is also Firebug Lite, although I think the built-in tools do a better 
job for most things.

I have noticed IE being generally slower to process JS than most other 
browsers, but not to the degree that you are describing.

-Ben

-- 
You received 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: Loading thumbnails of images as links in gwt

2011-04-22 Thread Ben Imp
The Image class implements HasClickHandlers, so you can just tie into that 
and do whatever you need to do when your handler gets called.

-Ben

-- 
You received 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: Which widget to use

2011-04-22 Thread Ben Imp
These examples will probably be helpful.  As the other person mentioned in 
this thread, the Cell Widgets will probably be what you are looking for.

http://code.google.com/webtoolkit/examples/

-Ben

-- 
You received 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: Ajax loader locked screen

2011-04-20 Thread Ben Imp
You could use a modal DialogBox and not offer the user a way to close it.

-Ben

-- 
You received 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: using SuggestBox with special Oracle and Suggestion - how to keep view humble

2011-04-19 Thread Ben Imp
I ran into this issue as well - knowledge of the domain in the view.  I 
ended up getting around it by creating a delegate for the suggest oracle.

public class SuggestOracleDelegator extends SuggestOracle {

private SuggestOracle delegate = null;

public SuggestOracleDelegator() {}


public void requestSuggestions(Request request, Callback callback) {
if(this.delegate != null){
this.delegate.requestSuggestions(request, callback);
}
}

public void setDelegate(SuggestOracle delegate) {
this.delegate = delegate;
}
}

Then I wrap this in a HasSuggestions interface that lets you set the 
delegate oracle from outside, and attach listeners and so forth.  Seems to 
work quite well.

-Ben

-- 
You received 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: KeyPressevent is being called twice for suggest box - Please help!!!!!

2011-04-19 Thread Ben Imp
I believe you are hitting this.

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

There's a few suggestions in there for how to go about fixing it.  I ended 
up creating a de-duping Handler that wont fire its delegate when it gets 
called for the duplicate event.

-Ben

-- 
You received 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: KeyPressevent is being called twice for suggest box - Please help!!!!!

2011-04-19 Thread Ben Imp
That seems a lot simpler than what I did.  Awesome.

-Ben

-- 
You received 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: gwtapi (createfile, redfilecontent, createpdf) etc

2011-04-13 Thread Ben Imp
As far as I am aware, the browser wont let you read/write local files
like that.

-Ben

On Apr 13, 9:53 am, Diego Lovison diegolovi...@gmail.com wrote:
 hello,
 each browser have your api for create and read files or to access data
 on disk storage
 So I would like to create an api to make 
 this...http://code.google.com/p/gwtapi/

 Will have an interface that will be create by deffered binding, and an
 implementation for each browser...

 for example
 ReadFile read = GWT.create(ReadFile.class);
 String[] lines = read.thisFile();

 make sense create this api?

 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: Is validation on client side enough or do I need both?

2011-04-08 Thread Ben Imp
Never trust a client.

-Ben

On Apr 8, 6:52 am, Stephan T stephan.tern...@gmail.com wrote:
 The scenario:
 I have a form where you can create a new person by entering name in a
 textbox and click a button. When the user clicks the button I grab the
 value from the textbox and sets it on the Person object. The Person
 object validates the value and makes sure the name on the object only
 contains a-z. If not execution stops and an error is presented to the
 user. If all is good I send the Person object via an RPC call to the
 server.

 The question:
 When continuing execution on the server, can I be sure that the name
 only contains a-z or do I have to do server validation as well for
 protection from attackers?

-- 
You received 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: MVP dialog boxes

2011-04-07 Thread Ben Imp
I've used approach #1 before (call a method on the view, it creates a
dialog) with good success.  As long as it isn't complicated, that
works just fine, and I can't imagine it would be something significant
enough to require testing.

More recently, however, I've taken to Approach #3, whereby you have a
whole separate view/presenter for the dialog boxes.  I go one extra
step and hide this behind a simple interface.  I think this would work
a bit better for your implementation of the MVP pattern.

Snippet from inside one of my page presenters:

ChooseOneDialogSuggestion dialog =
this.bundle.getApplicationFactory().createChooseOneDialog();
dialog.addSelectionHandler(this.selectionHandler);
dialog.setOptions(ContactSuggestion.translate(result));
dialog.show();

The application factory is part of the resource bundle made available
to all of my presenters.  The ChooseOneDialog interface hides the
implementation, but inside it is a fairly standard presenter/view.
The methods on the ChooseOneDialog interface simply delegate to the
presenter.

This allows me to keep this code separate and reusable, while at the
same time allowing me to mock it out for testing purposes, since both
the ApplicationFactory and the ChooseOneDialog are only known through
their interfaces.  The bundle itself is actually a concrete class, but
all it does is contain interfaces, so it doesn't need mocking up.

-Ben

On Apr 7, 7:14 am, Terry Bachard terram...@gmail.com wrote:
 Thanks Jen.

 Yes, I can see how that works. Unfortunately I haven't implemented my MVP
 pattern this way so far, the view cannot delegate to the presenter; only the
 presenter can talk to the view...

 Cheers,
 Cormac

 On 7 April 2011 12:18, Jens jens.nehlme...@gmail.com wrote:







  Well I also use the Mvp pattern (custom one) and in the beginning I always
  define methods HasXYZHandlers getXYZHandlerProvider() (e.g. HasClickHandler
  getSaveClickHandlerProvider() ) and use these in the presenter. So I would
  have chosen your second or even third approach.

  But today I think it is better to perform simple tasks in the view itself
  and use as much code provided by GWT. So as we use UiBinder we are able to
  use the @UiHandler annotation which makes code much cleaner. Now our
  confirmation boxes for cancel and delete actions/buttons are implemented in
  the view itself and if the user wants to do an action the view calls a
  corresponding method defined by a delegate interface which is implemented by
  the view's presenter.

  Example:

  public interface MyPresenter extends Presenter {

    public interface MyPresentersView extends Display {

       public interface Delegate {
          public void doCancel();
          public void doDelete();
          /* basically one method for every user action/event */
       }

       /* should be the first method to be executed */
       public void setDelegate(MyPresentersView.Delegate delegate);

    }

  }

  public class MyPresentersViewImpl extends Composite implements
  MyPresentersView {

     /* UiBinder stuff */

     /* setDelegate method */

     private void ensureDelegate() {
       assert this.delegate != null : Delegate not set;
     }

     @UiHandler(cancelButton)
     protected void onCancelClicked(ClickEvent e) {
       this.ensureDelegate();
       if(Window.confirm(Do you really want to cancel?)) {
         this.delegate.doCancel();
       }
     }

      /* other ui handler methods */
  }

  public class MyPresenterImpl implements MyPresenter,
  MyPresentersView.Delegate {

     /* implement doCancel() etc. */

  }

  I think this approach can also be done with dialog boxes although you need
  a bit more code in the view for handling the dialog box. As we use
  Window.confirm it is pretty simple. I like this pattern because the view
  knows a delegate interface that contains a method for every user
  action/event and can perform simple logic that do not have to be tested
  before calling a meaningful delegate method that performs more complicated
  logic. It also saves a lot of anonymous handler classes in the presenter.

  Maybe you like this fourth approach ;-) But in general I would let the view
  perform some confirmation logic that do not have to be tested and let the
  presenter concentrate on complicated stuff.

  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.

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

Re: MVP dialog boxes

2011-04-07 Thread Ben Imp
Yeah, essentially.  The one presenter doesn't know the details of what
lives behind that interface, which is the important bit.

I do have some 'child presenters' in the application as well.  Those
are concrete presenter classes that a page presenter will instantiate
to handle some subset of functionality on the page.  They have a
corresponding 'child view' interface on the page view that they are
assigned to handle.  Those presenters aren't shared much, though, so I
don't think the lack of an obscuring interface matters as much.

this.revenueSplitPresenter = new
RevenueSplitComponentPresenter(bundle,
this.model.getRevenueSplitModel(), this.view.getRevenueSplitView());

You could also do something similar to this for the dialogs.  The view
is still separate, so testing will still be fairly simple.  However,
you do lose out on the ability to mock out that particular subset of
functionality, which may or may not matter.

-Ben

On Apr 7, 9:08 am, Terry Bachard terram...@gmail.com wrote:
 Thanks for response. So you basically have a presenter invoking another
 presenter?

 Currently, the only way I communicate with other presenters is via events;
 they know nothing of each other. But I suppose I could change that!

 Cheers,
 Terra

 On 7 April 2011 14:26, Ben Imp benlee...@gmail.com wrote:







  I've used approach #1 before (call a method on the view, it creates a
  dialog) with good success.  As long as it isn't complicated, that
  works just fine, and I can't imagine it would be something significant
  enough to require testing.

  More recently, however, I've taken to Approach #3, whereby you have a
  whole separate view/presenter for the dialog boxes.  I go one extra
  step and hide this behind a simple interface.  I think this would work
  a bit better for your implementation of the MVP pattern.

  Snippet from inside one of my page presenters:

                 ChooseOneDialogSuggestion dialog =
  this.bundle.getApplicationFactory().createChooseOneDialog();
                 dialog.addSelectionHandler(this.selectionHandler);
                 dialog.setOptions(ContactSuggestion.translate(result));
                 dialog.show();

  The application factory is part of the resource bundle made available
  to all of my presenters.  The ChooseOneDialog interface hides the
  implementation, but inside it is a fairly standard presenter/view.
  The methods on the ChooseOneDialog interface simply delegate to the
  presenter.

  This allows me to keep this code separate and reusable, while at the
  same time allowing me to mock it out for testing purposes, since both
  the ApplicationFactory and the ChooseOneDialog are only known through
  their interfaces.  The bundle itself is actually a concrete class, but
  all it does is contain interfaces, so it doesn't need mocking up.

  -Ben

  On Apr 7, 7:14 am, Terry Bachard terram...@gmail.com wrote:
   Thanks Jen.

   Yes, I can see how that works. Unfortunately I haven't implemented my MVP
   pattern this way so far, the view cannot delegate to the presenter; only
  the
   presenter can talk to the view...

   Cheers,
   Cormac

   On 7 April 2011 12:18, Jens jens.nehlme...@gmail.com wrote:

Well I also use the Mvp pattern (custom one) and in the beginning I
  always
define methods HasXYZHandlers getXYZHandlerProvider() (e.g.
  HasClickHandler
getSaveClickHandlerProvider() ) and use these in the presenter. So I
  would
have chosen your second or even third approach.

But today I think it is better to perform simple tasks in the view
  itself
and use as much code provided by GWT. So as we use UiBinder we are able
  to
use the @UiHandler annotation which makes code much cleaner. Now our
confirmation boxes for cancel and delete actions/buttons are
  implemented in
the view itself and if the user wants to do an action the view calls a
corresponding method defined by a delegate interface which is
  implemented by
the view's presenter.

Example:

public interface MyPresenter extends Presenter {

  public interface MyPresentersView extends Display {

     public interface Delegate {
        public void doCancel();
        public void doDelete();
        /* basically one method for every user action/event */
     }

     /* should be the first method to be executed */
     public void setDelegate(MyPresentersView.Delegate delegate);

  }

}

public class MyPresentersViewImpl extends Composite implements
MyPresentersView {

   /* UiBinder stuff */

   /* setDelegate method */

   private void ensureDelegate() {
     assert this.delegate != null : Delegate not set;
   }

   @UiHandler(cancelButton)
   protected void onCancelClicked(ClickEvent e) {
     this.ensureDelegate();
     if(Window.confirm(Do you really want to cancel?)) {
       this.delegate.doCancel();
     }
   }

    /* other ui handler methods

Re: Differences between Firefox and IE7

2011-04-07 Thread Ben Imp
http://code.google.com/p/google-web-toolkit/issues/detail?id=5612

-Ben

On Apr 6, 11:23 am, Vicky solid@gmail.com wrote:
 I was going through the tutorial available on GWT website for
 StockWatcher application and testing the application as described in
 Step4: Manage Events on the Client.

 Below piece of code behaves differently in Firefox and IE7. In IE7
 this works well, i.e. If I enter some junk characters in Text field
 and hit Enter event.getCharCode() == KeyCodes.KEY_ENTER line gets
 executed successfully and I could see an alert message. However this
 same line does not work, if I use Firefox.

 When I use Firefox, event.getCharCode returns some junk character.
 What am I doing wrong here? or is this expected behaviour?

 newSymbolTextBox.addKeyPressHandler(new KeyPressHandler() {
               public void onKeyPress(KeyPressEvent event) {
                 if (event.getCharCode() == KeyCodes.KEY_ENTER) {
                   addStock();
                 }
               }
             });

-- 
You received 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: Show progress of RPC call

2011-04-07 Thread Ben Imp
I've seen something like this.  We kick off a long-running process,
then have the browser ask for updates from the server every X seconds
and update the user.  This requires storing the progress bits in the
session, or some other persistent store, which I generally avoid
doing, but it works.

-Ben

On Apr 2, 10:04 am, Michael mrher...@gmail.com wrote:
 In my app I make an RPC call that results in a return of a large
 amount of data.  I would like to show the progress to the user of the
 download, is there a way to do that?

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

2011-03-31 Thread Ben Imp
You could set the title attribute of the text field.

http://www.w3schools.com/tags/att_standard_title.asp

-Ben

On Mar 31, 8:57 am, SVR svr...@gmail.com wrote:
 Ho to display hint text (like a date format, currency symbol etc) to a text
 field. Is there any built in feature to do this in GWT?
 I am not using Smart GWT or anything else.
 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: Overriding panel's iterator() prevents clickHandler from being called.

2011-03-31 Thread Ben Imp
Ah, I finally see what you are doing with that iterator.  You are
using that to find and remove the item elements from the view.

What you are doing wrong is just abusing an existing method.  You
generally try to not change the contracts of methods by overriding
them and assigning them different functionality, as it tends to break
existing code, and just be confusing.

There are many ways to do this kind of thing.  The simplest would
probably be to define a new method getItemElementsIterator or
whatever else you want to call it, and return the flow panels iterator
that you want with that new method.

-Ben

On Mar 30, 10:35 pm, Vhann3000 vhann3...@gmail.com wrote:
 On Mar 30, 12:26 pm, Vhann3000 vhann3...@gmail.com wrote:

  Second, I may very well be wrong, but the way I understand it, if I
  don't override the ScrollPanel's iterator(), then it will return the
  VerticalPanel (as the VerticalPanel is the sole child widget of the
  ScrollPanel). Of course, I don't want that, I want to be able to list
  the VerticalPanel's child widgets with
  scrollVerticalPanelInstance.iterator().

 I just tested and, indeed, if I don't override the iterator(), it just
 lists the
 nested Panel:

 public class ScrollFlowPanel extends ScrollPanel {
         private FlowPanel fPanel;

         public ScrollFlowPanel() {
                 fPanel = new FlowPanel();
                 super.add(fPanel);

                 for (Iterator i = iterator(); i.hasNext(); ) {
                         GWT.log(Widget class =  + i.next().getClass());
                 }
         }

 }

 This code outputs:
 Widget class = class com.google.gwt.user.ui.FlowPanel

 So how can I hide the nested Panels from the caller and still have my
 Handlers work?
 What am I doing wrong?

 Regards,
 Olivier

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: Overriding panel's iterator() prevents clickHandler from being called.

2011-03-31 Thread Ben Imp
Correct.  You weren't abusing the iterator itself, you were abusing
the iterator method, which other things used.

You can still extend ScrollPanel, but just add your own bit of
interface on top of it.  Like this bit of pseudocode.

class MyScrollPanel extends ScrollPanel {

  private FlowPanel mySecretFlowPanel;

  public void addThing(Thing x) { //add things to secret flow panel
here }

  public void removeThing(Thing x) { //you get the idea }

  public IteratorThing getThingIterator() { return
mySecretFlowPanel.iterator(); }

}

This is all a very view-centric way of doing it, however.  I might
suggest reading up on the MVP pattern, which would help abstract away
the details of the panels entirely.

-Ben

On Mar 31, 12:02 pm, Vhann3000 vhann3...@gmail.com wrote:
 On Mar 31, 11:53 am, Vhann3000 vhann3...@gmail.com wrote: 2- When the 
 Button gets clicked, it should call the ItemClickHandler
  (but it does not if and only the overriden iterator() is not there).

 I meant it doesn't work when I override iterator().

 Now, from what I understand, GWT relies on being to walk through the
 panel tree using iterators() and that means I can't hide a panel
 like that
 (hence why it fails).

 If I'm correct, then what are my options? Obviously, I can't use
 ScrollPanel
 because it implements the HasOneWidget interface. But then, if I
 don't
 extend ScrollPanel, how can I implement HasScrollHandlers: to do that,
 I must implement addScrollHandler() which returns a
 HandlerRegistration.
 The problem is that, as far as I know, HandlerRegistration can only be
 returned by
 HandlerManager and its subclasses (DefaultHandlerManager) yet these
 are deprecated
 with no replacement :s .

 Regards,
 Olivier

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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: 2.1 Version of documentation? / CellTable sorting

2011-03-30 Thread Ben Imp
http://code.google.com/webtoolkit/doc/2.1

You can twiddle the version in the upper left by clicking on it.

-Ben

On Mar 30, 11:12 am, cri chuck.irvine...@gmail.com wrote:
 We are currently at version 2.1 of GWT and I'm trying  to implement
 sorting of CellTables. The online (2.2) GWT documentation for doing
 this isn't compatible with 2.1 (i.e. the 2.2 docs reference classes/
 methods that aren't available in 2.1.

 Is there documentation for 2.1 anywhere that I can reference /
 download?

 Any help much 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.



Re: Overriding panel's iterator() prevents clickHandler from being called.

2011-03-29 Thread Ben Imp
You shouldn't need to override any methods just to add scrollbars.  Im
curious as to why you want to do that.  You should be able to just
nest the panels, as you have done.

-Ben

On Mar 29, 12:40 am, Olivier Diotte oliv...@diotte.ca wrote:
 Hi,

 I am new to GWT (and not that expert in Java) and I have a problem I
 haven't been able to solve.

 Here's my problem:

 I want to do a panel (say a VerticalPanel) but also want it to have
 scroll bars. So, what I did was to nest a VerticalPanel in a
 ScrollPanel and then overrode the latter's iterator() with a call to
 the former's iterator.

 Attached is a (relatively) small test code showing the problem:

 With the overriding iterator() in place, the SelectedItemsListPanel's
 ClickHandler() doesn't get called. Comment the iterator() out and
 everything works perfectly.

 Regards,
 --
 Olivier Diotte

  olivier.java
 1KViewDownload

  ItemElement.java
 2KViewDownload

  ItemSelector.java
 2KViewDownload

  ItemsListPanel.java
 3KViewDownload

  SelectedItemElement.java
  1KViewDownload

  SelectedItemsListPanel.java
 3KViewDownload

-- 
You received 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: Returning URL from RPC

2011-03-29 Thread Ben Imp
I suppose the obvious thing to investigate would be whether ???/
myfolder/report.html is visible to http requests.  That will depend on
where exactly your code is writing this HTML file to and whether your
app server and/or web server allow reading from that location.

-Ben

On Mar 29, 10:26 am, azuniga alessandro.zun...@gmail.com wrote:
 I make a call to and rpc and the rpc returns a string. The string is
 the name of a business report generated, report.html. Now I want the
 client to embed this html in the app, so I use a Frame widget. Now I
 want to know how to instantiate this frame, since I have been trying
 Frame frame = new Frame(GWT.getHostPageBaseURL() + report.html);
 This is just returning a 404 - GET error. I tried passing back the
 path of the file, /myfolder/report.html, but that didn't work. I also
 tried getHostPageBaseURL() + modulename/servicename/ + reportname
 but I get the same 404 error. My question is, what string do I have to
 pass back in order to be able to embed this page in my app? Is this
 even possible. I tried passing back the html as a string and it
 worked, but it took way too long for big business reports, approx 2
 1/2 minutes to render, and this is too long, so I'm trying other
 options. Any insight or advice is greatly 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.



Re: RPC Problem with HashMap containing ArrayList Value

2011-03-28 Thread Ben Imp
The more generic your remote interface, the more code the GWT compiler
generates to try and handle all the possible values you may pass
through it.

Having a method that can take something of type Serializable would, I
believe, make the GWT compiler generate code for all possible types,
since you can't get any more generic than that.

-Ben

On Mar 28, 3:58 pm, SergeZ comp1...@gmail.com wrote:
 What it means ? Is it bad or not ? I see nothing bad or just nothing
 that takes my attention to that ! Can you explain your point about
 serialization policy in more details ? What did you mean ?

 On 28 мар, 22:56, ciosbel andrew...@gmail.com wrote:







  Remember that gwt will create a serialization policy for all serializable
  types at compile time.

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

2011-03-23 Thread Ben Imp
I've found using ORM in GWT to be pretty much the same as using it in
any other setting.  If you like it, go for it.  I personally do not
care for it, as I've found, at least in the projects I've worked on,
that the added complexity doesn't seem to pay off.  I'd rather just
write a thin DAO layer and be done with it.

Toplink has been my only real experience with such things, however, so
perhaps I just got stuck with a crappy ORM.

-Ben

On Mar 23, 3:45 am, csaffi csaff...@gmail.com wrote:
 Hi everybody,
 I would like your opinion regarding the use of ORM in web applications
 built with GWT. I'm a little reconsider about the ORM, and I wonder
 whether it is worth to use in web applications built with GWT. What
 would be real advantages in addition to greater independence and
 portability?

 Waiting for your comments :)

-- 
You received 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: Working with third party client libraries in gwt

2011-03-23 Thread Ben Imp
If you want to use them on the client side, you must have the source
code for GWT to translate to JS.  In addition, this code must be
compatible with GWT's subset of Java.

Using third party jars on the server side, on the other hand, is just
straight Java.

I would hazard a guess that your issue is due to an attempt to use
them on the client.

-Ben

On Mar 23, 8:27 am, Prashant er.prashants...@gmail.com wrote:
 Hi Guys,

 I'm very new to GWT and have basic experience in web development. Just
 started learning gwt and trying to build a web application  which
 would use client libraries in order to connect TIBCO EMS but not sure
 how to import libraries in to gwt project.
 I've already developed a java desktop application built on swings
 using those libraries but now not able to use them in gwt project.

 I'm getting below error when I'm trying to create an object of
 TibjmsAdmin class.

 com.tibco.tibjms.admin.TibjmsAdmin can not be found in source
 packages. Check the inheritance chain from your module; it may not be
 inheriting a required module or a module may not be adding its source
 path entries properly.

 Can you please help here?

 Thanks in Advance
 Prashant

-- 
You received 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 chart representation

2011-03-21 Thread Ben Imp
Perhaps if you provided details, people here might have something to
go on to try and help you.

As it stands, my only advice would be to use the IE developer tools
and inspect the DOM elements where things look different.

http://msdn.microsoft.com/en-us/library/dd565628%28VS.85%29.aspx

-Ben

On Mar 21, 5:21 am, kedar vyawahare kedar.vyawahare1...@gmail.com
wrote:
 Hi All,
 I have a small GWT charting code which shows my charts in  Mozilla perfectly
 but I m  getting problem to visualize it(same charts) in I.E 8.
 Please help me .

 Thanks in Advance.
 Kedar.

-- 
You received 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: Why does History.newItem clear my screen completely?

2011-03-21 Thread Ben Imp
As far as I am aware, adding a new history token only fires history
events.  Unless you are listening to them, it shouldn't do anything.

I haven't used the GWT MVP framework, though.  If you are using that,
this may be the result of some baked-in behavior.

-Ben

On Mar 21, 10:11 am, Navigateur naveen.c...@gmail.com wrote:
 Is History.newItem supposed to clear the screen? I don't want this to
 happen, yet it is. The history part is working (back, forward etc.)
 but is there any way of adding a history token without it clearing the
 screen? (it's definitely newItem that's clearing the screen on its own
 in my case, not onValueChange).

 Or is this a known issue between newItem and certain types of panel?

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



Re: GWT menu item text alignment issue

2011-03-18 Thread Ben Imp
It looks like there is a setHTML method on the MenuItem.  I'd imagine
you could use that to put a table element in there, with a left and
right cell, and then differently align the contents of those.

I can't say I've tried to do this, mind you, but it seems like it
should work.

-Ben

On Mar 18, 1:50 am, maximus mohitchilk...@gmail.com wrote:
 Instead of using setText() from menuitem i have created my own
 settext() as below

     public void setText(String text, String acceleratorKey) {
         Element leftDIV = DOM.createDiv();
         DOM.setElementProperty(leftDIV, align, left);
         DOM.setInnerText(leftDIV, text);
         DOM.insertChild(getElement(), leftDIV, 0);
         Element rightDIV = DOM.createDiv();
         DOM.setElementProperty(rightDIV, align, right);
         DOM.setInnerText(rightDIV, acceleratorKey);
         DOM.insertChild(getElement(), rightDIV, 2);
     }

 This method shows the menuitems but do not show any effect of
         DOM.setElementProperty(leftDIV, align, left);
 or
         DOM.setElementProperty(rightDIV, align, right);

 output from above code is:

 CreateAlt+Ctrl+C
 EditShift+E
 OptimizeCtrl+O

 can anyone help if i can create two div elements so that alignment can
 be done properly or is there any otherway to achieve this.

 On Mar 18, 9:08 am, maximus mohitchilk...@gmail.com wrote:

  On Mar 17, 4:13 pm, maximus mohitchilk...@gmail.com wrote:

   Hi all,
   Is it possible in GWT to set Menu Item text in two different
   alignments,what I mean to say is I want my menu item's label to be
   left justified and its accelerator key to be right justified.

   i.e,

         Create     Alt+Ctrl+C
         Edit          Shift+E
         Optimize       Ctrl+O

   Thanks

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



Re: GWT-RPC Pass array of Serializable objects

2011-03-18 Thread Ben Imp
If I saw #2 in any code I was responsible for I would hunt down and
beat the person who wrote it.  With a rusty spork.

I may be slightly resentful of having bad code dumped on me.
Possibly...

Defining your methods return type is good practice.  I recommend
creating a result object to return for the same reason I recommend not
returning type Object on every method.  Its good documentation, and,
in my mind, makes for a more stable and healthy application.  You'll
probably forget what index #3 in your array is a few months down the
line anyway, and if you want to try and remove a result from the array
you will have a hard time tracking down where it gets used.

All remote methods in the GWT application I maintain use a result
object.  I have found it to be well worth the extra bit of code and
effort in order to gain the benefits.

-Ben

On Mar 18, 12:50 pm, ss.require ss.requ...@gmail.com wrote:
 I want to create an RPC-method that returns 3 java-objects that can
 have different types. These types are always Serializable. So I have 2
 possible approaches:
 1)Create a new class SomeClass with properties of these types and
 return this object: public SomeClass someMethod()..
 2)Retrun Serializable array:  public Serializable[] someMethod()..

 I prefer the 2) approache, cause I don't like to create new class just
 to pass objects through RPC. Is it correct to do that from the
 perspective of GWT? Or I should create a new class every time when I
 want to pass a cortège of objects of different types?

-- 
You received 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: Need Help for gwt-rpc mysql database connectivity

2011-03-15 Thread Ben Imp
Yeah, I've been meaning to do something like that in my application.
The current lack of details on the client isn't very pleasant for
users or developers.  SSH-ing into the prod server is annoying as
well.  I'm always worried about breaking something with a twitchy rm -
rf finger.

I'm still curious as to why OP can't see the logs in his server,
though.  If it happens in development mode, odds are the server
console is right there in eclipse, full stack trace and all.

-Ben

On Mar 15, 7:20 am, Sean slough...@gmail.com wrote:
 This is more for Ben then the original poster, but you can make your own
 serializble exception, catch the exception on the server side and then throw
 your Serializable Exception with the original message in it. It makes RCP so
 much easier to debug.

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



Re: GWT application requires Plugin to be installed in browser

2011-03-15 Thread Ben Imp
You are running your application in development mode, which means you
are probably running it from your IDE.  Its used for debugging and fun
stuff like that.

If you compile and deploy your web application to a server, like
Apache or Tomcat, you wont get that.

http://code.google.com/webtoolkit/doc/latest/DevGuideDeploying.html

-Ben

On Mar 15, 7:57 am, BhaskerT bhasker.i...@gmail.com wrote:
 Hi All,

 I am new to GWT(2.0) development.
 Problem statement: While accessing a GWT based web application, IE ask
 me to install GWT plugin.

 Solution: If i instal the plugin then it works perfectly fine.

 As per my knowledge Gmail is based on GWT. and if i try to access
 gmail from any where it does not ask me to install any plugin.

 I want my application to behave in similar manner.

 What i have googled till now is, there is something called GWT
 development mode, due to which this problem is caused.

 Any suggestion will be very helpful.

 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: Getting child window(s)

2011-03-14 Thread Ben Imp
You can hold onto a handle in pure JS.

http://www.w3schools.com/jsref/met_win_open.asp

I don't believe GWT gives you a way to access this handle, however.

-Ben

On Mar 14, 2:19 pm, Ice13ill andrei.fifi...@gmail.com wrote:
 Is it possible to get a handle to the windows opened by a certain
 window ?
 For example, i have an anchor element with a href and a target that
 opens a new window at some point. Can i access that window (for ex a
 method like getChildWindows()'? Or by opening a window with an
 anchor, i automatically lose the handle to that window.

-- 
You received 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: Need Help for gwt-rpc mysql database connectivity

2011-03-14 Thread Ben Imp
I am quite curious how it is that you can not have access to the
server side stack trace.  I suspect the answer to your question lies
there.

-Ben

On Mar 14, 7:04 am, Dilip Rathod rathod...@gmail.com wrote:
 I can gwt-rpc communication with server sucessfully.
 but when i want to interact with mysql I get following error

 com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
 Could not create connection to database server.

 I added mysql connector to WEB-Inf/lib dierctory

 following is my code that tries to connect to data base

 public String login(String usr,String pwd)
         {
                 Connection conn     = null;
         String url          = jdbc:mysql://localhost:3306/
 SeekwadiDataBank;
         String db           = SeekwadiDataBank;
         String driver       = com.mysql.jdbc.Driver;
         String user         = user;
         String pass         = user;
         String connerr=null;
         try
           {
                 connerr=Connecting ;
                 Class.forName(driver).newInstance();
                 connerr+=Still Working;
                 //Class.forName(com.mysql.jdbc.Driver);
                 conn = DriverManager.getConnection(url, user, pass);
                 connerr=Conncted;
           } catch (Exception e) {
                         // TODO: handle exception
                   connerr+=e.toString();

                 }
                  return connerr;
         }

 i cannot give full stack trace becuse it is not available at client
 side

 client side code taht communicate asynchronoulsy to server is

 Hyperlink login = new Hyperlink(Login, Login);
                 login.addClickListener(new ClickListener() {
                     public void onClick(Widget widget)
                     {
                         hp.clear();
                         final TextBox usr=new TextBox();
                         final PasswordTextBox pwd=new PasswordTextBox();

                         Button loginb=new Button(Login);
                         loginb.addClickHandler(new ClickHandler()
                         {
                          public void onClick(ClickEvent event)
                           { //Window.alert(Starts);
                           AsyncCallback callback = new AsyncCallback()
                            {

                            public void onSuccess(Object result)
                          {
                                 if(((String) result).equals(Ok))
                                 { Window.alert(Login 
 Status:+result.toString());
 usr.setText(); pwd.setText(); }
                                else { Window.alert(Login
 Status:+result.toString()); usr.setText(); pwd.setText(); }
                          }
                              public void onFailure(Throwable caught)
                                { Window.alert(caught.getMessage()); }
                            };
                           no.login(usr.getText(),pwd.getText(), callback);
                            //Window.alert(Ends);
                           }

                         });

-- 
You received 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: Cannot change CSS in dev mode

2011-03-04 Thread Ben Imp
I cannot say I've observed the same behavior.  The browser may be
caching your CSS, though.  Hit refresh a few times and I'd wager you
will see your changes.

-Ben

On Mar 4, 7:40 am, Andrey mino...@gmail.com wrote:
 When running GWT app in dev mode static web resources such as css-
 files cannot be changed.
 To change a line in css I must stop server, change and run again.
 That's really inconvenient.

 Is there any workaround?

 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: Is the Issue 5320 resolved ?

2011-03-04 Thread Ben Imp
The issue tracker is public.

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

-Ben

On Mar 4, 12:44 am, Deepak Singh deepaksingh...@gmail.com wrote:


-- 
You received 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: Best practice for to maintain Big project

2011-03-04 Thread Ben Imp
If I am understanding you correctly, you worry about having to deploy
the whole war for small changes, like a quick bugfix or the like.

As far as I am aware, there isn't really a way to partially deploy a
GWT application, like only those parts that changed.  In theory, I
suppose, you might be able to get away with just updating one of the
JS fragments, assuming you knew which one held your changes, but that
assumes a lot.

Personally, I'd much rather deploy the whole thing for every change
anyway.  I wouldn't trust my fallible human brain to remember all of
the individual code changes that need to go out.

-Ben

On Mar 4, 12:31 am, Jiunarayan jiunara...@gmail.com wrote:
 What I meant was when the project is compiled and you are project is
 ready. But during maintenance, for a small changes the whole code has
 to be recompiled again instead for a particular change. Is there a way
 to recompiled again during production.

 On Mar 3, 7:01 pm, Jeff Schwartz jefftschwa...@gmail.com wrote:

  If you are using Eclipse and the plugin to create your projects then you
  wont have to recompile every time you make a code change.

  On Thu, Mar 3, 2011 at 3:10 AM, Jiunarayan jiunara...@gmail.com wrote:
   What could be the best practice to maintain big project. I meant for
   every changes the whole project is compiled to get the javascript?? I
   got a kind of insecure of recompiling the whole project for a every
   changes.

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

  --
  *Jeff 
  Schwartz*http://jefftschwartz.appspot.com/http://www.linkedin.com/in/jefftschw...
  follow me on twitter: @jefftschwartz

-- 
You received 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: Issues with IE GWT compiled javascript is 11MB

2011-03-04 Thread Ben Imp
I believe GWT already does that.  The browser should only be loading
one of the permutations.

You should look at code splitting.  Cutting out code you dont need
couldn't hurt either.

-Ben

On Mar 4, 11:18 am, sridevi macherla sridevimache...@gmail.com
wrote:
  Is there any mechanism to generate browser sepecific example I have 3
 browser, but currenlty user is browsing in Firefox, so the rest of
 permutation can be ignored meaning dynamic binding of browser specific way
 so that way the javascript can be reduced to a larger extent, but please
 suggest me.

 On Fri, Mar 4, 2011 at 10:46 PM, sridevi macherla sridevimache...@gmail.com

  wrote:
  Larsen,

  Can't we use any other options available, like the Generators.

  Thanks
  Sri

  On Fri, Mar 4, 2011 at 9:53 PM, Jeff Larsen larse...@gmail.com wrote:

  11MB you're probably gonna want to start looking into codesplitting
  various parts of the app. That is probably the only way you're going to get
  that beast down to a reasonable size.

  --
  You received 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: Development mode vs web mode URL discrepancy

2011-03-04 Thread Ben Imp
GWT has the concept of a history token to preserve your application's
context.  You shouldn't need to be parsing the URL.

http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHistory.html

-Ben

On Mar 4, 11:20 am, cri chuck.irvine...@gmail.com wrote:
 I saw another post on this subject, but there wasn't a satisfactory
 answer for me. So...

 I find it very unfortunate that my GWT application URLs are not
 consistent between development mode and web mode. Our application
 lives on an intranet with lots of interaction with other intranet
 resources which requires us to derive resources URLs depending on the
 environment that we are running in.

 In our testing and production environments, our application URL is
 http://hostname:port/myapp/myapp.html;. In development mode, the url
 ishttp://hostname:port/myapp.html?gwt.codesvr=127.0.0.1:9997. This
 has caused us all kinds of pain in terms of fragile URL derivation
 code and application breakage caused by this fragility. So, there are
 two problems. One, we need a way to preserve our application context,
 which is fundamental to web applications. Second, we need a way to
 lose the ?gwt.codesvr=127.0.0.1:9997. Surely, there is a less
 intrusive way to handle this development mode information.

 In another thread on this problem, a way to preserve the application
 context was suggested that required giving up the nice jetty
 integration that comes out of the box with the gwt eclipse plugin. I'd
 hate to give this up and I'd hate to have to have our entire
 development team give it up as well. They wouldn't like it.

 Also, in the other thread, there was a description on how to bypass
 the ?gwt.codesvr=127.0.0.1:9997. Unfortunately, looking over the
 instructions a couple of times, I still don't quite understand what I
 need to do.

 I don't know if there is a work around for this issue; one that
 doesn't require giving up the nifty jetty integration. I'd be very
 grateful of course if anyone could suggest a work around.

 In any case, I sure think that a future release of GWT should address
 this issue.

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



Re: Development mode vs web mode URL discrepancy

2011-03-04 Thread Ben Imp
Oh, I missed the bit where you are accessing resources outside of the
GWT app.

Icky ...

I punt.

-Ben

On Mar 4, 12:09 pm, Ben Imp benlee...@gmail.com wrote:
 GWT has the concept of a history token to preserve your application's
 context.  You shouldn't need to be parsing the URL.

 http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsHist...

 -Ben

 On Mar 4, 11:20 am, cri chuck.irvine...@gmail.com wrote:

  I saw another post on this subject, but there wasn't a satisfactory
  answer for me. So...

  I find it very unfortunate that my GWT application URLs are not
  consistent between development mode and web mode. Our application
  lives on an intranet with lots of interaction with other intranet
  resources which requires us to derive resources URLs depending on the
  environment that we are running in.

  In our testing and production environments, our application URL is
  http://hostname:port/myapp/myapp.html;. In development mode, the url
  ishttp://hostname:port/myapp.html?gwt.codesvr=127.0.0.1:9997. This
  has caused us all kinds of pain in terms of fragile URL derivation
  code and application breakage caused by this fragility. So, there are
  two problems. One, we need a way to preserve our application context,
  which is fundamental to web applications. Second, we need a way to
  lose the ?gwt.codesvr=127.0.0.1:9997. Surely, there is a less
  intrusive way to handle this development mode information.

  In another thread on this problem, a way to preserve the application
  context was suggested that required giving up the nice jetty
  integration that comes out of the box with the gwt eclipse plugin. I'd
  hate to give this up and I'd hate to have to have our entire
  development team give it up as well. They wouldn't like it.

  Also, in the other thread, there was a description on how to bypass
  the ?gwt.codesvr=127.0.0.1:9997. Unfortunately, looking over the
  instructions a couple of times, I still don't quite understand what I
  need to do.

  I don't know if there is a work around for this issue; one that
  doesn't require giving up the nifty jetty integration. I'd be very
  grateful of course if anyone could suggest a work around.

  In any case, I sure think that a future release of GWT should address
  this issue.

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



Re: Database jdbc

2011-03-03 Thread Ben Imp
Server-side GWT is just plain old java.  I'd suggest reading up on the
JDBC documentation.

http://download.oracle.com/javase/6/docs/technotes/guides/jdbc/

-Ben

On Mar 3, 3:14 pm, Mohammed Magdi moh_ma...@acm.org wrote:
 yes in Java

 thanks
 magdi

 On Thu, Mar 3, 2011 at 6:06 PM, Juan Pablo Gardella 



 gardellajuanpa...@gmail.com wrote:
  Is Java. You must implement layers to connect with a database.

  Juan

  2011/3/3 Mohammed Magdi acm.ma...@gmail.com

  hi

  i waht tow know how to connect database into GWT project

  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.

 --
 Eng Mohammed Magdi Mohammed
 Third Year - CS dept

-- 
You received 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: User roles in GWT applications

2011-03-02 Thread Ben Imp
This is basically what I have implemented in my system as well.  Our
user roles are in the DB and I keep a copy on the client so all of the
presenters can inspect it to see what the user can do.

I should mention that double-checking the permissions on the server
side for all requests is a very good idea.  A clients words are not to
be trusted.

-Ben

On Mar 2, 7:31 am, Lukasz l.plotni...@googlemail.com wrote:
 I'm doing it by providing a self-implemented UserManager object on the
 client. It contains the currently signed in user and provides methods
 for access or role checks e.g. canEditUser(). This UserManager object
 is an singleton injected via gin into all relevant presenters (as you
 see I'm also using the MVP pattern in my app). When the presenter is
 rendering the view, it can check which functionality should be enabled
 or disabled.

 HTH,
 Lukasz

 On 1 Mrz., 18:47, csaffi csaff...@gmail.com wrote:

  Hi everybody,
  I'm wondering if you could suggest me any way to implement user
  roles in GWT applications. I would like to implement a GWT
  application where users log in and are assigned roles. Based on
  their role, they would be able to see and use different application
  areas.

  Thank you very much in advance for your help!

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

2011-03-02 Thread Ben Imp
You can probably simulate a red border by surrounding the list box
with a div, which you could add a border color to.  IE should actually
listen to that one.  I don't think you can style the drop down arrow
at all.  From my understanding, form elements are kind of limited in
how you can alter their appearance.

-Ben

On Mar 2, 9:27 am, K upadhya...@gmail.com wrote:
 Hi,

 I wish to change the way ListBox looks using CSS

 - Change the border color - Tried using the usual border-color:red.
 Worked on Firefox. No effect on IE Still the standard blue color
 - Change the Color of the arop down arrow. No idea how to go about
 doing it.

 regards
 K

-- 
You received 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: Hosting web application on production server.

2011-03-02 Thread Ben Imp
I'm pretty sure IIS can't handle Java servlets, at least not out of
the box (someone please correct me if I am mistaken).  I'd want to be
testing on the same application server as I was deploying on anyway.

-Ben

On Mar 1, 11:07 pm, dg damaya...@bitscrape.com wrote:
 I will develop a web application using GWT, MySQL and Apache Tomcat
 server. Once I develop my application, I have to show it to my client
 in a production environment

 I am not very clear on this part. I understand that I am using Apache
 Tomcat as an application server. on my own machine. Can I show it on
 Windows running IIS?. Do I have to install Apache Tomcat there also?
 Can someone please explain?

-- 
You received 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: User roles in GWT applications

2011-03-02 Thread Ben Imp
Depends on the situation, but in general its much easier on users if
things they can't do/edit aren't shown to them.  Or, alternatively, if
they are shown, be shown with some visual indicator of restricted
access.  A panel full of blank values with no UI feedback is somewhat
unintuitive.  A panel with a shadowbox over it that says ADMINS
ONLY, for example, makes a bit more sense, and will get you many
fewer support calls.

I maintain a collection of user role objects in my application model,
which is available to all presenters in the application.  The
presenters can each poke at this to see what they should be
displaying.

-Ben

On Mar 2, 11:10 am, zixzigma zixzi...@gmail.com wrote:
 could you please explain, why the check on client-side is necessary, if the
 server does the check ?

 and on the client-side, do you mean having a UserRoles object, which
 contains user's permission ?

 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: Method Reference Delegate or so

2011-02-28 Thread Ben Imp
You could create a composite async request object.  Its constructor
would take a list of special async requests, and it would execute them
in order.  They would have to be special as you would need some way to
attach listeners to them to know when each is done (the base interface
doesn't provide for such a thing).  As it was notified of each
success, it could kick off the next.  Alternatively, you might try
kicking them all off, and whenever you get a pokeback from one of your
children you could see if they are all done.

-Ben

On Feb 26, 2:43 pm, andi andi.ba...@googlemail.com wrote:
 Hi all,

 I'm looking for a solution how to transport a method reference. Usecase is
 to wrap some async method calls and only have one success handler after all
 are doen.

 E.g. I want something like this (which would easily possible in JS):

 Requestor req = new Requestor();
 req.add(Foo.method, param, param);
 req.add(Bar.method, param);
 req.do(new SimpleMethodCallbackJSONValue() {
     @Override
     public void onSuccess() {
     // ...
     }

 });

 Someone has a solution how to accomplish this?

 Thanks in advance,
 Andi

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



Re: Can I set some piece of code to be ignored by GWT compiler

2011-02-25 Thread Ben Imp
There is GWT.isClient().  I'm not certain if the compiler will ignore
the unused chunks, however.

-Ben

On Feb 25, 12:22 am, lalit lalit.bh...@gmail.com wrote:
 I know that certain methods in my class are never going to be used in
 client side. They are specific to server. Can I somehow notify the GWT
 compiler to ignore these code fragments either at class level or
 method level.

 thanks in advance

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



Re: Compiling GWT project from command line

2011-02-22 Thread Ben Imp
I assume you are building an ANT script.  If so, then it means
something like this.

java classname=com.google.gwt.dev.Compiler fork=true
maxmemory=256M
arg line=-style DETAILED -war ${dist} ${gwt.module}/
!--Uncomment this line to get a detailed report of the 
code
splitting--
!--arg line=-compileReport/--
classpath
pathelement location=${gwt.user.jar}/
pathelement location=${gwt.dev.jar}/
pathelement location=${gwt.src}/
pathelement location=${dist}/${proj.jar}/
pathelement location=${dist}/framework.jar/
/classpath
/java

-Ben

On Feb 22, 10:45 am, shahid shahidza...@gmail.com wrote:
 I have a GWT project that I created using the WebAppCreator a couple
 of years ago. The application has evolved alot since and I am
 currently using GWT 2.1.0. So far I have been compiling the project
 using Eclipse with Google Plugin for Eclipse. However I am now moving
 to a batch build script which builds all my projects (including the
 server side) in one go. However I am having difficulty trying to
 achieve that. Reading the GWT documentation it says:

  - Run the main class com.google.gwt.dev.Compiler using java from the
 command-line

 However I don't understand what it actually means. Can someone please
 explain this for me. Many 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: best practice for callbacks

2011-02-21 Thread Ben Imp
Use unique click handlers.  Then each clickhandler knows where it
came from, so to speak, and can use a unique callback to update the
appropriate widgets.

Alternatively, you could pass an enum of some kind to a common click
handler, and case through the possibilities in the callback.  To me,
thats significantly less elegant, but it would still work.

-Ben

On Feb 19, 9:20 am, frank t3devt...@googlemail.com wrote:
 Hi,

 I have the following Problem.
 From many  different methods (e.g. a Clickhandlers) I call the same
 async service on the server.

 In the callback I don´t have access on the variables of my calling
 method, which I need, to decide, who called the service. (for example
 to update different UI-Widgets)
 Is there a better way as using kind of global variable?

 Thanks Frank.

-- 
You received 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: Split points for method having return type other than void

2011-02-21 Thread Ben Imp
You cannot return something from an async call like that.  The work
will be done asynchronously, and the main program has presumably gone
on its merry way while the async things are being done.

If some object needs that result, a simple solution would be to pass
the object into the async method, and call a method on it with the
result when its ready.

-Ben

On Feb 21, 1:08 pm, Deepak Singh deepaksingh...@gmail.com wrote:
 Hi,

 How to set code splitting for entire body of methods with return type other
 than void as void onSuccess() will not allow to return anything?

 public Object myMethod() {

 //
 Object object = new Object();
 // method body

 return object;

 }

 After we code split point as,

 public Object myMethod() {

 GWT.runAsync(new RunAsyncCallback() {
 @Override
 public void onSuccess() {
 //
 Object object = new Object();
 // method body

 return object;

 }

 @Override
 public void onFailure(Throwable reason) {
  }

 });
 }

 This will give error as onSuccess has void return type.

 Regards
 Deepak

-- 
You received 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: Serious Bug or some Type Erasure I don't understand ???

2011-02-21 Thread Ben Imp
It seems like you are using a singleton event bus.  I would assume all
three entities are registered with that bus to handle the
SelectEntitiesEvent.  If thats the case, then I don't see why all
three wouldn't have their listeners triggered.  The event they
registered for did get fired.

-Ben

On Feb 21, 12:52 pm, Riyaz Mansoor riyaz.mans...@gmail.com wrote:
 Use case:

 Register an event (2nd snippet) using extending classes AEntity,
 BEntity, CEntity
 Refresh a specific table - create one event and fire it (1st snippet)
 === the three handlers of AEntity, BEntity, CEntity are fired. Why ?
 Expected Case: If BEntity is refreshed - only BEntity handler should
 fire.

 CellTable refresh code:

         @UiHandler(fRefresh)
         protected void refresh(ClickEvent clickEvent) {
                 MsgPopup.getInstance().msgSending();
                 SelectEntitiesEventT event = new SelectEntitiesEventT(new
 GenericCallbackListT() {
                         public void onSuccess(ListT result) {
                                 System.out.println(result);
                                 MsgPopup.getInstance().msgLoading();
                                 fDataProvider.setList(result);
                                 MsgPopup.getInstance().clearMessage();

                         };
                 });
                 EventBusInstance.getInstance().fireEvent(event);
         }

 Event registering - Specific classes extend this class:

                 SelectEntitiesEvent.register(new 
 SelectEntitiesEvent.HandlerT() {
                         @Override
                         public void onSelectEntities(SelectEntitiesEventT 
 event) {
                                 service.selectEntities(event.getCallback());
                         }
                 });

-- 
You received 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: Serious Bug or some Type Erasure I don't understand ???

2011-02-21 Thread Ben Imp
After re-reading your post, I think I see the issue.  While you didn't
post code for the three derived entities, I assume you are using
different type parameters for your SelectEntitiesEvent, and relying on
that to keep the events distinct.  I do not believe that works either
in Java or in the translated JavaScript.  As you mention, generics in
Java work on erasure, which means they don't really exist at runtime.
You would have to make them separate classes in order for the event
bus to treat them as distinct.

http://en.wikipedia.org/wiki/Generics_in_Java#Type_erasure

-Ben

On Feb 21, 2:29 pm, Ben Imp benlee...@gmail.com wrote:
 It seems like you are using a singleton event bus.  I would assume all
 three entities are registered with that bus to handle the
 SelectEntitiesEvent.  If thats the case, then I don't see why all
 three wouldn't have their listeners triggered.  The event they
 registered for did get fired.

 -Ben

 On Feb 21, 12:52 pm, Riyaz Mansoor riyaz.mans...@gmail.com wrote:

  Use case:

  Register an event (2nd snippet) using extending classes AEntity,
  BEntity, CEntity
  Refresh a specific table - create one event and fire it (1st snippet)
  === the three handlers of AEntity, BEntity, CEntity are fired. Why ?
  Expected Case: If BEntity is refreshed - only BEntity handler should
  fire.

  CellTable refresh code:

          @UiHandler(fRefresh)
          protected void refresh(ClickEvent clickEvent) {
                  MsgPopup.getInstance().msgSending();
                  SelectEntitiesEventT event = new 
  SelectEntitiesEventT(new
  GenericCallbackListT() {
                          public void onSuccess(ListT result) {
                                  System.out.println(result);
                                  MsgPopup.getInstance().msgLoading();
                                  fDataProvider.setList(result);
                                  MsgPopup.getInstance().clearMessage();

                          };
                  });
                  EventBusInstance.getInstance().fireEvent(event);
          }

  Event registering - Specific classes extend this class:

                  SelectEntitiesEvent.register(new 
  SelectEntitiesEvent.HandlerT() {
                          @Override
                          public void onSelectEntities(SelectEntitiesEventT 
  event) {
                                  service.selectEntities(event.getCallback());
                          }
                  });

-- 
You received 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: Split points for method having return type other than void

2011-02-21 Thread Ben Imp
The code split would likely still work, depending on how you reference
things.  Try it and see.

-Ben

On Feb 21, 2:51 pm, Deepak Singh deepaksingh...@gmail.com wrote:
 @Phillipe,

 Void? Could you pls tell about this. It is also not recognised by program.

 @Ben

 So if i put some lines of the method body within onSucces() then will the
 code split for this portion of method be succesful?

 On Tue, Feb 22, 2011 at 1:51 AM, Ben Imp benlee...@gmail.com wrote:
  You cannot return something from an async call like that.  The work
  will be done asynchronously, and the main program has presumably gone
  on its merry way while the async things are being done.

  If some object needs that result, a simple solution would be to pass
  the object into the async method, and call a method on it with the
  result when its ready.

  -Ben

  On Feb 21, 1:08 pm, Deepak Singh deepaksingh...@gmail.com wrote:
   Hi,

   How to set code splitting for entire body of methods with return type
  other
   than void as void onSuccess() will not allow to return anything?

   public Object myMethod() {

   //
   Object object = new Object();
   // method body

   return object;

   }

   After we code split point as,

   public Object myMethod() {

   GWT.runAsync(new RunAsyncCallback() {
   @Override
   public void onSuccess() {
   //
   Object object = new Object();
   // method body

   return object;

   }

   @Override
   public void onFailure(Throwable reason) {
    }

   });
   }

   This will give error as onSuccess has void return type.

   Regards
   Deepak

  --
  You received 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 about do the UI in the Java-Swing way?

2011-02-17 Thread Ben Imp
Sounds like an awful lot of extra work to simply avoid learning CSS.
Don't get me wrong, CSS is kind of clunky, but I find it hard to
imagine that this new solution would be significantly more elegant.

-Ben

On Feb 16, 8:31 pm, Kurtt kurtt@gmail.com wrote:
 GWT 2.2 introduces the Canvas, which is actually a 2D-API. This is
 exactly what Java Swing is based on. And we can create a LooknFeel
 class for GWT, which wraps a set of painting Canvas method. If we set
 the app a certain LooknFeel, when a widget is showing , the widget
 asks the LooknFeel to draw the UI for it according to its own state.
 This is similar to how the Java Swing pluggable LooknFeel works.

 benefits are that, 1) apps don't need CSS to define the look. For pure
 desktop-app developers like me, i find trouble in writing perfect
 CSSs. 2) Further, this guarantees the unified look across platform,
 while sometimes you have to write different CSS styles for different
 browsers. 3) Canvas supports drawing in the vector way. Nimbus in
 Swing is a LooknFeel based on vector-rendering.

 What do you think, guys?

 And, allow me to complain that the Canvas class under GWT 2.2.0
 removed the support for IE 6/7/8. Even though some few effects are not
 displayed perfectly in IE and are 30x slower because the canvas tag is
 actually simulated, I need the Canvas in IE 6/7/8. Cause in china, the
 IE6/7/8 occupies a worth-noting market share (Microsoft executives:
 China is IE6 die biggest obstacle:http://www.amieindia.net/
 viewtopic.php?f=244t=15183).

-- 
You received 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: Production bugs that don't exist in development mode

2011-02-17 Thread Ben Imp
So ... curious ... runAsync provides a callback to let you know when
its done doing its thing.  Why aren't you just using that to know when
you can mess with the objects you have created?  To me, that is the
bug, not anything in particular to do with what order GWT runs things
asynchronously.

-Ben

On Feb 16, 10:13 pm, Sky myonceinalifet...@gmail.com wrote:
 I created a GWT issue for this 
 here:http://code.google.com/p/google-web-toolkit/issues/detail?id=6036

-- 
You received 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: SuggestBox can't set Oracle

2011-02-17 Thread Ben Imp
I find it awkward as well.  I have worked around it by providing a
delegating oracle on creation of the suggest box.  Not exactly ideal,
but a rather simple fix.

-Ben

On Feb 17, 1:29 pm, Eric edimickeast...@gmail.com wrote:
 So, SuggestBox.setOracle(SuggestOracle oracle) is private.  I can't
 immediately see a good reason for it.  I can work around it, but
 calling that method would be the most natural fit for my code.

 Thoughts?

 Eric

-- 
You received 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: radio button listener/handler issue on IE8.

2011-02-15 Thread Ben Imp
Use Firebug Lite, or IE's development tools to look at the names on
the elements.  That should give you the answers.

-Ben

On Feb 14, 2:24 pm, NAARAYANA REDDY NANDIGAMA nandigam...@gmail.com
wrote:
 Yes it was assigned to different names. Here is the logic to set group
 names.

 String groupName =  + new Date().getTime();

 It works fine if I run the application in debug mode but it does not work
 with compilation code. Not sure if it is because of groupName. FYI, this is
 happening only on IE and with Win XP OS. Could you please suggest me if this
 is because of group Name or some thing else?

 From
 Narayana

 On Mon, Feb 14, 2011 at 9:07 AM, Ben Imp benlee...@gmail.com wrote:
  Did you give each of your radio button sets different names?  Radio
  button groups are defined by their names.

  -Ben

  On Feb 13, 2:13 pm, Dallas007 nandigam...@gmail.com wrote:
   Hi,
   I have installed IE8 yesterday and Win XP OS.

   The problem is radio button selection is not working properly. I have
   two radio buttons in each vertical panel and I can able to select only
   one radio button at a time on the page. My requirement is i want to
   select radio button from each vertical panel. Is there any thing I
   need to do extra setttings for IE8 to support radio button handlers/
   Listeners?

   From,
   Dallas007

  --
  You received 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: GWT runasync

2011-02-15 Thread Ben Imp
Ewww.  Icky.  I'm not actually even sure if that works in GWT ...

If you really need them in a list, you could probably write a fairly
thin wrapper for your views.  Im not sure what their interface is
like, but if they are in a list, they can't be specific types anyway.
Something like:

public interface ViewWrapper {
  public void getView(callback);
}

Then you could fill your list with instances of that wrapper.  So:

list.add( new ViewWrapper() {
  public void getView(callback) {
//run async here
  }
});

Your presenters could then go:

this.viewList.get(id).getView(new HeyMyViewIsReadyCallback(this));

Or something like that.  I'd still voice a preference for a simple
factory object instead of a list, though.  Then you could actually
have a specific type associated with the view.  I suppose 200 methods
is a lot.  200 views is a lot too ... what evilness are you bringing
into the world?

-Ben

On Feb 15, 5:05 am, Gambo mark.vanv...@gmail.com wrote:
 Hi Ben, thanks a lot for your quick reply.

 I have one question(very basic :-)) how do I put them in a list
 without instantiating them? Just adding strings of the class names and
 later on using Class.forName(test).newInstance();?!

 On 14 Feb., 17:50, Ben Imp benlee...@gmail.com wrote:

  One way to do this would be to put your view list inside of a factory
  object.  This factory object would have a method to request a view for
  a given id, and return a new instance of it.  The creation of that
  view would take place inside of a runAsync block.  Your page
  controller would have to pass in a callback so it can get a handle on
  the view when its done loading.

  -Ben

  On Feb 14, 10:09 am, Gambo mark.vanv...@gmail.com wrote:

   Hi there,

   I have a question regarding GWT's runAsync feature. We have a complete
   list of all views within the application. What I understand each time
   a user access our webapp the complete list of view is downloaded to
   the clients machine. I am sure we are going to have more than 200
   views sometime so the app is getting very big.

   I want to implement now the async feature but I am not sure how to do
   this as I need the list of view to display them later in my app.

   Example:
   - User trigger click event
   - Click event gets an ID with button clicked and is forwarded to page
   controller
   - Page controller looks in view list with id and display the correct
   view

   Can somebody help me with a hint? Maybe my approach is wrong.

   Thanks a lot!

-- 
You received 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: replacement for String.format in GWT?

2011-02-15 Thread Ben Imp
If you are trying to format a date, which appears to be the case, you
can use DateTimeFormat.

-Ben

On Feb 15, 12:36 pm, Magnus alpineblas...@googlemail.com wrote:
 Hi,

 I need String.format:

 String r = String.format(%2d %2d:%2d:%2d,d,h,m,s);

 Since GWT does not support this method: What can I do instead?

 Magnus

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



Re: GWT runasync

2011-02-14 Thread Ben Imp
One way to do this would be to put your view list inside of a factory
object.  This factory object would have a method to request a view for
a given id, and return a new instance of it.  The creation of that
view would take place inside of a runAsync block.  Your page
controller would have to pass in a callback so it can get a handle on
the view when its done loading.

-Ben

On Feb 14, 10:09 am, Gambo mark.vanv...@gmail.com wrote:
 Hi there,

 I have a question regarding GWT's runAsync feature. We have a complete
 list of all views within the application. What I understand each time
 a user access our webapp the complete list of view is downloaded to
 the clients machine. I am sure we are going to have more than 200
 views sometime so the app is getting very big.

 I want to implement now the async feature but I am not sure how to do
 this as I need the list of view to display them later in my app.

 Example:
 - User trigger click event
 - Click event gets an ID with button clicked and is forwarded to page
 controller
 - Page controller looks in view list with id and display the correct
 view

 Can somebody help me with a hint? Maybe my approach is wrong.

 Thanks a lot!

-- 
You received 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: is using DivElement instead of Label recommended?

2011-02-14 Thread Ben Imp
Sounds like some Cell Widgets might be a perfect fit for you.

http://code.google.com/webtoolkit/doc/latest/DevGuideUiCellWidgets.html

-Ben

On Feb 14, 8:51 am, denis56 denis.ergashb...@gmail.com wrote:
 Hello,

 I wonder if it is a usual practice to use Element objects instead of
 Widgets in GWT to achieve better performacne. For instance, instead of
 adding a list of labels to a HTMLPanel I could do the following:

                 HTMLPanel pnl = new HTMLPanel(myPanel);
                 DivElement div = DivElement.as(DOM.createDiv());
                 pnl.getElement().appendChild(div);

 My motivation is that since these divs shouldn't act on any events
 there is no reason to imposing more overhead and making them widgets.
 That's what UiBinder at least does, as far as I understand.

 I would have also used UiBinder instead, the problem is though that it
 is a dynamic list of items changing at runtime and since can not be
 created declaratively and statically?

 Am I on the right path? What are possible repercussions, memory leaks
 or maintainability? 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: radio button listener/handler issue on IE8.

2011-02-14 Thread Ben Imp
Did you give each of your radio button sets different names?  Radio
button groups are defined by their names.

-Ben

On Feb 13, 2:13 pm, Dallas007 nandigam...@gmail.com wrote:
 Hi,
 I have installed IE8 yesterday and Win XP OS.

 The problem is radio button selection is not working properly. I have
 two radio buttons in each vertical panel and I can able to select only
 one radio button at a time on the page. My requirement is i want to
 select radio button from each vertical panel. Is there any thing I
 need to do extra setttings for IE8 to support radio button handlers/
 Listeners?

 From,
 Dallas007

-- 
You received 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 warning message in web mode

2011-02-11 Thread Ben Imp
You don't need to run a Tomcat instance.  You could always just stick
it behind a rather simple Apache install.  I must confess I have not
personally done this, but I see no reason why it would not work.

Of course, this does bring up the question of why you are deploying a
web application locally.  A web application without the web bit sounds
quite silly.  It seems like something a plain old desktop app is
better suited for.

-Ben

On Feb 10, 3:39 pm, othman othmanelmou...@gmail.com wrote:
 unfortunately our gwt app is client only and we don't use any server
 side functionality.our app will be run from user's local file system
 without deploying in a web server.
 why IE made this security restriction? and why this doesn't happen in
 Firefox and Chrome?

 On Feb 10, 9:34 pm, Ben Imp benlee...@gmail.com wrote:

  You could run a local web server.  I always deploy my application to a
  local Tomcat server for testing.

  -Ben

  On Feb 10, 3:09 pm, othman othmanelmou...@gmail.com wrote:

   Thanks Ben,
   So there is no solution other to accept and live with this security
   restriction in IE?

   On Feb 10, 8:52 pm, Ben Imp benlee...@gmail.com wrote:

I believe your problem is the lack of a web server.  IE doesn't like
people opening JS-laced web pages from the local drive.  Probably a
security concern, I would imagine.  I have noticed this with non-GWT
html as well, as I will often create little html test harnesses for
some jQuery work, and I get the same warning.

-Ben

On Feb 10, 2:27 pm, othman othmanelmou...@gmail.com wrote:

 Hello,
 I'm using GWT 2.1 and IE to test the default hello world GWT app.
 I compile the default Hello world GWT app and then go to HTML file and
 open it with IE.
 I get a red warning message Your web browser must have JavaScript
 enabled in order for this application to display correctly.
 I had to allow the active content to be running in order to see the
 app screen.
 things are a bit different  if I run the app via \\.psf\Home
 \myFile.htm which is path to my Parallel's shared directory .. I
 wouldn't see such warning.
 also running in dev mode seems not to raise this warning message.
 what is the problem of IE running GWT apps in web mode?

 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: IE warning message in web mode

2011-02-10 Thread Ben Imp
I believe your problem is the lack of a web server.  IE doesn't like
people opening JS-laced web pages from the local drive.  Probably a
security concern, I would imagine.  I have noticed this with non-GWT
html as well, as I will often create little html test harnesses for
some jQuery work, and I get the same warning.

-Ben

On Feb 10, 2:27 pm, othman othmanelmou...@gmail.com wrote:
 Hello,
 I'm using GWT 2.1 and IE to test the default hello world GWT app.
 I compile the default Hello world GWT app and then go to HTML file and
 open it with IE.
 I get a red warning message Your web browser must have JavaScript
 enabled in order for this application to display correctly.
 I had to allow the active content to be running in order to see the
 app screen.
 things are a bit different  if I run the app via \\.psf\Home
 \myFile.htm which is path to my Parallel's shared directory .. I
 wouldn't see such warning.
 also running in dev mode seems not to raise this warning message.
 what is the problem of IE running GWT apps in web mode?

 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: IE warning message in web mode

2011-02-10 Thread Ben Imp
You could run a local web server.  I always deploy my application to a
local Tomcat server for testing.

-Ben

On Feb 10, 3:09 pm, othman othmanelmou...@gmail.com wrote:
 Thanks Ben,
 So there is no solution other to accept and live with this security
 restriction in IE?

 On Feb 10, 8:52 pm, Ben Imp benlee...@gmail.com wrote:

  I believe your problem is the lack of a web server.  IE doesn't like
  people opening JS-laced web pages from the local drive.  Probably a
  security concern, I would imagine.  I have noticed this with non-GWT
  html as well, as I will often create little html test harnesses for
  some jQuery work, and I get the same warning.

  -Ben

  On Feb 10, 2:27 pm, othman othmanelmou...@gmail.com wrote:

   Hello,
   I'm using GWT 2.1 and IE to test the default hello world GWT app.
   I compile the default Hello world GWT app and then go to HTML file and
   open it with IE.
   I get a red warning message Your web browser must have JavaScript
   enabled in order for this application to display correctly.
   I had to allow the active content to be running in order to see the
   app screen.
   things are a bit different  if I run the app via \\.psf\Home
   \myFile.htm which is path to my Parallel's shared directory .. I
   wouldn't see such warning.
   also running in dev mode seems not to raise this warning message.
   what is the problem of IE running GWT apps in web mode?

   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: Developing a large scale GWT app and MVP

2011-02-07 Thread Ben Imp
I have an application factory that gets passed into all of my
presenters.  This factory has methods on it for creating the various
kinds of popups that will occur in the application, and covers them
all in a nice clean interface.

Seems to work quite well.

-Ben

On Feb 5, 10:57 pm, TigerFox harold.alc...@gmail.com wrote:
 Hi,

 I'm currently developing my second GWT-based site and trying to fit
 the Activity/Place style of MVP this time around.  But at the moment,
 I'm struggling a bit thinking how can a popup widget be achieve with
 the said approach.

 Well, basically, I have this main page which I call Home (with
 matching HomeView, HomePlace and so on), and then I've got this
 Login link on which popups (using a PopupPanel) LoginViewImp.  At
 the moment, the most straight forward idea I've got to make this
 happen is to embed the LoginView interface in HomeView interface (via
 getLoginView).  That said the login panel's view gets setup (with all
 the click handlers and stuffs) at HomeActivity rather than
 LoginActivity if I am to carry out the Activity/Place concept all the
 way through.

 However, I do not want to end up doing similar thing for every
 composite/popup that I'm going to include in my Home place as it is
 going to be a bad looking MVP implementation and kinda defeat the
 purpose if I'm going to stuck everything in one Activity.

 So, I'm curious to know whether there's a more proper way or popups
 are actually an exception to the rule and must be treated as part of
 the whole activity.  Or if there's any large scale example for this
 large scale solution.

-- 
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to google-web-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 add my voice in my gwt application as time of registration

2011-02-03 Thread Ben Imp
I don't believe a web browser will let you access anything like a
microphone.  A flash plugin can access such things, but thats about
it.

-Ben

On Feb 2, 11:08 pm, dhruti dhruti...@gmail.com wrote:
 hi
 i m gwt designer.
 i working with app in which i want to enroll users voice at the time
 of registration and than at the time of login i have to math that
 voice and new voice as an login authentication.
 so how the things can be done?

-- 
You received 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: Calculate age

2011-02-03 Thread Ben Imp
Indeed.  The alternative of sending all date operations to the server
is ... incredibly inconvenient at best.

-Ben

On Feb 3, 7:20 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 I think you will find that you are not alone in your opinion regarding using
 deprecated methods and that you are in fact in good company.



 On Thu, Feb 3, 2011 at 7:35 AM, kkpirri hkakashisharin...@gmail.com wrote:
  Thank you! JsDate worked perfectly.

  Maybe I am too picky but I don't like using deprecated methods and
  neither suppress warning tags.

  Thank you.

  On 3 feb, 10:17, Thomas Broyer t.bro...@gmail.com wrote:
   If you want JVM forwards compatibility, then use Calendar.
   If you want GWT compatibility, then use java.util.Date and ignore the
   warnings: your code doesn't run in a JVM, what matters is what GWT
   understands. You can alternatively use JsDate
 http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g...
   .
   If you want both, then you can use JodaTime (there's a GWT-compatible
  port).

   But honestly, do you really think java.util.Date will go away before you
  do
   some maintenance work on your app?

  --
  You received 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: How to add datetimepiker in GWT

2011-02-03 Thread Ben Imp
As far as I am aware, there is no such widget.  You will have to make
one.

-Ben

On Feb 3, 3:24 am, sujit mishra sujit.u...@gmail.com wrote:
 Hi ,

      I need help regards datetimepicke widget . I am using GWT but not
 found any widget that able to capture date and time both at a
      time  from user.

      So , please help me how to add datetimepicke using GWT

 Thanks
 Sujit Mishra

-- 
You received 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 add datetimepiker in GWT

2011-02-03 Thread Ben Imp
I think you missed the bit about capturing the time portion as well.

-Ben

On Feb 3, 8:47 am, Jeff Schwartz jefftschwa...@gmail.com wrote:
 Using UiBinder in some ui.xml file:

 ui:UiBinder xmlns:ui=urn:ui:com.google.gwt.uibinder
     xmlns:g=urn:import:com.google.gwt.user.client.ui
     xmlns:dp=urn:import:com.google.gwt.user.datepicker.client
 ...
 table id=inputTable
                 tr
                     tdg:Label addStyleNames={style.detailLabel}
 {style.required}Date of purchase/g:Label/td
                     tddp:DateBox ui:field=dopDateBox
 styleName={style.detailValue}//td
                 /tr
 /table
 ...

 Then, in the .java file:
 ...
     @UiField
     DateBox dopDateBox;

 ...
         dopDateBox.setFormat(new
 DateBox.DefaultFormat(DateTimeFormat.getFormat( dd, )));
         dopDateBox.getDatePicker().setWidth(200px);
         dopDateBox.addValueChangeHandler(new ValueChangeHandlerDate(){

             @Override
             public void onValueChange(ValueChangeEventDate event) {
                 ...
             }

         });
 ...

 I hope this helps.

 Jeff



 On Thu, Feb 3, 2011 at 9:28 AM, Ben Imp benlee...@gmail.com wrote:
  As far as I am aware, there is no such widget.  You will have to make
  one.

  -Ben

  On Feb 3, 3:24 am, sujit mishra sujit.u...@gmail.com wrote:
   Hi ,

        I need help regards datetimepicke widget . I am using GWT but not
   found any widget that able to capture date and time both at a
        time  from user.

        So , please help me how to add datetimepicke using GWT

   Thanks
   Sujit Mishra

  --
  You received 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: History.replaceItem?

2011-02-03 Thread Ben Imp
I have a possible alternative suggestion - instead of messing with the
browser's history function, simply don't use the history tokens for
navigating through the results list.  Then your back button will work
as you will want it to.

I do this in my application, and it seems to work quite well.

-Ben

On Feb 3, 12:23 pm, Jason jason.siem...@namsys.com wrote:
 Before I start, I'm working with GWT 2.1.1

 In the example below the user goes to a list, pages through results,
 views a record and then clicks Back.  Everything works as expected,
 the user is viewing page 4, clicks a row and views the record, clicks
 Back and they land on page 4.  But if they click Back again, it goes
 to page 3, then page 2, etc.

 1. User is on the home page - History.newItem( HOME, true )
 2. User selects list of records page - History.newItem( LIST, true )
 3. User pages through results page (using CellTable) -
 History.newItem( LIST#page2, false )
 4. User pages through results page - History.newItem( LIST#page3,
 false )
 5. User pages through results page - History.newItem( LIST#page4,
 false )
 6. User selects record to view - History.newItem( VIEW#record123,
 true )
 7. User clicks Back, token is replaced with LIST#page4
 8. User clicks Back, token is replaced with LIST#page3
 9. User clicks Back, token is replaced with LIST#page2
 10. User clicks Back, token is replaced with LIST

 What I'd prefer to see is that when the press back from the record
 page, it goes to the list page they were viewing and if they click
 back again, it moves back to the home page.  So far I've worked around
 this by adding a 'Close' button to the list page that is moves them to
 the home page directly.

 This would be easy if I could call 'replaceItem( TOKEN, false )'
 instead of 'newItem( TOKEN, false )' in steps 2 through 5 above.  This
 call would replace the current URL in the browser, and rewrite the
 last entry in the history stack with the new entry.

 Anyone else have this issue?

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



Re: Formatting data - best on the server, or client?

2011-01-31 Thread Ben Imp
My Right Thing is as follows.

I will generally do some transformation work on the server side.  Not
to HTML, mind you, since that, to me, is purely presentation layer
work.  Rather, I will take the raw data and package it into lean
records objects, and send the collection of those to the client.  This
work may mostly be done in SQL, or might mostly be done in code,
depending on how your DAO layer is set up, and how much crunching is
required.

The collection of record objects is then shipped off to the client,
where the display is taken care of.  All of the values should already
be pre-calculated in the record objects, so it just has to go about
making them all pretty.

So in this wall all work related to the contents of the report (the
data itself, and its logical organization) are handled server side.
But the server stays out of the pretty display business - thats purely
client.  The server generates no HTML, which is good, as I have found
that to be extremely painful on most occasions.

-Ben

On Jan 30, 6:42 pm, tachoknight tachokni...@gmail.com wrote:
 Hi all-

 I am writing a site that generates an HTML-based report that uses some
 pretty complex table formatting (think of it as a web page equivalent
 of the phone book). This is not a big site, and the result page is not
 interactive; it's a static report.

 I've mocked up the result page in an HTML page with CSS and the
 formatting is fine for all browsers, but now I'm at something of an
 impasse in how to implement it. In a JSP world I'd just be populating
 the jsp file on the server and displaying the results in the browser.
 As it is, I'm using GWT (obviously... :) ) and I'm at a loss as to how
 to properly do this.

 I looked into the UIBinder class, which would give me the HTML
 template, but that means that the result set would have to be
 transmitted to the client and all the work done in the browser. I
 could use something like FreeMarker to format the results on the
 server, and then send back the generated HTML, which is the method I'm
 leaning towards, but that too seems sub-optimal.

 Any assistance on the right thing would be 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.



Re: GWT Web Application testing...

2011-01-28 Thread Ben Imp
I've only used Selenium for GWT client testing.  It worked as we
expected it to.  The learning curve has a bit of a bump at first, due
to the somewhat confusing way they name things and have you configure
a test suite.  Nothing to do specifically with GWT, mind you.

I must mention that we have done a very limited amount of full on
integration testing, however.  Most of our testing is in the form of
unit tests.

-Ben

On Jan 28, 10:32 am, SBParks scott.b.pa...@gmail.com wrote:
 Folks,

  Hello. I'm new to the group, but I've been working with a GWT based
 application for roughly 4 months now.  Great stuff!

  I am looking ahead to testing our application.  We have a person in our
 organization who performs test using the Sahi test scripts / programs.
  We've also discussed using Selenium to help with our testing effort.

  I am looking for opinions and experiences on what tools, specifically
 either Sahi and Selenium, are most useful for testing GWT based web
 applications.  Possibly, one of these test suite is better suited for a GWT
 application over the other.

  I do appreciate your time.

 Scott

-- 
You received 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: Use hosted mode existing tomcat server and not with embadded jetty server

2011-01-28 Thread Ben Imp
Its in the FAQ.  In fact, its the first result when you search for
Tomcat on the GWT site.  I highly recommend reading through the all of
the docs there.

http://code.google.com/webtoolkit/doc/1.6/FAQ_DebuggingAndCompiling.html#How_do_I_use_my_own_server_in_hosted_mode_instead_of_GWT%27s

-Ben

On Jan 27, 6:21 am, tarik.bts...@gmail.com tarik.bts...@gmail.com
wrote:
 Hello all,
   I'm new gwt and i'm working in project which i create by using
 eclipse and architype of gwt-maven pluging.
 So my problem is how to use my existnig tomcat server to debug my
 application ?
 i made some researsh  what i find is to add noServertrue/noServer
 in my gwt-maven pluging configuration in my pom.xml and configure
 runTarget but i dont understund how to make this?! and also where to
 put sources in webapps  folder of tomcat or in anthor place and use
 maven-war-plugin to generate snapshot to webapps/myproject or some
 thing else like tomcat pluging ??!!

 please can some help me in this topic because very confused .

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



Re: GWT Activities, Places with Event Bus ??????

2011-01-20 Thread Ben Imp
Events allow you to synchronize two concurrently active presenters.
If you never have more than one presenter active in your application
at a given time, then this becomes less of an issue.

-Ben

On Jan 20, 8:01 am, ailinykh ailin...@gmail.com wrote:
 Why do you need events? Each Activity is notified when it becomes
 active ( method start() is called).
 Just check the application state at this moment. If you want to share
 some data between several activities make this data singleton.

 Thank you,
   Andrey

 On Jan 19, 7:59 am, SergeZ comp1...@gmail.com wrote:

  Hello everybody! Can someone help me to sort things out ?   The
  question is: is it possible to use EventBus (or just HandlerManager )
  with Activities and Places ? How can I notify a set of my places ( for
  example, 5 widgets ) about an event which happened in a particular
  place (a widget, not included in those 5 widgets ).

  For example...
  I have 6 widgets. Acutaly 6 different pages ( places ). Each of them
  consist of a button and a text area (for example). Suppose, I write
  some text in widget1's textarea, and I want that text to be displayed
  in other 5 text ereas. How can I fire event ( for example
  UpdateTextAreaEvent() ). Is there in GWR 2.1's architecture such
  mechanism or all this stuff - activities, places and other are just
  about history management and more convinient way to switch between
  pages ?

  Hope, I have managed to explain my problem quite well.

  Thanks a lot for your time!!!

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

2011-01-20 Thread Ben Imp
Sounds like classic infinite recursion to me.  I can't see the code,
but if your service call simply calls itself again on failure, and you
don't track a failure count anywhere, I could see that spinning around
infinitely and blowing up.

-Ben

On Jan 20, 1:24 pm, mike b mbaker.t...@gmail.com wrote:
 gwt 2.1.0
 winxp
 ie7

 I was tracing a completely different StatusCodeException (500) because of
 server socket errors were are having.  
 (seehttp://code.google.com/p/google-web-toolkit/issues/detail?id=4723)

 Then strangely, I got this error on the client side.  Basically, I created
 an RpcHelperaSerivce,T which wraps the inner AsyncCallbackT in another
 AsyncCallbackT.  If I get the above mention 500 status code error, then I
 re-execute the service without calling the inner onFailure.  Re-execution
 takes place w/ Scheduler.get().scheduleDefered( ...aService call );

 Based on my client logs, the Out of stack space occurred in the Scheduler
 part.  

 com.blah.MyUncaughtExceptionHandler: onUncaughtException:
 java.lang.Throwable: (Error): Out of stack space
 number: -2146828260
 description: Out of stack space
 I have a service that ships logs to the server and that still executed
 successfully.  

 Any ideas?  I searched this forum and the gwt issues but did not find
 anything remotely similar.  

 Thanks,
 Mike B

-- 
You received 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: Unable to set the text of a HTML element with a string, advice Please!!

2011-01-20 Thread Ben Imp
You never seem to actually set the 'tml' variable to anything besides
null, so I'm guessing that's your issue.

-Ben

On Jan 20, 3:45 pm, AmaraSat amara.forthewo...@gmail.com wrote:
 static HTML tml = null;
 String HeatParametersString = ;

 for (int i = 0; i  Properties.length; i++) {

        HeatParametersString = HeatParametersString +
 Properties[i].getValue() + br;

 }

 tml.setHTML(HeatParametersString);
  Error thrown; java.lang.NullPointerException: null
 tml.setText(HeatParametersString);
  Error thrown; java.lang.NullPointerException: null

 later in the code
 popup.setWidget(tml);

 The main aim is to collect three String values from the server side
 and display them in the popup (each in one new line). tried so many
 ways no luck any suggestions.

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



Re: GWT Activities, Places with Event Bus ??????

2011-01-19 Thread Ben Imp
I solve this issue by having a single application wide event bus that
is passed to all of the presenters in my application.  I bundle it up
with other application resources, such as a navigation control and an
application wide model, and simply hand it to them in the
constructor.  So, if I wanted to do the same thing you describe in my
application, I would simply have the controller that is listening to
your updates push data into the application model, which would then
fire off change events in the application event bus, and the other
controllers would all be listening to those events.

I haven't used the place/activity thing yet, so I don't know how those
work exactly, but I would imagine there should be a way to hand them
an application resource bundle on creation.

-Ben

On Jan 19, 7:59 am, SergeZ comp1...@gmail.com wrote:
 Hello everybody! Can someone help me to sort things out ?   The
 question is: is it possible to use EventBus (or just HandlerManager )
 with Activities and Places ? How can I notify a set of my places ( for
 example, 5 widgets ) about an event which happened in a particular
 place (a widget, not included in those 5 widgets ).

 For example...
 I have 6 widgets. Acutaly 6 different pages ( places ). Each of them
 consist of a button and a text area (for example). Suppose, I write
 some text in widget1's textarea, and I want that text to be displayed
 in other 5 text ereas. How can I fire event ( for example
 UpdateTextAreaEvent() ). Is there in GWR 2.1's architecture such
 mechanism or all this stuff - activities, places and other are just
 about history management and more convinient way to switch between
 pages ?

 Hope, I have managed to explain my problem quite well.

 Thanks a lot for your time!!!

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

2011-01-19 Thread Ben Imp
Welcome to the wonderful world of Java dates.  Dates without a time
component don't exist in this strange place, so the simplest solution
I've found is to just create your own date class and store three
integers.

-Ben

On Jan 19, 2:46 am, Sreekanth Nambiar pk.sreeka...@gmail.com wrote:
 Hi,

     DateTimeFormat.getFormat(MM/dd/).parse(10/01/2001) is giving me
 a Date object which contains local time zone. When i pass this object to
 server which is in other timezone the date is getting converted. How can i
 ignore the timezone while parsing Date.

 Thanks
 Sreekanth

-- 
You received 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: Client en Server side validation

2011-01-19 Thread Ben Imp
The correct thing to do, in my mind anyway (admittedly an odd place),
is never trust a client and do your own validation of the data and
operation requested.  This contrasts with my professional experience,
which has been that pretty much everyone just trusts the client and
mindlessly follows its directions.  I should mention that most of the
applications I have dealt with are internal to an organization, so a
rogue client isn't as big of a risk there.

-Ben

On Jan 19, 2:06 pm, Jeroen Wolff jeroen.wo...@gmail.com wrote:
 Hi, there has been a lot of discussion already in this group about
 validation and the frameworks that can help with it.
 Now i'm in a big project which need form/field validation onChange
 focus events and the same field validation
 need to be done on the server when the domain objects are being send
 via RPC to the server.
 Based on the concept: Always validate your input. The data coming in
 on the server is also input that we want to validate.

 Is this a right approach? If so, why can't i find this issue more
 spoken of...or does anybody thrust the rpc input?

 How do you slove this problem?
 If i make the presenter responsible for validating the widgets input,
 how does i know on the server which validator to use because on the
 server i have no presenter.

 Do you have patterns for this problem?

 Thanks,

 Jeroen Wolff

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



Re: GWT best practices and GUI libraries

2011-01-18 Thread Ben Imp
Revenge of the Zombie Thread ...

I am currently the owner/maintainer/code monkey behind a fairly
complex GWT application.  It is primarily data driven, but there is
plenty of logic in the UI for role-based editing permissions,
visibility, and coordinating different components of the application.
It utilizes a centralized event bus and application model to keep
everything on the same page.

My experience with the widgets has been a pretty good one.  The only
thing that was lacking, but has been improved to a significant degree,
was grids.  With the new cell widgets, this is _almost_ no longer an
issue.  Static headers and sorting are really the only remaining
things desired in these components.

One minor caveat was the inability to directly re-use our business
objects, as that project references DAOs (a horrible design decision,
mind you, but I am stuck with it) and those don't work so well in
JavaScript.  We ended up writing a new business layer and translator
objects.  Not a small undertaking, but not difficult either.

Also, client side calendar support sucks balls (to use a technical
term) right now.  Workable, but not nice.

Overall, I've been pleasantly surprised with GWT.  I normally despise
web development, so that statement has a bit of weight behind it.  I
was able to apply more traditional Software Engineering principles and
design patterns to the application (to the dismay of the web guy I was
working with) and the environment felt very similar to developing a
standard java swing application.  As long as Google supports it
(which, admittedly, is a bit of a worry), I will be happy to use it.
Probably.  Well, I might be angry, but that likely wont be GWTs fault.

-Ben

On Jan 18, 4:55 am, Kristjan kristjan.ko...@gmail.com wrote:
 Hi... I am also interested in questions below... Anyone with
 experience on larger project...

 with br
 KK

 On Dec 9 2010, 8:50 pm, dhoffer dhoff...@gmail.com wrote:

  I have some questions about the new 2.1 release, how this compares to
  prior releases, and other GUI libraries.  First a little background...

  I've used prior versions of GWT in a couple of applications, versions
  1.5 and 1.7 I believe.  In both cases what we found most lacking in
  GWT was an extensive UI widget library so in one case Mosaic was used
  and in another ExtGWT.  The applications are not your standard web-
  site application, they are more like desktop apps redesigned for the
  web.

  I see that GWT 2.1 has built-in support via Roo for very easily
  creating a database app that has the basic UI for seeing and editing
  some database tables/etc.

  However what if one is creating an application that is not a simple
  database view/edit application but rather has lots of business logic
  that changes what is in the UI?  I.e. the UI is not driven directly by
  what is in the database but is driven by business logic that is driven
  by both the user's choices and database data?

  So I guess my question is how does Roo help if its not the simple use
  case?

  Regarding UI widgets, has this improved in 2.1?  I can't recall
  exactly what I was missing but it seemed GWT's UI library was a small
  subset of ExtGWT for instance.

  However I am worried about starting a new application using ExtGWT as
  I suspect that is being developed in a separate track from GWT 2.1 and
  lots of things won't work together so I'd not be able to follow a GWT
  2.1 design approach.

  Please let me know your experiences using 2.1 for non-trivial
  applications and your thoughts on using ExtGWT.  Is there an extension
  GWT UI widget library(s) that does follow the 2.1 design approach?

-- 
You received 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: Issues creating new web application project

2011-01-18 Thread Ben Imp
It looks like you either have an old version of Java installed (pre
1.5) or (more likely) your Java compiler compliance settings in
eclipse are set up to not allow 1.5+ syntax.

-Ben

On Jan 18, 5:38 am, Jamie jamie.ma...@skybet.com wrote:
 When creating a new web application project I get the following errors
 in the eclipse problems pane.

 Any help would be appreciated, I'm using Aptana Studio 2 which is
 built on Eclipse 3.5.

 Description     Resource        Path    Location        Type
 Syntax error, annotations are only available if source level is 1.5
 GreetingService.java    /Test GWT/src/com/skybet/testgwt/client line 9
 Java Problem
 Syntax error, annotations are only available if source level is 1.5
 GreetingServiceImpl.java        /Test GWT/src/com/skybet/testgwt/server line
 10      Java Problem
 Syntax error, parameterized types are only available if source level
 is 1.5  GreetingServiceAsync.java       /Test GWT/src/com/skybet/testgwt/
 client  line 9  Java Problem
 Syntax error, parameterized types are only available if source level
 is 1.5  Test_GWT.java   /Test GWT/src/com/skybet/testgwt/client line 122
 Java Problem
 The type new AsyncCallback(){} must implement the inherited abstract
 method AsyncCallback.onSuccess(Object)  Test_GWT.java   /Test GWT/src/com/
 skybet/testgwt/client   line 122        Java Problem
 Type mismatch: cannot convert from Object to GreetingServiceAsync
 Test_GWT.java   /Test GWT/src/com/skybet/testgwt/client line 35 Java
 Problem
 Missing 'title' tag     link-variations.htm     /_lib/tests/generic     
 Unknown
 Web Problem
 Missing required attribute 'content'    500.html        /_lib/errors/myaccount
 line 4  Web Problem
 Missing required attribute 'type'       500.html        
 /_lib/errors/myaccount  line
 7       Web Problem
 Missing required attribute 'type'       funcunit.html   /_lib/funcunit/0.1.2
 line 5  Web Problem
 Missing required attribute 'type'       funcunit.html   /_lib/funcunit/beta-5/
 demo    line 5  Web Problem
 Missing required attribute 'type'       myapp.html      /_lib/funcunit/beta-5/
 demo    line 10 Web Problem
 Unclosed tag 'body'     test.html       /_lib/docs/syntaxhighlighter_2.1.364
 line 30 Web Problem

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



  1   2   >