Is it possible to _replace_ element with my widget?

2010-06-18 Thread Jaroslav Záruba
Hi

I know how to insert widget into element...
RootPanel.get("placeholder").add(new MyWidget("hello"));

But is it possible to *replace* element with my widget?

I already tried following...
Element placeholder = RootPanel.get("debatePlaceholder").getElement();
placeholder.getParentElement().replaceChild(commentPanel.getElement(),
placeholder);

But the widget seems to be dead, i.e. it does not receive ClickEvents. :(

Regards
  J. Záruba

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



Redirect loop

2010-06-18 Thread Jaroslav Záruba
http://groups.google.com/group/Google-Web-Toolkit ->
https://www.google.com/accounts/ServiceLogin?service=groups2&passive=1209600&continue=http://groups.google.com/group/Google-Web-Toolkit%3Fpli%3D1&followup=http://groups.google.com/group/Google-Web-Toolkit%3Fpli%3D1
.

Seems to be the same with all Google groups. Am I the only one?

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



Re: Compile and Run gwt web application from Command Line

2010-06-18 Thread fmod
On Jun 18, 7:46 pm, André Moraes  wrote:
> History.getToken() isn't deprecated?!
This is the javadoc for History.getToken() in 2.1:

http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/History.html#getToken()
Gets the current history token. The handler will not receive a
ValueChangeHandler.onValueChange(com.google.gwt.event.logical.shared.ValueChangeEvent)
event for the initial token; requiring that an application request the
token explicitly on startup gives it an opportunity to run different
initialization code in the presence or absence of an initial token.

So guess is not deprecated.

> I use the History.addValueChangeHandler.
>
>                 History.addValueChangeHandler(new 
> ValueChangeHandler() {
>
>                         @Override
>                         public void onValueChange(ValueChangeEvent 
> event) {
>                                 location = event.getValue();
>                         }
>                 });
>
> But it only works with the information after the "#", not with the
> parameters in the QueryString part of the URL.

Yep, now u tell... There is another way to access the location, but i
never used.
http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/gwt/user/client/Window.Location.html

BTW about the question about how to compile it. You can use ant or
maven.

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



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

2010-06-18 Thread Jaroslav Záruba
I don't dare teach anyone Roo, I'm yet to try it myself. :) Let me only tell
you that I'm having pretty similar concerns to yours whenever I hear "code
generation". And after watching the video I know I will try it, it has
impressed me enough.

2010/6/19 André Moraes 

> Jaroslav,
>
> But how can I control the merge process?
> In my case the code is generated, than i can edit make any changes in
> the generated code (which will be preserved by the safe-code-marks)
> and then the GWT compiler (or any other compiler) will compile the
> code that i wrote.
>
> I don't really know/use Roo, but I used some code generation tools
> before, so excuse me for any noob comment on the Roo subject.
>
> On 18 jun, 19:08, Jaroslav Záruba  wrote:
> > 2010/6/18 André Moraes 
> >
> > > I'm not using the integration with Roo, but I dislike the idea of
> > > having a tool that after generating my code difficult to customize the
> > > generated code.
> >
> > Roo keeps your code untouched. It stores the modifications elsewhere and
> > merges those files at compilation-time.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



ClickHandler on ListBox. Problems in Safari and Chrome

2010-06-18 Thread chfr
Hello,

I'm working on a small GWT application, but I'm experiencing a
problem.

When I add a ClickListener to a ListBox there is no functionality in
Safari and limited functionality in Chrome(both browsers in their
newest versions).

However in IE and Firefox everything is working fine so I'm wondering
where the problem is...

I wanted to ask if someone knows a workaround so that my application
can support all browsers.

best regards

chfr

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



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

2010-06-18 Thread André Moraes
Jaroslav,

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

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

On 18 jun, 19:08, Jaroslav Záruba  wrote:
> 2010/6/18 André Moraes 
>
> > I'm not using the integration with Roo, but I dislike the idea of
> > having a tool that after generating my code difficult to customize the
> > generated code.
>
> Roo keeps your code untouched. It stores the modifications elsewhere and
> merges those files at compilation-time.

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



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

2010-06-18 Thread Jaroslav Záruba
Well not exactly like that but it does not mess-up your code irreversibly.
Here is kind-of introduction if you haven't seen it already:
http://www.infoq.com/presentations/Introducing-Spring-Roo
(Don't go fullscreen when watching
the video, there goes a screen-cast under its frame.)

2010/6/19 Jaroslav Záruba 

> 2010/6/18 André Moraes 
>
> I'm not using the integration with Roo, but I dislike the idea of
>> having a tool that after generating my code difficult to customize the
>> generated code.
>>
>
> Roo keeps your code untouched. It stores the modifications elsewhere and
> merges those files at compilation-time.
>

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



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

2010-06-18 Thread Jaroslav Záruba
2010/6/18 André Moraes 

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

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

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



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

2010-06-18 Thread André Moraes
I'm not using the integration with Roo, but I dislike the idea of
having a tool that after generating my code difficult to customize the
generated code.

A while ago I wrote a code generator that allows reuse of code and
Retrieval without losing the customizations made.

Through some markings (in comments) in the code the user can define
the points where he wants to insert customizations.

Thus, the tool does not enter the path and the user has more control
over the generated code and customizations future.

Follow the link from the tool:
http://code.google.com/p/am-code-generator/

The documentation on using the tool is not very good, but it is quite
simple.

I'll try to commit some examples of how to generate code using the
tool.
Any comments or criticism is welcome.

I am available for any questions.

On 18 jun, 07:50, Marco De Angelis  wrote:
> I've been giving a closer look at GWT 2.1.0 M1 and Expense application
> lately, as the best way to be educated after Google I/O 2010 sessions.
> In your opinion, how long a real-world application shall be coupled
> with Spring Roo infrastructure/annotations?
>
> It's obvious that the default views generated by Spring Roo will be
> replaced by custom views developed with specific application logic.
> Even if you're a CSS wizard, at some point in time you would need a
> custom behaviour. I can see the following approaches:
>
> 1) Remove all references to Roo. The Expenses application has, in
> fact, removed the AspectJ extensions, all Roo annotations and just
> reused the skeleton of Entity+Record+Places+Activities as basis for
> custom views. If you have to add a new field or a new entity after
> abandoning roo, you're own your own.
>
> 2) Like 1), but keep the original Roo project somewhere in parallel.
> If you have to modify something, you can still use Roo to generate new
> classes and fields scaffolding, and then manually copy/paste/adjust in
> the real-world application. Not so integrated, but it may work if your
> views and logic change more often than the model does.
>
> 3) You keep roo as part of the development cycle. You place your
> custom views in separate package, and add your own modules that use
> your own widgets instead of the scaffolding ones. In this way, roo can
> always rebuild the entire scaffolding without interfering with your
> code. You still have to manually adjust your custom views to handle
> new/removed/modified fields and entities. Very nice integration, but
> you need to know exactly what Roo is going to ovewrite when things
> change.
>
> 4) I have a little knowledge of Roo, so there might be extension
> points that I'm not aware of. In that case there might be other ways
> to add your own views.
>
> I'm tempted to think approach 2) is the classical good-enough
> compromise, but I'm interested in other people's opinion.

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



Re: java.util.Map with Javascript Overlay example?

2010-06-18 Thread André Moraes
In JavaScript world, almost everything is a Dictionary.

If you simply need a dictionary, just use a JavaScriptObject.
Here is a example:

public final native void setValue(String key, String value) /*-{
this[key] = value;
}-*/;

private native static JavaScriptObject _createInstance() /*-{
var obj = new Object
return obj
}-*/;

I think the _createInstance isn't required, but I don't tested.

On 18 jun, 16:13, rhodebump  wrote:
> Can anyone point me to an example in which someone uses Javascript
> Overlays to create a java.util.Map.  I've tried, but keep getting a
>
>  java.lang.ClassCastException:
> com.google.gwt.core.client.JavaScriptObject$ cannot be cast to
> java.util.Map
>
> Is it even possible?  Or am I limited to using a JsArray?
>
> Thanks!

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



java.util.Map with Javascript Overlay example?

2010-06-18 Thread rhodebump
Can anyone point me to an example in which someone uses Javascript
Overlays to create a java.util.Map.  I've tried, but keep getting a

 java.lang.ClassCastException:
com.google.gwt.core.client.JavaScriptObject$ cannot be cast to
java.util.Map


Is it even possible?  Or am I limited to using a JsArray?

Thanks!

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



Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Gal Dolber
Sure, there is no doubt that the best way to go its the gwt-rpc

2010/6/18 Chris Boertien 

> All good points, but I think you guys are totally missing the point.
> He was taking a POJO and converting it to JSON for transmission using
> GWT-RPC, which is completely redundant since GWT-RPC can simply send
> the POJO and handle all the messy bits for him.
>
> Simple is better...
>
> On Fri, Jun 18, 2010 at 9:26 AM, Gal Dolber  wrote:
> > I think the best you can do is a generator that creates an overlay for
> that
> > pojo and a utility class to convert a json string to the pojo.
> > The interface will look like this:
> > public interface Json2Pojo {
> > POJO fromJson(String json);
> > }
> > And the steps will be:
> >
> > Create an POJOOverlay from the json string
> > Instantiate a POJO
> > Call all POJO setters with POJOOverlay getter
> > Return the POJO
> >
> > And the gwt compiler will inline that for you.
> > Best
> > 2010/6/18 Peter Simun 
> >>
> >> Hi Jose,
> >>
> >> Piriti project looks great for your needs. If you would like to
> >> customize deserialization process (with custom instantiators and
> >> deserializers) you can also use acris-json project. You can find
> >> details here:
> >> http://code.google.com/p/acris/wiki/GWTJsonizer
> >>
> >> (Project is based on JSONParser from GWT which internally use eval
> >> function)
> >>
> >> Only with using annotations you can get powerfull piece of
> >> functionality in JSON parsing mechanism. For example this project was
> >> used for deserialize JSON reponses from Google Youtube API in gwt-
> >> youtube-api.googlecode.com project.
> >>
> >> Peter
> >>
> >> On 18. Jún, 16:14 h., Harald Pehl  wrote:
> >> > Hi Jose,
> >> >
> >> > you could take a look at Piriti:http://code.google.com/p/piriti/.
> >> > It's an XML / JSON mapper for GWT which maps JSON data from the server
> >> > to POJO on the client.
> >> >
> >> > - Harald
> >> >
> >> > P.S. At the moment Piriti uses the "eval" function to parse JSON. This
> >> > will be changed in the next release, so that the internal JSON parser
> >> > is used.
> >> >
> >> > On 18 Jun., 15:34, Chris Boertien  wrote:
> >> >
> >> >
> >> >
> >> > > Shouldn't have a problem sending a HashMap back and forth. As far as
> i
> >> > > can tell GWT has a fairly complete implementation of the Java
> >> > > Collections API, and all of which are Serializable, so there
> shouldn't
> >> > > be any issues. I haven't used it for much more than Lists so there
> >> > > might be quirks I haven't come across yet.
> >> >
> >> > > 2010/6/18 Jose Luis Estrella Campaña :
> >> >
> >> > > > Hello There !
> >> >
> >> > > > I believe what Chris says is totally right, I should just use a
> >> > > > regular Java Object, I was mistaken when I thought I had to do
> JSON
> >> > > > parsing on the server side.
> >> > > > Now, I would like to know if a HashMap containing Strings only is
> >> > > > serializable ? Could I send it from the client to the Server and
> >> > > > Back
> >> > > > (specially back)?
> >> >
> >> > > > Thank you very much in advance !
> >> >
> >> > > > Jose.
> >> >
> >> > > > On Jun 17, 10:59 pm, Jan Ehrhardt 
> >> > > > wrote:
> >> > > >> The GWT docs are offering you to use the JavaScript "eval"
> function
> >> > > >> directly
> >> > > >> or through the JSONParser class, which internally uses the "eval"
> >> > > >> function.
> >> > > >> A more secure way, that is to use the JSON
> >> > > >> libraryhttp://www.json.org/js.html. You'll place the additional
> JavaScript
> >> > > >> library
> >> > > >> in your host page, as any other JavaScript too. Than take the
> code
> >> > > >> from the
> >> > > >> GWT docs:
> >> >
> >> > > >> private final native JsArray asArrayOfStockData(String
> >> > > >> json) /*-{
> >> > > >>   return *eval(json);*
> >> >
> >> > > >> }-*/;
> >> >
> >> > > >> and modify it like this:
> >> >
> >> > > >> private final native JsArray asArrayOfStockData(String
> >> > > >> json) /*-{
> >> > > >>   return *$wnd.JSON.parse(json);*
> >> >
> >> > > >> }-*/;
> >> >
> >> > > >> This is more secure than using the "eval" function. Additionally
> >> > > >> the
> >> > > >> "JSON.parse()" function has become part of the JavaScript
> standard
> >> > > >> and is
> >> > > >> implemented natively in many modern browsers. The above library
> >> > > >> knows this
> >> > > >> and delegates the secure JSON parsing to the fast native parser
> >> > > >> provided by
> >> > > >> the browser.
> >> >
> >> > > >> Regards
> >> > > >> Jan Ehrhardt
> >> >
> >> > > >> 2010/6/18 Chris Boertien 
> >> >
> >> > > >> > Is there a particular reason that you _need_ the JSON string?
> If
> >> > > >> > your
> >> > > >> > using GWT RPC then you can simply send a Java Object to the
> >> > > >> > server and
> >> > > >> > the underlying GWT will handle the serialization for you.
> >> >
> >> > > >> > If you the JSON string is coming from somewhere else and you
> >> > > >> > really
> >> > > >> > have no choice, then it may be worthwhile to put together a JSO
> 

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

2010-06-18 Thread anjan bacchu.dev
Hi Marco,

  I'm inclined to go with approach #2 as well for the same reasons you've
mentioned below.

BR,
~A


On Fri, Jun 18, 2010 at 4:20 PM, Marco De Angelis <
de.angelis.ma...@gmail.com> wrote:

> I've been giving a closer look at GWT 2.1.0 M1 and Expense application
> lately, as the best way to be educated after Google I/O 2010 sessions.
> In your opinion, how long a real-world application shall be coupled
> with Spring Roo infrastructure/annotations?
>
> It's obvious that the default views generated by Spring Roo will be
> replaced by custom views developed with specific application logic.
> Even if you're a CSS wizard, at some point in time you would need a
> custom behaviour. I can see the following approaches:
>
> 1) Remove all references to Roo. The Expenses application has, in
> fact, removed the AspectJ extensions, all Roo annotations and just
> reused the skeleton of Entity+Record+Places+Activities as basis for
> custom views. If you have to add a new field or a new entity after
> abandoning roo, you're own your own.
>
> 2) Like 1), but keep the original Roo project somewhere in parallel.
> If you have to modify something, you can still use Roo to generate new
> classes and fields scaffolding, and then manually copy/paste/adjust in
> the real-world application. Not so integrated, but it may work if your
> views and logic change more often than the model does.
>
> 3) You keep roo as part of the development cycle. You place your
> custom views in separate package, and add your own modules that use
> your own widgets instead of the scaffolding ones. In this way, roo can
> always rebuild the entire scaffolding without interfering with your
> code. You still have to manually adjust your custom views to handle
> new/removed/modified fields and entities. Very nice integration, but
> you need to know exactly what Roo is going to ovewrite when things
> change.
>
> 4) I have a little knowledge of Roo, so there might be extension
> points that I'm not aware of. In that case there might be other ways
> to add your own views.
>
> I'm tempted to think approach 2) is the classical good-enough
> compromise, but I'm interested in other people's opinion.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Making the "back" button go even further back in history?

2010-06-18 Thread anjan bacchu.dev
Hi There,

  Yes, I've seen this happen in several online applications. It would be
nice to know how to prevent such "torture" of users :-)

Anyone ?

BR,
~A


On Fri, Jun 18, 2010 at 6:39 PM, dduck wrote:

> Hi,
>
> I have this unusual problem.
>
> I have a form page that redirects to a results page that auto-
> redirects to my GWT application page. Now, if the user presses the
> browser "Back" button, he goes back to the auto-redirect page, which
> is not what he would expect - he wants to get to the form page, so TWO
> steps backwards.
>
> Is there any way to make that happen?
>
> Regards,
>  Anders
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Compile and Run gwt web application from Command Line

2010-06-18 Thread André Moraes
History.getToken() isn't deprecated?!

I use the History.addValueChangeHandler.

History.addValueChangeHandler(new ValueChangeHandler() {

@Override
public void onValueChange(ValueChangeEvent 
event) {
location = event.getValue();
}
});

But it only works with the information after the "#", not with the
parameters in the QueryString part of the URL.

On 18 jun, 14:00, fmod  wrote:
> Hi, from the command line:
> starthttp://somesite.com/MyPage.html
>
> If you want to pass some parameters, you can use the address.
> starthttp://somesite.com/MyPage.html?param1=blah¶m2=boo
>
> Somewhere in the onLoadModule() you will need to check
> History.getToken()
> and parse it.
>
> Regards
> Fran
>
> On Jun 18, 1:57 am, leila  wrote:
>
>
>
> > Hello,
>
> > How we can run the application in command line (windows), and how we
> > can pass parameters to onLoadModule()
> > I want to call this from another program and pass 2 points (string lat/
> > log) to it as arguments.
> > Please give me your suggestions I am new to this.
> > Thanks a lot
>
> > Leila

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



Re: Invoke SOAP Web Service from GWT on the server side.

2010-06-18 Thread AgitoM
Hi Stefan,

Thanks for your reply. Well thats what I indeed thought as well.
But for some reason invoking a service using AXIS2 is causing me a
problem, hence I decided to ask if there was any restriction.
Well, I will just keep on trying and getting it to work.
Once I do, I will post a solution here.

In the meanwhile, if anyone has a good idea on how to do it, feel free
to post here.

On Jun 18, 10:45 pm, Stefan Bachert  wrote:
> Hi Agito,
>
> when you on the server side, you can do anything you can do with java.
> No limits from GWT applies.
>
> With other word, you may ask any other java group, too
>
> Stefan Bacherthttp://gwtworld.de
>
> On Jun 17, 5:59 am, AgitoM  wrote:
>
> > For a big GWT project I am working on, we need to to retrieve data
> > from other computer systems. Based on my previous experience, a good
> > way to integrate these two systems, is to integrate them together
> > using a SOAP based Web Service.
>
> > Preferably I would like to server side of my GWT project to invoke the
> > Web Service of the other system, and retrieve some data which is then
> > send back to the client using GWT's normal RPC methods.
>
> > I've tried creating such a integration using AXIS2 in Eclipse. This
> > however does not seem to work well. Therefore I would like to ask if
> > anyone knows what is the way Google prefers for GWT projects to make
> > Web Service calls?
>
> > I've tried  Googling for solutions for a significant amount of time,
> > but couldn't find much.
> > Anyone have any idea?

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



Re: Calling RSS service in GWT from the server side

2010-06-18 Thread AgitoM
Managed to solve the problem. Used a different object to connect to
YAHOO.
Don't know why my first solution didn't work though.

I do not have access to my corrected code currently, but will post the
right solution here as soon as possible.

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



Re: Add Click Listener to an Element

2010-06-18 Thread fmod
Assuming the element is  or 

HTML html = HTML.wrap(DOM.getElementById("GWTIDSOFELEMENT"));
html.addClickHandler(new ClickHandler() {
  @Override
  public void onClick(ClickEvent event) {
System.out.println("CLICK");
  }
});


On Jun 17, 9:35 pm, Umesh Gohil  wrote:
> Hi Friends,
>
> I am kind of new bee to GWT and started learning things. I want to add
> click listener to existing element in HTML.
>
> Currently I am able to get element using this method
>
> Element el = DOM.getElementById("GWTIDSOFELEMENT");
>
> But dont know how to add click Listener to this element.
>
> Appreciate if somebody can help me with code snippet or link for
> reference.
>
> Thanks
> Umesh Gohil

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



Re: Compile and Run gwt web application from Command Line

2010-06-18 Thread fmod
Hi, from the command line:
start http://somesite.com/MyPage.html

If you want to pass some parameters, you can use the address.
start http://somesite.com/MyPage.html?param1=blah¶m2=boo

Somewhere in the onLoadModule() you will need to check
History.getToken()
and parse it.

Regards
Fran

On Jun 18, 1:57 am, leila  wrote:
> Hello,
>
> How we can run the application in command line (windows), and how we
> can pass parameters to onLoadModule()
> I want to call this from another program and pass 2 points (string lat/
> log) to it as arguments.
> Please give me your suggestions I am new to this.
> Thanks a lot
>
> Leila

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



Need to build a WYSIWYG XML editor

2010-06-18 Thread NS Gopikrishnan
Hi all,

I want to develop a WYSIWYG XML editor for a custom schema.
I am new to GWT.
I wanted to know whether GWT will be  the right framework for that.

* Whether XML DOM builders are available.
* I need to provide the view side using CSS.
* Validation of XML for every change in nodes.
* view the XML while editing the view (Not necessarily simultaneously)

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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



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

2010-06-18 Thread Marco De Angelis
I've been giving a closer look at GWT 2.1.0 M1 and Expense application
lately, as the best way to be educated after Google I/O 2010 sessions.
In your opinion, how long a real-world application shall be coupled
with Spring Roo infrastructure/annotations?

It's obvious that the default views generated by Spring Roo will be
replaced by custom views developed with specific application logic.
Even if you're a CSS wizard, at some point in time you would need a
custom behaviour. I can see the following approaches:

1) Remove all references to Roo. The Expenses application has, in
fact, removed the AspectJ extensions, all Roo annotations and just
reused the skeleton of Entity+Record+Places+Activities as basis for
custom views. If you have to add a new field or a new entity after
abandoning roo, you're own your own.

2) Like 1), but keep the original Roo project somewhere in parallel.
If you have to modify something, you can still use Roo to generate new
classes and fields scaffolding, and then manually copy/paste/adjust in
the real-world application. Not so integrated, but it may work if your
views and logic change more often than the model does.

3) You keep roo as part of the development cycle. You place your
custom views in separate package, and add your own modules that use
your own widgets instead of the scaffolding ones. In this way, roo can
always rebuild the entire scaffolding without interfering with your
code. You still have to manually adjust your custom views to handle
new/removed/modified fields and entities. Very nice integration, but
you need to know exactly what Roo is going to ovewrite when things
change.

4) I have a little knowledge of Roo, so there might be extension
points that I'm not aware of. In that case there might be other ways
to add your own views.

I'm tempted to think approach 2) is the classical good-enough
compromise, but I'm interested in other people's opinion.

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



GWT Visualization not compiling on Netbeans

2010-06-18 Thread Luiz Gustavo Arruda
Hi guys!

The following issue is happening when I'm trying to compile my project with
as Visualization module on Netbeans.

I've update all jars, (ajaxloader and gwt-visualization it self).

Here is:

Validating newly compiled units
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/visualizations/IntensityMap.java'
 [ERROR] Line 56: The method toJsArrayString(String[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/DataView.java'
 [ERROR] Line 61: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
 [ERROR] Line 73: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
 [ERROR] Line 81: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
 [ERROR] Line 93: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/DataTable.java'
 [ERROR] Line 140: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/visualizations/ImageChart.java'
 [ERROR] Line 113: The method toJsArrayString(String[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/visualizations/Gauge.java'
 [ERROR] Line 71: The method toJsArrayString(String[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/visualizations/AnnotatedTimeLine.java'
 [ERROR] Line 127: The method toJsArrayString(String[]) is undefined
for the type ArrayHelper
 [ERROR] Line 199: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
 [ERROR] Line 373: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
 [ERROR] Line 385: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/CommonOptions.java'
 [ERROR] Line 61: The method toJsArrayString(String[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/visualizations/GeoMap.java'
 [ERROR] Line 70: The method toJsArrayInteger(int[]) is undefined
for the type ArrayHelper
  [ERROR] Errors in
'jar:file:/C:/gwt-visualization-1.1.0/gwt-visualization-1.1.0/gwt-visualization.jar!/com/google/gwt/visualization/client/VisualizationUtils.java'
 [ERROR] Line 30: The method toJsArrayString(String[]) is undefined
for the type ArrayHelper
 [ERROR] Line 44: The method toJsArrayString(String[]) is undefined
for the type ArrayHelper
   Finding entry point classes

Anyone knows what is this all about?

Best regards.

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



Property 'compiler.stackMode' not found...?

2010-06-18 Thread luiskarlos
Hi, I am trying to set the property 'compiler.stackMode' to strip and
it shows this messages..

Property 'compiler.stackMode' not found

Is this property in a future release?

I am using GWT 2.0.3

Thanks

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



Re: Web server magic?

2010-06-18 Thread anjan bacchu.dev
Hi fmod,

  Thank you.

"If you
open the Run Configurations dialog from eclipse it will uncover part
of this magic."
I was wondering how to change the port on which jetty listens and the above
dialog did the trick.

I run the Fiddler http proxy for intercepting the traffice between chrome
browser and Jetty. Fiddler listens at port  and since jetty also listens
at port , this clashed and I could NOT get Fiddler to work. Now, I've
moved Jetty to use 8889 (hope that does NOT clash with another program that
is installed in my box :-)  )

BR,
~A


On Thu, Jun 17, 2010 at 11:28 PM, fmod  wrote:

> Yes, GWT comes with an embedded server, for testing your apps. If you
> open the Run Configurations dialog from eclipse it will uncover part
> of this magic.
> About that error, what are you trying to do? Maybe reloading the web
> services (there is a refresh button in the dev mode view), or re-run
> the app can fix it.
>
> On Jun 15, 5:52 pm, Matt  wrote:
> > When I run a GWT application in eclipse, what is serving the web
> > page?  I haven't installed a web server, yet something is answering
> > requests on port  when I run the application through eclipse. Does
> > the eclipse plugin include a web server?
> >
> > I'm having problems loading pages now... says:
> >
> > HTTP ERROR: 503
> >
> > Problem accessing /. Reason:
> >
> > SERVICE_UNAVAILABLE
> > Powered by Jetty://
> >
> > So I guess Jetty is running somehow... but I don't know how to fix
> > this problem since everything is magic and hidden from me.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Add Click Listener to an Element

2010-06-18 Thread Umesh Gohil
Hi Friends,

I am kind of new bee to GWT and started learning things. I want to add
click listener to existing element in HTML.

Currently I am able to get element using this method

Element el = DOM.getElementById("GWTIDSOFELEMENT");

But dont know how to add click Listener to this element.

Appreciate if somebody can help me with code snippet or link for
reference.

Thanks
Umesh Gohil


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



Re: Custom GWT Widget and RPC

2010-06-18 Thread Tim G
Ugh.

yeah, my SeachBox widget is in com.foo.widget'S'.search.SearchBox

Day and a half wasted

On Jun 16, 5:22 pm, Tim G  wrote:
> Can you make a RPC call from a custom GWT widget (i.e. a Search Box
> widget) which then can be packaged as a jar and added to another
> projects build path?
>
> For example:
>
> I have a custom widget that is comprised of a textbox, button and a
> popup panel.  What I want it to do is on the click event, make a call
> to my server code, populate an list of result objects,send the list
> back to the widget and populate the Popup box with data from the
> list.  The goal is to reuse this widget in multiple internal web apps
> we develop.
>
> The problem I am having is configuring the servlet path in the web.xml
> file for the specific we apps which is leading me to believe that this
> can not do want I want it to do.
>
> The GWT module that is inheriting the custom widget:
>
>         com.foo.web.Home
>
> The GWT module that contains the custom widget:
>
>        com.foo.widget.search.SearchBox
>
> Currently, what I have populated in web.xml from com.foo.web.Home:
>
>         
>                 seachBox
>                 
> com.foo.widget.search.server.SearchBoxServiceImpl servlet-class>
>         
>         
>                 seachBox
>                 
> /com.foo.widget.search.SearchBox/search
>         
>
> I have added @RemoteServiceRelativePath("search") to
> com.foo.widget.search.client.SearchBoxService
>
> Jetty throws the following warnings when I attempt to run the app in
> dev mode:
>
> 00:00:00.000 [WARN] EXCEPTION
> java.lang.ClassNotFoundException:
> com.foo.widget.search.server.SearchBoxServiceImpl
>
> 00:00:00.000 [WARN] failed seachBox
> javax.servlet.UnavailableException:
> com.foo.widget.search.server.SearchBoxServiceImpl
>
> 00:00:00.093 [WARN] Failed startup of context
> com.google.gwt.dev.shell.jetty.JettyLauncher
> $webappcontextwithrel...@1b5a5cf{/,C:\web-app\main\web\war}
> javax.servlet.UnavailableException:
> com.foo.widget.search.server.SearchBoxServiceImpl
>
> When I launch the app in Chrome, I get a 503 error.
>
> Any insight will be 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Application works only in hosted mode

2010-06-18 Thread Günter Zöchbauer
I my case it was the following line in the
Main.gwt.xml file:


I read somewhere that with this property better stack traces are
supplied byt GWT.
There were some additional lines but removing this one solved the
problem.

I had no problem with that in hosted mode but in web mode i got a
blank page.

On Jun 11, 11:37 am, Stefan Ludwig  wrote:
> Hi,
>
> I have a simple application contains a GXT form panel. When I start
> the app inhostedmodeitworksfine. But not in normalmode.
>
> In Firebug I see, that all files are well loaded (Status 200 OK). When
> I check the generated HTML with Firbug, I see that the DIV (my GWT
> container) is empty (inhostedmodethe DIV contains some HTML code).
> It seems that the entry point doesn't work in "normal"mode.
>
> Other GWT/GXT appsworksfine. So i think its a configuration issue of
> my GWT project, not a installation problem.
>
> Any ideas?
>
> Thanks
> Steff

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



Integration of servlet from another GWT module

2010-06-18 Thread remip73
Hi,

I've 2 GWT module, module 1 and module 2.
Module 1 inherits module 2.
Module 2 has an entry point and when it has finished its startup tasks
it must load some services from module 1.
Module 2 and module 1 have some servlets, they are all declared in
web.xml from module 1.
I run module 1 in GWT development mode.

How can I process to integrate properly module 2 and module 1?

For now module 1 is unable to find Servlet class from module 2
(java.lang.ClassNotFoundException at launching), I've included
module2.jar in build path : it doesn't work. I've also tried to copy
content of war/web-inf of module 2 in war/web-inf of module 1, it
works but for debugging it's not easy!!!

Thanks 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Compile and Run gwt web application from Command Line

2010-06-18 Thread leila
Hello,

How we can run the application in command line (windows), and how we
can pass parameters to onLoadModule()
I want to call this from another program and pass 2 points (string lat/
log) to it as arguments.
Please give me your suggestions I am new to this.
Thanks a lot

Leila

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



Problem to load data from Database

2010-06-18 Thread Lucasj85
Hi all, i'm Gianluca and i start from a few week to study Google Web
Toolkit.

In this days i'm trying to load a data from a FireBird Database. But i
have  a problem, can't load!!!
Ok, if i create a projet in java , i can normally extract a data from
my database( creating connection  with JDBC).

I also copy the class created in java for connection to the database
in my GWT project, but the error that Eclipse show me in the console
is:

org.firebirdsql.jdbc.FBDriver

I show you my  GWT project:



The main class call ChiamataServe.javar ( italian name , i'm italian):

package mioesempio.client;



import mioesempio.shared.FieldVerifier;
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;


public class ChiamataServer implements EntryPoint {

public FlexTable tabella= new FlexTable();
public VerticalPanel pannello=new VerticalPanel();

public void onModuleLoad(){


tabella.setText(0, 0, "Id");
tabella.setText(0, 1, "Nome ");
tabella.setText(0, 2, "Cognome ");


pannello.add(tabella);




ServizioRemotoAsync sra;
sra=(ServizioRemotoAsync) GWT.create(ServizioRemoto.class);

ServiceDefTarget target= (ServiceDefTarget) sra;
target.setServiceEntryPoint(GWT.getModuleBaseURL() + "data");

AsyncCallback callbackTabella =new AsyncCallback(){

public void onSuccess(Object oggetto){
Utente[] utente= (Utente[]) oggetto;
Window.alert("Server risponde");

for(int i=0; i callback);

}


After i created an implementation on the server ServizioRemotoImpl:

package mioesempio.server;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.List;

import mioesempio.client.ListaUtenti;
import mioesempio.client.ServizioRemoto;
import mioesempio.client.Utente;

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

public class ServizioRemotoImpl extends RemoteServiceServlet
implements ServizioRemoto{


public Utente[] getTabella(){

Utente[] lista = null;

String databaseurl= 
"jdbc:firebirdsql:127.0.0.1/3050:E:/TIROCINIO/
Database/basedati.fdb";
String username = "sysdba";
String password = "masterkey";

String driverName= "org.firebirdsql.jdbc.FBDriver";

Connection connessione;
Statement stm;
ResultSet risultatoUtenti;



try {
Class.forName(driverName).newInstance();

connessione = DriverManager.getConnection(databaseurl, 
username,
password);

stm= connessione.createStatement();

String sql= "SELECT * FROM utenti";

risultatoUtenti=stm.executeQuery(sql);

int i=0;

risultatoUtenti.last();
int size = risultatoUtenti.getRow();
risultatoUtenti.beforeFirst();

while(risultatoUtenti.next()){

lista = new Utente[size];

lista[i].nome=risultatoUtenti.getString("nome");

lista[i].cognome=risultatoUtenti.getString("cognome");


i++;

}
risultatoUtenti.close();
connessione.close();
}
catch(Exception e){
System.out.println(e.getMessage());
}

return lista;
}


}


That' all, when i run this Project, there is a message that the RPC is
successful with the onSuccess message.
But i cant see my data stored on the database, console show me the
name of driver!!!

org.firebirdsql.jdbc.FBDriver


Can someone help me?

Thanks all , and sorry for my english


G

Re: Does a private variable in Java stays private when compiled to javascript?

2010-06-18 Thread Sripathi Krishnan
I think you missed Thomas' post. You *CAN* keep your variables private, its
just you have to use a different linker. Its just a minor change to your
gwt.xml, and with that your entire script will be private.


-Sri


On 18 June 2010 20:04, Shedokan  wrote:

> So i'll guess I'll have to make my app completley in javascript, I
> hope that someday in the future GWT would allow things like this.
> In javascript it is possible to have a completley private variable,
> like so:
>
> myApp = function(){
>  var privateVariable = "private";
>
>  // Setter and getter
>  this.setPrivate = function(var){
>privateVariable = var;
>  };
>
>  this.getPrivate = function(){
>return privateVariable;
>  };
> };
>
> and as far as I know there is no way to access the privateVariable
> unless your'e using something that is not javascript.
>
> Well, thanks anyway.
>
>
> On 17 יוני, 20:31, Stefan Bachert  wrote:
> > Hi,
> >
> > probably not, I am quite sure that there is a way using (native)
> > JavaScript.
> >
> > However, as long you only code in Java effectively it isprivate.
> > And remember, even in Java it is possible to accessprivatevar from
> > outside.
> > Some OR-mapper doing so. Or your debugger.
> >
> > When your question is about security, never ever dream about that
> > anything is secure in your browser code.
> > Anything you give to a browser is open, at least for a professional.
> >
> > Stefan Bacherthttp://gwtworld.de
> >
> > On Jun 16, 11:23 am, Shedokan  wrote:
> >
> > > Hello,
> > > I am looking at GWT's features and can't figure out weather a variable
> > > declared in java asprivatewill stayprivateonce compiled in GWT.
> > > ByprivateI mean unaccessible to anyone except for the constructor or
> > > the construtors functions.
> >
> > > Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Chris Boertien
All good points, but I think you guys are totally missing the point.
He was taking a POJO and converting it to JSON for transmission using
GWT-RPC, which is completely redundant since GWT-RPC can simply send
the POJO and handle all the messy bits for him.

Simple is better...

On Fri, Jun 18, 2010 at 9:26 AM, Gal Dolber  wrote:
> I think the best you can do is a generator that creates an overlay for that
> pojo and a utility class to convert a json string to the pojo.
> The interface will look like this:
> public interface Json2Pojo {
> POJO fromJson(String json);
> }
> And the steps will be:
>
> Create an POJOOverlay from the json string
> Instantiate a POJO
> Call all POJO setters with POJOOverlay getter
> Return the POJO
>
> And the gwt compiler will inline that for you.
> Best
> 2010/6/18 Peter Simun 
>>
>> Hi Jose,
>>
>> Piriti project looks great for your needs. If you would like to
>> customize deserialization process (with custom instantiators and
>> deserializers) you can also use acris-json project. You can find
>> details here:
>> http://code.google.com/p/acris/wiki/GWTJsonizer
>>
>> (Project is based on JSONParser from GWT which internally use eval
>> function)
>>
>> Only with using annotations you can get powerfull piece of
>> functionality in JSON parsing mechanism. For example this project was
>> used for deserialize JSON reponses from Google Youtube API in gwt-
>> youtube-api.googlecode.com project.
>>
>> Peter
>>
>> On 18. Jún, 16:14 h., Harald Pehl  wrote:
>> > Hi Jose,
>> >
>> > you could take a look at Piriti:http://code.google.com/p/piriti/.
>> > It's an XML / JSON mapper for GWT which maps JSON data from the server
>> > to POJO on the client.
>> >
>> > - Harald
>> >
>> > P.S. At the moment Piriti uses the "eval" function to parse JSON. This
>> > will be changed in the next release, so that the internal JSON parser
>> > is used.
>> >
>> > On 18 Jun., 15:34, Chris Boertien  wrote:
>> >
>> >
>> >
>> > > Shouldn't have a problem sending a HashMap back and forth. As far as i
>> > > can tell GWT has a fairly complete implementation of the Java
>> > > Collections API, and all of which are Serializable, so there shouldn't
>> > > be any issues. I haven't used it for much more than Lists so there
>> > > might be quirks I haven't come across yet.
>> >
>> > > 2010/6/18 Jose Luis Estrella Campaña :
>> >
>> > > > Hello There !
>> >
>> > > > I believe what Chris says is totally right, I should just use a
>> > > > regular Java Object, I was mistaken when I thought I had to do JSON
>> > > > parsing on the server side.
>> > > > Now, I would like to know if a HashMap containing Strings only is
>> > > > serializable ? Could I send it from the client to the Server and
>> > > > Back
>> > > > (specially back)?
>> >
>> > > > Thank you very much in advance !
>> >
>> > > > Jose.
>> >
>> > > > On Jun 17, 10:59 pm, Jan Ehrhardt 
>> > > > wrote:
>> > > >> The GWT docs are offering you to use the JavaScript "eval" function
>> > > >> directly
>> > > >> or through the JSONParser class, which internally uses the "eval"
>> > > >> function.
>> > > >> A more secure way, that is to use the JSON
>> > > >> libraryhttp://www.json.org/js.html. You'll place the additional 
>> > > >> JavaScript
>> > > >> library
>> > > >> in your host page, as any other JavaScript too. Than take the code
>> > > >> from the
>> > > >> GWT docs:
>> >
>> > > >> private final native JsArray asArrayOfStockData(String
>> > > >> json) /*-{
>> > > >>   return *eval(json);*
>> >
>> > > >> }-*/;
>> >
>> > > >> and modify it like this:
>> >
>> > > >> private final native JsArray asArrayOfStockData(String
>> > > >> json) /*-{
>> > > >>   return *$wnd.JSON.parse(json);*
>> >
>> > > >> }-*/;
>> >
>> > > >> This is more secure than using the "eval" function. Additionally
>> > > >> the
>> > > >> "JSON.parse()" function has become part of the JavaScript standard
>> > > >> and is
>> > > >> implemented natively in many modern browsers. The above library
>> > > >> knows this
>> > > >> and delegates the secure JSON parsing to the fast native parser
>> > > >> provided by
>> > > >> the browser.
>> >
>> > > >> Regards
>> > > >> Jan Ehrhardt
>> >
>> > > >> 2010/6/18 Chris Boertien 
>> >
>> > > >> > Is there a particular reason that you _need_ the JSON string? If
>> > > >> > your
>> > > >> > using GWT RPC then you can simply send a Java Object to the
>> > > >> > server and
>> > > >> > the underlying GWT will handle the serialization for you.
>> >
>> > > >> > If you the JSON string is coming from somewhere else and you
>> > > >> > really
>> > > >> > have no choice, then it may be worthwhile to put together a JSO
>> > > >> > Overlay, use the Overlay to instantiate a POJO on the client side
>> > > >> > code, and send the POJO to the server via GWT RPC.
>> >
>> > > >> > Since your new some of that probably makes no sense, and If you
>> > > >> > can
>> > > >> > give a little more detail as to why you need to have JSON
>> > > >> > originating
>> > > >> > from the client I'm s

Re: Regarding GWT 2.0.3

2010-06-18 Thread Andrés Cerezo
The file is ok try to find in another site, servlets ,etc search in in
google "Parse error in application web.xml" the is a lof of messages.

2010/6/18 gourineni rakesh 

> Hi Andres,
> these is  the attached web.xml
>
>
> 2010/6/18 Andrés Cerezo 
>
> Try to attach the file, please.
>>
>> 2010/6/18 gourineni rakesh 
>>
>> Hi Andres,
>>> the below is my web.xml file. Plz check this and let me know
>>> if there r any errors in that.
>>>
>>>
>>>
>>> 
>>> >> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>>> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>>>
>>> 
>>>
>>>
>>>   
>>> BuoyDataService
>>>
>>>  edu.msstate.gri.server.BuoyDataServiceImpl
>>>   
>>>
>>>
>>>
>>>   
>>> BuoyDataService
>>> /buoyapplication/buoyDataService
>>>   
>>>
>>>
>>>   
>>>
>>>   
>>>
>>> BuoyApplication.html
>>>
>>> 
>>>
>>> 
>>>
>>>
>>> Regards,
>>> Rakesh.
>>>
>>>
>>> 2010/6/17 Andrés Cerezo 
>>>
 Yes send me it by email.

 2010/6/17 gourineni rakesh 

 Thanks Cerezo for the reply
>   I had opened web.xml file from xml editor but I
> couldnt find any error. Can you check whether my web.xml format is
> correct?
>
>
> Regards,
> Rakesh
>
> 2010/6/17 Andrés Cerezo 
>
> Try to open it with the xml editor of eclipse (design view) perhaps It
>> has an erroneus character (space, etc) and you can`t see it.
>>
>> 2010/6/16 gourineni rakesh 
>>
>>> Hi,
>>> I m Rakesh. I m developing a GWT based eclipse project.The
>>> project is about sensor web application for Buoys n i used google maps 
>>> to
>>> display the Buoy locations.For this the GWT i m using is 2.0.3, eclipse 
>>> is
>>> 3.4 Ganemade n Tomcat is 5.5.9. Recently I have upgraded the Sensor Web
>>> project from gwt 1.4.62 to 2.0.3. I m able to get the application in 
>>> the web
>>> browser but i m unable to update the database into PostgreSql {version 
>>> is
>>> 8.2.}
>>>
>>>  My *Web.xml* is shown below
>>>
>>> 
>>> >> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>>> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>>>
>>> 
>>>
>>>
>>>   
>>> BuoyDataService
>>>
>>>  
>>> edu.msstate.gri.server.BuoyDataServiceImpl
>>>   
>>>
>>>
>>>
>>>   
>>> BuoyDataService
>>> /buoyapplication/buoyDataService
>>>   
>>>
>>>
>>>   
>>>
>>>   
>>>
>>> BuoyApplication.html
>>>
>>> 
>>>
>>> 
>>>
>>>
>>> And my *gwt.xml* file is given below
>>>
>>> 
>>> 
>>>   
>>>   
>>>
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>   
>>>
>>>   
>>>
>>>   
>>>   
>>>
>>>   
>>>   
>>>
>>>
>>> 
>>>
>>>
>>>
>>> When I start my Tomcat I m getting the
>>>
>>>  "End event threw exception" in startup window and following this
>>> another error " Parse error in application web.xml"
>>>
>>> Is there any error in my* web.xml file*.Plz help me
>>>
>>> Thanks in advance,
>>> Rakesh.
>>>
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Web Toolkit" group.
>>> To post to this group, send email to
>>> google-web-tool...@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> google-web-toolkit+unsubscr...@googlegroups.com
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Google Web Toolkit" group.
>> To post to this group, send email to
>> google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google Web Toolkit" group.
> To post to this group, send email to
> google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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

Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Gal Dolber
I think the best you can do is a generator that creates an overlay for that
pojo and a utility class to convert a json string to the pojo.

The interface will look like this:

public interface Json2Pojo {
POJO fromJson(String json);
}

And the steps will be:

   1. Create an POJOOverlay from the json string
   2. Instantiate a POJO
   3. Call all POJO setters with POJOOverlay getter
   4. Return the POJO

And the gwt compiler will inline that for you.

Best

2010/6/18 Peter Simun 

> Hi Jose,
>
> Piriti project looks great for your needs. If you would like to
> customize deserialization process (with custom instantiators and
> deserializers) you can also use acris-json project. You can find
> details here:
> http://code.google.com/p/acris/wiki/GWTJsonizer
>
> (Project is based on JSONParser from GWT which internally use eval
> function)
>
> Only with using annotations you can get powerfull piece of
> functionality in JSON parsing mechanism. For example this project was
> used for deserialize JSON reponses from Google Youtube API in gwt-
> youtube-api.googlecode.com project.
>
> Peter
>
> On 18. Jún, 16:14 h., Harald Pehl  wrote:
> > Hi Jose,
> >
> > you could take a look at Piriti:http://code.google.com/p/piriti/.
> > It's an XML / JSON mapper for GWT which maps JSON data from the server
> > to POJO on the client.
> >
> > - Harald
> >
> > P.S. At the moment Piriti uses the "eval" function to parse JSON. This
> > will be changed in the next release, so that the internal JSON parser
> > is used.
> >
> > On 18 Jun., 15:34, Chris Boertien  wrote:
> >
> >
> >
> > > Shouldn't have a problem sending a HashMap back and forth. As far as i
> > > can tell GWT has a fairly complete implementation of the Java
> > > Collections API, and all of which are Serializable, so there shouldn't
> > > be any issues. I haven't used it for much more than Lists so there
> > > might be quirks I haven't come across yet.
> >
> > > 2010/6/18 Jose Luis Estrella Campaña :
> >
> > > > Hello There !
> >
> > > > I believe what Chris says is totally right, I should just use a
> > > > regular Java Object, I was mistaken when I thought I had to do JSON
> > > > parsing on the server side.
> > > > Now, I would like to know if a HashMap containing Strings only is
> > > > serializable ? Could I send it from the client to the Server and Back
> > > > (specially back)?
> >
> > > > Thank you very much in advance !
> >
> > > > Jose.
> >
> > > > On Jun 17, 10:59 pm, Jan Ehrhardt 
> wrote:
> > > >> The GWT docs are offering you to use the JavaScript "eval" function
> directly
> > > >> or through the JSONParser class, which internally uses the "eval"
> function.
> > > >> A more secure way, that is to use the JSON libraryhttp://
> www.json.org/js.html. You'll place the additional JavaScript library
> > > >> in your host page, as any other JavaScript too. Than take the code
> from the
> > > >> GWT docs:
> >
> > > >> private final native JsArray asArrayOfStockData(String
> json) /*-{
> > > >>   return *eval(json);*
> >
> > > >> }-*/;
> >
> > > >> and modify it like this:
> >
> > > >> private final native JsArray asArrayOfStockData(String
> json) /*-{
> > > >>   return *$wnd.JSON.parse(json);*
> >
> > > >> }-*/;
> >
> > > >> This is more secure than using the "eval" function. Additionally the
> > > >> "JSON.parse()" function has become part of the JavaScript standard
> and is
> > > >> implemented natively in many modern browsers. The above library
> knows this
> > > >> and delegates the secure JSON parsing to the fast native parser
> provided by
> > > >> the browser.
> >
> > > >> Regards
> > > >> Jan Ehrhardt
> >
> > > >> 2010/6/18 Chris Boertien 
> >
> > > >> > Is there a particular reason that you _need_ the JSON string? If
> your
> > > >> > using GWT RPC then you can simply send a Java Object to the server
> and
> > > >> > the underlying GWT will handle the serialization for you.
> >
> > > >> > If you the JSON string is coming from somewhere else and you
> really
> > > >> > have no choice, then it may be worthwhile to put together a JSO
> > > >> > Overlay, use the Overlay to instantiate a POJO on the client side
> > > >> > code, and send the POJO to the server via GWT RPC.
> >
> > > >> > Since your new some of that probably makes no sense, and If you
> can
> > > >> > give a little more detail as to why you need to have JSON
> originating
> > > >> > from the client I'm sure this can be explained a bit better to fit
> > > >> > your case.
> >
> > > >> > GWT-RPC:
> http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html
> > > >> > GWT-JSON:
> > > >> >
> http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html#client
> >
> > > >> > 2010/6/16 Jose Luis Estrella Campaña :
> > > >> > > Hello Folks !
> >
> > > >> > > I'm glad to say that I'm a brand new user of GWT, a very happy
> one by
> > > >> > > the way. However, as any newcomer I have questions, One in
> particular.
> > > >> > > Here it goes:
> >
> > > >> > > What's the easiest, most straight for

Re: Creating custom 'elements' for UiBinder, like in DockLayoutPanel

2010-06-18 Thread Lukas Laag
Hi Graham,

You should look at this thread which contains interesting information
on how to create custom element parsers:
https://groups.google.com/group/google-web-toolkit-contributors/browse_thread/thread/4d79f729030527c5/181973c17d16cbc0?lnk=gst&q=custom+element+parser#181973c17d16cbc0

My understanding of the key points is:
a/ You officially cannot create your own element parser (there is no
publicly supported API for that)
b/ However, because GWT is open source, you can easily patch one or
two classes, put them at the head of your classpath and create your
own element parsers (though with no guarantee that they will not be
broken by future GWT evolutions).
c/ rjrjr mentions a possible public API for this in a later release,
possibly 2.1. However, if you listen to this webcast (http://
code.google.com/events/io/2010/sessions/gwt-ui-overhaul.html) from IO
2010, the possibility for a public API seems more remote (somebody
asks the question at the end of the session)

I have used this myself extensively to map SVG tags in UiBinder. If
you are interested, you can look here (http://www.vectomatic.org/lib-
gwt-svg/uibinder-integration-with-lib-gwt-svg) for an article about
this work and here (http://www.vectomatic.org/mvn-sites/lib-gwt-svg/
xref/org/vectomatic/dev/svg/impl/gen/SVGButtonBaseParser.html) for
source code.

Lukas

On Jun 18, 2:45 pm, Chris Boertien  wrote:
> I'm not sure as to any exact procedure fro this, but this might give
> you some idea of whats happening under the hood...
>
> http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/...
>
> On Fri, Jun 18, 2010 at 6:29 AM, Will  wrote:
> > I want to create the same UiBinder support for custom elements as
> > well.  Can anyone point us towards an example in the GWT source so
> > that we can see how  is implemented and get an idea on how
> > we can create similar elements?  If I don't hear back I plan to create
> > a different widget for each custom element and have an onAttach( )
> > method that will throw an exception if the widget is placed outside of
> > the correct context.  I think that will behave similar to 
> > but I imagine GWT uses something more robust.
>
> > On Apr 19, 1:58 pm, Graham J  wrote:
> >> DockLayoutPanel has the , , etc. which are referred
> >> to as 'elements' on theUiBinderhelp page. (http://code.google.com/
> >> webtoolkit/doc/latest/DevGuideUiBinder.html#Panels)
>
> >> Any idea how one would go about adding this functionality to my own
> >> widgets? Theirs appear to be parametrized and everything.
>
> >> --
> >> You received this message because you are subscribed to the Google Groups 
> >> "Google Web Toolkit" group.
> >> To post to this group, send email to google-web-tool...@googlegroups.com.
> >> To unsubscribe from this group, send email to 
> >> google-web-toolkit+unsubscr...@googlegroups.com.
> >> For more options, visit this group 
> >> athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Stop Cell Selections in a Grid

2010-06-18 Thread Stefan Bachert
> Stefan,

>I can't find a way to apply Event.sinkEvents to selections within my
>Grid. Can you give me a basic example of how I would apply that to a
>grid for selections?

>~Scott

Hi Scott,

I do not answer to personal mail without a support contract ;-)


The mentioned idea is, that a selection starts with some kind of mouse
click.
When you catch this click and avoid default handling, this may
succeed.
However, a specific "selection" is not known to me.

Your problem is a general one.

The google group app behaves the same as you describes. You ca do
selection regardless of you application. In such cases you will detect
that we are still using browser which allows to copy and paste html.

On thing i detected recently is that a absolute positioned panel (like
LayoutPanel) do limit the selection across widget.

However, maybe the easiest might be to ignore this requirement as it
seems to lead to a bunch of hacks.

Stefan Bachert
http://gwtworld.de





On Jun 18, 6:12 am, spierce7  wrote:
> I was playing around with the CSS option, and it doesn't work in IE. I
> need something that works in all major browsers.

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



central configuration file (xml) - where to place?

2010-06-18 Thread Magnus
Hi,

I want to have a central configuration xml file to store things like
database connection. The file should be accessible from the client and
the server code.

Where should I place this file and how can I access it (are java
properties supported in client code?)?

Thank you
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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Peter Simun
Hi Jose,

Piriti project looks great for your needs. If you would like to
customize deserialization process (with custom instantiators and
deserializers) you can also use acris-json project. You can find
details here:
http://code.google.com/p/acris/wiki/GWTJsonizer

(Project is based on JSONParser from GWT which internally use eval
function)

Only with using annotations you can get powerfull piece of
functionality in JSON parsing mechanism. For example this project was
used for deserialize JSON reponses from Google Youtube API in gwt-
youtube-api.googlecode.com project.

Peter

On 18. Jún, 16:14 h., Harald Pehl  wrote:
> Hi Jose,
>
> you could take a look at Piriti:http://code.google.com/p/piriti/.
> It's an XML / JSON mapper for GWT which maps JSON data from the server
> to POJO on the client.
>
> - Harald
>
> P.S. At the moment Piriti uses the "eval" function to parse JSON. This
> will be changed in the next release, so that the internal JSON parser
> is used.
>
> On 18 Jun., 15:34, Chris Boertien  wrote:
>
>
>
> > Shouldn't have a problem sending a HashMap back and forth. As far as i
> > can tell GWT has a fairly complete implementation of the Java
> > Collections API, and all of which are Serializable, so there shouldn't
> > be any issues. I haven't used it for much more than Lists so there
> > might be quirks I haven't come across yet.
>
> > 2010/6/18 Jose Luis Estrella Campaña :
>
> > > Hello There !
>
> > > I believe what Chris says is totally right, I should just use a
> > > regular Java Object, I was mistaken when I thought I had to do JSON
> > > parsing on the server side.
> > > Now, I would like to know if a HashMap containing Strings only is
> > > serializable ? Could I send it from the client to the Server and Back
> > > (specially back)?
>
> > > Thank you very much in advance !
>
> > > Jose.
>
> > > On Jun 17, 10:59 pm, Jan Ehrhardt  wrote:
> > >> The GWT docs are offering you to use the JavaScript "eval" function 
> > >> directly
> > >> or through the JSONParser class, which internally uses the "eval" 
> > >> function.
> > >> A more secure way, that is to use the JSON 
> > >> libraryhttp://www.json.org/js.html. You'll place the additional 
> > >> JavaScript library
> > >> in your host page, as any other JavaScript too. Than take the code from 
> > >> the
> > >> GWT docs:
>
> > >> private final native JsArray asArrayOfStockData(String json) 
> > >> /*-{
> > >>   return *eval(json);*
>
> > >> }-*/;
>
> > >> and modify it like this:
>
> > >> private final native JsArray asArrayOfStockData(String json) 
> > >> /*-{
> > >>   return *$wnd.JSON.parse(json);*
>
> > >> }-*/;
>
> > >> This is more secure than using the "eval" function. Additionally the
> > >> "JSON.parse()" function has become part of the JavaScript standard and is
> > >> implemented natively in many modern browsers. The above library knows 
> > >> this
> > >> and delegates the secure JSON parsing to the fast native parser provided 
> > >> by
> > >> the browser.
>
> > >> Regards
> > >> Jan Ehrhardt
>
> > >> 2010/6/18 Chris Boertien 
>
> > >> > Is there a particular reason that you _need_ the JSON string? If your
> > >> > using GWT RPC then you can simply send a Java Object to the server and
> > >> > the underlying GWT will handle the serialization for you.
>
> > >> > If you the JSON string is coming from somewhere else and you really
> > >> > have no choice, then it may be worthwhile to put together a JSO
> > >> > Overlay, use the Overlay to instantiate a POJO on the client side
> > >> > code, and send the POJO to the server via GWT RPC.
>
> > >> > Since your new some of that probably makes no sense, and If you can
> > >> > give a little more detail as to why you need to have JSON originating
> > >> > from the client I'm sure this can be explained a bit better to fit
> > >> > your case.
>
> > >> > GWT-RPC:http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html
> > >> > GWT-JSON:
> > >> >http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html#client
>
> > >> > 2010/6/16 Jose Luis Estrella Campaña :
> > >> > > Hello Folks !
>
> > >> > > I'm glad to say that I'm a brand new user of GWT, a very happy one by
> > >> > > the way. However, as any newcomer I have questions, One in 
> > >> > > particular.
> > >> > > Here it goes:
>
> > >> > > What's the easiest, most straight forward way to deserialize a JSON
> > >> > > String on the Server side and instance a Java Object from it ?
>
> > >> > > The JSON String will be sent from the client side, an implementation
> > >> > > of the RemoteService for example, and I intend to deserialize it on
> > >> > > the Server side, say inside the RemoteServiceServlet Implementation,
> > >> > > so I can instance a Java Object with the information contained in the
> > >> > > JSON string afterwards. Is there a way this last step automatically
> > >> > > with some GWT API ?
>
> > >> > > I would like to see some examples if it's possible.
>
> > >> > > Best Regards,
>
> > >> > > Sincerely,
>
> > >> >

Re: Regarding GWT 2.0.3

2010-06-18 Thread gourineni rakesh
Hi Andres,
these is  the attached web.xml


2010/6/18 Andrés Cerezo 

> Try to attach the file, please.
>
> 2010/6/18 gourineni rakesh 
>
> Hi Andres,
>> the below is my web.xml file. Plz check this and let me know
>> if there r any errors in that.
>>
>>
>>
>> 
>> > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>>
>> 
>>
>>
>>   
>> BuoyDataService
>>
>>  edu.msstate.gri.server.BuoyDataServiceImpl
>>   
>>
>>
>>
>>   
>> BuoyDataService
>> /buoyapplication/buoyDataService
>>   
>>
>>
>>   
>>
>>   
>>
>> BuoyApplication.html
>>
>> 
>>
>> 
>>
>>
>> Regards,
>> Rakesh.
>>
>>
>> 2010/6/17 Andrés Cerezo 
>>
>>> Yes send me it by email.
>>>
>>> 2010/6/17 gourineni rakesh 
>>>
>>> Thanks Cerezo for the reply
   I had opened web.xml file from xml editor but I
 couldnt find any error. Can you check whether my web.xml format is
 correct?


 Regards,
 Rakesh

 2010/6/17 Andrés Cerezo 

 Try to open it with the xml editor of eclipse (design view) perhaps It
> has an erroneus character (space, etc) and you can`t see it.
>
> 2010/6/16 gourineni rakesh 
>
>> Hi,
>> I m Rakesh. I m developing a GWT based eclipse project.The project
>> is about sensor web application for Buoys n i used google maps to display
>> the Buoy locations.For this the GWT i m using is 2.0.3, eclipse is 3.4
>> Ganemade n Tomcat is 5.5.9. Recently I have upgraded the Sensor Web 
>> project
>> from gwt 1.4.62 to 2.0.3. I m able to get the application in the web 
>> browser
>> but i m unable to update the database into PostgreSql {version is 8.2.}
>>
>>  My *Web.xml* is shown below
>>
>> 
>> > PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>>
>> 
>>
>>
>>   
>> BuoyDataService
>>
>>  
>> edu.msstate.gri.server.BuoyDataServiceImpl
>>   
>>
>>
>>
>>   
>> BuoyDataService
>> /buoyapplication/buoyDataService
>>   
>>
>>
>>   
>>
>>   
>>
>> BuoyApplication.html
>>
>> 
>>
>> 
>>
>>
>> And my *gwt.xml* file is given below
>>
>> 
>> 
>>   
>>   
>>
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>   
>>
>>   
>>
>>   
>>   
>>
>>   
>>   
>>
>>
>> 
>>
>>
>>
>> When I start my Tomcat I m getting the
>>
>>  "End event threw exception" in startup window and following this
>> another error " Parse error in application web.xml"
>>
>> Is there any error in my* web.xml file*.Plz help me
>>
>> Thanks in advance,
>> Rakesh.
>>
>>
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Google Web Toolkit" group.
>> To post to this group, send email to
>> google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google Web Toolkit" group.
> To post to this group, send email to
> google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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

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

Re: enable/disable widgets?

2010-06-18 Thread Trevor Skaife
The setEnabled method is in the FocusWidget which I'm assuming all of
your input widgets extend. So just cast all of the widgets in your
form to a FocusWidget and then you can enable/disable them.

Trevor

On Jun 18, 9:38 am, Stefan Bachert  wrote:
> Hi Magnus,
>
> I agree with you, there should be such a method at UiObject, but
> actually it it not.
> You may write an enhancement request
>
> Stefan Bacherthttp://gwtworld.de
>
> On Jun 17, 7:27 pm, Magnus  wrote:
>
>
>
> > Hi,
>
> > how can I enable/disable a widget (TextBox, Button, etc.)?
>
> > I would like to iterate all Widgets of a form and set this status. I
> > found no appropriate methods in the Widget class...
>
> > 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Inserting an external HTML/JSP Page in GWT

2010-06-18 Thread Stefan Bachert
Hi Gaurav,

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

Stefan Bachert
http://gwtworld.de

On Jun 16, 2:43 pm, Gaurav Munjal  wrote:
> Is there an option that when the user clicks on one of the buttons in
> gwt, in a seperate panel a html page ( kind of an iframe) is inserted
> whose link will be specified by us.

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



Re: how to enable scrolling for app using DecoratedTabPanel?

2010-06-18 Thread ingo
hello stefan,

thank you very much for this hint. i think so too and i tried it. but
it does not have the desired effect. see the diff
http://code.google.com/p/honeycrm/source/detail?r=73#
i put a scrollpanel around the widget that i insert into the decorated
tab panel. did you mean it this way?

kind regards,
ingo

On 17 Jun., 19:52, Stefan Bachert  wrote:
> Hi Ingo,
>
> from user point of view neither of your mentiones widget should scroll
> at all.
>
> RootLayoutPanel
>  \_ DockLayoutPanel (TabLayout class)
>   \_ DecoratedTabPanel (TabCenterView class)
>
>      \_ScrollPanel
>       \_Content A
>      \_ScrollPanel
>       \_Content B
>      \_ScrollPanel
>       \_Content C
>
> The content page of a tab should be able to scroll.
> Just put a scrollPanel in between.
>
> Stefan Bacherthttp://gwtworld.de
>
> On Jun 16, 9:12 am, ingo  wrote:
>
> > hello everyone,
>
> > i am using the DecoratedTabPanel to split my application into several
> > modules (http://honeyyycrm.appspot.com). however, i have currently no
> > scrolling at all (in no browser). i read about this in the mailing
> > list and it seems like a lot of developers have issues with this
> > (especially when they use TabPanels). i experimented with the
> > suggestions but i did not yet find a working solution. is there any
> > point in the documentation describing what to do to enable scrolling
> > when using TabPanels?
>
> > this is the widget that is inserted into the 
> > RootLayoutPanel:http://code.google.com/p/honeycrm/source/browse/trunk/src/honeycrm/cl...
> > it contains a docklayoutpanel and inserts an instance of TabCenterView
> > into 
> > itself:http://code.google.com/p/honeycrm/source/browse/trunk/src/honeycrm/cl...
>
> > RootLayoutPanel
> >  \_ DockLayoutPanel (TabLayout class)
> >   \_ DecoratedTabPanel (TabCenterView class)
>
> > this is the current hierarchy. now which steps are neccessary to
> > enable proper scrolling for the app?
>
> > regards,
> > ingo
>
>

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



Re: Invoke SOAP Web Service from GWT on the server side.

2010-06-18 Thread Stefan Bachert
Hi Agito,

when you on the server side, you can do anything you can do with java.
No limits from GWT applies.

With other word, you may ask any other java group, too

Stefan Bachert
http://gwtworld.de

On Jun 17, 5:59 am, AgitoM  wrote:
> For a big GWT project I am working on, we need to to retrieve data
> from other computer systems. Based on my previous experience, a good
> way to integrate these two systems, is to integrate them together
> using a SOAP based Web Service.
>
> Preferably I would like to server side of my GWT project to invoke the
> Web Service of the other system, and retrieve some data which is then
> send back to the client using GWT's normal RPC methods.
>
> I've tried creating such a integration using AXIS2 in Eclipse. This
> however does not seem to work well. Therefore I would like to ask if
> anyone knows what is the way Google prefers for GWT projects to make
> Web Service calls?
>
> I've tried  Googling for solutions for a significant amount of time,
> but couldn't find much.
> Anyone have any idea?

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



Re: css loading

2010-06-18 Thread Stefan Bachert
Hi Zubair,

when you want to change the gwt themes at run, have a look on the
showCase sample coming with source with your GWT-SDK
The showCase is doing such a thing.

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

Stefan Bachert
http://gwtworld.de

On Jun 17, 12:42 pm, Mohammad  wrote:
> My requirement is to support multiple themes. For achieving that need
> to change the .css file and images at runtime. Can anyone help me out,
> How to support multiple theme mechanism.
>
> Regards
> Zubair

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



Re: enable/disable widgets?

2010-06-18 Thread Stefan Bachert
Hi Magnus,

I agree with you, there should be such a method at UiObject, but
actually it it not.
You may write an enhancement request

Stefan Bachert
http://gwtworld.de

On Jun 17, 7:27 pm, Magnus  wrote:
> Hi,
>
> how can I enable/disable a widget (TextBox, Button, etc.)?
>
> I would like to iterate all Widgets of a form and set this status. I
> found no appropriate methods in the Widget class...
>
> 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Regarding GWT 2.0.3

2010-06-18 Thread Andrés Cerezo
Try to attach the file, please.

2010/6/18 gourineni rakesh 

> Hi Andres,
> the below is my web.xml file. Plz check this and let me know if
> there r any errors in that.
>
>
>
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> 
>
>
>   
> BuoyDataService
>
>  edu.msstate.gri.server.BuoyDataServiceImpl
>   
>
>
>
>   
> BuoyDataService
> /buoyapplication/buoyDataService
>   
>
>
>   
>
>   
>
> BuoyApplication.html
>
> 
>
> 
>
>
> Regards,
> Rakesh.
>
>
> 2010/6/17 Andrés Cerezo 
>
>> Yes send me it by email.
>>
>> 2010/6/17 gourineni rakesh 
>>
>> Thanks Cerezo for the reply
>>>   I had opened web.xml file from xml editor but I
>>> couldnt find any error. Can you check whether my web.xml format is
>>> correct?
>>>
>>>
>>> Regards,
>>> Rakesh
>>>
>>> 2010/6/17 Andrés Cerezo 
>>>
>>> Try to open it with the xml editor of eclipse (design view) perhaps It
 has an erroneus character (space, etc) and you can`t see it.

 2010/6/16 gourineni rakesh 

> Hi,
> I m Rakesh. I m developing a GWT based eclipse project.The project
> is about sensor web application for Buoys n i used google maps to display
> the Buoy locations.For this the GWT i m using is 2.0.3, eclipse is 3.4
> Ganemade n Tomcat is 5.5.9. Recently I have upgraded the Sensor Web 
> project
> from gwt 1.4.62 to 2.0.3. I m able to get the application in the web 
> browser
> but i m unable to update the database into PostgreSql {version is 8.2.}
>
>  My *Web.xml* is shown below
>
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> 
>
>
>   
> BuoyDataService
>
>  edu.msstate.gri.server.BuoyDataServiceImpl
>   
>
>
>
>   
> BuoyDataService
> /buoyapplication/buoyDataService
>   
>
>
>   
>
>   
>
> BuoyApplication.html
>
> 
>
> 
>
>
> And my *gwt.xml* file is given below
>
> 
> 
>   
>   
>
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>
>   
>
>   
>   
>
>   
>   
>
>
> 
>
>
>
> When I start my Tomcat I m getting the
>
>  "End event threw exception" in startup window and following this
> another error " Parse error in application web.xml"
>
> Is there any error in my* web.xml file*.Plz help me
>
> Thanks in advance,
> Rakesh.
>
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Google Web Toolkit" group.
> To post to this group, send email to
> google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

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

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

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-too

Re: Regarding GWT 2.0.3

2010-06-18 Thread gourineni rakesh
Hi Andres,
the below is my web.xml file. Plz check this and let me know if
there r any errors in that.




http://java.sun.com/dtd/web-app_2_3.dtd";>




  
BuoyDataService

 edu.msstate.gri.server.BuoyDataServiceImpl
  



  
BuoyDataService
/buoyapplication/buoyDataService
  


  

  

BuoyApplication.html






Regards,
Rakesh.


2010/6/17 Andrés Cerezo 

> Yes send me it by email.
>
> 2010/6/17 gourineni rakesh 
>
> Thanks Cerezo for the reply
>>   I had opened web.xml file from xml editor but I
>> couldnt find any error. Can you check whether my web.xml format is
>> correct?
>>
>>
>> Regards,
>> Rakesh
>>
>> 2010/6/17 Andrés Cerezo 
>>
>> Try to open it with the xml editor of eclipse (design view) perhaps It has
>>> an erroneus character (space, etc) and you can`t see it.
>>>
>>> 2010/6/16 gourineni rakesh 
>>>
 Hi,
 I m Rakesh. I m developing a GWT based eclipse project.The project
 is about sensor web application for Buoys n i used google maps to display
 the Buoy locations.For this the GWT i m using is 2.0.3, eclipse is 3.4
 Ganemade n Tomcat is 5.5.9. Recently I have upgraded the Sensor Web project
 from gwt 1.4.62 to 2.0.3. I m able to get the application in the web 
 browser
 but i m unable to update the database into PostgreSql {version is 8.2.}

  My *Web.xml* is shown below

 
 >>> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd";>

 


   
 BuoyDataService

  edu.msstate.gri.server.BuoyDataServiceImpl
   



   
 BuoyDataService
 /buoyapplication/buoyDataService
   


   

   

 BuoyApplication.html

 

 


 And my *gwt.xml* file is given below

 
 
   
   

   
   
   
   
   
   
   
   
   
   
   
   

   

   
   

   
   


 



 When I start my Tomcat I m getting the

  "End event threw exception" in startup window and following this
 another error " Parse error in application web.xml"

 Is there any error in my* web.xml file*.Plz help me

 Thanks in advance,
 Rakesh.



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

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

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



Re: Does a private variable in Java stays private when compiled to javascript?

2010-06-18 Thread Shedokan
So i'll guess I'll have to make my app completley in javascript, I
hope that someday in the future GWT would allow things like this.
In javascript it is possible to have a completley private variable,
like so:

myApp = function(){
  var privateVariable = "private";

  // Setter and getter
  this.setPrivate = function(var){
privateVariable = var;
  };

  this.getPrivate = function(){
return privateVariable;
  };
};

and as far as I know there is no way to access the privateVariable
unless your'e using something that is not javascript.

Well, thanks anyway.


On 17 יוני, 20:31, Stefan Bachert  wrote:
> Hi,
>
> probably not, I am quite sure that there is a way using (native)
> JavaScript.
>
> However, as long you only code in Java effectively it isprivate.
> And remember, even in Java it is possible to accessprivatevar from
> outside.
> Some OR-mapper doing so. Or your debugger.
>
> When your question is about security, never ever dream about that
> anything is secure in your browser code.
> Anything you give to a browser is open, at least for a professional.
>
> Stefan Bacherthttp://gwtworld.de
>
> On Jun 16, 11:23 am, Shedokan  wrote:
>
> > Hello,
> > I am looking at GWT's features and can't figure out weather a variable
> > declared in java asprivatewill stayprivateonce compiled in GWT.
> > ByprivateI mean unaccessible to anyone except for the constructor or
> > the construtors functions.
>
> > Thanks.

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



Re: Vertical/Horizontal split panel min size?

2010-06-18 Thread Stefan Bachert
Hi Tony,

look at the source code, try to catch the event which changes the
splitter position and do them not to allow to exceed certain values.

I have seen such a behaviour with gwt-mosaic.
Maybe you want give mosaic a try.


Stefan Bachert
http://gwtworld.de

On Jun 18, 11:56 am, Toni  wrote:
> Hello,
>
> Does anyone know whether it is possible or not to set a minimum split
> bar position to the Vertical or HorizontalSplitPanel so that the user
> cant drag it to the border of the panel? If not, is there a way to do
> it?
>
> Cheers!

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



Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Harald Pehl
Hi Jose,

you could take a look at Piriti: http://code.google.com/p/piriti/.
It's an XML / JSON mapper for GWT which maps JSON data from the server
to POJO on the client.

- Harald

P.S. At the moment Piriti uses the "eval" function to parse JSON. This
will be changed in the next release, so that the internal JSON parser
is used.

On 18 Jun., 15:34, Chris Boertien  wrote:
> Shouldn't have a problem sending a HashMap back and forth. As far as i
> can tell GWT has a fairly complete implementation of the Java
> Collections API, and all of which are Serializable, so there shouldn't
> be any issues. I haven't used it for much more than Lists so there
> might be quirks I haven't come across yet.
>
> 2010/6/18 Jose Luis Estrella Campaña :
>
>
>
> > Hello There !
>
> > I believe what Chris says is totally right, I should just use a
> > regular Java Object, I was mistaken when I thought I had to do JSON
> > parsing on the server side.
> > Now, I would like to know if a HashMap containing Strings only is
> > serializable ? Could I send it from the client to the Server and Back
> > (specially back)?
>
> > Thank you very much in advance !
>
> > Jose.
>
> > On Jun 17, 10:59 pm, Jan Ehrhardt  wrote:
> >> The GWT docs are offering you to use the JavaScript "eval" function 
> >> directly
> >> or through the JSONParser class, which internally uses the "eval" function.
> >> A more secure way, that is to use the JSON 
> >> libraryhttp://www.json.org/js.html. You'll place the additional JavaScript 
> >> library
> >> in your host page, as any other JavaScript too. Than take the code from the
> >> GWT docs:
>
> >> private final native JsArray asArrayOfStockData(String json) 
> >> /*-{
> >>   return *eval(json);*
>
> >> }-*/;
>
> >> and modify it like this:
>
> >> private final native JsArray asArrayOfStockData(String json) 
> >> /*-{
> >>   return *$wnd.JSON.parse(json);*
>
> >> }-*/;
>
> >> This is more secure than using the "eval" function. Additionally the
> >> "JSON.parse()" function has become part of the JavaScript standard and is
> >> implemented natively in many modern browsers. The above library knows this
> >> and delegates the secure JSON parsing to the fast native parser provided by
> >> the browser.
>
> >> Regards
> >> Jan Ehrhardt
>
> >> 2010/6/18 Chris Boertien 
>
> >> > Is there a particular reason that you _need_ the JSON string? If your
> >> > using GWT RPC then you can simply send a Java Object to the server and
> >> > the underlying GWT will handle the serialization for you.
>
> >> > If you the JSON string is coming from somewhere else and you really
> >> > have no choice, then it may be worthwhile to put together a JSO
> >> > Overlay, use the Overlay to instantiate a POJO on the client side
> >> > code, and send the POJO to the server via GWT RPC.
>
> >> > Since your new some of that probably makes no sense, and If you can
> >> > give a little more detail as to why you need to have JSON originating
> >> > from the client I'm sure this can be explained a bit better to fit
> >> > your case.
>
> >> > GWT-RPC:http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html
> >> > GWT-JSON:
> >> >http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html#client
>
> >> > 2010/6/16 Jose Luis Estrella Campaña :
> >> > > Hello Folks !
>
> >> > > I'm glad to say that I'm a brand new user of GWT, a very happy one by
> >> > > the way. However, as any newcomer I have questions, One in particular.
> >> > > Here it goes:
>
> >> > > What's the easiest, most straight forward way to deserialize a JSON
> >> > > String on the Server side and instance a Java Object from it ?
>
> >> > > The JSON String will be sent from the client side, an implementation
> >> > > of the RemoteService for example, and I intend to deserialize it on
> >> > > the Server side, say inside the RemoteServiceServlet Implementation,
> >> > > so I can instance a Java Object with the information contained in the
> >> > > JSON string afterwards. Is there a way this last step automatically
> >> > > with some GWT API ?
>
> >> > > I would like to see some examples if it's possible.
>
> >> > > Best Regards,
>
> >> > > Sincerely,
>
> >> > > Jose.
>
> >> > > --
> >> > > You received 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 >> >  cr...@googlegroups.com>
> >> > .
> >> > > For more options, visit this group at
> >> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> >> > --
> >> > You received this message because you are subscribed to the Google Groups
> >> > "Google Web Toolkit" group.
> >> > To post to this group, send email to google-web-tool...@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> > google-web-toolkit+unsubscr...@googlegroups.com >> >  cr..

Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Chris Boertien
Shouldn't have a problem sending a HashMap back and forth. As far as i
can tell GWT has a fairly complete implementation of the Java
Collections API, and all of which are Serializable, so there shouldn't
be any issues. I haven't used it for much more than Lists so there
might be quirks I haven't come across yet.

2010/6/18 Jose Luis Estrella Campaña :
> Hello There !
>
> I believe what Chris says is totally right, I should just use a
> regular Java Object, I was mistaken when I thought I had to do JSON
> parsing on the server side.
> Now, I would like to know if a HashMap containing Strings only is
> serializable ? Could I send it from the client to the Server and Back
> (specially back)?
>
> Thank you very much in advance !
>
> Jose.
>
> On Jun 17, 10:59 pm, Jan Ehrhardt  wrote:
>> The GWT docs are offering you to use the JavaScript "eval" function directly
>> or through the JSONParser class, which internally uses the "eval" function.
>> A more secure way, that is to use the JSON 
>> libraryhttp://www.json.org/js.html. You'll place the additional JavaScript 
>> library
>> in your host page, as any other JavaScript too. Than take the code from the
>> GWT docs:
>>
>> private final native JsArray asArrayOfStockData(String json) /*-{
>>   return *eval(json);*
>>
>> }-*/;
>>
>> and modify it like this:
>>
>> private final native JsArray asArrayOfStockData(String json) /*-{
>>   return *$wnd.JSON.parse(json);*
>>
>> }-*/;
>>
>> This is more secure than using the "eval" function. Additionally the
>> "JSON.parse()" function has become part of the JavaScript standard and is
>> implemented natively in many modern browsers. The above library knows this
>> and delegates the secure JSON parsing to the fast native parser provided by
>> the browser.
>>
>> Regards
>> Jan Ehrhardt
>>
>> 2010/6/18 Chris Boertien 
>>
>>
>>
>> > Is there a particular reason that you _need_ the JSON string? If your
>> > using GWT RPC then you can simply send a Java Object to the server and
>> > the underlying GWT will handle the serialization for you.
>>
>> > If you the JSON string is coming from somewhere else and you really
>> > have no choice, then it may be worthwhile to put together a JSO
>> > Overlay, use the Overlay to instantiate a POJO on the client side
>> > code, and send the POJO to the server via GWT RPC.
>>
>> > Since your new some of that probably makes no sense, and If you can
>> > give a little more detail as to why you need to have JSON originating
>> > from the client I'm sure this can be explained a bit better to fit
>> > your case.
>>
>> > GWT-RPC:http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html
>> > GWT-JSON:
>> >http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html#client
>>
>> > 2010/6/16 Jose Luis Estrella Campaña :
>> > > Hello Folks !
>>
>> > > I'm glad to say that I'm a brand new user of GWT, a very happy one by
>> > > the way. However, as any newcomer I have questions, One in particular.
>> > > Here it goes:
>>
>> > > What's the easiest, most straight forward way to deserialize a JSON
>> > > String on the Server side and instance a Java Object from it ?
>>
>> > > The JSON String will be sent from the client side, an implementation
>> > > of the RemoteService for example, and I intend to deserialize it on
>> > > the Server side, say inside the RemoteServiceServlet Implementation,
>> > > so I can instance a Java Object with the information contained in the
>> > > JSON string afterwards. Is there a way this last step automatically
>> > > with some GWT API ?
>>
>> > > I would like to see some examples if it's possible.
>>
>> > > Best Regards,
>>
>> > > Sincerely,
>>
>> > > Jose.
>>
>> > > --
>> > > You received 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> >  cr...@googlegroups.com>
>> > .
>> > > For more options, visit this group at
>> >http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups
>> > "Google Web Toolkit" group.
>> > To post to this group, send email to google-web-tool...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > google-web-toolkit+unsubscr...@googlegroups.com> >  cr...@googlegroups.com>
>> > .
>> > For more options, visit this group at
>> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because yo

Re: Best way to Deserialize JSON String to Java Object

2010-06-18 Thread Jose Luis Estrella Campaña
Hello There !

I believe what Chris says is totally right, I should just use a
regular Java Object, I was mistaken when I thought I had to do JSON
parsing on the server side.
Now, I would like to know if a HashMap containing Strings only is
serializable ? Could I send it from the client to the Server and Back
(specially back)?

Thank you very much in advance !

Jose.

On Jun 17, 10:59 pm, Jan Ehrhardt  wrote:
> The GWT docs are offering you to use the JavaScript "eval" function directly
> or through the JSONParser class, which internally uses the "eval" function.
> A more secure way, that is to use the JSON 
> libraryhttp://www.json.org/js.html. You'll place the additional JavaScript 
> library
> in your host page, as any other JavaScript too. Than take the code from the
> GWT docs:
>
> private final native JsArray asArrayOfStockData(String json) /*-{
>   return *eval(json);*
>
> }-*/;
>
> and modify it like this:
>
> private final native JsArray asArrayOfStockData(String json) /*-{
>   return *$wnd.JSON.parse(json);*
>
> }-*/;
>
> This is more secure than using the "eval" function. Additionally the
> "JSON.parse()" function has become part of the JavaScript standard and is
> implemented natively in many modern browsers. The above library knows this
> and delegates the secure JSON parsing to the fast native parser provided by
> the browser.
>
> Regards
> Jan Ehrhardt
>
> 2010/6/18 Chris Boertien 
>
>
>
> > Is there a particular reason that you _need_ the JSON string? If your
> > using GWT RPC then you can simply send a Java Object to the server and
> > the underlying GWT will handle the serialization for you.
>
> > If you the JSON string is coming from somewhere else and you really
> > have no choice, then it may be worthwhile to put together a JSO
> > Overlay, use the Overlay to instantiate a POJO on the client side
> > code, and send the POJO to the server via GWT RPC.
>
> > Since your new some of that probably makes no sense, and If you can
> > give a little more detail as to why you need to have JSON originating
> > from the client I'm sure this can be explained a bit better to fit
> > your case.
>
> > GWT-RPC:http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html
> > GWT-JSON:
> >http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html#client
>
> > 2010/6/16 Jose Luis Estrella Campaña :
> > > Hello Folks !
>
> > > I'm glad to say that I'm a brand new user of GWT, a very happy one by
> > > the way. However, as any newcomer I have questions, One in particular.
> > > Here it goes:
>
> > > What's the easiest, most straight forward way to deserialize a JSON
> > > String on the Server side and instance a Java Object from it ?
>
> > > The JSON String will be sent from the client side, an implementation
> > > of the RemoteService for example, and I intend to deserialize it on
> > > the Server side, say inside the RemoteServiceServlet Implementation,
> > > so I can instance a Java Object with the information contained in the
> > > JSON string afterwards. Is there a way this last step automatically
> > > with some GWT API ?
>
> > > I would like to see some examples if it's possible.
>
> > > Best Regards,
>
> > > Sincerely,
>
> > > Jose.
>
> > > --
> > > You received 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 > cr...@googlegroups.com>
> > .
> > > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

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



Making the "back" button go even further back in history?

2010-06-18 Thread dduck
Hi,

I have this unusual problem.

I have a form page that redirects to a results page that auto-
redirects to my GWT application page. Now, if the user presses the
browser "Back" button, he goes back to the auto-redirect page, which
is not what he would expect - he wants to get to the form page, so TWO
steps backwards.

Is there any way to make that happen?

Regards,
  Anders

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



Re: GWT project with multiple pages

2010-06-18 Thread Brian Reilly
The application that I'm working with has been around for a long time
and has used a few different web frameworks. The last one we adopted
(Tapestry 4) took that "reverse" approach of being the primary
framework and providing an adaptor for the previous framework. This
time around, I'm not looking to replace or re-implement the overall
application structure, especially the menu system that's currently in
place.

I agree that it's not optimal and not taking full advantage of what a
GWT application could be. However, it's more like having a collection
of separate GWT applications that are deployed together. The reason
for putting them all in one GWT module is to optimize compile time.
There are some parts of GWT compilation that would be repeated
unnecessarily if they were in separate modules. I know this because we
implemented 2 features that way before realizing it would be a
problem.

One upside of my situation is that, while we have a lot of existing
features implemented in other frameworks, we may eventually be able to
leave those behind. Once we have enough of the new requirements
implemented in GWT, we may be able to essentially extract an entirely
new application where GWT is the primary framework, which will be
reasonably easy to do. The other way to look at it is that there's no
way we could adopt GWT at all if we weren't able to take this
incremental approach.

-Brian

On Jun 17, 3:14 am, Stefan Bachert  wrote:
> Hi,
>
> On Jun 16, 3:14 pm, Brian Reilly  wrote:
>
> > This is a technique that I'm finding useful for using GWT to implement
> > new features in an existing web application.
>
> With multiple pages you will lose the gui state of the GWT-
> application.
> Multipages will have poor user timing problems and latencies.
>
> When you do it reverse than you can maintain the gui-state.
> "Reverse" means that ONE GWT-Application reads the "old paged"
> application pages and than display them.
> I guess this approach will succeed on the long run because it allows
> to move to a modern, user friendly RIApplication
>
> Stefan Bacherthttp://gwtworld.de

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



Re: Creating custom 'elements' for UiBinder, like in DockLayoutPanel

2010-06-18 Thread Chris Boertien
I'm not sure as to any exact procedure fro this, but this might give
you some idea of whats happening under the hood...

http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/uibinder/elementparsers/

On Fri, Jun 18, 2010 at 6:29 AM, Will  wrote:
> I want to create the same UiBinder support for custom elements as
> well.  Can anyone point us towards an example in the GWT source so
> that we can see how  is implemented and get an idea on how
> we can create similar elements?  If I don't hear back I plan to create
> a different widget for each custom element and have an onAttach( )
> method that will throw an exception if the widget is placed outside of
> the correct context.  I think that will behave similar to 
> but I imagine GWT uses something more robust.
>
> On Apr 19, 1:58 pm, Graham J  wrote:
>> DockLayoutPanel has the , , etc. which are referred
>> to as 'elements' on theUiBinderhelp page. (http://code.google.com/
>> webtoolkit/doc/latest/DevGuideUiBinder.html#Panels)
>>
>> Any idea how one would go about adding this functionality to my own
>> widgets? Theirs appear to be parametrized and everything.
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group 
>> athttp://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Creating custom 'elements' for UiBinder, like in DockLayoutPanel

2010-06-18 Thread Will
I want to create the same UiBinder support for custom elements as
well.  Can anyone point us towards an example in the GWT source so
that we can see how  is implemented and get an idea on how
we can create similar elements?  If I don't hear back I plan to create
a different widget for each custom element and have an onAttach( )
method that will throw an exception if the widget is placed outside of
the correct context.  I think that will behave similar to 
but I imagine GWT uses something more robust.

On Apr 19, 1:58 pm, Graham J  wrote:
> DockLayoutPanel has the , , etc. which are referred
> to as 'elements' on theUiBinderhelp page. (http://code.google.com/
> webtoolkit/doc/latest/DevGuideUiBinder.html#Panels)
>
> Any idea how one would go about adding this functionality to my own
> widgets? Theirs appear to be parametrized and everything.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: History and server call.

2010-06-18 Thread Ravi Sharma
Thanks Tristan for your comments. Your comments kicked my thoughts
running again :).

Let me explain how non readable code/decoupling view from presenter
etc can make life easier in terms of designing.(for the Records, i
always like Readable code)

Currently our view and presenter are dependent on each other, although
we use interfaces but still they are tightly bound that view know
there is one presenter for him(implementation may be different by
injection). I have seen the Contacts project code provided by Google
and see presenter(via dispaly) and view(via presenter) call each other
directly.

Now lets say i am writing a wizard screen or my one click will update
2-3 view/panels in my screen.

Ok i will take example where one click will update 2-3 section of
whole page which are basically different view and each will have
presenter.

Say ViewA is header (PresenterA is its presenter)
ViewB is left side panel,(PresenterB is its presenter)
ViewC is Bottom Panel(PresenterC is its presenter)
ViewD is right side Panel(PresenterD is its presenter)

Now there is button/Link on ViewA which say clickMe. On clicking this
ViewB should load some data from server and ViewC should hide some
data, viewD also load some data.

Now as per MVP/Contact project style.
My ViewA should be injected with PresnterA,PresnterB,PresenterC and
PresenterD

And onClick event i will call methods of each presenter, which
eventually raise the required events and which may create history and
then do the server calls. Technically everything is ok(normal java
inetrface/class calls tree), but problem occurs when something
changes. Say now PresenterB doesnt need to update any thing when we
click the same button. At that time you may want to remove PresnterB
from ViewA as whole, you dont want to keep such code as it(PresenterB)
will never be used in ViewA. Or say some new ViewE came up somewhere
and you want to update this via PresenterE, so you need to inject
presenterE dependency in ViewA so that ViewA can a make call like
PresenterE.doSomethingForMe(). Lots of code changes which could be
avoided by just using EventBus.


Say OnClick we just raise an event HEY_BUTTON_CLICKED_ON_VIEW_A and
presenterB,PresenterC,PresnterD will be interested in this event
initially. Once PresenterE will come then PresnterE will be interested
in that too.And when PresnterB says i dont need to update, it will
just stop listening to that event. But i will never touch ViewA class
or any other presenter at all.

And also i looked into AppController class in Contacts project  and it
looks to be controller it self for views and presenter.
I should say its not MVP but its MVPC

Now with using EventBus for all Communcation i am just assesing the
existance of presenter it self(just to make a go call ?). Why do i
need presenter at first place. Just to be tight bound with View??. SO
that if tommorow my site/application goes for mobile i write seprate
presenter which will be bind to seprate view as per Mobile screen. Why
not i just write seprate view and use EventBus.

Basically with in Client(between UI events/activities and server calls
at client side), i am trying to have RPC calls kind of style. UI
request client side code with an event and get response with another
event. I feel its just MVE (Model View Event), no controller and no
presenter.


Does it make sense?
Ravi.

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



RE: Moving to gwt 2.0.3

2010-06-18 Thread Ricardo Manuel Saraiva
Nevermind... It was my web.xml ... thanks ;)

From: google-web-toolkit@googlegroups.com 
[mailto:google-web-tool...@googlegroups.com] On Behalf Of Ricardo Manuel Saraiva
Sent: sexta-feira, 18 de Junho de 2010 11:04
To: google-web-toolkit@googlegroups.com
Subject: Moving to gwt 2.0.3

Hi,

I'm moving my project to the new version of gwt.

I'm having some problems. It gives me the following error:

"message /zonaReservada/scripts/gwt.Foo/common

description The requested resource (/zonaReservada/scripts/gwt.Foo/common) is 
not available."

I'm using module inheritance. It was working fine in the previous version. Is 
there anything new I have to consider?

Here are the modules:

Common.gwt.xml







Adv.gwt.xml






Foo.gwt.xml








And this is my html file:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>


   
   


   
   



In the previous version I only moved the file gwt.js to my scripts folder. In 
this version I'm moving all the compiled files.

Can anybody help?

Thanks,
Ricardo Saraiva


Esta mensagem (incluindo eventuais ficheiros anexos) pode conter informação 
confidencial ou privilegiada. Se não for o destinatário pretendido, queira por 
favor contactar o remetente por e-mail e apagar a mensagem do seu sistema 
informático. A transmissão de mensagens por e-mail não é absolutamente segura 
ou livre de erros: a mensagem pode ser interceptada, alterada, perdida, 
destruída, chegar ao seu destinatário num momento posterior ao pretendido ou 
alterada, ou ainda com vírus. A AdvanceCare declina qualquer responsabilidade 
por erros ou omissões na presente mensagem que resultem das circunstâncias 
descritas. As opiniões contidas na presente mensagem são imputáveis à pessoa 
que a enviou, a não ser que o contrário resulte expressamente do seu texto e 
que a pessoa em causa tenha poderes para vincular a AdvanceCare.

E-mail transmission cannot be guaranteed to be secure or error-free as 
information could be intercepted, corrupted, lost, destroyed, arrive late or 
incomplete, or contain viruses. AdvanceCare therefore does not accept liability 
for any errors or omissions in the contents of this message which arise as a 
result of e-mail transmission. This message and any files transmitted with it 
may contain confidential information or privileged material. If you are not the 
intended recipient, please notify the sender immediately by e-mail and delete 
this message from your system. Any views expressed in this message are those of 
the individual sender, except where the message states otherwise and the sender 
is authorized to state them to be the views of AdvanceCare.
--
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

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



Re: SuggestBox showing all options on Enter key

2010-06-18 Thread Jaroslav Záruba
Hi

The the code-numbers have been moved to
com.google.gwt.event.dom.client.KeyCodes.

Cheers
  J. Záruba

On Fri, Jun 18, 2010 at 12:27 PM, Rashmi  wrote:

> Thanks Jaroslav.
> I was not able to find a replacement for that deprecated Listener.
>
> On Jun 14, 7:51 pm, Jaroslav Záruba  wrote:
> > /**
> >  * Event listener interface for keyboard events.
> >  *
> >  * @deprecated use {...@link
> com.google.gwt.event.dom.client.KeyDownHandler},
> >  * {...@link com.google.gwt.event.dom.client.KeyUpHandler}
> and/or
> >  * {...@link com.google.gwt.event.dom.client.KeyPressHandler}
> > instead
> >  */
> > @Deprecated
> > public interface KeyboardListener extends EventListener {
> >
> > cheers
> >   JZ
> >
> >
> >
> > On Mon, Jun 14, 2010 at 2:00 PM, Rashmi  wrote:
> > > I need to create a SuggestBox that will show all options on pressing
> > > the Enter key.
> > > I have written the following implementation, and it seems to be
> > > working fine.
> > > I would like someone to review my implementation and let me know if it
> > > will cause problems in any particular scenario.
> >
> > > Also, the SuggestOracle to be passed to this SuggestBox should have
> > > the default suggestions set, by calling the method
> > > setDefaultSuggestions() on MultiWordSuggestOracle.  Any user of my
> > > SuggestBox should be transparent to this fact. Hence I guess I will
> > > need to wrap (or extend) MultiWordSuggestOracle to do the default
> > > suggestions settings. Can you please recommend what will be a good way
> > > of doing this?
> >
> > > public class SuggestBoxWithAllOptions extends SuggestBox implements
> > > KeyPressHandler {
> >
> > >public SuggestBoxWithAllOptions(MultiWordSuggestOracle oracle) {
> > >super(oracle);
> >
> > >this.addKeyPressHandler(this);
> >
> > >}
> >
> > >@Override
> > >public void onKeyPress(KeyPressEvent event) {
> > >char c = event.getCharCode();
> > >int i = this.getText().length();
> > >if (c == KeyboardListener.KEY_ENTER && i == 0) {
> > >/* Since the query string is null, the default
> suggestions
> > > will get listed */
> > >this.showSuggestionList();
> > >}
> >
> > >}
> > > }
> >
> > > /* Code for initializing the SuggestBox */
> > >List suggestions = new ArrayList();
> > >suggestions.add("Tablet");
> > >suggestions.add("Capsule");
> > >MultiWordSuggestOracle myOracle = new
> > > MultiWordSuggestOracle();
> > >myOracle.addAll(suggestions );
> > >myOracle.setDefaultSuggestionsFromText(suggestions);
> >
> > >SuggestBox mySuggest = new
> > > SuggestBoxWithAllOptions(myOracle);
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: SuggestBox showing all options on Enter key

2010-06-18 Thread Rashmi
Thanks Jaroslav.
I was not able to find a replacement for that deprecated Listener.

On Jun 14, 7:51 pm, Jaroslav Záruba  wrote:
> /**
>  * Event listener interface for keyboard events.
>  *
>  * @deprecated use {...@link com.google.gwt.event.dom.client.KeyDownHandler},
>  *             {...@link com.google.gwt.event.dom.client.KeyUpHandler} and/or
>  *             {...@link com.google.gwt.event.dom.client.KeyPressHandler}
> instead
>  */
> @Deprecated
> public interface KeyboardListener extends EventListener {
>
> cheers
>   JZ
>
>
>
> On Mon, Jun 14, 2010 at 2:00 PM, Rashmi  wrote:
> > I need to create a SuggestBox that will show all options on pressing
> > the Enter key.
> > I have written the following implementation, and it seems to be
> > working fine.
> > I would like someone to review my implementation and let me know if it
> > will cause problems in any particular scenario.
>
> > Also, the SuggestOracle to be passed to this SuggestBox should have
> > the default suggestions set, by calling the method
> > setDefaultSuggestions() on MultiWordSuggestOracle.  Any user of my
> > SuggestBox should be transparent to this fact. Hence I guess I will
> > need to wrap (or extend) MultiWordSuggestOracle to do the default
> > suggestions settings. Can you please recommend what will be a good way
> > of doing this?
>
> > public class SuggestBoxWithAllOptions extends SuggestBox implements
> > KeyPressHandler {
>
> >        public SuggestBoxWithAllOptions(MultiWordSuggestOracle oracle) {
> >                super(oracle);
>
> >                this.addKeyPressHandler(this);
>
> >        }
>
> >       �...@override
> >        public void onKeyPress(KeyPressEvent event) {
> >                char c = event.getCharCode();
> >                int i = this.getText().length();
> >        if (c == KeyboardListener.KEY_ENTER && i == 0) {
> >                /* Since the query string is null, the default suggestions
> > will get listed */
> >                this.showSuggestionList();
> >        }
>
> >        }
> > }
>
> > /* Code for initializing the SuggestBox */
> >                List suggestions = new ArrayList();
> >                suggestions.add("Tablet");
> >                suggestions.add("Capsule");
> >                MultiWordSuggestOracle myOracle = new
> > MultiWordSuggestOracle();
> >                myOracle.addAll(suggestions );
> >                myOracle.setDefaultSuggestionsFromText(suggestions);
>
> >                SuggestBox mySuggest = new
> > SuggestBoxWithAllOptions(myOracle);
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

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



Moving to gwt 2.0.3

2010-06-18 Thread Ricardo Manuel Saraiva
Hi,

I'm moving my project to the new version of gwt.

I'm having some problems. It gives me the following error:

"message /zonaReservada/scripts/gwt.Foo/common

description The requested resource (/zonaReservada/scripts/gwt.Foo/common) is 
not available."

I'm using module inheritance. It was working fine in the previous version. Is 
there anything new I have to consider?

Here are the modules:

Common.gwt.xml







Adv.gwt.xml






Foo.gwt.xml








And this is my html file:

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>


   
   


   
   



In the previous version I only moved the file gwt.js to my scripts folder. In 
this version I'm moving all the compiled files.

Can anybody help?

Thanks,
Ricardo Saraiva


Esta mensagem (incluindo eventuais ficheiros anexos) pode conter informa??o 
confidencial ou privilegiada. Se n?o for o destinat?rio pretendido, queira por 
favor contactar o remetente por e-mail e apagar a mensagem do seu sistema 
inform?tico. A transmiss?o de mensagens por e-mail n?o ? absolutamente segura 
ou livre de erros: a mensagem pode ser interceptada, alterada, perdida, 
destru?da, chegar ao seu destinat?rio num momento posterior ao pretendido ou 
alterada, ou ainda com v?rus. A AdvanceCare declina qualquer responsabilidade 
por erros ou omiss?es na presente mensagem que resultem das circunst?ncias 
descritas. As opini?es contidas na presente mensagem s?o imput?veis ? pessoa 
que a enviou, a n?o ser que o contr?rio resulte expressamente do seu texto e 
que a pessoa em causa tenha poderes para vincular a AdvanceCare.

E-mail transmission cannot be guaranteed to be secure or error-free as 
information could be intercepted, corrupted, lost, destroyed, arrive late or 
incomplete, or contain viruses. AdvanceCare therefore does not accept liability 
for any errors or omissions in the contents of this message which arise as a 
result of e-mail transmission. This message and any files transmitted with it 
may contain confidential information or privileged material. If you are not the 
intended recipient, please notify the sender immediately by e-mail and delete 
this message from your system. Any views expressed in this message are those of 
the individual sender, except where the message states otherwise and the sender 
is authorized to state them to be the views of AdvanceCare.

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



Vertical/Horizontal split panel min size?

2010-06-18 Thread Toni
Hello,

Does anyone know whether it is possible or not to set a minimum split
bar position to the Vertical or HorizontalSplitPanel so that the user
cant drag it to the border of the panel? If not, is there a way to do
it?

Cheers!

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