Re: More than one module

2010-06-30 Thread Chris Boertien
This is just a suggestion off the top of my head and may or may not
work as i think it will.

To address your case I would setup 1 Module for the entry point and
use it to choose which of the other Module's to load for the main
page. I think this should allow you to take the most advantage of code
splitting so as not to load any of the data for one page when the
other is chosen.

Something like...
// PageChooserEntryPoint.onModuleLoad()

if(loadPageOne) {
  GWT.runAsync(new AsyncCallback() {
(new PageOneEntryPoint).onModuleLoad();
  });
} else {
  GWT.runAsync(new AsyncCallback() {
(new PageTwoEntryPoint).onModuleLoad();
  });
}

Im not sure if thats the best way to go about it, but its the first
thing that came to mind.

On Wed, Jun 30, 2010 at 7:25 AM, Katharina Probst  wrote:
> See some documentation here:
> http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules
>
> On Tue, Jun 29, 2010 at 11:59 PM, Michael W  wrote:
>>
>> Yes, you can have more than one module.
>> If you use Maven, you can view gwt maven plugin for detail.
>>
>> On Jun 25, 5:27 pm, GWT_AL  wrote:
>> > I need to developer a web application which has more than one main
>> > page layout.
>> > I was wondering how to develop more than one main page in a GWT
>> > application.
>> > Is it possible to have more than one Module in a GWT app (is that the
>> > way to achieve this)?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-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: Creating tr / td's with UiBinder, how?

2010-06-25 Thread Chris Boertien
wrap it with  or 

On Fri, Jun 25, 2010 at 9:22 AM, Andrew Hughes  wrote:
> I want a template that produces a . The following doesn't work, but it's
> what I was hoping for...
> http://dl.google.com/gwt/DTD/xhtml.ent";>
>  xmlns:g="urn:import:com.google.gwt.user.client.ui">
> 
> 
> 
> 
> 
> 
>
> Has anyone worked with 's in this way before? Seems very similar
> to http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Hello_World which
> works with a  bit this just won't work.
>
> Help would be great thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-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: Passing PHP variables to my GWT application

2010-06-25 Thread Chris Boertien
You might want to take a look at this:
http://code.google.com/webtoolkit/doc/latest/tutorial/JSON.html

Although the examples there are using a servlet for the server-side,
that is not a requirement. The server simply needs to be accessible at
the requested URL and output the formatted JSON.

The basic idea is to make a request to the server and have the server
send back the json data structure. You can then eval, or use a js json
parser, and setup Overlay types so you get to use the objects like
regular java objects.

2010/6/24 Jaroslav Záruba :
> I believe the module loads on document's load event, therefore pausing PHP
> does not help indeed.
> You can load the JSON using JsonpRequestBuilder. That means another
> (XHR)request to server. If that's an issue I'd try to output the JSON using
> PHP as you do now, but not into  element. I would hide it within
> the page and afterwards convert that JSON-string into a JS-object in GWT.
> Or you could place the JSON-string into a  element using GWT, tthat
> should fire the addTreeItems-method right away.
> When I needed to load some data from (3rd-party) server I created my
> receiving JS-function and the  element with src-attribute by myself
> in onModuleLoad. It worked. And I guess that's similar to what the
> JsonpRequestBuilder does, but I did not know that class before. I'm quite
> new to GWT.
> That's also kind of disclaimer: I'm not sure whether the above is the best
> and most elegant solution. :)
> On Fri, Jun 25, 2010 at 3:25 AM, barbe...@muohio.edu 
> wrote:
>>
>> Thanks, that makes sense. However, do you have any suggestions on how
>> I might work around it? I want to be able to load all of the data on
>> startup, so I have called the PHP function that calls the javascript
>> function in the  of the .php file. I tried to throw in a PHP
>> sleep to delay the javascript from being called, but the sleep seems
>> to also delay the loading of the module, thus really giving me no
>> benefit. Any other suggestions would be great.
>>
>> On Jun 24, 8:47 pm, Jaroslav Záruba  wrote:
>> > It seems that your  might get evaluated/executed before the
>> > module
>> > has finished loading and therefore your function window.addTreeItem
>> > might
>> > not exist yet.
>> > Several workarounds for that are possible I think.
>> >
>> > On Thu, Jun 24, 2010 at 9:39 PM, barbe...@muohio.edu
>> > wrote:
>> >
>> >
>> >
>> > > Hi everyone,
>> >
>> > > I am faced with a situation in which I must pass variables read in
>> > > from a database table using PHP to my GWT application. I am doing this
>> > > by using PHP to read in the data(which are Strings), and then calling
>> > > a JSNI function from my GWT application like so:
>> >
>> > > $result = mysql_query("SELECT * FROM sampleTreeTable");
>> >
>> > > while($row = mysql_fetch_array($result)) {
>> > >       $temp = $row['treeItem'];
>> > >       echo "

Re: what large apps use GWT?

2010-06-24 Thread Chris Boertien
You can find out if a page is gwt with this

http://gwt-instrumental.googlecode.com/svn-history/r5/latest/index.html

Drag the box into a bookmark and when your on a page, activate that
bookmark and it will give you info about the page. If it shows no
widgets, then its not GWT.. Not that it is foolproof or anything...

On Thu, Jun 24, 2010 at 5:47 AM, Flemming Boller
 wrote:
> Hi
>
> I dont think that GMail is GWT app.
>
>
> /Flemming
> On Thu, Jun 24, 2010 at 1:29 PM, Subhrajyoti Moitra 
> wrote:
>>
>> pentaho BI suite is a GWT product.
>> Wave, GMail .. Google AdSense are all GWT products.
>>
>>
>> On Thu, Jun 24, 2010 at 4:35 AM, mikedshaf...@gmail.com
>>  wrote:
>>>
>>> Here's a link:
>>>
>>> http://gwtgallery.appspot.com/
>>>
>>> and the standard answer I give is "yes, it's suited for large apps".
>>> If your development team is skilled in Java and prefers to write good
>>> Java code rather than Javascript for UI's and you understand how AJAX
>>> (GWT is simply a great way to do AJAX)then it's perfect.
>>>
>>>
>>> On Jun 23, 4:31 pm, "marius.andreiana" 
>>> wrote:
>>> > Hi,
>>> >
>>> > I'm looking to build a case for using GWT for a large app. The back-
>>> > end is not Java.
>>> > Besides Wave, AdWords and Lombardi, what large apps use GWT? (couldn't
>>> > find more in GWT presentations)
>>> >
>>> > Is GWT suited for large apps, eg Facebook?
>>> >
>>> > 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.
>
> --
> You received 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: UIBinder Benefits?

2010-06-23 Thread Chris Boertien
That has to be the most disturbing use of annotations I have ever
seen... on so many levels...

On Wed, Jun 23, 2010 at 11:52 AM, jocke eriksson  wrote:
> Great post!
> Jocke
>
> 2010/6/23 Blessed Geek 
>>
>> Looking at your annotation, I find that I have to learn yet another
>> language.
>> I mean learning the annotation style as a language.
>>
>> UiBinder is in XML and if you are familiar with XML, it's a breeze to
>> understand what's going on.
>>
>> For the many many years doing distributed computing in industrial
>> environment - I find the unfortunate situation that data come in many
>> formats. There are log sheets that each vendor equipment invented with
>> their own respective formats. Frequently, the same equipment maker
>> willy-nilly comes out with a slight variation just because they have a
>> new line of models. Some are text, some are XML. if you do not strive
>> to be familiar with XML, you don't get to work.
>>
>> So, every time I need to write a data loader for a piece of equipment,
>> should I have complained to management - I have to learn another
>> language, sir/maam?
>>
>> Moreover, databases I encountered are of differing schemata of course.
>> Getting familiarized with an XML schema is similar to encountering yet
>> another database schema. I am personally guilty of inventing more
>> database and XML schemata (the plural for schema is schemata,
>> http://h2g2java.blessedgeek.com/2010/03/data-is-already-plural.html)
>> and adding to the plethora of "new languages" people who worked with
>> me had to learn.
>>
>> For those of us who've had the misfortune of having to frequently work
>> with deciphering new XML and database schemata, which in your sense -
>> frequently having to learn new languages, UiBinder comes as natural as
>> mother tongue. So my condolences that you find UiBinder difficult for
>> you due to your less exposure to XML. It is indeed an unfortunate
>> situation that the people who came out with UiBinder did not take into
>> consideration that not all people are familiar with XML or are
>> resonant to data schemata. After all, UiBinder inventors probably made
>> a high presumption that every and any one using GWT has an industrial
>> purpose to using it.
>>
>> Fortunately for me, and to your undue inconvenience  (my apologies
>> again), there must be a lot of programmers out there who are like-
>> minded with me about the convenience of UiBinder due to our
>> inexplicable and mysterious bias towards XML. I think it is safe for
>> me to say that I am representative of those appreciative of UiBinder -
>> that our tacit complain are the following mysteries: Having invented
>> such a wonderous framework,
>>
>> - why did the UiBinder inventors forgot about the need to provide a
>> means to register custorm parsers?
>> - why did they not realise the extreme inconvenience of not being able
>> extend Uibinderable classes properly?
>>
>> Once these two issues are settled - hmmm ... there seems to be no
>> bounds to what my enthusiasm could do with UiBinder.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>
> --
> You received 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: Million access to GWT Appl ??

2010-06-22 Thread Chris Boertien
Your essentially asking the wrong question. I think its better to
think of by how much will GWT or products similar to GWT reduce the
load on a server.

You have to consider the fact that every user accessing a traditional
website backed by a templating engine involves alot of resources for
each and every request for new information.

Take a web forum for example. I think they are probably one of the
least effecient communication mediums and would be very interesting to
see a GWT implementation of one. With the status quo web forum you
have full page loads happening every single time a user wants to move
around on the forum. And if the user wants to see what is new on the
forum... you guessed it, full page load.

Now, if you consider all the ways that having most of the web forum on
the client side and using much more lightweight RPC calls to get new
info (and ONLY new info) there would be quite large improvements. I
wouldnt be suprised if the resource requirement of a GWT based web
forum dropped the load on even the most highly active forums by
upwards of 80%, and probably more if you really took the care to setup
some proper caching. But regardless of how the server resource load
would drop, just the bandwidth drop alone would be a 100% win.

2010/6/21 Jaroslav Záruba :
> On Mon, Jun 21, 2010 at 9:28 PM, rakesh wagh  wrote:
>>
>> If you compare gwt to other js based toolkits, they all behave similar
>> as far as client to server communication is concerned. gwt only makes
>> life simple for the developers.
>
> ...and (with comparably complex UI) makes your JavaScript run faster :)
>>
>> Rakesh Wagh
>>
>> On Jun 19, 7:44 pm, manish kumar  wrote:
>> > Hi, i have gone through many articles on web and found that GWT is not
>> > good for an application that has million users access simultaniouly.
>> > Is that really true? If not then what should i do make it accessible
>> > by million users?Is that really tough job in GWT?
>>
>> --
>> You received 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: MVP Framework in GWT 2.1 M1 ?

2010-06-22 Thread Chris Boertien
The one half of Expenses isnt even MVP. The one you access via
Expenses.html is a hard-wired app. That is the one they were showing
at Google I/O.

The other part, the Scaffold app I believe is what Roo spits out found
under Scaffold.html. I'm not sure as to just how much of that has been
hand tweaked and how much is straight up codegen. Of course, all of
that stuff is still under heavy development.

On Mon, Jun 21, 2010 at 11:00 PM, M Shannon  wrote:
> I've been taking a good look at this 2.1 MVP stuff - and in particular
> the Expenses example (rev 8291)
>
> http://google-web-toolkit.googlecode.com/svn/branches/2.1/bikeshed/src/com/google/gwt/sample/expenses/
>
> I'm certainly not the best developer/architect going round, but I like
> to think I'm pretty good at reading people's existing code/examples
> and adapting/running with them as if they were my own.
> This expenses example is a nightmare to follow.  The bindings/wiring
> of all the pieces both client and server is nuts.
>
> I sure hope Spring Roo can generate an excellent CRUD starter
> application for me based off my domain objects and their
> relationships, cause there is no way in the world I could have come up
> with anything like that application.
>
> I thought hand-crafiting files that comprise a JSF app was difficult,
> but this thing takes the cake. I sure hope the IDE has some new tools
> to support this stuff.
>
>
>
>
>
>
>
>
> On May 27, 11:38 pm, Anton Tanasenko  wrote:
>> Actually, it is on the javadoc page 
>> athttp://google-web-toolkit.googlecode.com/svn/javadoc/2.1/index.html
>> under com.google.gwt.app.place package.
>> It also includes PlaceManager, Activity (presenter) mappings
>>
>> Bikeshed example, though clumpy, sheds plenty of light on how it can
>> be used.
>>
>> On May 27, 3:24 pm, pjulien  wrote:
>>
>> > It exists but the javadoc wasn't included for some reason.  A
>> > presenter is called "Activity".  I'm guessing to make it more familiar
>> > to Android development.
>>
>> > You can see the code for activities and places here:
>>
>> >http://code.google.com/p/google-web-toolkit/source/browse/branches/2
>>
>> > On May 20, 4:44 am, metrixon  wrote:
>>
>> > > I just downloaded the M1 release ofGWT2.1and was wondering where I
>> > > can find more information on the MVP framework that will be part 
>> > > ofGWT2.1.
>> > > I looked around the Javadocs but did not find anything like it. Is the
>> > > MVP framework already part of the M1 release ?
>>
>> > > --
>> > > You received 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: Does a private variable in Java stays private when compiled to javascript?

2010-06-22 Thread Chris Boertien
There is a GWT module you can include that might make life a bit
easier for you. The second link is the authors blog. If you go through
his blog history you'll find references to articles about the module
and how it works.

http://code.google.com/p/gwt-exporter/
http://timepedia.blogspot.com/

On Tue, Jun 22, 2010 at 12:41 AM, Shedokan  wrote:
> I want to allow people to add javascript extensions to my app using an
> API I'll make with GWT, so I don't want them to be able to be able to
> access private variables my app uses.
> The problem is that GWT does symbol obfuscation so there is no way to
> have a list of unallowed variables.
>
> On Jun 19, 5:25 pm, Stefan Bachert  wrote:
>> Hi,
>>
>> I still don't get the need for private var in JavaScript.
>> JavaScript is somewhat the binary for GWT/Java-Code.
>> The use of scopes like "private" is a concept  on "Source code level"
>> not on  "Binary level".
>>
>> When you compile C++ code to object code, the object does no more know
>> about private, protected or public.
>> (I am NOT referencing Java since the concepts are not so separated in
>> this language)
>>
>> Stefan Bacherthttp://gwtworld.de
>>
>> On Jun 19, 3:34 pm, Shedokan  wrote:
>>
>> > I didn't miss his post I just didn't understand what's a linker so I
>> > thought he was talking about something else, either way I don't want
>> > my entire script to be private.
>> > I am trying to make some sort of API to be usable to other scripts on
>> > the page.
>>
>> > On 18 יוני, 19:06, Sripathi Krishnan 
>> > wrote:
>>
>> > > 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.
>
>

-- 
You received 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: Theory behind UiBinder that makes TabLayoutPanel work

2010-06-22 Thread Chris Boertien
I'm only just starting to dive into GWT internals but I believe to do
this you will need to create a Parser for your widget to be recognized
internally by UiBinder.

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

The method error your getting is from the fact that GWT is magically
trying to map the attribute which it has failed to deal with in any
meaningful way to a method in your class which of course doesn't
exist. You'll notice within that parser that barHeight and barUnit are
being consumed by the parser.

And of course the rest of the parser is about dealing with the child
tags that it supports as special.

On Mon, Jun 21, 2010 at 11:05 PM, kornhill  wrote:
> Given the absence of a vertical TabLayoutPanel in GWT, I was trying to
> patch the TabLayoutPanel code in my local space by copying the
> TabLayoutPanel source code and modifying it. However, when I use
> UiBinder to construct my UI, I run into a problem that makes me wonder
> how UiBinder works behind the scene.
>
> First I have my locally modified TabLayoutPanel class, which I name it
> "MyTabLayoutPanel".
> Then I use it in a UiBinder template like this:
> ...
> 
>    
>         ABC
>         This is a test
>    
>   ...
> 
>
> When running the program, I ran into the following issues:
> - "Class MyTabLayoutPanel has no appropriate setBarUnit method... "
> - "tab" not found, obviously UiBinder doesn't recognize the ""
> thing
>
> If I switch "MyTabLayoutPanel" back to the standard "TabLayoutPanel",
> everything works. In fact, to trouble-shoot my problem, I merely copy
> the original GWT TabLayoutPanel to my app code space and rename it
> "MyTabLayoutPanel" without any other modification.
>
> When I look at TabLayoutPanel code, I notice the constructor takes a
> "barUnit" and a "barHeight" as arguments. I wonder why widgets in
> GWT's own SDK do not need to follow the rule of providing an empty
> constructor or using things like "@UiConstructor". Also, if I want to
> natively write my own widget to support things like "",
> "" etc in UiBinder, how should I do it?
>
> Any advices would be highly 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.
>
>

-- 
You received 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: Devmode vs prod performance

2010-06-21 Thread Chris Boertien
In devmode you are running within a JVM, production is running from
the browsers javascript engine.

Your probably getting some big bumps from hotspot if your doing
something with any major calculations, which means those inner loops
are getting optimized a couple of times and are running as asm direct
to the cpu

On Sun, Jun 20, 2010 at 11:36 PM, Eirik Brandtzæg  wrote:
> Hello
> I'm running GWT 2.0.3 and experiencing a performance peak when running
> devmode, and much slower when running prod.
> I add Phys2D as a module jar, then I add a bunch of bodies to the physics
> engine.
> Each "step" in the engine takes about 0-1ms when running devmode, but when I
> build the project and run straight from file
> (or server) each "step" takes up to 25ms.
> When running devmode, is some of the work done outside the browser?
> Thanks
> --
> Eirik Brandtzæg
>
> --
> You received 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: Maven is obfuscating and GWT2.1 should not depend on it

2010-06-20 Thread Chris Boertien
@Blessed Geek

If your serious about starting up a project like your describing I'm
interested in working on it. I have a need for just such a tool and
have been meaning to sit down and actually do some planning for it.
Let me know if you'd like to bounce some ideas around and when is good
for you.

2010/6/20 Jaroslav Záruba :
> 2010/6/14 Matthias Groß 
>>
>> If GWT absorbs these flaws from Maven and Spring it would lose some of
>> its most significant benefits for me, i.e. being slim, effective and
>> easy to use.
>
> Just to make things clear, I hope you're describing your experience with
> Roo, right? Why would GWT "absorb flaws from Maven" then? I'm using GWT2.1m1
> w/o Roo and I don't use/need Maven.
> ???
> In fact, if Roo requires Maven then I'm not interested anymore. I don't want
> to pile bazillion of layers or omni-potent frameworks every time I install
> new version of Eclipse. (Not speaking about potential for things blowing up
> with more "intelligent" sub-systems wired together.)
> I know Roo only from the presentation video and the impression has been
> good, but Maven would be 'deal-breaker'.
>
>> just my $0.02
>>
>> Kind regards
>> Matthias
>>
>> On 7 Jun., 12:49, Thomas Broyer  wrote:
>> > On 6 juin, 22:14, Blessed Geek  wrote:
>> >
>> >
>> >
>> >
>> >
>> > > Maven is great when used as a "more capable Ant", but sucks when used
>> > > for everything else that it has been so far been used for (like
>> > > attempting to create the Universe in 7 days).
>> >
>> > > Maven as a build dependency and testing setup tool is not bad but the
>> > > way it has been misused for everything else so far sucks. Despite any
>> > > enthusiasm anyone else has for Maven as a all-in-one Swiss knife all-
>> > > purpose tool, my personal observation says that Maven is the wrong
>> > > tool to use to perform MVP/MVC building (as well as almost everything
>> > > else).
>> >
>> > > Maven is a good tool to be used in-house within great companies like
>> > > IBM or Google who have some spare change to hire someone to maintain
>> > > the scripts to perform esoteric tasks like MVP/MVC code preparations
>> > > and concoctions but not for small companies or contractors.
>> >
>> > > Therefore, it is a disappointment that GWT 2.1 decided to use Spring
>> > > which has a huge dependency on the abuse of use of Maven.
>> >
>> > > GWT MVP/MVC should get back to the basics of XML XSD, like what
>> > > smartgwt is doing. I am hoping the GWT architects will provide an XML
>> > > XSD client side exposure to ui widgets and provide the specs to it so
>> > > that I could write my own mavenless data-ui binding (for example in
>> > > groovy).
>> >
>> > You are confusing many things:
>> >  1. GWT 2.1 does not "use Spring", it "works with" Spring Roo, in that
>> > Roo generates Java code from server-side code that's suitable for your
>> > GWT client-side; but Roo is only a "helper": you can do the same by
>> > hand (this is an explicitly goal of the system)
>> >  2. What Roo generates has nothing to do with MVP or data-ui binding
>> > but with the RequestFactory which is just a way of performing CRUD
>> > operations on entity objects easily and efficiently (by that I mean
>> > "on the wire", not "in your code"); sure it generates a "scaffold" app
>> > but you're free to build from it or trash it and start from scratch
>> >  3. demos of the Roo/GWT integration never mentionned Maven, so I
>> > think this is either an implementation detail (which I doubt) or just
>> > a way of grabbing all the dependencies, and eventually run Roo as part
>> > of your build process (I don't know, I don't do Maven, and I haven't
>> > looked at Roo –neither do I intend to look at it anytime soon–)
>>
>> --
>> You received 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: Best way to Deserialize JSON String to Java Object

2010-06-19 Thread Chris Boertien
Essentially that's about it. Although you probably want to put them
into a different package. The default Eclipse GWT Project contains a
'shared' package that is for this purpose. Its also by default in your
[project].gwt.xml file with the tag .

Adding those source tags to your gwt.xml file tells GWT that those
classes need to be available client side. Hence why you wont find the
'server' package in that file, as it's server side code only. By
accessing a class in shared from the server side code, it will get
compiled and be available for you.

The rest is all done for you when GWT creates the MyServiceAsync class
which you define the interface for, and within the
RemoteServiceServlet which your Servlet extends.

I think it would be a worthwhile experiment to see if and how much of
a difference there is between using GWT-RPC and using JSON with
Overlay Types.

Just to throw another option into the mix you could roll your own RPC
interface using GWT Generators like GWT does.

While we're on the subject of GWT-RPC, are you locked into using a
Servlet on the server side? Is there some binary format that GWT
converts to for serialization, or is it simply producing a JSON string
and decoding it in RemoteServiceServlet.

2010/6/19 Jose Luis Estrella Campaña :
> Wow, It's amazing to see this forum has so much activity. I feel so
> welcome in here, too bad I can't see my question on the main
> discussions page. :(
>
> Ok, based on your replies, I've now analyzed all the options you've
> given me, and sincerely I now honestly gotta say that it was my own
> lack of GWT knowledge which led me to believe I had to do something
> more complex than necessary. I think
> if I stick with Chris' suggestion I'll be just fine. Now, I still have
> one more fundamental question:
>
> If I use my own classes (POJOs), say like a Person POJO and I create
> it on the .client package of my gwt application. Is that ALL I gotta
> do in order to work with it between the client and the server ? I mean
> sending it from the client to the RemoteServiceService Impl.
>
> If that's not all that I should do to work with my personal classes,
> could you please tell me what else is required ? I'm still confused
> with the  thing. or wheter a personal class should be
> defined on the client as well as in the server side. I just would like
> to know.
>
> Best Regards, and thanks everyone for the kind replies !.
>
> Jose.
>
> On Jun 19, 10:09 am, "Dean S. Jones"  wrote:
>> This is not totally true, gwt-rpc is OK for most data transfers, but
>> it causes a bit of overhead in deserialization. GWT's client side JSON
>> library is SLOW,
>> it constructs a parallel data structure of concrete types on parse,
>> upfront, and by default uses eval('''), which isn't always the best or
>> fastest way to go.
>>
>> Since your asking the JSON data-structure "isArray()", etc, most of
>> the time, I find lazy evaluation to be much faster. Also, you can
>> tweak your custom deserializer to use the JSON
>> native parser if it is available.
>>
>> On Jun 18, 2:14 pm, Gal Dolber  wrote:
>>
>>
>>
>> > 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 d

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()" func

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

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: Best way to Deserialize JSON String to Java Object

2010-06-17 Thread 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-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: AsyncCallback - returning values to enclosing block

2010-06-17 Thread Chris Boertien
What you want to do is have some method in the caller that is waiting
for the result that the callback can call once the data is retrieved.
So you would make the getUser() method return type void and, if the
class defining that method is the same as the one calling that method,
add another method handleUser(String s) which will be called from
within onSuccess.

Some examples : http://pastebin.com/t8aMbPq3



On Thu, Jun 17, 2010 at 1:51 AM, Joost Bloemsma
 wrote:
> Yep,
>
> I tried it too, but my wife didn't get the beer!!!
>
> On 16 jun, 15:07, Magnus  wrote:
>> Hi,
>>
>> thanks, the mechanism is still too new for me. Now, after debugging
>> exactly what Thomas said (the return val was empty), I understand it.
>>
>> So one can never just fetch something from the server while being in a
>> process where the server's result is needed.
>>
>> Good example! :-)
>>
>> Magnus
>>
>> On 16 Jun., 14:52, aditya sanas <007aditya.b...@gmail.com> wrote:
>>
>> > LOL Thomas.[?]
>>
>> > That was great example to determine async calls.
>>
>> > anyway what you are saying is right.
>>
>> > Its a bad design to have a method which returns something and then make
>> > async call which
>>
>> > changes the state of some variable.
>>
>> > --
>> > Aditya
>>
>> > On Wed, Jun 16, 2010 at 6:13 PM, Thomas Broyer  wrote:
>>
>> > > On Jun 16, 1:09 pm, Magnus  wrote:
>> > > > Hi,
>>
>> > > > because I cannot access a variable in the enclosing block from within
>> > > > an AsyncCallback method I found the following workaround with a class
>> > > > global variable, which I find very unpretty. How can one do this
>> > > > better?
>>
>> > > What is it that you don't understand in "asynchronous"?
>>
>> > > I mean, your getUsr call will *always* end after the "return
>> > > tmp_str_usr" statement. So, on the first call and until the server
>> > > responds and you AsyncCallback is called, you'll get the empty string
>> > > (initial value of the field); then AsyncCallback will change its
>> > > value, and on all subsequent calls until the server responds to the
>> > > new requests (and AsyncCallback will be called again) you'll get that
>> > > value.
>>
>> > > When you ask your wife to get you some beer, the beer won't be there
>> > > until your wife come back from the kitchen; and while she's gone, the
>> > > football match isn't paused and life continues.
>>
>> > > --
>> > > You received 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.
>>
>> >  360.gif
>> > < 1 KBAnzeigenHerunterladen- Zitierten Text ausblenden -
>>
>> > - Zitierten Text anzeigen -
>>
>>
>
> --
> You received 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: SplitLayoutPanel - initial split between top and bottom panel

2010-06-14 Thread Chris Boertien
The size element for SplitLayoutPanel is in PX or pixels. So your
essentially making the north panel 2px in size. According to the
javadoc, this is hardcoded, so you cant specifiy EM or PCT

On Sun, Jun 13, 2010 at 5:17 PM, pac  wrote:
> Thanks for your reply Stefan.
> As such I do not have height for north and center panel, but I did try
> a style for both panels  and tried to make their size half of split
> panel i.e. 300px, but did not work. And half & half I really do not
> need, as long as both panels are visible, at the moment center panel
> starts from top and so north is not visible at all initially. Below is
> rough idea of code what I have at the moment. thanks for your time.
>
> 
>        .splitPnl {
>                text-align: left;
>                width: 925px;
>                height: 600px;
>        }
>
>        .header {
>                background: #d0e4f6;
>        }
>
>        .table {
>                table-layout: fixed;
>                cursor: pointer;
>                cursor: hand;
>                width: 100%;
>        }
>
>        .body {
>                line-height: 150%;
>                padding: 20px 40px 20px 10px;
>                font-family: 'Times New Roman', Times, serif;
>        }
>
> 
>
>
>
> 
>        
>                
>                        
>                                
>                                         styleName='{style.header}'
>                                                cellSpacing='0' 
> cellPadding='0'>
>                                        
>                                
>
>                                
>                                        
>                                                 styleName='{style.table}' cellSpacing='0'
> cellPadding='0' />
>                                        
>                                
>                        
>                
>
>                
>                        
>                                 ui:field='messageBody'
>                                        wordWrap='true' />
>                        
>                
>        
> 
>
> On Jun 13, 4:20 pm, Stefan Bachert  wrote:
>> Hi,
>>
>> you did not supplied code. However, I guess, the panel is initially
>> smaller then north and center panel together.
>> To check just use setPixelSize with large values e.g.
>> setPixelSize(1000, 1000)
>>
>> I afraid, probably the is no easy way to set half and half.
>> Because you need to know the total height of the SplitLayoutPanel
>> which is NOT the sum of both member panels.
>>
>> Stefan Bacherthttp://gwtworld.de
>>
>> On Jun 12, 11:25 pm, "parvez.chau...@gmail.com"
>>
>>  wrote:
>> > I am trying to use SplitLayoutPanel, everything seems to be working
>> > fine, except that on initial start, center panel (bottom panel) covers
>> > the north panel (top panel) completely.
>> > I have to use split bar to bring it down, I must be missing some
>> > property, any suggestion what should I do so that initially both
>> > panels are split half & half?
>> > 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.