Re: UIBinder Benefits?

2010-06-21 Thread Tristan
One key benefit I realized recently is having another developer come
in and style up the application. No need for anything but opening
UiBinder files and adding some css in different places, hitting
refresh and seeing how it looks. No need to understand framework used,
any logic code, nothing. That's pretty cool.

On Jun 21, 9:46 am, Sripathi Krishnan 
wrote:
> I think I disagree with you on almost all points. I have been using UIBinder
> much before GWT2.0 was officially released, and I think to use GWT
> straight-from-trunk to leverage UIBinder was the best architectural decision
> we made.
>
> a further language. No way to debug it
>
> Its the language of the web. If you are building websites, you ought to know
> html. There is no escaping that fact. And because it is HTML, debugging
> layout problems is just a matter of pulling out tools like firebug and the
> like.
>
> limited to a set of widgets
>
> .. but you are free to develop and use your own widgets. Besides, you have
> the full power of HTML. And, when it comes to widgets, its GWT in general
> which is poor; it has nothing to do with UiBinder. I mean, there are only
> 4-5 widgets that are supported by GWT but not by UIBinder.
>
> it is a graphic designer mindset (we do this app, the app is our concern)
>
> >  not a developer mindset (we do this class of apps, we separate
> > concerns). no clear separation, no SoC. A big bunch of widgets and
> > css-styles.
>
> It actually is the best possible separation of concerns. Graphic designer
> works on the *.ui.xml - its just html, so he doesn't need to learn anything
> new. The developer works on the corresponding *.java file - he doesn't care
> about the layout or styling information. Both teams make changes almost
> independently, and its best utilization of each teams skills.
>
> When you watch the video with Ray Rian (gwt wave, discussion) you clearly
>
> > read between the lines that he doesn't like UiBinder, too.
>
> Er, no. I certainly didn't read such a message.
>
>  But how often you will create a html-structure? In a good design this will
>
> > rarely happen.
>
> I find myself creating or changing HTML a lot frequently than changing the
> logic. Again, as I said, you are building for the browser, and there just
> isn't a way to escape HTML. Embrace html, and you will surely be a lot more
> productive.
>
> And performance is one but not the only design goal.
>
> Agree that performance is not the only goal. But when you make a
> web-application (think gmail) that will not be refreshed/reloaded for long
> time periods, you cannot afford to perform DOM manipulations all the time.
> innerHTML is order of magnitudes faster than corresponding dom insertions..
>
> --Sri
>
> On 21 June 2010 19:47, Stefan Bachert  wrote:
>
>
>
>
>
> > Hi,
>
> > I don't use UiBinder in general. It may be nice for some hacks.
>
> > UiBinder has a lot of problems
> > * a further language. No way to debug it
> > * limited to a set of widgets
> > * it is a graphic designer mindset (we do this app, the app is our
> > concern)  not a developer mindset (we do this class of apps, we
> > separate concerns)
> > * no clear separation, no SoC. A big bunch of widgets and css-styles.
> > * no separation of theme/skin
>
> > When you watch the video with Ray Rian (gwt wave, discussion) you
> > clearly read between the lines that he doesn't like UiBinder, too.
>
> > The only advantage I see, it is faster to create a fragment of HTML
> > code than to build it via java/javascript code. But how often you will
> > create a html-structure? In a good design this will rarely happen.
> > And performance is one but the only design goal.
>
> > Stefan Bachert
> >http://gwtworld.de
>
> > On Jun 21, 3:23 am, spierce7  wrote:
> > > Does using the UI Binder provide any benefits? I watched some of the I/
> > > O conference, and it seemed like they made reference that the UI
> > > Binder using the browsers native rendering engine (or something like
> > > that), and it being a lot faster, but they didn't really specify
> > > whether that was the layout panels, or using the ui binder.
>
> > > What are the benefits to using the UIBinder, and where can I learn to
> > > use it?
>
> > --
> > You received 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.
>
> > I think the decision to build from gwt trunk was the best architectural
>
> decision we took

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

Re: History and server call.

2010-06-17 Thread Tristan Slominski
cation for Mobile or new
web look create ur view again. This is what MVP gives.



Basically i am quite excited about using this new MVP archt. and
History and event bus(I Love Eventbus, it solves me lot of things and
long chains of async calls and also it gives me opportunity to make
client side calls asynch(i.e. if i find that data is present in cache
then i raise the event and view/presenter handler will be called in
async was as if server has returned)

happy coding guys.
Feel free to comment.


Thanks,
Ravi.














On Jun 17, 1:45 pm, Tristan Slominski 
wrote:

> here's an example i wrote that walks through place service, hope that
helps
> with place service c...
> 2010/6/17 Jaroslav Záruba 

>
>
>
> > I searched too but have found only this:
>
> >http://code.google.com/p/google-web-toolkit/source/browse/branches/2
> > <http://code.google.com/p/google-web-toolkit/source/browse/branches/2...
.>It

> > seems to be missing in 2.1 m1 yet.
>

> > On Thu, Jun 17, 2010 at 12:30 PM, Ravi Sharma 
wrote:
>
> >> Hi Thomas,
> >...
> >> google-web-toolkit+unsubscr...@googlegroups.com

> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-web-tool...
> > google-web-toolkit+unsubscr...@googlegroups.com

> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit...

-- 
You received 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: Access ClientBundle ImageResource from UiBinder

2010-06-17 Thread Tristan
Thanks for taking the time to share your findings. It's a good clear
example / starting point for understanding the plumbing.

On Jun 17, 2:15 pm, CJ Bilkins  wrote:
> It seems my guess that you could store images outside of the directory
> is wrong.  Because ui:image's field name is the image filename, the
> images can only be stored in the same directory as the ui.xml file.
>
> On Jun 17, 12:55 pm, CJ Bilkins  wrote:
>
>
>
> > I've succeeded in getting sprites to work via uibinder though it
> > doesn't seem possible to get it to work how you'd like (or arguably at
> > all).
>
> > I looked high and low for a complete working example and couldn't find
> > one, so I'm going to try to be as verbose as possible in the hope that
> > you and future searchers can save hours of their life...
>
> > My .ui.xml file
> > ==
>
> > http://dl.google.com/gwt/DTD/xhtml.ent";>
> >  >     xmlns:g='urn:import:com.google.gwt.user.client.ui'>
>
> > 
> > 
> > 
> > 
> >         @sprite .hdrAlign {
> >                 gwt-image: "lbl_align";
> >         }
>
> >         @sprite .hdrWidth {
> >                 gwt-image: "lbl_width";
> >         }
> > 
>
> > 
> > 
> > 
> > 
>
> > === End ui.xml ===
>
> > MyResources.class
> > ===
>
> > package com.sub;
>
> > import com.google.gwt.core.client.GWT;
> > import com.google.gwt.resources.client.ClientBundle;
> > import com.google.gwt.resources.client.ImageResource;
>
> > public interface MyResources extends ClientBundle {
> >         public static final MyResources INSTANCE =
> > GWT.create(MyResources.class);
>
> > /*
> > The @Source path has a huge gotcha... from what I can tell, the file
> > paths must exist in the location specified relative to this file, but
> > ALSO in the location relative to your .ui.xml
>
> > This was my problem.  I was storing my .ui.xml in a ./directory/ and
> > then this clientbundle in ./directory/sub/ along with the image
> > files.  The only way I could get it to work was to have the images
> > exist in both ./directory and ./directory/sub
>
> > I'm guessing you could avoid these dupe images by putting MyResources
> > in ./directory and then reference the images in ./directory/sub, but I
> > didn't test it.
> > */
> >         @Source("lbl_align.png")
> >         ImageResource label_Align();
>
> >         @Source("lbl_width.png")
> >         ImageResource label_Width();
>
> > }
>
> > === End MyResources.class ===
>
> > Things to consider:
>
> > After doing this the first time in Eclipse, I was getting errors about
> > my uibinder code.  Specifically, that dupe references to lbl_align
> > existed. (Even though they were called lbl_align and lbl_width.)    It
> > took some playing with the code (just deleting parts and retyping
> > them, adding returns here and there above and below, before the errors
> > disappeared.  Note: I didn't actually change any code.)
>
> > As someone else noted (I believe in the linked post above), GWT seems
> > to use the field name to retrieve the image (which makes it just about
> > useless).  Trying to change:
> > 
>
> > To:
> > 
>
> > Results in an error that the resource could not be
> > found.. .. .. ... which means that your field="" needs to be the
> > name of the file (Use underscores and not hyphens in your filenames).
> > It seems that resource="" is completely ignored and I'm not sure what
> > the purpose of having a ClientBundle is.
>
> > When running in hosted mode, your background images will show up as
> > inline base64 encoded data and not as sprites.  The sprite assembling
> > seems to occur on build.
>
> > So far, my experiences with GWT have been that it makes my code more
> > complex, adds tons of extra time to development, and is buggy.  =]  I
> > would not recommend it to my enemies.  Maybe in a few years all this
> > will get sorted out.
>
> > On Jun 10, 1:27 pm, David Grant  wrote:
>
> > > The other solution which seems to work is that I can put
>
> > > @sprite .header {
> > >           gwt-image: 'myimage';
> > >      }
>
> > > in a css file and reference it as a CssResource in a ClientBundle...then 
> > > it
> > > will look for an image resource called 'myimage' in that ClientBundle.
>
> > > it works but it just puts stuff in to the css file associated with my 
> > > global
> > > theme that I would rather just keep local to my widget.
>
> > > Dave
>
> > > On Thu, Jun 10, 2010 at 9:41 AM, David Grant  wrote:
> > > > Has anyone succeeded in using @sprite  {gwt-image: ...} in a
> > > > uibinder file to access an image in a ClientBundle?
>
> > > > I've tried the following which Chris Ramsdale at Google claimed would 
> > > > workbut
> > > >  it doesn't:
>
> > > > 
> > > > 
> > > > 
> > > >     �...@sprite .header {
> > > >           gwt-image: 'myimage';
> > > >      }
> > > > 
>
> > > > I can't use  because I definitely can't put a 
> > > > hard-coded
> > > > path there because it needs change if the user change

Re: MVP questions

2010-06-17 Thread Tristan
I'd do it the second way, for reasons Olivier pointed out.

On Jun 17, 3:08 am, Olivier Monaco  wrote:
> Hi,
>
> Depending on the "size" of object2, I will use a dedicated presenter
> or not. Commonly, I like to have a dedicated one so I can easily reuse
> it, extends it... and, more important, I have more encapsulation,
> reducing the complexity of my code.
>
> Olivier
>
> On 16 juin, 17:20, Bilousme  wrote:
>
>
>
> > Hello all,
>
> > I need some help to check if my design I choose is correct.
> > Imagine I have a data model like that :
> >  - An object1 containing a list of many object2
>
> > Imagine now I want that my screen displays info of object1 and the
> > list of object2 inside a tabpanel. When you click on a tab, you
> > display the info of the selected object2.
>
> > What is the best way to implement that ?
> > 1) only one couple of presenter/view for object1 and this couple
> > manages the display of object2 in each tab
> > 2) one presenter/view object for object1 and one presenter/view for
> > each instance of object2 ?
>
> > in other words, do I have one couple of presenter/view by object
> > model ?

-- 
You received 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-17 Thread Tristan Slominski
here's an example i wrote that walks through place service, hope that helps
with place service concepts. note that I got feedback that two types of
place events that i implemented here are not necessary and that one would be
sufficient, but i haven't had the time to refactor yet. it should however
capture the essence of what a place service does. I too am waiting for 2.1
to settle and see where Google wants to go with that, in the mean time this
is a production system description:

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

2010/6/17 Jaroslav Záruba 

> I searched too but have found only this:
>
> http://code.google.com/p/google-web-toolkit/source/browse/branches/2.1/bikeshed/src/com/google/gwt/app/place/
> <http://code.google.com/p/google-web-toolkit/source/browse/branches/2.1/bikeshed/src/com/google/gwt/app/place/>It
> seems to be missing in 2.1 m1 yet.
>
>
> On Thu, Jun 17, 2010 at 12:30 PM, Ravi Sharma  wrote:
>
>> Hi Thomas,
>> I checked this URL
>> http://code.google.com/webtoolkit/doc/latest/ReleaseNotes.html,
>> for GWT 2.1 but didnt find much information about Activities. Is it
>> explained somewhere else. Can you share such info/link so i can look
>> into it dont reinvent everything. I am about to start implementing
>> "switch view only when ready" pattern but if its present in 2.1 then i
>> would love to use it instead of writing my own.
>>
>> Thanks,
>> Ravi.
>>
>> On Jun 17, 10:59 am, Thomas Broyer  wrote:
>> > On 16 juin, 15:31, Tristan  wrote:
>> >
>> > > sounds like you're reinventing the place service, with event bus, with
>> > > local cache rpc service, but doing it in a new, innovative, complex
>> > > and if the code grows on you perhaps unintelligible way. if you're the
>> > > only one who will support this ever, that may work. otherwise i would
>> > > seriously look into a bunch of mvp-like frameworks out there and look
>> > > at how place services/managers, local caches, and event buses are
>> > > implemented. you don't need to use the framework, but the concepts are
>> > > very helpful to organize the code. they're straightforward and most
>> > > people understand the design.
>> >
>> > Sure Ravi is "reinventing" the "place service" here. Sure he should
>> > move its "cache" to a "local cache rpc service". But the main issue
>> > with his code is that he has a "synchronous method" which has to do
>> > something "asynchronous".
>> >
>> > Now, most "place services & MVP" implementations I've seen don't use
>> > the "switch view only when ready" pattern. The "activities" coming
>> > into GWT 2.1 do that however.
>>
>> --
>> You received 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: GWT, servlet, JSP and datastore

2010-06-17 Thread Tristan Slominski
hey there, my work is on app engine so i don't have an example you
requested, but probably someone else in the community does.

On Thu, Jun 17, 2010 at 06:06, kensai yanesha wrote:

> Tristan maybe you could help me, do you have any completed Eclipse
> project with grid connected to database? I would thank you if you
> could provide me such thing to learn more. I am on dead point. We will
> use only stored procedures for communication with database and I am
> not able to find any rich subject related to this over net.
>
> Our application will run finally on intranet, so in our case there is
> no possibility of using online google app engine, altough I already
> tried to use it and it worked well.
>
> Thank you
>
>
> On 9 čvn, 18:32, Tristan Slominski 
> wrote:
> > @kensai
> >
> > If you look at Google App Engine, the datastore is part of Google's
> > free-to-start cloud hosting service.
> >
> > On Wed, Jun 9, 2010 at 02:56, kensai yanesha  >wrote:
> >
> > > Hi Laurent,
> >
> > > I am also new to GWT, also fascinated :-). I also already went trough
> > > samples and tutorials and well stopped at the point how to bind
> > > components to, in my case, database table in Oracle database. I don't
> > > know what do you mean exactly by "Google datastore" but I think you
> > > mean the Datastore class in GWT framework.
> >
> > > Even GWT is very good for creating nice GUI on the client side, it's
> > > object-relational mapping is still in incubation period and you
> > > following options how to proceed:
> > > 1.) You need to manually write the functions which manipulate with
> > > data  on the server side and call it via AJAX (JavaScript) from the
> > > client side when necessary.
> > > 2.) Look at EoD SQL project athttp://eodsql.sourceforge.net/this
> > > library may help you, there are also tutorials how to use it together
> > > with GWT
> > > 3.) This is the easiest, free for trial then payed, option. Use
> > > SmartGWT Professional or Enterprise. Take a look at it
> > >http://code.google.com/p/smartgwt/. It has integrated tomcat inside.
> > > In the SDK there are lot of examples and tutorials, but also something
> > > what you will find maybe really useful:
> > > Datasource generator - generate XML DS descriptional file, works with
> > > standard database engines, etc.
> > > Visual designer - you can create client layouts in visual way, in this
> > > tool you are also able to use for example Datagrid directly with
> > > Datasource you created in generator, and you have component directly
> > > interacting with any datasource.
> >
> > > I found SmartGWT SDK best for learning, as standard GWT, you have
> > > access to all Java, XML files, but from Visual designer you also
> > > generate JSP file and can see what have you created.
> >
> > > Hope I helped you. Also send me your experiences I you already found
> > > something better, different.
> >
> > > Best regards,
> >
> > > Kensai
> > > On Jun 8, 11:08 am, laurentleb  wrote:
> > > > To the GWT community,
> >
> > > > I am pretty new to GWT but familiar with n-tiers application
> > > > development. I find GWT fascinating to develop rich web applications
> > > > and went through the tutorial. This is amazingly simple to achieve.
> >
> > > > On the other side, I tested also Google app Engine to develop and
> > > > deploy a JSP/servlet + datastore testing app. Once again, it is
> really
> > > > efficient.
> >
> > > > My question is : how can I combine these two approaches to build nice
> > > > applications on the client side with efficient business java code on
> > > > the server side and data storing in Google datastore ?
> >
> > > > Are there some guidelines ? Is there a policy ?
> >
> > > > Thank you in advance for your help.
> >
> > > > Laurent
> >
> > > --
> > > You received 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 AdSense work with GWT? If so, How?

2010-06-16 Thread Tristan
http://code.google.com/apis/afa/

On Jun 15, 1:29 am, Joe Blow  wrote:
> I'm looking at using this framework for a new project, but I need to
> have the AdSense functionality.
>
> 1 - Does AdSense work with GWT?
>
> 2 - If so, how?  I see a whole bunch of hacks that 'might' work, but I
> need something more stable than that.
>
> This is really a deal breaker for us...if AdSense does not work with
> GWT, then we can't use GWT.
>
> Thanks for any 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.



Re: History and server call.

2010-06-16 Thread Tristan
sounds like you're reinventing the place service, with event bus, with
local cache rpc service, but doing it in a new, innovative, complex
and if the code grows on you perhaps unintelligible way. if you're the
only one who will support this ever, that may work. otherwise i would
seriously look into a bunch of mvp-like frameworks out there and look
at how place services/managers, local caches, and event buses are
implemented. you don't need to use the framework, but the concepts are
very helpful to organize the code. they're straightforward and most
people understand the design.

On Jun 16, 5:46 am, Thomas Broyer  wrote:
> On Jun 16, 3:52 am, Sky  wrote:
>
>
>
>
>
> > Well, I don't know about the event bus and I have yet to watch that
> > GWT best practices video (but I really should!) and I haven't done MVP
> > with GWT, BUT I'm super creative so here's what I would do with your
> > situation! :D
>
> > I would have an object that is rather more aware of the all
> > recoverPanelFromHistory async actions going on. This object would
> > store a copy of each other object that is performing the
> > recoverPanelFromHistory for a specific panel. (in other words a list
> > of objects that have the method(s) controlling all that async
> > goodness) The code inside recoverPanelFromHistory() that does the
> > async data retrieval from the server would talk back to this object,
> > which is the "owner". It tells the Owner that it's finished getting
> > the data (even when it already had the data cached). Every time the
> > owner gets told that one of it's "subjects" finished getting data it
> > checks to see if that was the last "subject" to get it's data, and if
> > so it talks to the mainContentPanel and gets it to do it's view change
> > (clear and add). Inside the recoverPanelFromHistory code you can do
> > your repeatedly trying to obtain the data and even if you don't get
> > the data until a day later when the user finally reconnects your code
> > will be able to continue on no prob.
>
> > Did that make sense? It makes sense in my head, so if it doesn't make
> > perfect sense to you ask me to clarify things and I'll do my best!
>
> Totally makes sense. In other words: make recoverPanelFromHistory
> async, with a callback passed as an argument rather than returning a
> value; and if data is cached, then just use the callback synchronously
> (of call it from a Scheduler.scheduleFinally if it makes you nervous
> to have your async call actually be synchronous)

-- 
You received 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: layout problems with positioning or aligning content

2010-06-11 Thread Tristan Slominski
it was just a rough example.. not the exact code

here's a production code that centers content in the center of the page
vertically and horizontally

  

  

  <  content that's centered here >

On Fri, Jun 11, 2010 at 06:58, Magnus  wrote:

> Hi,
>
> your example does not work for me.
>
> 
>
> This means AFAIK that the content of the VerticalPanel are aligned
> within the VerticalPanel, but not the VerticalPanel itself.
> Also it does not align vertically...
>
> Magnus
>
>
> On 11 Jun., 09:40, Tristan Slominski 
> wrote:
> > I don't understand how UiBinder cannot be used to do what you describe.
> You
> > may have to create multiple views (for example "fileMenuView") that you
> > attach when the user clicks on "File" in the menu. But that
> "fileMenuView"
> > could be fully described in UiBinder.  how it is attached probably won't
> be
> > done in UiBinder but it's just one dynamic part of it...   I haven't
> looked
> > into the menu widget too much, but that itself can probably do some of
> that
> > declaratively
> >
> > centering a form is as easy as centering some panels
> >
> > 
> >   
> > ...
> >etc..
> >
> > I use UiBinder and I have centered forms, popups, menus, etc
> >
> > it's possible.. but remember it's a tool.. you may not be able to declare
> > where the menu should be attached, but you can declare the menu itself in
> > the uibinder. use what works best for each purpose.
> >
> > On Tue, Jun 8, 2010 at 12:13, Magnus 
> wrote:
> > > I would like a menubar, and whenever a menu item is selected, I would
> > > like to show a panel.
> >
> > > The screen should have a north, west, east and south section, and in
> > > the center the current panel should be shown.
> >
> > > For example, if the user selects "create account", a form should be
> > > shown to enter the data for a new account.
> >
> > > And I would like the form to be centered within the middle space...
> >
> > > Magnus
> >
> > > On Jun 8, 5:48 pm, Tristan Slominski 
> > > wrote:
> > > > What do you mean by "dynamically generated"? Are you setting styles
> and
> > > > widths programmatically? What's the use case?
> >
> > > > On Tue, Jun 8, 2010 at 10:45, Magnus 
> > > wrote:
> > > > > Hi fmod,
> >
> > > > > I am thinking about your advice using UIbinder, but I think I
> cannot
> > > > > use it, because my layout is dynamically generated. I think that
> the
> > > > > declarative way using UIbinder is for fixed panels like forms,
> isn't
> > > > > it?
> >
> > > > > 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.
> >
> > > --
> > > You received 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: layout problems with positioning or aligning content

2010-06-11 Thread Tristan Slominski
I don't understand how UiBinder cannot be used to do what you describe. You
may have to create multiple views (for example "fileMenuView") that you
attach when the user clicks on "File" in the menu. But that "fileMenuView"
could be fully described in UiBinder.  how it is attached probably won't be
done in UiBinder but it's just one dynamic part of it...   I haven't looked
into the menu widget too much, but that itself can probably do some of that
declaratively

centering a form is as easy as centering some panels


  
...
   etc..

I use UiBinder and I have centered forms, popups, menus, etc

it's possible.. but remember it's a tool.. you may not be able to declare
where the menu should be attached, but you can declare the menu itself in
the uibinder. use what works best for each purpose.



On Tue, Jun 8, 2010 at 12:13, Magnus  wrote:

> I would like a menubar, and whenever a menu item is selected, I would
> like to show a panel.
>
> The screen should have a north, west, east and south section, and in
> the center the current panel should be shown.
>
> For example, if the user selects "create account", a form should be
> shown to enter the data for a new account.
>
> And I would like the form to be centered within the middle space...
>
> Magnus
>
> On Jun 8, 5:48 pm, Tristan Slominski 
> wrote:
> > What do you mean by "dynamically generated"? Are you setting styles and
> > widths programmatically? What's the use case?
> >
> > On Tue, Jun 8, 2010 at 10:45, Magnus 
> wrote:
> > > Hi fmod,
> >
> > > I am thinking about your advice using UIbinder, but I think I cannot
> > > use it, because my layout is dynamically generated. I think that the
> > > declarative way using UIbinder is for fixed panels like forms, isn't
> > > it?
> >
> > > 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.
>
> --
> You received 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: GWT, servlet, JSP and datastore

2010-06-09 Thread Tristan Slominski
@kensai

If you look at Google App Engine, the datastore is part of Google's
free-to-start cloud hosting service.

On Wed, Jun 9, 2010 at 02:56, kensai yanesha wrote:

> Hi Laurent,
>
> I am also new to GWT, also fascinated :-). I also already went trough
> samples and tutorials and well stopped at the point how to bind
> components to, in my case, database table in Oracle database. I don't
> know what do you mean exactly by "Google datastore" but I think you
> mean the Datastore class in GWT framework.
>
> Even GWT is very good for creating nice GUI on the client side, it's
> object-relational mapping is still in incubation period and you
> following options how to proceed:
> 1.) You need to manually write the functions which manipulate with
> data  on the server side and call it via AJAX (JavaScript) from the
> client side when necessary.
> 2.) Look at EoD SQL project at http://eodsql.sourceforge.net/ this
> library may help you, there are also tutorials how to use it together
> with GWT
> 3.) This is the easiest, free for trial then payed, option. Use
> SmartGWT Professional or Enterprise. Take a look at it
> http://code.google.com/p/smartgwt/. It has integrated tomcat inside.
> In the SDK there are lot of examples and tutorials, but also something
> what you will find maybe really useful:
> Datasource generator - generate XML DS descriptional file, works with
> standard database engines, etc.
> Visual designer - you can create client layouts in visual way, in this
> tool you are also able to use for example Datagrid directly with
> Datasource you created in generator, and you have component directly
> interacting with any datasource.
>
> I found SmartGWT SDK best for learning, as standard GWT, you have
> access to all Java, XML files, but from Visual designer you also
> generate JSP file and can see what have you created.
>
> Hope I helped you. Also send me your experiences I you already found
> something better, different.
>
> Best regards,
>
> Kensai
> On Jun 8, 11:08 am, laurentleb  wrote:
> > To the GWT community,
> >
> > I am pretty new to GWT but familiar with n-tiers application
> > development. I find GWT fascinating to develop rich web applications
> > and went through the tutorial. This is amazingly simple to achieve.
> >
> > On the other side, I tested also Google app Engine to develop and
> > deploy a JSP/servlet + datastore testing app. Once again, it is really
> > efficient.
> >
> > My question is : how can I combine these two approaches to build nice
> > applications on the client side with efficient business java code on
> > the server side and data storing in Google datastore ?
> >
> > Are there some guidelines ? Is there a policy ?
> >
> > Thank you in advance for your help.
> >
> > Laurent
>
> --
> You received 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: GWT, servlet, JSP and datastore

2010-06-09 Thread Tristan
if you develop with eclipse, in your starter project pick GWT and App
Engine, and it will set up a basic GWT / App Engine project. That's
the basic wiring required, (it uses RPC, it's convenient but not a
must). As to guidelines... that's a huge topic... suggest browse the
Google App Engine for Java and this forum and learn about all the
frameworks out there.

On Jun 8, 4:08 am, laurentleb  wrote:
> To the GWT community,
>
> I am pretty new to GWT but familiar with n-tiers application
> development. I find GWT fascinating to develop rich web applications
> and went through the tutorial. This is amazingly simple to achieve.
>
> On the other side, I tested also Google app Engine to develop and
> deploy a JSP/servlet + datastore testing app. Once again, it is really
> efficient.
>
> My question is : how can I combine these two approaches to build nice
> applications on the client side with efficient business java code on
> the server side and data storing in Google datastore ?
>
> Are there some guidelines ? Is there a policy ?
>
> Thank you in advance for your help.
>
> Laurent

-- 
You received 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: layout problems with positioning or aligning content

2010-06-08 Thread Tristan Slominski
What do you mean by "dynamically generated"? Are you setting styles and
widths programmatically? What's the use case?

On Tue, Jun 8, 2010 at 10:45, Magnus  wrote:

> Hi fmod,
>
> I am thinking about your advice using UIbinder, but I think I cannot
> use it, because my layout is dynamically generated. I think that the
> declarative way using UIbinder is for fixed panels like forms, isn't
> it?
>
> 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.
>
>

-- 
You received 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: problem with RequestBuilder

2010-06-08 Thread Tristan
take a look here

http://www.google.com/url?sa=D&q=http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html

On Jun 8, 12:06 am, Alex  wrote:
> what should i use to make such a request?
> i have tried com.google.gwt.xhr.client.XMLHttpRequest, but the status
> code i get is 0.
>
> On Jun 8, 4:26 am, Sripathi Krishnan 
> wrote:
>
>
>
> > It seems you are making a cross-domain request.  In general, you cannot use
> > RequestBuilder to make cross domain calls.
>
> > --Sri
>
> > On 7 June 2010 23:39, Alex  wrote:
>
> > > im getting empty string from response.getText()
> > > and response.getStatusText() give OK
>
> > > must the response from the server be in xml?
> > > must the data i send be in xml?
>
> > > im working on a google wave gadget.
> > > im trying to send a http POST to a web service which i have no control
> > > of.
> > > the data im sending is in plain text and the data im expecting is in
> > > plain text.
>
> > > --
> > > You received 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.



Re: An example Place Service(Activity Manager) implementation maintains complex dependency between presenters in MVP

2010-06-07 Thread Tristan
Hey,

So I'd still like to understand what you're describing better. Perhaps
you could take a look at this and provide some commentary on how your
approach differs? Perhaps contribute a change? (source code comments
are enabled).  http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

Tristan

On Jun 6, 8:53 pm, Jiang Zhu  wrote:
> Thanks for your reply and suggestions.
>
> To answer your questions, I also found out that in most of time
> providing the place to a Presenter looks redundant. I designed the
> interface like that because I was thinking a Presenter might serve
> more than one type of Place, I'm still not clear about this point
> though.
>
> With my implementation i'm instantiating all the presenters using GIN
> and use a separate GIN module (or within constructor of Presenter) to
> call Place Binder to bind the presenter instance with a Place. Sorry
> the last part of my post is a bit confusing, it's not source code or
> generate code, I wrote them to show what happened in side place
> service when navigate, consider them as System.out.

-- 
You received 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: layout problems with positioning or aligning content

2010-06-07 Thread Tristan
Short of designing the layout for you it's hard to give "hints".
fmod's hint is a good one though, because you'll run into that quickly
doing the layout you want.  Here's a starting point, in particular,
take a look at the source code that goes with the various widget to
build an intuition around how things work and then check out the
UiBinder tutorial to get on board with the latest best practice of
doing it.

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

On Jun 7, 4:31 am, Magnus  wrote:
> Hello,
>
> is there really no advice for me? Or is something wrong with my
> question?
>
> Sorry, but this is the only group for GWT I know and I really would
> like to get started with it. But if the result looks awful, it doesn't
> make fun.
>
> I started thinking about a workaround with fixed pixel sizes, but I
> thought, the promise of GWT is to get away from such workarounds...
>
> Please consider giving me just a small hint. I would be thankful for
> each one...
>
> Thank you
> Magnus
>
> On 6 Jun., 16:33, Magnus  wrote:
>
>
>
> > The link:http://h1403230.stratoserver.net/apache2-default/tmp/gwt-layout.png

-- 
You received 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: Outlook style textbox

2010-06-07 Thread Tristan
You should be able to do something like this with a model backing up
the widgets.

Essentially you have a text box that people type into.
Then you add a handler for onBlur()... this would trigger to parse the
text box contents into multiple email addresses that get saved in some
model object that's probably a list of email addresses.
Another thing that happens with onBlur(), is that the text box becomes
hidden and is replaced by an Anchor widget with a mailto: link
populated with the first address and a "+" image.
Then "+" image onClick would convert the entire model object list into
a list of displayed Anchors.

So yes, it should be possible, the key will be parsing email addresses
I think and having an efficient model object behind the widgets doing
all this.

Tristan

On Jun 6, 3:51 am, Praveen Kumar  wrote:
> Hi All,
>
> I need to create a text box which can take input and once it looses
> focus it converts that text to a clickable link with image too. And
> still the user should be able to input more if he wants.
> This functionality is similar to Outlook "To" textbox where when you
> type a distibution list it converts itself into a clickable link with
> a plus sign with it, when you click the plus sign it expands the
> distribution list.
> Is this kind of text box at all possible with GWT.
>
> Please help.
> Thanks a lot 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.



Re: Large scale application development and MVP -- Developing composite screens with a menu and main view

2010-06-07 Thread Tristan
Hey there,

It seems like Google guys are currently in transition as to how to do
MVP. Integration with Roo as well as new ideas about production level
frameworks sort of muddle the issue for now and as stated by GWT guys
themselves, aren't quite figured all out yet. If you haven't seen the
I/O video on this yet:

http://code.google.com/events/io/2010/sessions/architecting-production-gwt.html

One of the ways to do it is to have parent activities (what presenters
are now called). But I think that is frowned upon because there's an
argument out there that presenters/activities should be independent of
each other.

Having said that, what I've done in the past is linked the presenters
and view a little bit, so that the presenter knows about child
presenters and views. Then what I essentially had was a Page Presenter
coupled with a Page VIew. Page Presenter has Child Presenters that
would be the Left Menu Presenter, Content Presenter, Footer Presenter,
each one of them coupled with Left Menu View, Content View, and Footer
View. Page Presenter would then bind the view by asking each of its
child presenters to give the view corresponding to the current place,
and the pass that view to the Page View to put in the proper spots on
the page.

The above works for pretty much anything I can think of doing with the
web app. I am really curious to hear how others solved this problem. I
think there is a loose analog between what I consider Page Presenter
and Activity Manager.

Cheers

On Jun 5, 5:32 pm, Kevin  wrote:
> I am new to GWT, and I took a look through the "Large scale
> application development and MVP" tutorial, and I was wondering how to
> deal with a UI that contains distinct parts that are composited
> together. For example:
>
> * Application contains a menu on the left, a main view in the middle
> which can show several different screens, and a view on the bottom of
> the screen
>
> How should this be done? How should one wire the presenters together?
> Should this logic be in the app controller? The app controller already
> takes care of the transitions from one view to the next, so perhaps it
> can also take care of how the views should be composited? The issue I
> have with this is that this seems to be a presentation-specific
> detail, but there doesn't seem to be a clean way to put this logic
> elsewhere.
>
> Does anyone have any examples or something that describes how to
> approach this? I would prefer something that sticks to plain GWT, as I
> am learning GWT at the same time and "black-magic" APIs that hide the
> details from you will only confuse me :)
>
> 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: SimplePager with UiBinder

2010-06-05 Thread Tristan
looks like SimplePager requires a constructor argument

public SimplePager(PagingListView view) {
FlowPanel p = new FlowPanel();
p.add(prevPageButton = makeButton("Previous Page", "PREV"));
p.add(nextPageButton = makeButton("Next Page", "NEXT"));
p.add(remove5Button = makeButton("Remove 5 rows", "REM5"));
p.add(remove1Button = makeButton("Remove row", "REM1"));
p.add(makeButton("Add row", "ADD1"));
p.add(makeButton("Add 5 rows", "ADD5"));
p.add(infoLabel = new Label(""));
initWidget(p);

this.view = view;
view.setPager(this);
  }

On Jun 4, 8:43 pm, Chris  wrote:
> Hello,
>
> I'm trying to get a CellTable example working with the UiBinder, and
> I'm getting the following error:
>
> [ERROR] [tree]  missing required
> attribute(s): location view Element 
> (PeopleWidget.ui.xml:9)
>
> Here's my ui.xml:
>
>      xmlns:g='urn:import:com.google.gwt.user.client.ui'
>     xmlns:h='urn:import:com.google.gwt.user.cellview.client'>
>
>     
>         
>         
>         
>         
>     
>
> 
>
> The error makes it look like I'm missing an attribute in my
> SimplePager definition, but I'm not sure what it would be.  Anyone
> have any ideas?
>
> Thanks,
> Chris

-- 
You received 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: An example Place Service(Activity Manager) implementation maintains complex dependency between presenters in MVP

2010-06-05 Thread Tristan
> For the places need to carry a parameter, it'll need to be defined as
> a class instead of enum.

The other effect of having your places as enums is that they cannot be
extended. So if you provide a framework, people are stuck with the
places you define as enums. I had a similar enum extension problem and
ended up having to use classes throughout.

like fmod mentioned, I'd like to see an example application with a
walkthrough. i'm curious to see how this binding concept works out in
practice.

-- 
You received 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: RichTextToolbar in Uibinder

2010-06-04 Thread Tristan
Ok,

taking a look at the RichTextArea in showcase
http://gwt.google.com/samples/Showcase/Showcase.html#!CwRichText
it looks like in order to get the toolbar you need to use
RichTextToolbar and give it the area.

// Create the text area and toolbar
RichTextArea area = new RichTextArea();
area.ensureDebugId("cwRichText-area");
area.setSize("100%", "14em");
RichTextToolbar toolbar = new RichTextToolbar(area);
toolbar.ensureDebugId("cwRichText-toolbar");
toolbar.setWidth("100%");

As one widget will require another one, this will probably help:

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

Cheers!

Tristan

On Jun 3, 9:13 am, krz  wrote:
> I need RichTextArea for my TextPresenter
>
> I have an interface TextPresenter, and TextPresenterImp.java as its
> implementation:
>
> public class TextPresenterImp extends BasePresenter
> implements TextPresenter{
>
>         @Inject
>     public TextPresenterImp(EventBus eventBus, Display display) {
>         super(eventBus, display);
>     }
>
>     @Override
>         public void bind() {
>                 super.bind();
>
>         }
>
> I also have a TextWidget.java what extends Composite and implements
> Display, and there knows the objects in TextWidget.ui.xml
> Now it looks like this:
>
> public class TextWidget extends Composite implements Display{
>
>         private static TextWidgetUiBinder uiBinder =
> GWT.create(TextWidgetUiBinder.class);
>
>         @UiTemplate("ui/TextWidget.ui.xml")
>         interface TextWidgetUiBinder extends UiBinder {
>         }
>
>         @UiField RichTextArea textInputField;
>
>         public TextWidget() {
>                 initWidget(uiBinder.createAndBindUi(this));
>
>         }
>
>         public HasHTML getEnteredText() {
>                 return this.textInputField;
>         }
>
>         public Widget asWidget() {
>                 return this;
>         }
>
> }
>
> And my TextWidget.ui.xml looks like this:
>
> http://dl.google.com/gwt/DTD/xhtml.ent";>
>          xmlns:g="urn:import:com.google.gwt.user.client.ui">
>         
>                 
>         
> 
>
> The problem is that if TextWidget is shown, it only has the text input
> fielt, but no text formation toolbar
>
> big thanx for any help
> On 3 Jun., 08:47, Tristan  wrote:
>
>
>
> > you're going to have to be more specific. There are many ways of
> > hooking up MVP and UiBinder together, what way are you using?
>
> > Where are you putting your RichTextArea? What do your presenters and
> > views look like and how are they wired together?
>
> > On Jun 2, 3:19 pm, krz  wrote:
>
> > > Hello,
>
> > > For my programm i use MVP, and UIbinder for drawing the GUI. i wanted
> > > to create an RichTextArea with the toolbar ( richTextToolbar), i spend
> > > now 2 hours trying things out, im totaly frustrated, and dont know how
> > > to do it... can anyone help 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.



Re: How do you connect to External RPC Service? In other words, can you expose RPC services to outside world by sharing only client/shared pieces?

2010-06-03 Thread Tristan
also this might help:

http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html

On Jun 2, 11:58 pm, Sripathi Krishnan 
wrote:
> Its not a GWT limitation, its a browser restriction - Same Origin Policy.
>
> There are ways to workaround the limitation. In your case, you can setup a
> proxy server to forward the requests from one domain to another. Apache
> mod_proxy can help you with this.
>
> For example, suppose you 
> havehttp://rpc.example.com/MyRpcServiceandhttp://UI.AnotherExample.com/. You 
> can setup Apache to forward requests 
> fromhttp://UI.AnotherExample.com/services/*to rpc.example.com. Then, you'd
> configure your RPC client to send requests to "../services/MyRpcService".
> Since the browser is sending the request to the same domain, everything
> works fine.
>
> It works well (we have our production systems working that way), but I don't
> recommend using it unless you have run out of options.
>
> --Sri
>
> On 1 June 2010 11:35, Umesh Adtani  wrote:
>
>
>
> > I have a RPC servlet that I would like to make available to other GWT
> > application developers.  The problem that I currently see is that
> > GWT.create() requires the service to be
> > deployed on the same host where the GWT application is deployed.
> > There is no way to do something like
> > GWT.create(,) to
> > create the handle to the service.
>
> > From client's perspective, this means that if your GWT application
> > talks to multiple RPC services hosted on various different hosts, then
> > there is no way to talk to those services even if you have shared and
> > client code-base (containing interfaces, asyncs etc) available to you
> > in some form of jar files.  Is there a way to get this working in
> > current GWT versions?
>
> > --
> > You received 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.



Re: Feedback on "Large scale app development MVP article"

2010-06-03 Thread Tristan Slominski
maybe it's that I expect too much MVPness from an MVP framework? as you
pointed out, the data widgets are pretty much the MVC observer pattern that
uses Request Factory to get it's stuff. From the programmer's perspective i
would argue that a data widget has nothing to do with MVP (not as i look at
it as a programmer and how it fits as a component into my application). it's
not a bad thing in itself, but when I'm writing a large application, then
this is where complexity begins...  now I have some MVP things, ok, let's
add some data widgets that talk directly to things.. ok, let's tie my data
directly to JPA representation on the server... and viola, I have a
datastore viewer in GWT. Sort of missing the point of a rich web application
I think.

On Thu, Jun 3, 2010 at 10:53, Thomas Broyer  wrote:

>
>
> On 3 juin, 17:15, Tristan Slominski 
> wrote:
> > i think at this point we should all probably see
> >
> > http://code.google.com/events/io/2010/sessions/architecting-productio...
> >
> > and see what they're trying to do there. Seems like Google decided the
> MVP
> > approach is obsolete, which might muddle the issue.
>
> Not at all, on the contrary!
> It however clarify things about how Google sees MVP in GWT.
> They're even adding some MVP "framework" to GWT 2.1 (IsWidget and
> Activities, where an Activity is more or less your presenter, from
> what I understood).
> RequestFactory on the other hand is a new thing for efficient CRUD
> operations on entity objects, which plugs more-or-less directly into
> the new Data widgets. Those widgets do blur the line a bit, but
> they're not really about presentation "logic", and they're somehow MVP-
> based themselves.
>
> >
> >
> >
> > On Thu, Jun 3, 2010 at 09:26, Thomas Broyer  wrote:
> >
> > > On 2 juin, 20:43, nogridbag  wrote:
> > > > Mainly because of habit - I always try to avoid mixing UI related
> code
> > > > with client/server code.  IMHO, it seems similar to doing RPC calls
> in
> > > > a controller or view in MVC which I think is a big no-no.
> >
> > > > Sticking with the article example, let's say you have two places
> where
> > > > you want to display contacts.  The data is the same, but the views
> may
> > > > be completely different and thus you may want different presenters.
> >
> > > > So now you have:
> > > > ContactsModel
> > > > ContactsPresenter
> > > > ContactsView
> >
> > > > ContactsPresenter2
> > > > ContactsView2
> >
> > > > You already have the RPC call to load and initialize the
> ContactsModel
> > > > in ContactsPresenter. Do you simply duplicate this in
> > > > ContactsPresenter2 or does ContactsPresenter2 have a dependency on
> > > > ContactsPresenter?
> >
> > > > Anyway, I'm really just thinking out loud here ;)  I haven't sat down
> > > > and coded any thing with MVP yet.  If this is the accepted practice I
> > > > will probably do it this way too.
> >
> > > How about using some client-side cache, so that when your second
> > > presenter asks for the same data as the first one, you don't send a
> > > request on the wire (have a look at Ray Ryan's I/O 2009 talk:
> >
> > >http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPr.
> ..
> > > )
> > > Your presenters don't have to know there's some caching involved
> > > though, as long as the service instance is injected into the
> > > presenter, you can pass a "right to the wire" implementation (a direct
> > > GWT.create() on your service interface) or a "through cache"
> > > implementation.
> >
> > > If you want your views to be somehow "synchronized" (when one
> > > presenter makes a request, the other is informed, at least when the
> > > response comes back), then fire some events on the event bus (again,
> > > this would be implemented in your service, not in the presenters
> > > themselves).
> >
> > > Again, MVP as used in GWT (at least as promoted by Google) has mainly
> > > three goals:
> > >  - making unit tests possible in "pure Java" (no browser, or browser-
> > > emulation, involved), which reduces testing time drastically!
> > >  - decoupling things a bit so you could use different views for a
> > > single "presentation logic" (let's say a desktop view that presents
> > > data in c

Re: How to add new event to HandlerManager

2010-06-03 Thread Tristan Slominski
@Thomas  haha... wow... now looking at it in the morning i see what you're
pointing out. I didn't even realize it was KeyPressEvent :)

On Thu, Jun 3, 2010 at 09:39, Thomas Broyer  wrote:

>
>
> On 31 mai, 20:54, justint  wrote:
> > Hi,  I'm fairly new to GWT and I'm trying to add events to my
> > "eventBus"...
> >
> > final HandlerManager eventBus = new HandlerManager(null);
> > ..
> >
> > eventBus.addHandler(RequestEvent.TYPE, new
> RequestEvent.Handler() {
> > public void onRequestEvent(RequestEvent
> requestEvent) {
> > if (requestEvent.getState() ==
> State.SENT) {
> > System.out.println("RPC sent!");
> > }
> > }
> > });
> >
> > This RequestEvent event works fine, but this doesn't work for
> > instance...or at least I don't think it works:
> > eventBus.addHandler(KeyPressEvent.getType(), new
> KeyPressHandler()
> > {
> > public void onKeyPress(KeyPressEvent arg0) {
> > System.out.println("Key pressed event!");
> > }
> > });
> >
> > Any tips are greatly appreciated!
>
> Are you *really* firing KeyPressEvents on your event bus ?!
>
> @Tristan: getAssociatedType and getType return the same object,
> getAssociatedType is not static though, it's part of the GwtEvent
> interface (and used by the HandlerManager to find back corresponding
> handlers in its internal registry).
>
> --
> You received 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: Feedback on "Large scale app development MVP article"

2010-06-03 Thread Tristan Slominski
i think at this point we should all probably see

http://code.google.com/events/io/2010/sessions/architecting-production-gwt.html

and see what they're trying to do there. Seems like Google decided the MVP
approach is obsolete, which might muddle the issue.

On Thu, Jun 3, 2010 at 09:26, Thomas Broyer  wrote:

>
>
> On 2 juin, 20:43, nogridbag  wrote:
> > Mainly because of habit - I always try to avoid mixing UI related code
> > with client/server code.  IMHO, it seems similar to doing RPC calls in
> > a controller or view in MVC which I think is a big no-no.
> >
> > Sticking with the article example, let's say you have two places where
> > you want to display contacts.  The data is the same, but the views may
> > be completely different and thus you may want different presenters.
> >
> > So now you have:
> > ContactsModel
> > ContactsPresenter
> > ContactsView
> >
> > ContactsPresenter2
> > ContactsView2
> >
> > You already have the RPC call to load and initialize the ContactsModel
> > in ContactsPresenter. Do you simply duplicate this in
> > ContactsPresenter2 or does ContactsPresenter2 have a dependency on
> > ContactsPresenter?
> >
> > Anyway, I'm really just thinking out loud here ;)  I haven't sat down
> > and coded any thing with MVP yet.  If this is the accepted practice I
> > will probably do it this way too.
>
> How about using some client-side cache, so that when your second
> presenter asks for the same data as the first one, you don't send a
> request on the wire (have a look at Ray Ryan's I/O 2009 talk:
>
> http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html
> )
> Your presenters don't have to know there's some caching involved
> though, as long as the service instance is injected into the
> presenter, you can pass a "right to the wire" implementation (a direct
> GWT.create() on your service interface) or a "through cache"
> implementation.
>
> If you want your views to be somehow "synchronized" (when one
> presenter makes a request, the other is informed, at least when the
> response comes back), then fire some events on the event bus (again,
> this would be implemented in your service, not in the presenters
> themselves).
>
> Again, MVP as used in GWT (at least as promoted by Google) has mainly
> three goals:
>  - making unit tests possible in "pure Java" (no browser, or browser-
> emulation, involved), which reduces testing time drastically!
>  - decoupling things a bit so you could use different views for a
> single "presentation logic" (let's say a desktop view that presents
> data in columns, and a mobile view that uses a taller single-column
> screen)
>  - presenters a lightweight compared to views, so instead of
> "resetting" your presenter with some new data, just throw it away,
> create a new one with the new data, and "attach" it to the very same
> view.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-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: GWT Design Problem

2010-06-03 Thread Tristan Slominski
I for one don't want to write any more xml in my life than I have to. I
prefer my history service written in Java with auto completion, etc...
that's why I use Guice over other DI frameworks. I think your argument is
for declarative history service, which I could get behind. But the
particular xml implementation of it, yuck.

On Thu, Jun 3, 2010 at 07:06, Nathan Wells  wrote:

> I would suggest watching Ray Ryan's videos on architecture from Google
> I/O 2009 and 2010. That couple of hours will help you understand how
> to solve a lot of your architecture/design problems.
>
> On Jun 3, 4:22 am, ping2ravi  wrote:
> > This post i am not asking a problem but suggesting a feature request
> > for GWT.
> > 
> >
> > Now history stuff is working well, except few things(Basic GWT issue/
> > feature, because of its nature of converting java into javascript at
> > the time of compilation and the classes it supports in .client
> > packages).
> >
> > I have declared the ValueChangeHandler but then in that code i need to
> > check one or more particular param, lets say page and then i write
> > 5-10 if then else statement to call my proper handlers.
> >
> > say if page=main, then call com.my.MainPanel.loadFromHistory(params)
> > say if page=editData1, then call
> > com.my.EditData1Panel.loadFromHistory(params)
> > say if page=editData2, then call
> > com.my.EditData2Panel.loadFromHistory(params)
> > say if page=showData1, then call
> > com.my.ShowData1Panel.loadFromHistory(params)
> > say if page=showData2, then call
> > com.my.ShowData2Panel.loadFromHistory(params)
> > etc etc
> >
> > In Spring/MVC architect we have seen that we don't need to write such
> > ifs as DispatchServlet can read our xml and call our handlers
> > depending on xml content(url-handler mappings). In Spring it was
> > implemented using Reflection which cant be used in GWT as there are no
> > JAVA classes at run time, its all javascript. Understandable.No
> > argument over it but its still solvable.
> >
> > We should not forget the javascript is loosely coupled language and
> > implementing such things(Reflection) should not be a big
> > hassle.Reflection makes Java loosely coupled at compile time(ofcourse
> > wrong types will create problem at runtime)
> >
> > Solution :
> >
> > We already have UIBinders where GWT compiler reads the xml and
> > generate proper java script. Why cant we have something like for
> > History(say HistoryBinder.xml) and i should be able to define some xml
> > like
> > 
> >   
> > 
> > 
> >  
> > 
> >
> > And all handlers can implement a Interface like
> > public interface HistoryHandler{
> > public handleHsitory(Map params, any other param which
> > is required)
> >
> > }
> >
> > and at compile time, compiler will check each class mentioned in this
> > xml and generate error if anything wrong with class else generate the
> > proper code behind the scene as lots of If then else(Compiler writers
> > cant use Reflection for generated scriptts too :) )
> >
> > and then GWT can call our proper handler whenever history event occurs
> > and we will never have to implement ValueChangeHandler.And GWT will
> > also take care of converting our history tokens into proper hashmap
> > like structure or any other key-value pair structure.
> >
> >  This will make code writing much easier, more understandable, makes
> > Developer's life bit easier. And i am sure it will add value to GWT.
> >
> > Thanks,
> > Ravi
> >
> > On Jun 2, 8:13 pm, Frederic Conrotte 
> > wrote:
> >
> >
> >
> > > Hello
> >
> > > You should check this book:http://apress.com/book/view/9781590599853
> >
> > > And the associated website:http://code.google.com/p/tocollege-net/
> >
> > > It mix both HTML/Freemarker templates with GWT modules.
> >
> > > Fred
> >
> > > On 1 juin, 18:02, ping2ravi  wrote:
> >
> > > > Hi All,
> > > > I am trying to create a website and stuck with confusion over whether
> > > > to use GWT for presentation or JSP based framework like Spring MVC. I
> > > > want UI to be very user friendly,faster etc and this is possible with
> > > > GWT. But following problem comes with GWT
> >
> > > > 1) Book marking of any page. As GWT is suppose to be one url
> > > > application and everything should come under it. But how i will solve
> > > > the problem if i have a site like Facebook, where url can be for User
> > > > profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
> > > > etc. I can solve it by using one html and keeping everything as
> > > > params(i.e. /myapp.htm?type=profile&id=1) but then i feel its not how
> > > > GWT should be used or is this the only way i will be able to use it.
> >
> > > > 2) Not searchable by Search Engines. Search engine can not see what
> > > > the content is as it always comes through RPC calls.
> >
> > > > 3) Implementing History is Overhead, if i fix the issue 1
> >
> > > > 4) Its not possibkle to mix jsps and GWT. I tried but GWT css start

Re: How to change the CSS Caption part of gwt-DialobBox

2010-06-03 Thread Tristan
had the same problem...

someone showed me how to use UiBinder to solve it

http://groups.google.com/group/google-web-toolkit/browse_thread/thread/b3c0e7038841e727/8d31c665c0902c73

not sure how it translates to doing it programmatically, but here's
the pattern in UiBinder


  @external .Caption;
  .whateverNameYouWant .Caption {
color: pink;
  }




because UiBinder obfuscates css class ".whateverNameYouWant" will
become a hash class  'c43SgH' or whatnot, but because you specified
@external .Caption, ".Caption" will not be obfuscated.. so in html,
when your style will be applied it will be something akin to:

   but it'll be the "Caption" that you
defined which will overwrite the .gwt-DialogBox .Caption

hope that makes sense

On May 30, 7:52 pm, koolootoomba  wrote:
> Hello
>
> How can I override the css class '.gwt-DialobBox .Caption' to use
> 'cursor: move' instead of 'cursor: default'?
>
> I want to do this to make it more obvious to the user that they can
> drag the DialogBox. To do this, I want to change the appearance of the
> cursor.
>
> Notice that one must grab the caption part of the DialogBox in order
> to drag it. That's why I need to modify '.gwt-DialobBox .Caption' and
> not '.gwt-DialobBox'.
>
> Now normally I know I can define my own css class in MyProject.css and
> then write code like myDialogBox.setStyleName("myCustomCssClass"). But
> here the problem is that I need to reach the .Caption part of '.gwt-
> DialobBox .Caption'. So how does the setStyleName method work in a
> case like this? Apparently, I cannot do things like
> myDialogBox.setStyleName("myCustomCssClass .Caption").
>
> So how can I modify the .Caption part of '.gwt-DialobBox .Caption'?
>
> 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: Authentication and login

2010-06-03 Thread Tristan
i don't think you missed anything. i haven't seen a ready-made
solution and had to write my own.

btw.. your steps seem to be missing something, because anyone can log
into your application. by login functionality do you mean retaining
session? or actually creating an account and getting authentication?

On May 31, 8:46 am, Kasper Hansen  wrote:
> Hi,
>
> Im wondering what's the best way to do a login functionality. I'm
> using GWT and GAE, and I can't use openID or Google Accounts (my app
> relies on phonenumber + pincode).
>
> I've built a Composite with the two boxes and a button for logging in,
> and on the server I would normally store a flag in the session that
> the user is logged in. However, when someone kicks the server, the
> user has to log in again, which is a pain, so session-only coding is a
> no-go.
>
> What's the best way to do this ? I can of course code everything myself, like
>
> 1) verify that the user exists
> 2) hash the pin + the time
> 3) store the time and the hash in the db and set the flag in session
> 4) encapsulate all server commands, so that the hash is being re-sent
> (by db lookup), if (for some reason) the server has been kicked and
> the session lost, or navigate to the login composite, if the hash has
> expired
>
> It just seems like a lot of work, for something that should be
> standard. What have I missed in the docs ??
>
> 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: About a multi page web application

2010-06-03 Thread Tristan
there are lots of way to do this.

first there are a lot frameworks that use MVP (GWTP comes to mind,
handlebars which is my own plug, and bunch of others), but it's a lot
of work to learn.

for what you're doing perhaps you should consider using jsp's and then
embed GWT where you need to.  so if you want to keep it really simple,
think html or jsp's using GWT for some of the widgets. if you want to
start getting complicated, then take a look at all the frameworks
available and let GWT control everything.

as to how to build it.. it could be nothing more than login being your
landing page, and on successful login you just call
Window.Location.assign("url/to/your/interface"); or something similar
(naturally you'd want to make sure that any requests to url/to/your/
interface were part of an authorized session).

On Jun 1, 4:16 am, MaveriK  wrote:
> Hi everyone.
>
> I'm new in GWT, i've just begun to use GWT a couple of week ago.
> My goal is to create a web app that shows a login page, and after the
> log-in shows an interface where the user can interact with the system
>
> So i was wondering if i need need a multi-page web app, or instead a
> single-page switching the visibility of widgets on/off.
> I though the first was the best solution as i don't have lots widgets
> to manage in one page, but i can't fine a way to make multi-page web
> app in GWT...
> I read some posts from GWT discussion but i couldn't find out how to
> do it.
> Could someone help me out?
>
> Tnx in adv

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



Re: How to add new event to HandlerManager

2010-06-02 Thread Tristan
Looks like you're getting the wrong type from KeyPressEvent.  Javadoc
says:

getAssociatedType()
  Returns the type used to register this event.

getType()
  Gets the event type associated with key press events.

for registering, you should use getAssociatedType(), so try

eventBus.addHandler(KeyPressEvent.getAssociatedType(), 

On May 31, 1:54 pm, justint  wrote:
> Hi,  I'm fairly new to GWT and I'm trying to add events to my
> "eventBus"...
>
> final HandlerManager eventBus = new HandlerManager(null);
> ..
>
>                 eventBus.addHandler(RequestEvent.TYPE, new 
> RequestEvent.Handler() {
>                         public void onRequestEvent(RequestEvent requestEvent) 
> {
>                                 if (requestEvent.getState() == State.SENT) {
>                                         System.out.println("RPC sent!");
>                                 }
>                         }
>                 });
>
> This RequestEvent event works fine, but this doesn't work for
> instance...or at least I don't think it works:
>                 eventBus.addHandler(KeyPressEvent.getType(), new 
> KeyPressHandler()
> {
>                         public void onKeyPress(KeyPressEvent arg0) {
>                                 System.out.println("Key pressed event!");
>                         }
>                 });
>
> Any tips are greatly appreciated!

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

2010-06-02 Thread Tristan
this is a different problem, but it goes into how events are hooked up
together. pay attention to the handlers, check out the Place Providers
and how the events are registered with an EventBus (which is just an
extension of EventHandler). I hope it helps:

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

some of the wiki references classes from source, which are available
in that project.

On Jun 2, 10:23 am, Ciarán  wrote:
> Hey I have a problem getting my head around how custom GWT event
> Handlers work. I have read quite a bit about the topic and it still is
> some what foggy. I have read threads on Stackoverflow like this 
> onehttp://stackoverflow.com/questions/998621/gwt-custom-event-handlerbut
> still some what lost .Could someone explain it in an applied mannar
> such as the following.
>
> I have 2 classes a block and a man class. When the man collides with
> the block the man fires an event ( onCollision() ) and then the block
> class listens for that event.
>
> 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: RichTextToolbar in Uibinder

2010-06-02 Thread Tristan
you're going to have to be more specific. There are many ways of
hooking up MVP and UiBinder together, what way are you using?

Where are you putting your RichTextArea? What do your presenters and
views look like and how are they wired together?

On Jun 2, 3:19 pm, krz  wrote:
> Hello,
>
> For my programm i use MVP, and UIbinder for drawing the GUI. i wanted
> to create an RichTextArea with the toolbar ( richTextToolbar), i spend
> now 2 hours trying things out, im totaly frustrated, and dont know how
> to do it... can anyone help 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.



Re: Prompt Message Box in View

2010-06-02 Thread Tristan
what about:

1. user clicks "add new item"
2. presenter does onAddNewItem() and calls getView().showNamePrompt()
3. user types in the name to name prompt and click "save"
4. presenter does onSave() and calls getView().getName()

this keeps it separate yes?

On Jun 2, 1:46 pm, Spring  wrote:
> Hello,
> When using the MVP pattern, how should I display alerts or message
> boxes prompting the user for information? For example, the user clicks
> a button to add a new item and I prompt for the name. Where should
> this prompt happen? In the View class? In the Presenter? The presenter
> is where I have added the listener and the prompt should happen when
> the user clicks the add button. I could do this in the presenter, when
> the listener is triggered, but I do not wish to have UI elements in
> the Presenter. The new name obtained from the prompt needs to be
> passed back to the presenter.

-- 
You received 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: Feedback on "Large scale app development MVP article"

2010-06-02 Thread Tristan
I don't like having two presenters either. I'm not quite sure that's
what's required. My presenters have an adapter parameter, so one
presenter can be coupled with different views depending on what
adapter is selected. Then, depending if it's a listAdapter,
editAdapter, displayAdapter, the same DTO is given to the appropriate
view to display itself.

The big benefits of presenter design really revolve around fast tests.
That was clearly a design choice. On the other hand, if you take a
look at the new Roo and GWT 2.1 integration, I think the waters get
muddled as I *think* they advertise not needing all the layering and
the approach not being a pure MVP from what I understand. So it
doesn't seem like a hard fast rule, but I've found the pattern very
useful and it greatly simplified my development. There is only one
method that does important things in my presenter (not taking into
account refactoring methods out of course). So if logic breaks, I know
where it is and I have fast unit tests for it. Everything else is
declarative boiler plate.

On Jun 2, 1:43 pm, nogridbag  wrote:
> Mainly because of habit - I always try to avoid mixing UI related code
> with client/server code.  IMHO, it seems similar to doing RPC calls in
> a controller or view in MVC which I think is a big no-no.
>
> Sticking with the article example, let's say you have two places where
> you want to display contacts.  The data is the same, but the views may
> be completely different and thus you may want different presenters.
>
> So now you have:
> ContactsModel
> ContactsPresenter
> ContactsView
>
> ContactsPresenter2
> ContactsView2
>
> You already have the RPC call to load and initialize the ContactsModel
> in ContactsPresenter. Do you simply duplicate this in
> ContactsPresenter2 or does ContactsPresenter2 have a dependency on
> ContactsPresenter?
>
> Anyway, I'm really just thinking out loud here ;)  I haven't sat down
> and coded any thing with MVP yet.  If this is the accepted practice I
> will probably do it this way too.
>
> On Jun 2, 1:08 pm, Tristan  wrote:
>
>
>
> > @nogridbag
>
> > What are your reasons for not having the presenter make RPC requests?
> > The RPC Service is not a presenter itself. Probably the MVP model
> > should be called MVPSE (services, event bus) because that's what it
> > takes to make it really work.
>
> > On Jun 1, 4:04 pm, jocke eriksson  wrote:
>
> > > I will answer my own question here, yes I am !! Thank god for the power of
> > > google.
>
> > > 2010/6/1 jocke eriksson 
>
> > > > Am I stupid or isn't EventBus an implementation of observer/observable.
>
> > > > 2010/6/1 Sripathi Krishnan 
>
> > > > There are a few things that you should keep in mind before you try to
> > > >> understand the MVP pattern
>
> > > >>    1. You don't have reflection or observer/observable pattern on the
> > > >>    client side.
> > > >>    2. Views depend on DOM and GWT UI Libraries, and are difficult to
> > > >>    mock/emulate in a pure java test case
>
> > > >> Now, to answer some of your questions
>
> > > >> *1. Why should model just be POJO's?*
> > > >> - Models are shared by the server and client. If models contain code to
> > > >> make RPC calls, it won't work on the server side.
> > > >> - Say the models make RPC calls and update themselves. How will the 
> > > >> views
> > > >> know about this? Remember, there is no observer/observable pattern on 
> > > >> the
> > > >> UI.
> > > >> - The only way multiple views can stay in sync is by listening to 
> > > >> events.
> > > >> And events carry the model objects around, so everybody stays in sync.
>
> > > >> *2. You would have multiple presenters and one of them would 
> > > >> arbitrarily
> > > >> have the RPC logic to initialize the model?*
> > > >> Have a central, command style RPC mechanism. When the data comes from 
> > > >> the
> > > >> server, you put it on the event bus so that every view gets the updated
> > > >> data. If there is an error, you have a plug to do central error 
> > > >> handling.
> > > >> You can also cache results centrally instead of hitting the server 
> > > >> every
> > > >> time.
>
> > > >> *3. Multiple views for the same model?*
> > > >> Its actually a very common thing. Say your model is a list of 

Re: Feedback on "Large scale app development MVP article"

2010-06-02 Thread Tristan
@nogridbag

What are your reasons for not having the presenter make RPC requests?
The RPC Service is not a presenter itself. Probably the MVP model
should be called MVPSE (services, event bus) because that's what it
takes to make it really work.

On Jun 1, 4:04 pm, jocke eriksson  wrote:
> I will answer my own question here, yes I am !! Thank god for the power of
> google.
>
> 2010/6/1 jocke eriksson 
>
>
>
> > Am I stupid or isn't EventBus an implementation of observer/observable.
>
> > 2010/6/1 Sripathi Krishnan 
>
> > There are a few things that you should keep in mind before you try to
> >> understand the MVP pattern
>
> >>    1. You don't have reflection or observer/observable pattern on the
> >>    client side.
> >>    2. Views depend on DOM and GWT UI Libraries, and are difficult to
> >>    mock/emulate in a pure java test case
>
> >> Now, to answer some of your questions
>
> >> *1. Why should model just be POJO's?*
> >> - Models are shared by the server and client. If models contain code to
> >> make RPC calls, it won't work on the server side.
> >> - Say the models make RPC calls and update themselves. How will the views
> >> know about this? Remember, there is no observer/observable pattern on the
> >> UI.
> >> - The only way multiple views can stay in sync is by listening to events.
> >> And events carry the model objects around, so everybody stays in sync.
>
> >> *2. You would have multiple presenters and one of them would arbitrarily
> >> have the RPC logic to initialize the model?*
> >> Have a central, command style RPC mechanism. When the data comes from the
> >> server, you put it on the event bus so that every view gets the updated
> >> data. If there is an error, you have a plug to do central error handling.
> >> You can also cache results centrally instead of hitting the server every
> >> time.
>
> >> *3. Multiple views for the same model?*
> >> Its actually a very common thing. Say your model is a list of contacts. In
> >> gmail, the chat view needs this model. Also, the compose email view needs 
> >> it
> >> to auto-complete the addresses. These views cannot "observe" the list fof
> >> contacts, so the only way for them to stay in sync is via events.
>
> >> *4. Why is it a poor design decision to let the view know about this
> >> model?*
> >> Because then your views are no longer dumb. And if they are not dumb,
> >> you'd have to test them, which we know is difficult to do via java.
>
> >> If the view knows about the model, you will also be tempted to "read from
> >> the text box and populate the model". At some point, you would be tempted 
> >> to
> >> add the validation in the view. And then there will be error handling. And
> >> slowly and surely, you have reached a stage where you cannot test your app
> >> easily.
>
> >> Which is why you want the view to only listen to low level browser events
> >> like clicks and key events, and then convert them to your apps vocabulary
> >> and then call the Presenter. Since Presenter is the only one which has any
> >> real code, and since it does not depend on the DOM, you can test them using
> >> only JUnit.
>
> >> *5. Event Handling*
> >> That part doesn't have to do with MVP, its purely a performance
> >> optimization. For general concepts on the subject, you may want to read 
> >> this
> >> quirks mode article .
>
> >> --Sri
>
> >> On 1 June 2010 23:08, nogridbag  wrote:
>
> >>> Hi, I've been reading the articles on MVP recently, specifically the
> >>> articles here:
>
> >>>http://code.google.com/webtoolkit/articles/mvp-architecture.html
> >>>http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
>
> >>> I've primarily worked with MVC in the past so this is my first
> >>> exposure to MVP (I've of course heard about it before but never really
> >>> cared to learn about it in depth).
>
> >>> Here's a few things that I wanted to comment on to perhaps help me
> >>> understand this all better.
>
> >>> 1.  Everyone does MVC slightly differently, but I've always treated
> >>> the model as more than a simple data object.  In MVC, I've always
> >>> designed it so that it's the model's responsibility to do RPC calls -
> >>> not the controller.
>
> >>> In MVP, I noticed you suggest to put this logic in the presenter.  It
> >>> seems a little strange to me.  What if you want multiple views to
> >>> essentially be an observer of the same model (I know I'm speaking in
> >>> MVC terms but you get the idea).  You would have multiple presenters
> >>> and one of them would arbitrarily have the RPC logic to initialize the
> >>> model?  I know in practice there's very few times in which you
> >>> actually need to have multiple views for the same model - so I'm OK
> >>> with this decision.  Just an observation...
>
> >>> 2. If the model is simply a DTO as you suggest, why is it a poor
> >>> design decision to let the view know about this model?  DTO's are
> >>> simple POJOs with no logic.  True, the vie

Re: GWT Design Problem

2010-06-02 Thread Tristan
check this out to give you some ideas about the history service..

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

On Jun 2, 8:08 am, ping2ravi  wrote:
> Ya this approach looks good, thanks kozura.
> Now my app will look like this.
>
> myapp.html#type=profile&id=100               call server and get data
> myapp.html#type=profile&id=234               call server and get data
> myapp.html#type=profile&id=100               get data from cache and
> refresh panel with this data
> myapp.html#type=profile&id=234               get data from cache and
> refresh panel with this data
>
> Thanks all, i guess now i can start writing a basic framework around
> this approach.
>
> On Jun 1, 10:25 pm, kozura  wrote:
>
>
>
> > I recommend you use a single widget with a method to change the data
> > showing in it (user profile, whatever).  You have to be able to
> > populate it anyway, so that's no extra code.  Caching panels is
> > generally a bad idea and a lot of overhead.
>
> > As for limiting server calls, you can cache the data returned to avoid
> > having to recall the server.  Easiest way is a simple map id->data;
> > check it when you need an id, if you have it then call the async
> > callback immediately, otherwise make the RPC call and be sure to stick
> > the result into the cache map when it gets returned.  Of course if the
> > data is dynamic you probably want some mechanism to know when a
> > particular piece of data gets changed and needs re-sent..
>
> > Also you might look at one of the models built on top of GWT which do
> > this for you in various ways.
>
> > On Jun 1, 2:36 pm, ping2ravi  wrote:
>
> > > Thanks Shaffer/Sri,
> > > I think i will go with GWT, the only thing is that i will have to
> > > implement History which usually i dont do while writing the
> > > websites(jsp/html page based). May be thats the reason i thought
> > > writing history is overhead but i guess this over head will give me
> > > good webapp/website.
> > > now with GWT also i have few question like.
> > > e.g. i am on a user profile (some other user) screen i created a
> > > panel(grand parent of every widget inside it) say the url is
> > > myapp.html#type=profile&id=100
> > > then i go to another user's profile and url is now
> > > myapp.html#type=profile&id=234.
>
> > > Question, what is the best approach here. Shall i create a brand new
> > > that grand panel and fill the data from server or shall i reuse the
> > > exisitng panel, clean it and then refill the data from server.
> > > Option 1) If i create always new panel, can i trust GWT that it will
> > > never go out of memeory or after some time user;s browser wont feel
> > > that something heavy has been loaded?  By using this approach i can
> > > make sure that if user come to link myapp.html#type=profile&id=100
> > > again, i wont go to server and will just display the existing Panel.
> > > It will be quickest thing on the earth and user may feel better to see
> > > a page faster then anything.
>
> > > My Server calls will be like
>
> > >  myapp.html#type=profile&id=100               call server and get data
> > >  myapp.html#type=profile&id=234               call server and get data
> > >  myapp.html#type=profile&id=100               ==No need to call
> > > server as one panel already exists which can show profile for user 100
> > >  myapp.html#type=profile&id=234               ==No need to call
> > > server as one panel already exists which can show profile for user 234
>
> > > Probelm which i see in this approach:
> > > 1) Memory can be a problem in this approach. Exp GWT developer may be
> > > able to give me some insight here.
> > > 2) Client view might be bit older then server, but panels can be
> > > removed from history cache using timers say 1 minute etc. But still
> > > older.
>
> > > Option 2) Reruse the existing Panel again and again. Basically create
> > > all main panels which need to have history as singleton(although its
> > > javascript, but in java write code like that) and reuse the panel and
> > > whenevr history changes reset all panels/widgets inside it and reload
> > > the data from Server
> > >  myapp.html#type=profile&id=100               call server and get data
> > >  myapp.html#type=profile&id=234               call server and get data
> > >  myapp.html#type=profile&id=100               call server and get data
> > >  myapp.html#type=profile&id=234               call server and get data
>
> > > In this approach i guesss i will have less problem with memory and
> > > data will always be latest. But Server calls will be increased.That
> > > means extra load on server and user's every click(Back and forward)
> > > will go to server
>
> > > Is there any ther option available here?. If not then out of these
> > > which one of you think will be better. SOmehow i am inclined to option
> > > 1 but need to know if memory will be a problem.
> > > Thanks,
> > > Ravi.

-- 
You received this message because you are subscribed to th

Re: Dialog Box Dragging?

2010-06-01 Thread Tristan
Haven't done this, but you should be able to write a handler when you
release the mouse button that checks the dialog box position and if it
is off the visible screen (outside some safe area you define), it
places it in the center.

On May 31, 10:59 pm, Sabbir  wrote:
> When a DialogBox is dragged off the screen and realease ur mouse,
> everthing gets locked. Cant even see the dialog box to drag back...
>
> any solutions?

-- 
You received 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 run a unittest for a class in client folder of gwt which makes Async calls to the server

2010-05-31 Thread Tristan
If you're using EasyMock, this is a very easy way to mock a service.
Been using this for a long time.

http://robvanmaris.jteam.nl/2008/04/22/test-driven-development-for-gwt-ui-code-with-asynchronous-rpc/

Take a particular look at AsyncCallbackMockSupport class.

Cheers!

Tristan

On May 30, 8:16 pm, Trung  wrote:
> See this thread
>
> http://groups.google.com/group/google-web-toolkit/browse_thread/threa...
> discussing GWT RPC calls from Java
>
> On May 28, 3:39 pm, Sumit Somani  wrote:
>
>
>
> > I am an engineering intern and want to write a test for a class which
> > makes a Async Request to the server How do I juct mock it up or use
> > some pre-built library. Please provide advise on resources

-- 
You received 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 + appController useful for the big projects ?

2010-05-31 Thread Tristan
gwtp, and handlebars are some others

On May 31, 5:35 am, Rizen  wrote:
> Yes I think it's probably the best solution for the big project. So
> now I need to learn it ^^
> Thanks very much.
>
> On May 30, 7:09 pm, Subhrajyoti Moitra  wrote:
>
>
>
> > i think one of the mvp frameworks could help.
> > gwt-dispatch,gwt-presenter, mvp4g.. there are more..
>
> > HTH.
> > Subhro.

-- 
You received 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 center a VerticalPanel on page with UiBinder

2010-05-30 Thread Tristan
have you tried...


  

  ...

  


On May 28, 8:38 am, BryanPoit  wrote:
> 
>         .centerStyle {
>         width: 800px;
>         margin: 0 auto 0 auto;
>         }
> 
>
> Is where the definition for style.centerStyle comes from.
>
> Uibinder interprets the style elements and they can be accessed
> using style.stylename.
>
> On May 28, 9:19 am, Mike  wrote:
>
>
>
> > Where did it get the definition for: {style.centerStyle} ???
>
> > Does UiBinder have access to all of the "default" style information
> > provided by GWT?
>
> > Usually, to center something horizontally, the technique is this:
>
> > .centerStyle {
> >    margin-left: auto;
> >    margin-right: auto;
>
> > }
>
> > (I believe)
>
> > Cheers
> > Mike
>
> > On May 28, 7:07 am, Mark  wrote:
>
> > > I finally found out how to do this:
> > >  > > styleName='{style.centerStyle}'>
>
> > > Hopefully this will help anybody else.
>
> > > On 27 Mai, 13:27, Mark  wrote:
>
> > > > Hello,
>
> > > > I am new to gwt and I hope you can help me. I want to center a
> > > > VerticalPanel on the page.
>
> > > >  
> > > >         Login Settings
> > > >         title
> > > >         placeholder
> > > >         text1
> > > >         text2
> > > >         stats
> > > > 
>
> > > > I tried several things like:
>
> > > > 
> > > >         .centerStyle {
> > > >         width: 800px;
> > > >         margin: 0 auto 0 auto;
> > > >         }
> > > > 
> > > > 
>
> > > > or
>
> > > > @UiField
> > > > VerticalPanel vertialPanel;
>
> > > > public void onModuleLoad() {
>
> > > > vertialPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
> > > >         vertialPanel.setWidth("100%");
> > > >         RootLayoutPanel.get().add(uiBinder.createAndBindUi(this));
>
> > > > }
>
> > > > My solutions all ended up with a page showing nothing...
> > > > Can you perhaps give me a hint where to read more about this hole Ui
> > > > Binder stuff? I think the google page is not very detailed...
>
> > > > Thank you very much.
>
> > > > Mark

-- 
You received 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.runAsync and Command Pattern

2010-05-30 Thread Tristan
You might be running into this issue:

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

The compiler simply doesn't do enough analysis to do code split
properly when inheritance is involved, staring the issue may help.

Cheers

On May 30, 7:38 am, Julio Faerman  wrote:
> Hi,
>
> I am trying to split a GWT app that uses the command (action) pattern.
> The problem is that  "GWT.create(ActionService.class)" causes every
> subclass of the return and parameter types to be included in the
> initial fragment.
>
> For instance, my action interface is:
>
> public interface ActionService extends RemoteService {
>          T execute(V req) throws
> ActionFailedException;
>
> }
>
> the problem is that "module1.SomeRequest" and "module2.OtherRequest"
> gets included in the initial fragment.
> Do you see a way around this?
>
> Thanks,
> Julio Faerman

-- 
You received 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: Share access beween two UiBinder files?

2010-05-28 Thread Tristan Slominski
Hmm...

Why don't you do it in main? It's the one thing that knows about both.

Buttons.java:

@UiHandler("nextButton")
void onClickNext(ClickEvent click) {
  getMain().onClickNext();
}

Main.java:

public void onClickNext(){
  getTextFields.setText("something");
}

On Fri, May 28, 2010 at 10:19, Mark Schewe  wrote:

> First of all thank you for the answer.
> I am new to GWT so I am a bit confused and not know yet the correct
> terminology :)
>
> Main.ui.xml:
>
> 
>
> // calls TextFields.ui.xml
>  // calls Buttons.ui.xml
>
> 
>
>
> Buttons.ui.xml:
>
> 
>prev
>next
> 
>
>
> TextFields.ui.xml:
>
> 
>blah
> 
>
>
> Buttons.java:
>
> @UiHandler("nextButton")
> void onClickNext(ClickEvent click) {
>// change text field in TextFields.ui.xml
> }
>
> In this last handler I need to access the textfield. I hope my problem
> is now easier to understand. I guess this has something to do with
> @UiFactory  but I just don't get it.
>
> 2010/5/28 Tristan :
> > like this?
> >
> > Buttons buttons = new Buttons();
> > TextFields fields = new TextFields();
> > buttons.setFieds(fields);
> > fields.setButtons(buttons);
> >
> > ??
> >
> > Can you elaborate?
> >
> > On May 28, 7:05 am, Mark  wrote:
> >> Hello,
> >>
> >> I need your help! I've got two files:
> >>
> >> Buttons.ui.xml / Buttons.java
> >> TextFields.ui.xml / TextFields.java
> >>
> >> Now I need to change the content of the TextFields in the Buttons and
> >> vice versa. Is it possible to do this without merging the two ui and
> >> java files? I hope you understand what I mean.
> >>
> >> Thank you very much for your help!
> >> Mark
> >
> > --
> > You received 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.



Re: Share access beween two UiBinder files?

2010-05-28 Thread Tristan
like this?

Buttons buttons = new Buttons();
TextFields fields = new TextFields();
buttons.setFieds(fields);
fields.setButtons(buttons);

??

Can you elaborate?

On May 28, 7:05 am, Mark  wrote:
> Hello,
>
> I need your help! I've got two files:
>
> Buttons.ui.xml / Buttons.java
> TextFields.ui.xml / TextFields.java
>
> Now I need to change the content of the TextFields in the Buttons and
> vice versa. Is it possible to do this without merging the two ui and
> java files? I hope you understand what I mean.
>
> Thank you very much for your help!
> Mark

-- 
You received 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: A way to implement place service in GWT

2010-05-27 Thread Tristan
Thanks Thomas,

Lots to consider here, let me take a look at the references you
pointed out and then I'll be better able to respond. I'm all for
making things simpler.

On May 27, 11:08 am, Thomas Broyer  wrote:
> On 27 mai, 13:41, Tristan  wrote:
>
> > I've written a wiki on how Place Service is implemented in Handlebars.
> > However, after the fact I realized that it's also a HOWTO document of
> > a way to implement a place service in general that is fairly robust.
>
> > I hope you'll find this document useful, and I'd be happy to answer
> > any questions or hear your comments.
>
> >http://code.google.com/p/handlebars/wiki/PlaceServiceOverview
>
> > Cheers!
>
> Have you measured using a GWT event per place vs. a single GWT event
> carrying a Place object? (BTW it would cut the number of classes by 4
> --no need for both a AtLandingPage and GoToLandingPage events, and
> their corresponding EventHandler interfaces, just a LandingPage place)
>
> I also notice that:
>  - the GoToPlace is only used to talk to the place service, how about
> having the place service injected and call a goTo() method on it
> directly?
>  - the GoToPlace "request" is imperative, it cannot be cancelled (e.g.
> you changed some field values and you want to ask the user
> confirmation before leaving without saving his changes); this would be
> fixed if it wasn't an event fired by the class that "triggers" it but
> by the PlaceService itself.
>  - you're forcing everyone to use your #sometoken?
> some=query&string=like&name=value&pair=parameters kind of history
> tokens, what if I'd prefer something like #/documents/some/folder for
> instance?
>
> Have you seen the work being done in GWT itself in the bikeshed
> project? (look into the branches/2.1 branch in SVN, not the trunk) It
> does not yet link places to the browser history but allows previewing
> (and cancelling) the GoToPlace event (or equivalent). My own
> PlaceManager (at work, not open source) does the same too.

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



A way to implement place service in GWT

2010-05-27 Thread Tristan
I've written a wiki on how Place Service is implemented in Handlebars.
However, after the fact I realized that it's also a HOWTO document of
a way to implement a place service in general that is fairly robust.

I hope you'll find this document useful, and I'd be happy to answer
any questions or hear your comments.

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

Cheers!

Tristan

-- 
You received 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: New open source MVP(UiBinder) GWT Framework with GIN - Handlebars

2010-05-27 Thread Tristan
Hey Wil,

I added a wiki on how to use Place Service in Handlebars, but it's
also a good HOWTO for Place Service implementation in general.

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

I'd be happy to answer any questions.

On May 26, 7:30 pm, "wil.pannell" 
wrote:
> Hey Tristan,
>
> I'm particularly interested in how you implemented the place service.
> What I've seen in other APIs seem excessively overly complex.
>
> Thanks for your reply,
>
> Wil
>
> On May 25, 12:51 pm, Tristan  wrote:
>
>
>
> > Hey Wil,
>
> > Actually it sounds like it ran perfectly :) . That's all it did
> > initially. Since it is not very interesting, today, because of your
> > feedback, I added a very rudimentary login presenter to the landing
> > page which will now take you (no matter what credentials you provide)
> > to the dashboard page (and all that says is "At Dashboard!"). But it
> > illustrates how the presenters get hooked into the pages, etc. Is
> > there particular functionality you would like to see implemented? That
> > will give me a focus area as I continue developing the starter
> > project.
>
> > Cheers!
>
> > Tristan
>
> > On May 25, 4:37 am, "wil.pannell" 
> > wrote:
>
> > > Tristan,
>
> > > Your work looks interesting and I'd like to find out more, but I was
> > > unable to get your sample app to run correctly.  All I see is a sample
> > > page that says, "Welcome to Handlebars."
>
> > > Can you upload eclipse project settings or a maven pom?
>
> > > Wil
>
> > > On May 1, 4:58 pm, Tristan  wrote:
>
> > > > First, thanks. Glad to see there's some interest.
>
> > > > I have limited resources, so I want to focus on the important things.
> > > > Hence, if you have questions or suggestions, please let me know, that
> > > > way I know what to spend time on first.
>
> > > > @Stephen
>
> > > > Unfortunately I'm not an Eclipse Plugin developer, so there's no code
> > > > generation going on... yet. Having said that, the whole thing was put
> > > > together with code generation in mind by being as declarative as
> > > > possible. The specific code for some functionality goes into well
> > > > defined areas like onAtPlace() method in presenter for example. So, in
> > > > theory, you can declare your entire page, presenter, and view
> > > > architecture and then just fill in the bits where they need to go and
> > > > it will work. Been doing it by hand and have have a checklist I
> > > > follow, but all the boiler plate can (and should) be code generated.
> > > > The Eclipse Plugin is definitely on the roadmap (I'll post that on
> > > > there soon), but for now it still provides a nice framework for the
> > > > client side app.
>
> > > > Handlebars Roadmap:
> > > > - Setup a starter handlebars project
> > > > - Open source the server side App Engine code
>
> > > > Future Plans:
> > > > - Eclipse Plugin
>
> > > > Tristan
>
> > > > On May 1, 8:35 am, Stephen Haberman 
> > > > wrote:
>
> > > > > >http://code.google.com/p/handlebars/
>
> > > > > Spiffy. The page mentions using Eclipse code generation--I like that.
> > > > > What sort of files are you generating?
>
> > > > > - Stephen
>
> > > > > --
> > > > > You received 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-

Re: large project mvp

2010-05-26 Thread Tristan
if you're going to have hundreds of windows... wouldn't it be easier
to manage if they are split up into a bunch of smaller packages
instead of one package with hundreds of files?

On May 25, 8:44 am, alf  wrote:
> I have a doubt suppuse a very large project with hundred of windows so
> thousand of files
>
> according mvp patter will be:
>
> eje. project contacts
> src/
> com.google.gwt.sample.contacts
> com.google.gwt.sample.contacts.client
>   controller/services
> com.google.gwt.sample.contacts.client.event
> com.google.gwt.sample.contacts.client.presenter
> com.google.gwt.sample.contacts.client.view
>
> now we can add customer proyect how I  should like to this away
>
> com.google.gwt.sample.customer
> com.google.gwt.sample.customer.client
>   controller/services
> com.google.gwt.sample.customer.client.event
> com.google.gwt.sample.customer.client.presenter
> com.google.gwt.sample.customer.client.view
>
> or is better
> a package for contacts and other package for customer
>
> com.google.gwt.sample.contacts
> contactService.java
> contactEvent.java
> contactPresenter.java
>
> com.google.gwt.sample.customer
> customerService.java
> customerEvent.java
> customerPresenter.java
>
> thanks for response I will accept other ideas.
>
> --
> You received 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: New open source MVP(UiBinder) GWT Framework with GIN - Handlebars

2010-05-25 Thread Tristan
Hey Wil,

Actually it sounds like it ran perfectly :) . That's all it did
initially. Since it is not very interesting, today, because of your
feedback, I added a very rudimentary login presenter to the landing
page which will now take you (no matter what credentials you provide)
to the dashboard page (and all that says is "At Dashboard!"). But it
illustrates how the presenters get hooked into the pages, etc. Is
there particular functionality you would like to see implemented? That
will give me a focus area as I continue developing the starter
project.

Cheers!

Tristan

On May 25, 4:37 am, "wil.pannell" 
wrote:
> Tristan,
>
> Your work looks interesting and I'd like to find out more, but I was
> unable to get your sample app to run correctly.  All I see is a sample
> page that says, "Welcome to Handlebars."
>
> Can you upload eclipse project settings or a maven pom?
>
> Wil
>
> On May 1, 4:58 pm, Tristan  wrote:
>
>
>
>
>
> > First, thanks. Glad to see there's some interest.
>
> > I have limited resources, so I want to focus on the important things.
> > Hence, if you have questions or suggestions, please let me know, that
> > way I know what to spend time on first.
>
> > @Stephen
>
> > Unfortunately I'm not an Eclipse Plugin developer, so there's no code
> > generation going on... yet. Having said that, the whole thing was put
> > together with code generation in mind by being as declarative as
> > possible. The specific code for some functionality goes into well
> > defined areas like onAtPlace() method in presenter for example. So, in
> > theory, you can declare your entire page, presenter, and view
> > architecture and then just fill in the bits where they need to go and
> > it will work. Been doing it by hand and have have a checklist I
> > follow, but all the boiler plate can (and should) be code generated.
> > The Eclipse Plugin is definitely on the roadmap (I'll post that on
> > there soon), but for now it still provides a nice framework for the
> > client side app.
>
> > Handlebars Roadmap:
> > - Setup a starter handlebars project
> > - Open source the server side App Engine code
>
> > Future Plans:
> > - Eclipse Plugin
>
> > Tristan
>
> > On May 1, 8:35 am, Stephen Haberman 
> > wrote:
>
> > > >http://code.google.com/p/handlebars/
>
> > > Spiffy. The page mentions using Eclipse code generation--I like that.
> > > What sort of files are you generating?
>
> > > - Stephen
>
> > > --
> > > You received 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 
> 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: MVP, gwt-presenter + UIBinder + Gin

2010-05-17 Thread Tristan
Hey Chris,

Take a look here for one of the ways of doing this: 
http://code.google.com/p/handlebars/

The view composition would be done in bindView() method in the
Presenter (it's in the interface, none of the default presenters
implement it in the package).. it usually looks like:

@Override
public void bindView() {
 
getView().setOneOfMyChildViews(getChildPresenters().get(MyChildPresenter.name).makeView().createAndBind());
}

Haven't seen gwt-platform before. Looks interesting...

On May 17, 10:30 am, PhilBeaudoin  wrote:
> I think the key is not to write your views into UiBinder but rather to
> use one UiBinder file for each of your views. Then you make your
> presenters embed one another in the desired fashion. That's what I
> understand 
> from:http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
>
> Many examples of the gwt-platform project use UiBinder within an MVP
> architecture, you might be interested to check them 
> out:http://code.google.com/p/gwt-platform
>
> Cheers,
>
>    Philippe
>
> On May 16, 2:45 pm, Chris  wrote:
>
>
>
>
>
> > Hi All
>
> > I'd like to use UIBinder to layout my page which is made of several
> > Views. I'm kind of confused as to how to do this...
>
> > For example, I'd like to inject my views straight into the UIBinder
> > context, so I extend the xml declaration to be:
>
> >  >         xmlns:g='urn:import:com.google.gwt.user.client.ui'
> > xmlns:step="urn:import:com.tyndalehouse.step.web.client.view">
>
> > That gives me access to the View, and I can then use something like:
> > 
> >   
> >         
> >   
> >   
> > 
>
> > where VersionSelectorView is one of my views. At the moment, I'm using
> > Gin to inject the Presenter via the constructor, and setting it as a
> > field, that is provided:
>
> > @UiField (provided = true)
> > VersionSelectorView versionSelector;
> > ...
>
> > @Inject
> > public StepView(final VersionSelectorPresenter versionSelector) {
> > this.versionSelector = versionSelector;
>
> > }
>
> > Now that's all very well... but what if the view above has many many
> > composites that I want to use in the UIBinder declarative XML? Also it
> > doesn't feel to be like it's best practice to inject the Presenter
> > into the View. Surely, it shouldn't know about it all... And I should
> > either be injecting is as VersionSelectorPresenter.Display or
> > VersionSelectorView.
>
> > However using gwt-dispatch, when I inject it like that, the View is
> > provided, but it's not bound to any presenter...
>
> > So basically, I'd like to know what the best practice is/would be?
> > Should I be injecting all the providers into the main Presenter (in my
> > case StepPresenter), and somehow setting them all onto the view? that
> > makes a lot of setters, but at least I get rid of the presenters from
> > the Views
>
> > I read somewhere something about injecting providers for lazy
> > initialisation. Sounds good, but I'm guessing I've still got lots of
> > them to inject...
>
> > Perhaps, that's not how I'm supposed to use UIBinder, but then I still
> > seem to have a similar issue with the way to get lots of views
> > injected into one Parent View.
>
> > Any ideas anyone?
> > Cheers
> > Chris
>
> > --
> > You received 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: IE8 doesn't recognize ClickEvent handler on Label ( I think )

2010-05-14 Thread Tristan
When I removed the left button recognition code it now works

@UiHandler("myLabel")
public void onMyLabel(ClickEvent event) {
  getPresenter().onMyLabel();
}

On May 7, 11:26 pm, Tristan  wrote:
> The following doesn't work in IE8. Do I have to do something with
> ()? Or am I missing
> a nuance with ClickEvent? By "doesn't work" I mean that the method
> onMyLabel() in the presenter does not get called.
>
> @UiFieldLabelmyLabel;
>
> @UiHandler("myLabel")
>   public void onMyLabel(ClickEvent event) {
>     if (event.getNativeEvent().getButton() == NativeEvent.BUTTON_LEFT)
> {
>       getPresenter().onMyLabel();   <- this doesn't execute
>   }
>
> Tristan
>
> --
> You received 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: Running gwt app with custom context root

2010-05-08 Thread Tristan
You can just put the second address in your browser and bookmark it.
What are you trying to automate?

On May 7, 1:17 pm, Antonio  wrote:
> I need to run my GWT application with custom context root.
>
> When i run the project plugin start server with empty context root 
> eg:http://127.0.0.1:/MyApp.html?gwt.codesvr=127.0.0.1:9997
>
> I need this:http://127.0.0.1:/myapp/MyApp.html?gwt.codesvr=127.0.0.1:9997
>
> The application must run onhttp://127.0.0.1:/myappinstead 
> ofhttp://127.0.0.1:
>
> I'm using GWT 2.0.3 and lastest plugin.
>
> thx.
>
> --
> You received 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.



IE8 doesn't recognize ClickEvent handler on Label ( I think )

2010-05-07 Thread Tristan
The following doesn't work in IE8. Do I have to do something with
()? Or am I missing
a nuance with ClickEvent? By "doesn't work" I mean that the method
onMyLabel() in the presenter does not get called.

@UiField
Label myLabel;

@UiHandler("myLabel")
  public void onMyLabel(ClickEvent event) {
if (event.getNativeEvent().getButton() == NativeEvent.BUTTON_LEFT)
{
  getPresenter().onMyLabel();   <- this doesn't execute
  }

Tristan

-- 
You received 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: Keeping track of traffic volume generated by a GWT application

2010-05-07 Thread Tristan
Sounds like you need to add filters to your server code.

On May 7, 4:23 am, Antonio Leonforte 
wrote:
> Hi all,
> I have multiple GWT applications running on Tomcat, and I need to
> monitor the total volume of traffic (inbound+outbound) generated by
> each application, so that each application can start rejecting
> requests when the total volume exeeds a given threshold.
>
> Maybe I can configure and query tomcat to gather the traffic volume
> stastistics, or do I have to modify the applications and add some code
> server-side to calculate the volume of each request and add it to an
> accumulator?
>
> Thank you for your help.
> Antonio.
>
> --
> You received 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: Navigating to new pages

2010-05-07 Thread Tristan
What you're doing.. (I didn't compile the code).. but it seems like it
would work. The only thing is, your users have to log in every single
time they visit your page. There's no "remember me" type thing. One
way to do it would be to make sure that you store some type of cookie
that you attempt to validate with inside onModuleLoad() before ever
showing the login portion.

I think a better approach would be to use a place service in
combination with per request authorization. Each page request should
be authorized if you want to secure it, which means that it needs to
ask the server for permission before displaying any data.

It really depends on how complex your application will get. If you
plan on growing it, I really recommend some kind of place service. It
really simplifies the application structure IF your application get's
big enough to need simplification.

Tristan

On May 7, 6:03 am, Abhay Singh  wrote:
> Hi All,
>
> I am trying to build an web based application, where i am giving login
> page.
> Once its successful then giving access to next page, and subsquent
> pages, but i am not able to understand how we can do this.
> I wanted to show a tabedpanel in next page.
> Here is the code i am using to display login page
>
> public class Cubot implements EntryPoint {
>         public Button loginbtn = new Button("Login");
>         public TextBox nameField = new TextBox();
>         public PasswordTextBox passwdField = new PasswordTextBox();
>         public DialogBox dialogBox = new DialogBox();
>         public Button closeButton = new Button("Close");
>         public Label textToServerLabel = new Label();
>         public HTML serverResponseLabel = new HTML();
>
>         public void onModuleLoad() {
>                 nameField.setText("");
>                 passwdField.setText("");
>
>                 RootPanel.get("useridbx").add(nameField);
>                 RootPanel.get("passwdbx").add(passwdField);
>                 RootPanel.get("loginbtn").add(loginbtn);
>                 nameField.setFocus(true);
>
>                 ValidateLogin validatelogin = new ValidateLogin();
>                 loginbtn.addClickHandler((ClickHandler) validatelogin);
>                 dialogBox.setAnimationEnabled(true);
>
>                 closeButton.getElement().setId("closeButton");
>
>                 VerticalPanel dialogVPanel = new VerticalPanel();
>                 dialogVPanel.addStyleName("dialogVPanel");
>                 dialogVPanel.add(new HTML("Validating User id:"));
>                 dialogVPanel.add(textToServerLabel);
>                 dialogVPanel.add(new HTML("Validation Response:"));
>                 dialogVPanel.add(serverResponseLabel);
>                 
> dialogVPanel.setHorizontalAlignment(VerticalPanel.ALIGN_RIGHT);
>                 dialogVPanel.add(closeButton);
>                 dialogBox.setWidget(dialogVPanel);
>                 closeButton.addClickHandler(new ClickHandler() {
>                         public void onClick(ClickEvent event) {
>                                 dialogBox.hide();
>                                 loginbtn.setEnabled(true);
>                                 loginbtn.setFocus(true);
>                         }
>                 });
>         }
>
>         class ValidateLogin implements ClickHandler {
>                 public void onClick(ClickEvent event) {
>                         Validatelogininfo();
>                 }
>
>                 private void Validatelogininfo() {
>                         loginbtn.setEnabled(false);
>                         String textToServer = nameField.getText();
>                         textToServerLabel.setText(textToServer);
>                         serverResponseLabel.setText("");
>                         greetingService.authenticateUser(nameField.getText(),
> passwdField.getText(), new AsyncCallback() {
>                                                 public void 
> onFailure(Throwable caught) {
>                                                         
> dialogBox.setText("Login - Failure");
>                                                         
> serverResponseLabel.addStyleName("serverResponseLabelError");
>                                                         
> serverResponseLabel.setHTML("Login Fail Due to Some Error");
>                                                         dialogBox.center();
>                                                         
> closeButton.setFocus(true);
>                                                 }
>
>                                 

Re: New open source MVP(UiBinder) GWT Framework with GIN - Handlebars

2010-05-01 Thread Tristan
First, thanks. Glad to see there's some interest.

I have limited resources, so I want to focus on the important things.
Hence, if you have questions or suggestions, please let me know, that
way I know what to spend time on first.

@Stephen

Unfortunately I'm not an Eclipse Plugin developer, so there's no code
generation going on... yet. Having said that, the whole thing was put
together with code generation in mind by being as declarative as
possible. The specific code for some functionality goes into well
defined areas like onAtPlace() method in presenter for example. So, in
theory, you can declare your entire page, presenter, and view
architecture and then just fill in the bits where they need to go and
it will work. Been doing it by hand and have have a checklist I
follow, but all the boiler plate can (and should) be code generated.
The Eclipse Plugin is definitely on the roadmap (I'll post that on
there soon), but for now it still provides a nice framework for the
client side app.

Handlebars Roadmap:
- Setup a starter handlebars project
- Open source the server side App Engine code

Future Plans:
- Eclipse Plugin

Tristan


On May 1, 8:35 am, Stephen Haberman 
wrote:
> >http://code.google.com/p/handlebars/
>
> Spiffy. The page mentions using Eclipse code generation--I like that.
> What sort of files are you generating?
>
> - Stephen
>
> --
> You received 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.



New open source MVP(UiBinder) GWT Framework with GIN - Handlebars

2010-04-30 Thread Tristan
Hey all,

I've built this framework for some of the projects I've been involved
with (this is just the client-side, working on open sourcing the App
Engine side soon). I thought it would be useful to open source
something that works in real projects, especially for those of you
getting started.

It uses place service to dictate the state of the application.
Incorporates event bus, adds some dto and multiple dto fetching stuff
already baked in, relies on dependency injection from GIN, etc.

There's a lot to take in, but here it is:

http://code.google.com/p/handlebars/

Feel free to provide feedback or comment.

All the best,

Tristan

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



Re: How to add widget to UIbinder

2010-04-29 Thread Tristan
I think you mean this?:

java

@UiField
HTMLPanel htmlPanel

ui binder


Re: Is there a way to override standard.css inline in UiBinder?

2010-04-27 Thread Tristan
You are the man!!

this worked:


  @external .datePickerMonth;
  .datePicker .datePickerMonth {
color: white;
  }




This solution should be included in the UiBinder Article (http://
code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html)!!!

On Apr 26, 12:32 am, daniel  wrote:
> try this:
>
> 
>     @external .datePickerMonth;
>     .datePicker .datePickerMonth {
>              color: white;
>      }
>   
>
>  StyleNames='{local.datePicker}'/>
>
> this way the style of your widget is 'datePicker', that would be
> obfuscated to lets say 'A'.
> so the calculated style will look like this then:
>
> .A .datePickerMonth{
>    color: white;
>
> }
>
> cause .datePickerMonth won't get obfuscated;
> and the html is somthing like
>
> 
>    
> 
>
> and the style matches the inner element.
>
> Is that what you wanted to do?
>
> On 26 Apr., 02:10, Tristan  wrote:
>
>
>
>
>
> > Thank you for pointing me to the right spot in the article, it seems
> > to answer well.  So now it seems the setup should be
>
> > 
> >   
> >     @external .datePickerMonth;
> >     .datePickerMonth { color: white !important; }
> >   
>
> >   
> > 
>
> > But I am stomped as to how to make the Widget use .datePickerMonth
> > that I specified instead of the one from standard.css. I don't want to
> > do addStyleNames='{local.datePickerMonth}' because that would assign
> > the style at the widget's top level instead of just the month label,
> > and there is no setMonthStyle thing. I think the functionality that
> > I'm looking for is some sort of call to create a css resource on the
> > fly when the widget gets called with myinline.datePickerMonth being
> > the last css loaded so that it overrides whatever other ones are
> > there. I don't think there's a call like that, or is there?
>
> > I'm thinking something like
> >    > overrideStyleNames='{local.datePickerMonth}'/>
>
> > this should translate to this type of html:
>
> > 
> > <!--
> >    .datePickerMonth { color: white; }
> > -->
> > 
> > 
> >     whatever the widget is
> > 
> > .. and then after the widget is done, override again to go back to the
> > defaults
> > 
> > <!--
> >   .datePickerMonth { }    .. since this is empty, it should default to
> > old values???
> > -->
> > 
>
> > Since I just made that up, would that even work?
>
> > Tristan
>
> > On Apr 25, 4:36 pm, daniel  wrote:
>
> > > have a look at 
> > > @externalhttp://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideClien...
>
> > > On 25 Apr., 22:36, Tristan  wrote:
>
> > > > Hey,
>
> > > > Does anyone have an idea how to override standard.cssinlinein
> > > >UiBinder?  For example,
>
> > > > 
>
> > > >   
>
> > > > 
>
> > > > where 'datePicker' in java is provided
>
> > > > @UiField(provided = true)
> > > > Widget datePicker;
>
> > > > I would like to do something like...
>
> > > > 
>
> > > >   
> > > >     .datePickerMonth { color: white }
> > > >   
>
> > > >    > > > addStyleName='{local.datePickerMonth}'/>
>
> > > > 
>
> > > > The above is obviously wrong as .datePickerMonth is obfuscated and i'm
> > > > adding the style to the whole thing and not to month selector in the
> > > > date picker.
> > > > How do I override standard.css in this case? Is it even possible to do
> > > > itinline?
>
> > > > Tristan
>
> > > > --
> > > > You received 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

Re: Is there a way to override standard.css inline in UiBinder?

2010-04-25 Thread Tristan
Thank you for pointing me to the right spot in the article, it seems
to answer well.  So now it seems the setup should be


  
@external .datePickerMonth;
.datePickerMonth { color: white !important; }
  

  


But I am stomped as to how to make the Widget use .datePickerMonth
that I specified instead of the one from standard.css. I don't want to
do addStyleNames='{local.datePickerMonth}' because that would assign
the style at the widget's top level instead of just the month label,
and there is no setMonthStyle thing. I think the functionality that
I'm looking for is some sort of call to create a css resource on the
fly when the widget gets called with my inline .datePickerMonth being
the last css loaded so that it overrides whatever other ones are
there. I don't think there's a call like that, or is there?

I'm thinking something like
  

this should translate to this type of html:


<!--
   .datePickerMonth { color: white; }
-->


    whatever the widget is

.. and then after the widget is done, override again to go back to the
defaults

<!--
  .datePickerMonth { }.. since this is empty, it should default to
old values???
-->


Since I just made that up, would that even work?

Tristan

On Apr 25, 4:36 pm, daniel  wrote:
> have a look at 
> @externalhttp://code.google.com/intl/de-DE/webtoolkit/doc/latest/DevGuideClien...
>
> On 25 Apr., 22:36, Tristan  wrote:
>
>
>
>
>
> > Hey,
>
> > Does anyone have an idea how to override standard.css inline in
> > UiBinder?  For example,
>
> > 
>
> >   
>
> > 
>
> > where 'datePicker' in java is provided
>
> > @UiField(provided = true)
> > Widget datePicker;
>
> > I would like to do something like...
>
> > 
>
> >   
> >     .datePickerMonth { color: white }
> >   
>
> >    > addStyleName='{local.datePickerMonth}'/>
>
> > 
>
> > The above is obviously wrong as .datePickerMonth is obfuscated and i'm
> > adding the style to the whole thing and not to month selector in the
> > date picker.
> > How do I override standard.css in this case? Is it even possible to do
> > it inline?
>
> > Tristan
>
> > --
> > You received 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.



Is there a way to override standard.css inline in UiBinder?

2010-04-25 Thread Tristan
Hey,

Does anyone have an idea how to override standard.css inline in
UiBinder?  For example,



  



where 'datePicker' in java is provided

@UiField(provided = true)
Widget datePicker;

I would like to do something like...



  
.datePickerMonth { color: white }
  

  



The above is obviously wrong as .datePickerMonth is obfuscated and i'm
adding the style to the whole thing and not to month selector in the
date picker.
How do I override standard.css in this case? Is it even possible to do
it inline?

Tristan

-- 
You received 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: Grid uibinder

2010-03-24 Thread Tristan Slominski
Same as other widgets.

@UiField
Grid myGrid;

or

@UiField(provided = true)
Grid myGrid = new Grid(1,1);

Depending on what you're doing.

On Mar 22, 2010 9:50 AM, "gadaleta.marco"  wrote:

but if i want to use grid inside code, how can bind it with uibinder
method?

On 20 Mar, 18:33, Tristan  wrote:
> someone said this here before, but it might be easier to use
>
> 
>   
>
> 
> etc...
> 
>
> On Mar 20, 11:45 am, "gadaleta.marco" 
> wrote:
>
>
>
> > Can anyone help me to usegridwidget insideuibinder?
>
> > Thx
> > Marco

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



what event does the PopupPanel use to autohide?

2010-03-21 Thread Tristan
Hi,

I'm trying to automate my testing via Selenium. When I do it myself by
hand, the popup panel hides when I click outside of it (ie.. it works
as expected), however when I use selenium.click or clickAt or
fireEvent blur or mouseDownAt, etc... i cannot get the popup panel to
hide and my test fails. Is there a specific event that PopupPanel
listens to? I'm using selenium rc and safari browser.

Cheers!

Tristan

-- 
You received 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: Selenium RC and OutOfMemory DevMode error

2010-03-20 Thread Tristan
No resolution on out of memory issue.

I ended up hosting a development version on app engine and running my
selenium tests against that.

On Mar 19, 12:13 pm, Nathan Wells  wrote:
> I get similar problems, but they are related to restarting the server,
> rather than refreshing the browser, and only while developing, not in
> a Selenium server.
>
> You might be able to resolve your issue by way of the -noserver
> option. I haven't yet looked for documentation about it, but it allows
> you to run any given server rather than the embedded Jetty server.
>
> On Mar 19, 8:16 am, Tristan  wrote:
>
>
>
> > So nobody has a clue as to why DevMode would run out of memory after
> > 34 URL refreshes?
>
> > On Mar 16, 12:01 am, Tristan  wrote:
>
> > > I started this in Google App Engine Java group, but as Ikai pointed
> > > out, it probably belongs here. Does anyone have any hints for this
> > > problem?
>
> > > Tristan
> > > ---
> > > Hi,
> > > I have Selenium RC hooked up and automated Selenium tests going using
> > > JUnit. The problem is that after Selenium runs about 34 out of the 43
> > > stories so far, my module complains that it is out of memory: [ERROR]
> > > Out of memory; to increase the amount of memory, use the -Xmx flag at
> > > startup (java -Xmx128M ...)
>
> > > Every time a Selenium test case is run, it opens a new Safari window
> > > and loads the page. I can see on the server (via eclipse) that it is
> > > rebinding my RPC services every time, which is normal as far as I can
> > > tell. And around 34 tests, during this rebinding, it gives me the
> > > above out of memory error.
>
> > > I already have the server memory set to -Xmx1024M... so that
> > > shouldn't
> > > be an issue.. is there a problem (ie memory leak) with DevMode? Or am
> > > I missing some parameter somewhere?
>
> > > Ikai L (Google)
> > > --
> > > Tristan,
> > > Is this a Google Web Toolkit question or a Google App Engine
> > > (OutOfMemoryError on Jetty) question? It sounds like a GWT question,
> > > in which case you should ask 
> > > here:http://groups.google.com/group/Google-Web-Toolkit
>
> > > Tristan
> > > 
> > > I think it's a Google App Engine (OutOfMemoryError on Jetty)
> > > question.
> > > After Selenium RC hits the Dev Mode url about 34 times, I get
> > > previously mentioned error [ERROR] Out of memory; to increase the
> > > amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)
> > > This happens with -Xmx1024M setting.
> > > So is there a way to free up memory after connection is broken? When
> > > Selenium breaks the connection, DevMode quits with the following
> > > exception:
> > > 20:02:12.232 [ERROR] [myModule] Remote connection lost
> > > com.google.gwt.dev.shell.BrowserChannel$RemoteDeathError: Remote
> > > connection lost
> > >     at
> > > com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java
> > >  :
> > > 1683)
> > >     at
> > > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
> > > nelServer.java:
> > > 401)
> > >     at
> > > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java
> > >  :
> > > 222)
> > >     at java.lang.Thread.run(Thread.java:637)
> > > Caused by: java.io.EOFException: null
> > >     at java.io.DataInputStream.readByte(DataInputStream.java:250)
> > >     at com.google.gwt.dev.shell.BrowserChannel
> > > $Message.readMessageType(BrowserChannel.java:1131)
> > >     at
> > > com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java
> > >  :
> > > 1659)
> > >     at
> > > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
> > > nelServer.java:
> > > 401)
> > >     at
> > > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java
> > >  :
> > > 222)
> > >     at java.lang.Thread.run(Thread.java:637)
> > > So does this cause a memory leak? Then after 34 of these, it finally
> > > runs out of memory.
>
> > > Tristan
> > > ---
> > > Sorry, forgot to thank you for responding quickly :) Thanks Ikai.
>
> > > Ikai L (Google)
> > > 
> > > I don't recognize that stack trace - I see com.google.gwt.dev.shell.
&

Re: Problem when using datastore with Tomcat

2010-03-20 Thread Tristan
I hate to make it sound like "is it plugged in?", but don't you need
to run the app on Google App Engine to access the datastore? (or
hosted mode, which fakes app engine for you). Or did you somehow fake
a datastore on your own?

On Mar 20, 11:06 am, duclm  wrote:
> I deploy a Gwt app that using GAE (datastore), hosted mode is ok, but
> when i deploy to Tomcat, there is problem like below:
>
> Mar 20, 2010 11:05:56 PM
> org.datanucleus.plugin.NonManagedPluginRegistry resolve
> Constraints
> INFO: Bundle "org.datanucleus.jpa" has an optional dependency to
> "org.datanucleu
> s.enhancer" but it cannot be resolved
> Mar 20, 2010 11:05:56 PM
> org.datanucleus.plugin.NonManagedPluginRegistry resolve
> Constraints
> INFO: Bundle "org.datanucleus" has an optional dependency to
> "org.eclipse.equino
> x.registry" but it cannot be resolved
> Mar 20, 2010 11:05:56 PM
> org.datanucleus.plugin.NonManagedPluginRegistry resolve
> Constraints
> INFO: Bundle "org.datanucleus" has an optional dependency to
> "org.eclipse.core.r
> untime" but it cannot be resolved
> Mar 20, 2010 11:05:56 PM org.datanucleus.PersistenceConfiguration
> setProperty
> INFO: Property datanucleus.rdbms.sql.allowAllSQLStatements unknown -
> will be ign
> ored
> Mar 20, 2010 11:05:56 PM org.datanucleus.PersistenceConfiguration
> setProperty
> INFO: Property datanucleus.rdbms.stringDefaultLength unknown - will be
> ignored
> Mar 20, 2010 11:05:56 PM org.datanucleus.PersistenceConfiguration
> setProperty
> INFO: Property datanucleus.appengine.autoCreateDatastoreTxns unknown -
> will be i
> gnored
> Mar 20, 2010 11:05:56 PM org.datanucleus.ObjectManagerFactoryImpl
> logConfigurati
> on
> INFO: = Persistence Configuration ===
> Mar 20, 2010 11:05:56 PM org.datanucleus.ObjectManagerFactoryImpl
> logConfigurati
> on
> INFO: DataNucleus Persistence Factory - Vendor: "DataNucleus"
> Version: "1.1.5"
> Mar 20, 2010 11:05:56 PM org.datanucleus.ObjectManagerFactoryImpl
> logConfigurati
> on
> INFO: DataNucleus Persistence Factory initialised for datastore
> URL="appengine"
> driver="" userName=""
> Mar 20, 2010 11:05:56 PM org.datanucleus.ObjectManagerFactoryImpl
> logConfigurati
> on
> INFO: ===
> Mar 20, 2010 11:05:56 PM org.datanucleus.PersistenceConfiguration
> setProperty
> INFO: Property datanucleus.query.cached unknown - will be ignored
> Mar 20, 2010 11:05:56 PM
> org.datanucleus.jdo.metadata.JDOMetaDataManager 
> INFO: Registering listener for metadata initialisation
> Mar 20, 2010 11:05:56 PM
> org.datanucleus.jdo.metadata.JDOAnnotationReader proces
> sClassAnnotations
> INFO: Class "com.cloudstudio.server.store.User" has been specified
> with JDO anno
> tations so using those.
> Mar 20, 2010 11:05:56 PM
> org.datanucleus.store.appengine.MetaDataValidator valid
> ate
> INFO: Performing appengine-specific metadata validation for
> com.cloudstudio.serv
> er.store.User
> Mar 20, 2010 11:05:56 PM
> org.datanucleus.store.appengine.MetaDataValidator valid
> ate
> INFO: Finished performing appengine-specific metadata validation for
> com.cloudst
> udio.server.store.User
> Mar 20, 2010 11:05:56 PM org.datanucleus.store.StoreDataManager
> registerStoreDat
> a
> INFO: Managing Persistence of Class :
> com.cloudstudio.server.store.User [Table :
>          identity-type="application"
>        objectid-class="javax.jdo.identity.ObjectIdentity"
>        persistence-modifier="persistence-capable"
>
> 
> 
>         persistence-modifier="persistent"
>        null-value="none"
>        default-fetch-group="true"
>        embedded="true"
>        unique="false">
> 
>         persistence-modifier="persistent"
>        primary-key="true"
>        null-value="none"
>        default-fetch-group="true"
>        embedded="false"
>        value-strategy="identity"
>        unique="false">
> 
>         persistence-modifier="persistent"
>        null-value="none"
>        default-fetch-group="true"
>        embedded="true"
>        unique="false">
> 
>         persistence-modifier="persistent"
>        null-value="none"
>        default-fetch-group="true"
>        embedded="true"
>        unique="false">
> 
> 
> , InheritanceStrategy : new-table]
> Mar 20, 2010 11:05:56 PM org.datanucleus.store.StoreDataManager
> registerStoreDat
> a
> INFO: Managing Persistence of Class :
> com.cloudstudio.server.store.User [Table :
>          identity-type="application"
>        objectid-class="javax.jdo.identity.ObjectIdentity"
>        persistence-modifier="persistence-capable"
>
> 
> 
>         persistence-modifier="persistent"
>        null-value="none"
>        default-fetch-group="true"
>        embedded="true"
>        unique="false">
> 
>         persistence-modifier="persistent"
>        primary-key="true"
>        null-value="none"
>        default-fetch-group="true"
>        embedded="false"
>        value-strategy="identity"
>        unique="false">
> 
>         persistence-modifier="persistent"
> 

Re: UIBinder: Adding event handler for tab change

2010-03-20 Thread Tristan
don't know if this will work, but have you tried



then in your java code

@UiField
UIObject myTab1

@UiHandler("myTab1")
public void onSpellCast(ClickEvent event){
   ... do stuff
}



On Mar 20, 11:30 am, spacejunkie  wrote:
> Hi,
>
> I'm using UIBinder to define tabbed layout. Each tab and its header is
> also defined in the XML. The  element holds a custom composite
> for each tab.
>
> I want to lazily populate the composite - held by a tab - with data
> when the tab is selected. For this I want to add event handler for tab
> change.
>
> Since I do not have reference to TabPanelLayout how can I add event
> handlers? Is there a work around?
>
> Regards,
> Priyank

-- 
You received 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: Grid uibinder

2010-03-20 Thread Tristan
someone said this here before, but it might be easier to use


  
   

etc...


On Mar 20, 11:45 am, "gadaleta.marco" 
wrote:
> Can anyone help me to use grid widget inside uibinder?
>
> Thx
> Marco

-- 
You received 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: Selenium RC and OutOfMemory DevMode error

2010-03-19 Thread Tristan
So nobody has a clue as to why DevMode would run out of memory after
34 URL refreshes?

On Mar 16, 12:01 am, Tristan  wrote:
> I started this in Google App Engine Java group, but as Ikai pointed
> out, it probably belongs here. Does anyone have any hints for this
> problem?
>
> Tristan
> ---
> Hi,
> I have Selenium RC hooked up and automated Selenium tests going using
> JUnit. The problem is that after Selenium runs about 34 out of the 43
> stories so far, my module complains that it is out of memory: [ERROR]
> Out of memory; to increase the amount of memory, use the -Xmx flag at
> startup (java -Xmx128M ...)
>
> Every time a Selenium test case is run, it opens a new Safari window
> and loads the page. I can see on the server (via eclipse) that it is
> rebinding my RPC services every time, which is normal as far as I can
> tell. And around 34 tests, during this rebinding, it gives me the
> above out of memory error.
>
> I already have the server memory set to -Xmx1024M... so that
> shouldn't
> be an issue.. is there a problem (ie memory leak) with DevMode? Or am
> I missing some parameter somewhere?
>
> Ikai L (Google)
> --
> Tristan,
> Is this a Google Web Toolkit question or a Google App Engine
> (OutOfMemoryError on Jetty) question? It sounds like a GWT question,
> in which case you should ask 
> here:http://groups.google.com/group/Google-Web-Toolkit
>
> Tristan
> 
> I think it's a Google App Engine (OutOfMemoryError on Jetty)
> question.
> After Selenium RC hits the Dev Mode url about 34 times, I get
> previously mentioned error [ERROR] Out of memory; to increase the
> amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)
> This happens with -Xmx1024M setting.
> So is there a way to free up memory after connection is broken? When
> Selenium breaks the connection, DevMode quits with the following
> exception:
> 20:02:12.232 [ERROR] [myModule] Remote connection lost
> com.google.gwt.dev.shell.BrowserChannel$RemoteDeathError: Remote
> connection lost
>     at
> com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java :
> 1683)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
> nelServer.java:
> 401)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java :
> 222)
>     at java.lang.Thread.run(Thread.java:637)
> Caused by: java.io.EOFException: null
>     at java.io.DataInputStream.readByte(DataInputStream.java:250)
>     at com.google.gwt.dev.shell.BrowserChannel
> $Message.readMessageType(BrowserChannel.java:1131)
>     at
> com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java :
> 1659)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
> nelServer.java:
> 401)
>     at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java :
> 222)
>     at java.lang.Thread.run(Thread.java:637)
> So does this cause a memory leak? Then after 34 of these, it finally
> runs out of memory.
>
> Tristan
> ---
> Sorry, forgot to thank you for responding quickly :) Thanks Ikai.
>
> Ikai L (Google)
> 
> I don't recognize that stack trace - I see com.google.gwt.dev.shell.
> GWT has a DevMode server, from what I remember. If it possible for
> you
> to compile the code to JavaScript, then run your Selenium tests? It
> really does look like a GWT issue, but the references to
> BrowserChannel somewhat unnerve me.
>
> Tristan
> -
> Thanks for taking a crack at it Ikai, I compiled the code but still
> ran out of memory around 34 Selenium touches. I'll post it in the GWT
> forum as you suggested.
> 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: ALIGN_CENTER problem ?!!!

2010-03-18 Thread Tristan
here's how you do it in UiBinder


  

  


the above code will center your vertical panel

On Mar 18, 3:02 pm, Philippe  wrote:
> Great, it works !!! Thank you for the tip.
>
> Chris Lercher a �crit :
>
>
>
> > I also had the same problem, and the only way I found was to do this
> > programmatically, with
>
> > @UiField(provided=true)
> > VerticalPanel verticalPanel;
>
> > And instantiating the vertical Panel + setting the horizontal
> > alignment before calling uiBinder.createAndBindUi(this)
>
> > On Mar 18, 9:27 am, Gecko  wrote:
>
> >> I'm trying to center a vertical panel on the browser but it does not
> >> work. I'm newbie... help me please !!!
>
> >> I'm using UiBinder as shown below :
>
> >> 
> >>   
> >>     ...
> >>   
> >> 
>
> >> From the ui.xml, the java code below is gennerated :
>
> >> com.google.gwt.user.client.ui.VerticalPanel f_VerticalPanel2 =
> >> (com.google.gwt.user.client.ui.VerticalPanel)
> >> GWT.create(com.google.gwt.user.client.ui.VerticalPanel.class);
> >> com.google.gwt.user.client.ui.HorizontalPanel f_HorizontalPanel1 =
> >> (com.google.gwt.user.client.ui.HorizontalPanel)
> >> GWT.create(com.google.gwt.user.client.ui.HorizontalPanel.class);
>
> >> f_VerticalPanel2.add(okbandeau);
> >> f_HorizontalPanel1.add(f_VerticalPanel2);
> >> f_HorizontalPanel1.setHorizontalAlignment(com.google.gwt.user.client.ui.Has
> >>  HorizontalAlignment.ALIGN_CENTER);
> >> f_HorizontalPanel1.setWidth("100%");
>
> >> And finally, I obtain the html code below :
>
> >> 
> >>   
> >>     
> >>       
> >>         
> >>           
> >>             
> >>               
> >>                 
> >>                   
> >>                     
> >>                       
> >>                         ...
> >>                       
> >>                     
> >>                   
> >>                 
> >>               
> >>             
> >>           
> >>         
> >>       
> >>     
> >>   
> >> 
>
> >> I think I made a mistake somewhere because I get in the first "td"  >> align="left" style="vertical-align: top;"> when I should  >> align="center" style="vertical-align: top;">
>
> >> Thank you for any 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.



Selenium RC and OutOfMemory DevMode error

2010-03-15 Thread Tristan
I started this in Google App Engine Java group, but as Ikai pointed
out, it probably belongs here. Does anyone have any hints for this
problem?

Tristan
---
Hi,
I have Selenium RC hooked up and automated Selenium tests going using
JUnit. The problem is that after Selenium runs about 34 out of the 43
stories so far, my module complains that it is out of memory: [ERROR]
Out of memory; to increase the amount of memory, use the -Xmx flag at
startup (java -Xmx128M ...)

Every time a Selenium test case is run, it opens a new Safari window
and loads the page. I can see on the server (via eclipse) that it is
rebinding my RPC services every time, which is normal as far as I can
tell. And around 34 tests, during this rebinding, it gives me the
above out of memory error.

I already have the server memory set to -Xmx1024M... so that
shouldn't
be an issue.. is there a problem (ie memory leak) with DevMode? Or am
I missing some parameter somewhere?


Ikai L (Google)
--
Tristan,
Is this a Google Web Toolkit question or a Google App Engine
(OutOfMemoryError on Jetty) question? It sounds like a GWT question,
in which case you should ask here:
http://groups.google.com/group/Google-Web-Toolkit


Tristan

I think it's a Google App Engine (OutOfMemoryError on Jetty)
question.
After Selenium RC hits the Dev Mode url about 34 times, I get
previously mentioned error [ERROR] Out of memory; to increase the
amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)
This happens with -Xmx1024M setting.
So is there a way to free up memory after connection is broken? When
Selenium breaks the connection, DevMode quits with the following
exception:
20:02:12.232 [ERROR] [myModule] Remote connection lost
com.google.gwt.dev.shell.BrowserChannel$RemoteDeathError: Remote
connection lost
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java :
1683)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
nelServer.java:
401)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java :
222)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.io.EOFException: null
at java.io.DataInputStream.readByte(DataInputStream.java:250)
at com.google.gwt.dev.shell.BrowserChannel
$Message.readMessageType(BrowserChannel.java:1131)
at
com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java :
1659)
at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
nelServer.java:
401)
at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java :
222)
at java.lang.Thread.run(Thread.java:637)
So does this cause a memory leak? Then after 34 of these, it finally
runs out of memory.

Tristan
---
Sorry, forgot to thank you for responding quickly :) Thanks Ikai.

Ikai L (Google)

I don't recognize that stack trace - I see com.google.gwt.dev.shell.
GWT has a DevMode server, from what I remember. If it possible for
you
to compile the code to JavaScript, then run your Selenium tests? It
really does look like a GWT issue, but the references to
BrowserChannel somewhat unnerve me.

Tristan
-
Thanks for taking a crack at it Ikai, I compiled the code but still
ran out of memory around 34 Selenium touches. I'll post it in the GWT
forum as you suggested.
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: Grid cell formatting

2009-12-25 Thread Tristan
I think you would need to create a css style like...

.table-cell: {
  align: left;
  valign: top;
}

but you wold still have to iterate through each one of your cells and
do addStyleName("table-cell") or something like that. because align
and valign could be different for , , and ...  so you
just have to specify what you really mean... just a hunch (not an
expert :) )


On Dec 25, 8:05 am, Paul Grenyer  wrote:
> Hi All
>
> How can I do this:
>
> public class Grid extends com.google.gwt.user.client.ui.Grid
> {
>         public Grid(int rows, int columns)
>         {
>                 super(rows, columns);
>
>                 for(int x = 0; x < columns; ++x)
>                 {
>                         for(int y = 0; y < rows; ++y)
>                         {
>                                 
> this.getCellFormatter().setAlignment(y,x,HasAlignment.ALIGN_LEFT,
> HasAlignment.ALIGN_TOP);
>                         }
>                 }
>         }
>
> }
>
> in CSS? All I want to do is specify that all cells have a left
> justified horizontal alignment and a top justified vertical alignment.
>
> Thanks!
>
> --
> Thanks
> Paul
>
> Paul Grenyer
> e: paul.gren...@gmail.com
> b: paulgrenyer.blogspot.com

--

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




Re: Why doesn't com.google.gwt.user.client.ui.Grid have a style name?

2009-12-25 Thread Tristan
A hint may come from UiBinder. I haven't found a way to use Grid in
UiBinder, and have to use the table instead, which is more intuitive
in that framework. But because it is a table, the table style doesn't
really do much for the individual table rows and table data, so
specifying global style on  tag could be misleading and maybe
that's why it's left null?  I'm not an expert in this, but it's a
hunch..

On Dec 25, 8:04 am, Paul Grenyer  wrote:
> Hi
>
> If i do this:
>
> Grid g = new Grid(rows,columns);
> String s1 = g.getStyleName();
> String s2 = g.getStylePrimaryName();
>
> both s1 and s2 are empty strings. This isn't true of other controls
> such as TextBox, etc.
>
> Any ideas?
>
> --
> Thanks
> Paul
>
> Paul Grenyer
> e: paul.gren...@gmail.com
> b: paulgrenyer.blogspot.com

--

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




Re: Code Split and Superclasses.

2009-12-25 Thread Tristan
Correction, the splitter looks like this:

public class GenericSplitter {

  HashMap providers; // populated with Aprovider and Bprovider

  public void onSplit {
GWT.runAsync(new RunAsyncCallback(){
  ...
  onSuccess(){
MySuperclass sup = providers.get( AorBparam ).get();
sup.doGeneric();
  }
}
   }

}

On Dec 25, 12:00 pm, Tristan  wrote:
> Here is an example I am trying to code split:
>
> public class MySuperclass {
>
>   public abstract doSpecific();
>
>   public void doGeneric(){
>     doSpecific();
>   }
>
> }
>
> public class A extends MySuperclass {
>
>   public doSpecific(){
>     // do something for A
>   }
>
> }
>
> public class B extends MySuperclass {
>
>   public doSpecific(){
>     // do something for B
>   }
>
> }
>
> The fun part happens when I do something to code split A and B.
>
> public class Splitter {
>
>   public void onSplitA {
>     GWT.runAsync(new RunAsyncCallback(){
>       ...
>       onSuccess(){
>         A a = providerOfA.get();
>         a.doGeneric();
>       }
>     }
>    }
>
>    public void onSplitB {
>      GWT.runAsync(new RunAsyncCallback(){
>        ...
>        onSuccess(){
>          B b = providerOfB.get();
>          b.doGeneric();
>        }
>       }
>     }
>
> }
>
> The SOYC has the following dependencies resulting in a trivial split
> (the method itself is split, but A and B are downloaded in initial
> download):
>
> A.doGeneric() -> MySuperclass.doGeneric -> B.doSpecific();
> also
> B.doGeneric() -> MySuperclass.doGeneric() -> A.doSpecific();
>
> I think I understand why that happens. But is this the desired
> functionality? Is there no way to add state information to the code
> splitter to determine which of the classes are calling the generic?
> This severely hinders code reuse. Is there a different pattern I
> should use?
>
> Thanks, Tristan

--

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




Code Split and Superclasses.

2009-12-25 Thread Tristan
Here is an example I am trying to code split:

public class MySuperclass {

  public abstract doSpecific();

  public void doGeneric(){
doSpecific();
  }

}

public class A extends MySuperclass {

  public doSpecific(){
// do something for A
  }

}

public class B extends MySuperclass {

  public doSpecific(){
// do something for B
  }

}

The fun part happens when I do something to code split A and B.

public class Splitter {

  public void onSplitA {
GWT.runAsync(new RunAsyncCallback(){
  ...
  onSuccess(){
A a = providerOfA.get();
a.doGeneric();
  }
}
   }

   public void onSplitB {
 GWT.runAsync(new RunAsyncCallback(){
   ...
   onSuccess(){
 B b = providerOfB.get();
 b.doGeneric();
   }
  }
}
}

The SOYC has the following dependencies resulting in a trivial split
(the method itself is split, but A and B are downloaded in initial
download):

A.doGeneric() -> MySuperclass.doGeneric -> B.doSpecific();
also
B.doGeneric() -> MySuperclass.doGeneric() -> A.doSpecific();

I think I understand why that happens. But is this the desired
functionality? Is there no way to add state information to the code
splitter to determine which of the classes are calling the generic?
This severely hinders code reuse. Is there a different pattern I
should use?

Thanks, Tristan

--

You received 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, GIN, UiBinder

2009-12-15 Thread Tristan
Would you be able to provide a sample non-trivial example? ie
injecting a child view into a parent view? I have been trying to do
this and I get a runtime error of ClassNotFoundException when the
provider tries to do "new ParentView(childView)".

On Dec 9, 9:30 am, "P.G.Taboada"  wrote:
> Well, that is what I am sort of doing. And it turns out to be a kind
> of service location.
>
> There are some workarounds, and they are nothing more than just that:
> a workaround.
>
> I am letting GIN build all of my presenters, and then I let them bind
> the UIs.
> Not nice, but that is the way with the fewest dependency lookup calls
> for me atm.
>
> On 9 Dez., 16:13, Thomas Broyer  wrote:
>
>
>
> > On Dec 9, 12:50 pm, "P.G.Taboada"  wrote:
>
> > > Hi,
>
> > > as many other GWT developers I really like the above mentioned
> > > approaches.
>
> > > I am having a little bit of pain when it comes down to embedding views
> > > into views. UiBinder and GIN don't play well together, I am struggling
> > > with ugly locator pattern usages to create my sub/ embedded views. My
> > > code is now full of //WORKAROUND task tags, hoping to get it solved
> > > somehow someday.
>
> > > But that is the point: at which direction should I look? MVP tells me
> > > to have views injected into my presenter, really nice. UiBinder on the
> > > other hand needs the views, would create them properly, but then they
> > > would not be available to GIN (compile-time vs. runtime).
>
> > > If my feeling is right, we would need some way to hook up into the
> > > UIBinder, providing a GIN based MVP resolver, quite similar to the
> > > variable resolvers people use in JSF to get hands on Spring beans from
> > > JSF. But as far I can see, UiBinder does not provide such extension
> > > point.
>
> > > Any thoughts here?
>
> > How about injecting your "child views" (or Provider<>s) into your view
> > and then use @UiField(provided=true) to tell UiBinder you're providing
> > those widgets?

--

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

2009-12-15 Thread Tristan
Aside from official docs I haven't seen much (and I've been looking
because of Gin and UiBinder issues I've been having)

If anyone is putting together a tutorial, it'd be great if you showed
how to use GIN effectively in a non-trivial example (so, an injected
view dependent on other injected views would be great!).



On Dec 15, 2:13 am, Nian Zhang  wrote:
> The UiBInder is diffcult to use, may be it's easy for the developers
> who were familiar with it, but to the new one, iit's hard to start, so
> is there any tutorials about this?
>
> 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: MVP: where to put the presenter?

2009-12-15 Thread Tristan
Check out this for starters:

http://code.google.com/p/gwt-presenter/

You probably want some tree like structure... few presenters for your
pages, and then dependent presenters relying on them.

To make the MVP model effective in GWT, you should probably get
familiar with using the EventBus and Command Pattern as well, see
here:

http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html

Good luck

-Tristan

On Dec 15, 8:27 am, jbdhl  wrote:
> I try to follow the (an?) MVP pattern, and while handling the View for
> a sub-component (ie "myComponent") is relatively easy (just implement
> it as a composite Widget and assemble the application with this widget
> along with all the other widgets), I don't see any natural place to
> put the presenters.
> In the simple case with one view/presenter I could write something
> like
>
>    public class Booking implements EntryPoint {
>      MyComponentPresenter p;
>      public void onModuleLoad() {
>        RootPanel.get().add(new MyComponentView());
>        p = new MyComponentPresenter();
>      }
>    }
>
> But in larger apps, eg apps with several independent tabs, it's not
> that easy to me: should I make an instance of all presenters in the
> entrypoint class? That seems a bit messy and unstructured to me. But
> where else would be a natural place for putting the presenters?

--

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




Rebinding com.google.gwt.user.client.impl.WindowImpl ERROR

2009-12-14 Thread Tristan
Ok,

Asked this a bit ago... haven't been able to fix. What in the world is
this?

Rebinding com.google.gwt.user.client.impl.WindowImpl
  Checking rule 
Error while executing the JavaScript provider for property
'user.agent'

It happens when I try to connect to DevMode from Safari or Firefox on
Mac.

I find it interesting that it refers to IE version WindowImpl
considering I am on Mac using Firefox or Safari.

Any pointers?

-Tristan

--

You received 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 fails binding for "com.google.gwt.user.client.impl.HistoryImpl"

2009-12-14 Thread Tristan
Actually... I keep on getting this error randomly now... so no fix :(

On Dec 12, 11:04 am, Tristan  wrote:
> It appears that updating my Safari GWT Plugin solved the problem.
> However, nothing in that error or the browser indicated that the
> Plugin should have been updated.
>
> On Dec 12, 10:57 am, Tristan  wrote:
>
>
>
> > Hey,
>
> > I started getting this error when launching DevMode, can anyone point
> > me in the right direction?
>
> > 10:49:16.348 [DEBUG] Rebinding
> > com.google.gwt.user.client.impl.HistoryImpl
> > 10:49:16.351 [DEBUG] Checking rule  > class='com.google.gwt.user.client.impl.HistoryImplIE6'/>
> >     Error while executing the JavaScript provider for property
> > 'user.agent'
> >     Unable to get value of property 'user.agent'
> > 10:49:16.592 [ERROR] Deferred binding failed for
> > 'com.google.gwt.user.client.impl.HistoryImpl'; expect subsequent
> > failures
>
> > -Tristan

--

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




Re: uibinder with MVP and interfaces

2009-12-14 Thread Tristan
The reason this is happening is because when you look at your
HelloWorldView.ui.xml you'll see that the tag is not called
WorldPresenter.Display but World. If you rename it in your field... ie

@UiField(provided=true)
World world;

it should work... then, just cast this.world = (World) world;

let me know if that works.. i'm having a similar issue. And the
compiler is droppin classes on me, see
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/0cc5b39d303b2484#

-Tristan

On Dec 14, 1:02 pm, Arthur Kalmenson  wrote:
> Hello everyone,
>
> We'd like to start using uibinder, but we've run into an issue using it with
> interfaces and MVP. In the documentation about 
> uibinder:http://code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html#Ap...
> example shows using HasText with a Label or some other widget that
> implements hasText. However, it doesn't seem possible to do that for our own
> interfaces. For example, I have a WorldPresenter class:
>
> public class WorldPresenter {
>
>  public interface Display {
>
> HasClickHandlers getButton();
>
> }
>
> ...
>
> }
>
> and an implementation of the Display, called World:
>
> public class World extends Composite implements WorldPresenter.Display {
>
>  private static WorldUiBinder uiBinder = GWT.create(WorldUiBinder.class);
>
>  interface WorldUiBinder extends UiBinder {
>
> }
>
> �...@uifield
>
> Button button;
>
>  public World() {
>
> initWidget(uiBinder.createAndBindUi(this));
>
> }
>
> �...@uihandler("button")
>
> void onClick(ClickEvent e) {
>
> Window.alert("Hello!");
>
> }
>
>  public HasClickHandlers getButton() {
>
> return button;
>
> }
> }
>
> And I try to have this implementation injected into another view called
> HelloWorldView:
>
> public class HelloWorldView extends Composite implements
>
> HelloWorldPresenter.Display {
>
>  private static HelloWorldUiBinder uiBinder =
>
> GWT.create(HelloWorldUiBinder.class);
>
>  interface HelloWorldUiBinder extends UiBinder {
>
> }
>
> �...@uifield(provided = true)
>
> WorldPresenter.Display world;
>
> �...@uifield
>
> HasText button;
>
> �...@inject
>
> public HelloWorldView(WorldPresenter.Display world) {
>
> this.world = world;
>
> initWidget(uiBinder.createAndBindUi(this));
>
> }
>
>  public WorldPresenter.Display getWorld() {
>
> return world;
>
> }
>
>  public HasText getButton() {
>
> return button;
>
> }
> }
>
> Hosted mode tells me:
>
>      Line 17: Type mismatch: cannot convert from WorldPresenter.Display to
> World
>
> Even though it is able to convert HasText to Button. Is there any reason for
> this? Am I doing something wrong? I put all the source up on github if it
> helps:http://github.com/arthurkalm/randomcode/tree/uibinder-with-interfaces
>
> Thank you for any help you can provide.
>
> All the best,
> --
> Arthur Kalmenson

--

You received 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 Compiler managed to lose one of my display classes. (GIN + UiBinder)

2009-12-14 Thread Tristan
Hey,

So this is interesting. The Compiler decided not to compile one of my
classes. So at runtime I get the wonderful ClassNotFound exception.
There are no errors, everything succeeds. No idea how to fix it, and
it's very weird. Here's the setup...

@Singleton
public class LandingPagePresenterImpl implements LandingPagePresenter
{

  LandingPageDisplayProvider landingPageDisplayProvider;
  ...
  @Inject
  public LandingPagePresenterImpl(LandingPageDisplayProvider
landingPageDisplayProvider, ... ){
this.landingPageDisplayProvider = landingPageDisplayProvider;
...
  }

  ...

  @Override
  public void onAtLandingPage(AtLandingPage place) {
...
// setup child presenters
setLoginPresenter(loginPresenterProvider.get());

...
setDisplay(constructDisplay());
...
  }

  public LandingPageDisplay constructDisplay() {
LoginDisplay loginDisplay = (LoginDisplay) getLoginPresenter
().display();
return landingPagedisplayProvider.get(loginDisplay);
<<<<<---   CODE FAILS HERE! (ClassNotFound)
  }

}

The provider looks like so...

@Singleton
public class LandingPageDisplayProvider implements
Provider {

  /* dependencies */
  private LandingPageBinder binder;

  @Inject
  public LandingPageDisplayProvider(LandingPageBinder binder) {
this.binder = binder;
  }

  @Override
  public LandingPageDisplay get() {
return null;
  }

  public LandingPageDisplay get(LoginDisplay loginDisplay) {
return new LandingPageDisplayImpl(binder, loginDisplay);
  }

}

within my Module I have

bind(LandingPageDisplay.class).toProvider
(LandingPageDisplayProvider.class);

For good measure here is the display impl

public class LandingPageDisplayImpl extends Composite implements
LandingPageDisplay {

  public interface LandingPageBinder extends
  UiBinder {
  }

  private LandingPageBinder binder;
  @UiField(provided = true)
  LoginDisplayImpl loginDisplay;

  public LandingPageDisplayImpl(LandingPageBinder binder, LoginDisplay
loginDisplay) {
this.binder = binder;
this.loginDisplay = (LoginDisplayImpl) loginDisplay;
initWidget(this.binder.createAndBindUi(this));
  }

}

So, one, I think its an MVP compatible way of using UiBinder and GIN.
And two, it's not working :).  I should mention that LoginDisplay
doesn't have any issues as it is just a Label, so it doesn't have any
UiField annotations.

When I compile.. I look at SOYC and LandingPageDisplayImpl is
there!!
In SOYC my compiled display package looks like this:
package.LandingPageDisplayImpl
package.LoginDisplayImpl
package.LoginDisplayImpl_LoginDisplayBinderImpl  (the binder
implementation that GIN automatically injects by calling GWT.create)

So, from SOYC it seems that LandingPageDisplayBinderImpl is missing.
But when I step through Debug code it says LandingPageDisplayImpl is
missing (ClassNotFound exception).

Does anyone have an idea where to start???

-Tristan

--

You received 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 fails binding for "com.google.gwt.user.client.impl.HistoryImpl"

2009-12-12 Thread Tristan
It appears that updating my Safari GWT Plugin solved the problem.
However, nothing in that error or the browser indicated that the
Plugin should have been updated.

On Dec 12, 10:57 am, Tristan  wrote:
> Hey,
>
> I started getting this error when launching DevMode, can anyone point
> me in the right direction?
>
> 10:49:16.348 [DEBUG] Rebinding
> com.google.gwt.user.client.impl.HistoryImpl
> 10:49:16.351 [DEBUG] Checking rule  class='com.google.gwt.user.client.impl.HistoryImplIE6'/>
>     Error while executing the JavaScript provider for property
> 'user.agent'
>     Unable to get value of property 'user.agent'
> 10:49:16.592 [ERROR] Deferred binding failed for
> 'com.google.gwt.user.client.impl.HistoryImpl'; expect subsequent
> failures
>
> -Tristan

--

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




DevMode fails binding for "com.google.gwt.user.client.impl.HistoryImpl"

2009-12-12 Thread Tristan
Hey,

I started getting this error when launching DevMode, can anyone point
me in the right direction?

10:49:16.348 [DEBUG] Rebinding
com.google.gwt.user.client.impl.HistoryImpl
10:49:16.351 [DEBUG] Checking rule 
Error while executing the JavaScript provider for property
'user.agent'
Unable to get value of property 'user.agent'
10:49:16.592 [ERROR] Deferred binding failed for
'com.google.gwt.user.client.impl.HistoryImpl'; expect subsequent
failures

-Tristan

--

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




SOYC report and code split don't make sense

2009-12-06 Thread Tristan
Hey,

I came across a weird case that no matter what I do I cannot fix. Here
is something that roughly describes the problem:

I have a class that does something like:

public abstract class MyAbstractClass{

@Inject SomeProvider someProvider;

public Widget getWidget(BaseObject object){
  ...
  someProvider.get()
  ...
}

}

When I do GWT compile and look at SOYC, the code split does not work
because of of the following "dependency":

com.my.package.some.place.UnrelatedClassProvider.get()
 com.my.package.some.unrelated.place.MyAbstractClass::getWidget
()

It appears that Code Split is confused about what provider gets
called, SomeProvider does get called, but for some reason it thinks
that UnrelatedClassProvider.get() is getting called. Any idea why in
the world this would happen?

-Tristan

--

You received 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: -server argument documentation?

2009-11-21 Thread Tristan
Answer:

-server com.google.appengine.tools.development.gwt.AppEngineLauncher

On Nov 20, 12:38 pm, Tristan  wrote:
> I am using GWT 2.0 built from trunk and I want to be able to launch my
> GWT / GAE app in DevMode (so that it uses GAE and not just Jetty).
> What is the the correct servlet configuration launcher that I should
> pass with the "-server" option in my Java Application Configuration?

--

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




Re: GWT 2.0 RC1 deRPC fails on App Engine?

2009-11-21 Thread Tristan
in case this is the problem, the -server argument is:

-server com.google.appengine.tools.development.gwt.AppEngineLauncher

On Nov 21, 9:39 am, Tristan  wrote:
> Don't know if it is the same problem.. but are you initializing GAE to
> run in your application configuration? I couldn't get server side to
> work because when configuring a custom Java Application Configuration,
> since Web Application doesn't work with GWT 2.0 because it is now
> DevMode and not HostedMode. To get GAE up, we need to pass a "-server"
> argument so that GAE runs instead of plain old Jetty. I haven't gotten
> an answer from anyone what that -server argument should be.
>
> Tristan
>
> On Nov 18, 11:01 pm, Kabe  wrote:
>
> > I'm trying to use deRPC of GWT 2.0 RC1 on App Engine and i'm getting
> > the following exception. Is this because sun.misc.Unsafe is
> > unavailable on App Engine (i'm not sure it isn't, but it seems
> > possible)? Seems strange that GWT 2.0 RPC would not work on App
> > Engine. Did i fail to configure something correctly or is this an
> > intended incompatibility with App Engine?
>
> > javax.servlet.ServletContext log: Exception while dispatching incoming
> > RPC call
> > java.lang.ExceptionInInitializerError
> >         at com.google.gwt.rpc.server.RPC.decodeRequest(RPC.java:158)
> >         at com.google.gwt.rpc.server.RpcServlet.processCall(RpcServlet.java:
> > 141)
> >         at com.google.gwt.rpc.server.RpcServlet.processPost(RpcServlet.java:
> > 203)
> >         at 
> > com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost
> > (AbstractRemoteServiceServlet.java:62)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
> >         at 
> > org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> > 487)
> >         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1093)
> >         at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
> > (SaveSessionFilter.java:35)
> >         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >         at
> > com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> > (TransactionCleanupFilter.java:43)
> >         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> > (ServletHandler.java:1084)
> >         at org.mortbay.jetty.servlet.ServletHandler.handle
> > (ServletHandler.java:360)
> >         at org.mortbay.jetty.security.SecurityHandler.handle
> > (SecurityHandler.java:216)
> >         at org.mortbay.jetty.servlet.SessionHandler.handle
> > (SessionHandler.java:181)
> >         at org.mortbay.jetty.handler.ContextHandler.handle
> > (ContextHandler.java:712)
> >         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> > 405)
> >         at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
> > (AppVersionHandlerMap.java:238)
> >         at org.mortbay.jetty.handler.HandlerWrapper.handle
> > (HandlerWrapper.java:139)
> >         at org.mortbay.jetty.Server.handle(Server.java:313)
> >         at 
> > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> > 506)
> >         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
> > (HttpConnection.java:830)
> >         at 
> > com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
> > (RpcRequestParser.java:76)
> >         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
> >         at
> > com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
> > (JettyServletEngineAdapter.java:139)
> >         at com.google.apphosting.runtime.JavaRuntime.handleRequest
> > (JavaRuntime.java:239)
> >         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > $6.handleBlockingRequest(RuntimePb.java:5135)
> >         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> > $6.handleBlockingRequest(RuntimePb.java:5133)
> >         at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
> > (BlockingApplicationHandler.java:24)
> >         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> > 363)
> >         at com.google.net.rpc.impl.Server$2.run(Server.java:814)
> >         at com.google.tracing.LocalTraceSpanRunnable.run
> > (LocalTraceSpanRunnable.java:56)
> >         at com.google.tracing.LocalT

Re: Google Web Toolkit 2.0 RC1 Now Available

2009-11-21 Thread Tristan
To answer my own question:

-server com.google.appengine.tools.development.gwt.AppEngineLauncher

On Nov 20, 5:07 pm, Tristan  wrote:
> What do I pass to the -server argument when I want gwt 2.0 to run with
> all the neat GAE stuff (the google eclipse plugin does it
> automatically in 1.7)
>
> On Nov 18, 10:01 am, Arthur Kalmenson  wrote:
>
> > Oh, good to hear. There was some discussion about whether deRPC would
> > make it into 2.0 or not, and I didn't see it mentioned in the Wiki.
> > Sorry about that!
>
> > --
> > Arthur Kalmenson
>
> > On Tue, Nov 17, 2009 at 3:33 PM, Chris Ramsdale  
> > wrote:
> > > The deRPC components live under the com.google.gwt.rpc package and are
> > > available in the RC. The doc may be a bit sparse or missing in a few spots
> > > but we're adding content daily as we march towards release.
>
> > > On Tue, Nov 17, 2009 at 2:58 PM, Arthur Kalmenson 
> > > wrote:
>
> > >> Congrats on the release! We'll definitely be using GWT 2 in our next
> > >> project, I can't wait!
>
> > >> But I guess deRPC didn't make it in? Any chance of it appearing before
> > >> the final release?
>
> > >> --
> > >> Arthur Kalmenson
>
> > >> On Tue, Nov 17, 2009 at 2:32 PM, br...@google.com 
> > >> wrote:
> > >> > You should be in good shape either way, actually. The same project
> > >> > structure will work with either SDK version, so you can retain the
> > >> > option to switch back and forth. The only "one-way" choice would be if
> > >> > you start using the new UiBinder, ClientBundle, and layout panel
> > >> > stuff. If you need to play it conservatively, you could hold off on
> > >> > those things, but you can at least start using the new in-browser
> > >> > development mode, which should make you even more productive as you
> > >> > push toward your own launch.
>
> > >> > Big picture, though, we're eager to finalize 2.0, so I wouldn't expect
> > >> > too long an RC cycle this time. In other words, you should even be
> > >> > safe to start using 2.0-only features in the timeframe you're
> > >> > describing.
>
> > >> > On Nov 17, 2:23 pm, Yozons Support on Gmail  wrote:
> > >> >> What's the ETA now for GWT 2.0 final?  I am developing now under 
> > >> >> 1.7.1,
> > >> >> but
> > >> >> won't expect to be in production for another 4 months or so.  Would I
> > >> >> be
> > >> >> better off getting a jump on 2.0 now or would I risk 2.0 not being
> > >> >> ready for
> > >> >> production over the next several months?
>
> > >> > --
>
> > >> > You received 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=.
>
> > >> --
>
> > >> You received 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=.
>
> > > --
>
> > > You received 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=.
>
>

--

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




Re: GWT 2.0 RC1 deRPC fails on App Engine?

2009-11-21 Thread Tristan
Don't know if it is the same problem.. but are you initializing GAE to
run in your application configuration? I couldn't get server side to
work because when configuring a custom Java Application Configuration,
since Web Application doesn't work with GWT 2.0 because it is now
DevMode and not HostedMode. To get GAE up, we need to pass a "-server"
argument so that GAE runs instead of plain old Jetty. I haven't gotten
an answer from anyone what that -server argument should be.

Tristan

On Nov 18, 11:01 pm, Kabe  wrote:
> I'm trying to use deRPC of GWT 2.0 RC1 on App Engine and i'm getting
> the following exception. Is this because sun.misc.Unsafe is
> unavailable on App Engine (i'm not sure it isn't, but it seems
> possible)? Seems strange that GWT 2.0 RPC would not work on App
> Engine. Did i fail to configure something correctly or is this an
> intended incompatibility with App Engine?
>
> javax.servlet.ServletContext log: Exception while dispatching incoming
> RPC call
> java.lang.ExceptionInInitializerError
>         at com.google.gwt.rpc.server.RPC.decodeRequest(RPC.java:158)
>         at com.google.gwt.rpc.server.RpcServlet.processCall(RpcServlet.java:
> 141)
>         at com.google.gwt.rpc.server.RpcServlet.processPost(RpcServlet.java:
> 203)
>         at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost
> (AbstractRemoteServiceServlet.java:62)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
> 487)
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1093)
>         at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter
> (SaveSessionFilter.java:35)
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
>         at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter
> (TransactionCleanupFilter.java:43)
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter
> (ServletHandler.java:1084)
>         at org.mortbay.jetty.servlet.ServletHandler.handle
> (ServletHandler.java:360)
>         at org.mortbay.jetty.security.SecurityHandler.handle
> (SecurityHandler.java:216)
>         at org.mortbay.jetty.servlet.SessionHandler.handle
> (SessionHandler.java:181)
>         at org.mortbay.jetty.handler.ContextHandler.handle
> (ContextHandler.java:712)
>         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
> 405)
>         at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle
> (AppVersionHandlerMap.java:238)
>         at org.mortbay.jetty.handler.HandlerWrapper.handle
> (HandlerWrapper.java:139)
>         at org.mortbay.jetty.Server.handle(Server.java:313)
>         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
> 506)
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete
> (HttpConnection.java:830)
>         at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable
> (RpcRequestParser.java:76)
>         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>         at
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest
> (JettyServletEngineAdapter.java:139)
>         at com.google.apphosting.runtime.JavaRuntime.handleRequest
> (JavaRuntime.java:239)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5135)
>         at com.google.apphosting.base.RuntimePb$EvaluationRuntime
> $6.handleBlockingRequest(RuntimePb.java:5133)
>         at com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest
> (BlockingApplicationHandler.java:24)
>         at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:
> 363)
>         at com.google.net.rpc.impl.Server$2.run(Server.java:814)
>         at com.google.tracing.LocalTraceSpanRunnable.run
> (LocalTraceSpanRunnable.java:56)
>         at com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan
> (LocalTraceSpanBuilder.java:516)
>         at com.google.net.rpc.impl.Server.startRpc(Server.java:769)
>         at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
>         at com.google.net.rpc.impl.ServerConnection.messageReceived
> (ServerConnection.java:437)
>         at com.google.net.rpc.impl.RpcConnection.parseMessages
> (RpcConnection.java:319)
>         at com.google.net.rpc.impl.RpcConnection.dataReceived
> (RpcConnection.java:290)
>         at com.google.net.async.Connection.handleReadEvent(Connection.java:
&g

Re: Google Web Toolkit 2.0 RC1 Now Available

2009-11-20 Thread Tristan
What do I pass to the -server argument when I want gwt 2.0 to run with
all the neat GAE stuff (the google eclipse plugin does it
automatically in 1.7)

On Nov 18, 10:01 am, Arthur Kalmenson  wrote:
> Oh, good to hear. There was some discussion about whether deRPC would
> make it into 2.0 or not, and I didn't see it mentioned in the Wiki.
> Sorry about that!
>
> --
> Arthur Kalmenson
>
>
>
> On Tue, Nov 17, 2009 at 3:33 PM, Chris Ramsdale  wrote:
> > The deRPC components live under the com.google.gwt.rpc package and are
> > available in the RC. The doc may be a bit sparse or missing in a few spots
> > but we're adding content daily as we march towards release.
>
> > On Tue, Nov 17, 2009 at 2:58 PM, Arthur Kalmenson 
> > wrote:
>
> >> Congrats on the release! We'll definitely be using GWT 2 in our next
> >> project, I can't wait!
>
> >> But I guess deRPC didn't make it in? Any chance of it appearing before
> >> the final release?
>
> >> --
> >> Arthur Kalmenson
>
> >> On Tue, Nov 17, 2009 at 2:32 PM, br...@google.com 
> >> wrote:
> >> > You should be in good shape either way, actually. The same project
> >> > structure will work with either SDK version, so you can retain the
> >> > option to switch back and forth. The only "one-way" choice would be if
> >> > you start using the new UiBinder, ClientBundle, and layout panel
> >> > stuff. If you need to play it conservatively, you could hold off on
> >> > those things, but you can at least start using the new in-browser
> >> > development mode, which should make you even more productive as you
> >> > push toward your own launch.
>
> >> > Big picture, though, we're eager to finalize 2.0, so I wouldn't expect
> >> > too long an RC cycle this time. In other words, you should even be
> >> > safe to start using 2.0-only features in the timeframe you're
> >> > describing.
>
> >> > On Nov 17, 2:23 pm, Yozons Support on Gmail  wrote:
> >> >> What's the ETA now for GWT 2.0 final?  I am developing now under 1.7.1,
> >> >> but
> >> >> won't expect to be in production for another 4 months or so.  Would I
> >> >> be
> >> >> better off getting a jump on 2.0 now or would I risk 2.0 not being
> >> >> ready for
> >> >> production over the next several months?
>
> >> > --
>
> >> > You received 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=.
>
> >> --
>
> >> You received 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=.
>
> > --
>
> > You received 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=.

--

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




-server argument documentation?

2009-11-20 Thread Tristan
I am using GWT 2.0 built from trunk and I want to be able to launch my
GWT / GAE app in DevMode (so that it uses GAE and not just Jetty).
What is the the correct servlet configuration launcher that I should
pass with the "-server" option in my Java Application Configuration?

--

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




Re: Is there a way to tell the GWT Compiler to ignore pieces of code?

2009-11-18 Thread Tristan
Excellent! That is exactly what I needed Sri, thank you.

On another note, I am having trouble compiling and running the debug/
test module at all. I can compile it, but I don't know how to use the
test module instead of the regular module when launching from Eclipse.
I'm using gwt 2.0 built from trunk, so I'm not sure what the
configuration is supposed to look like (I can get the normal module to
run properly just fine). I just keep on getting the error trying to
use the debug module in dev mode: "Failed to load module 'myModule'
from user agent 'Safari DMP'at " (where myModule is the normal one
that works by itself)

Here's the configuration I'm using

Java Application
[main]
project: myproject
main class: com.google.gwt.dev.DevMode
[arguments]
program arguments: com.unecloud.SeleniumTests -startupUrl
http://localhost:/MyPage.html
[classpath]
I have the source and test folder included (SeleniumTests.gwt.xml is
in the test folder)

Any ideas what I'm missing?

On Nov 18, 8:32 pm, Sripathi Krishnan 
wrote:
> GWT builds that specific use case.
>
> Use the widget.ensureDebugId() to set the ids.
>
> In dev and test, inherit the debug module. Put the following line in your
> module xml
> 
>
> When compiling for production, remove the debug module. That way, the test
> code will be removed.
>
> To simplify your scripts, create a new module MyModuleTest.gwt.xml which
> inherits from MyModule.gwt.xml, and add the extra inherits line. Then
> compile the appropriate module based on the environment.
>
> --Sri
>
> 2009/11/19 Tristan 
>
> > Here's what I would like to do:
>
> > Selenium tests are easiest to run if each element has a unique id. I
> > would like to be able to do something along the lines of:
>
> > if Compiler style is Pretty.. include the line:
>
> >  widget.setElementId("easy-to-locate-id-for-tests")
>
> > but if I set the Compiler to Obfuscated (i.e. production), I don't
> > want that extra test code in there.
>
> > Is this possible? If so, how?
>
> > -Tristan
>
> > --
>
> > You received 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=.




Is there a way to tell the GWT Compiler to ignore pieces of code?

2009-11-18 Thread Tristan
Here's what I would like to do:

Selenium tests are easiest to run if each element has a unique id. I
would like to be able to do something along the lines of:

if Compiler style is Pretty.. include the line:

  widget.setElementId("easy-to-locate-id-for-tests")

but if I set the Compiler to Obfuscated (i.e. production), I don't
want that extra test code in there.

Is this possible? If so, how?

-Tristan

--

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




Re: GWT 2.0 ms1 RPC issue IncompatibleRemoteServiceException: Parameter 0 of is of an unknown type 'java.lang.String/2004016611'

2009-11-15 Thread Tristan
ditto

On Oct 15, 8:39 pm, tskaife  wrote:
> While running in either hosted mode, or compiled I get this error. I
> have no problems with RPC calls that pass primitive types. But I've
> tried both java.lang.String and java.lang.Long and get the same
> results. I've tried both JDK 1.6.0_10 and 1.5.0_21 to no avail. I'm on
> Linux, if that matters, and haven't had any problems with the
> application while using GWT 1.7.1, 1.7.0, 1.6.4... Any insights on
> what it might be would be much appreciated.
>
> com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException:
> Parameter 0 of is of an unknown type 'java.lang.String/2004016611'
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance
> (NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
> (DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> 105)
>         at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> 71)
>         at com.google.gwt.dev.shell.OophmSessionHandler.invoke
> (OophmSessionHandler.java:146)
>         at
> com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn
> (BrowserChannel.java:1573)
>         at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript
> (BrowserChannelServer.java:124)
>         at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke
> (ModuleSpaceOOPHM.java:120)
>         at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
> 502)
>         at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
> (ModuleSpace.java:275)
>         at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject
> (JavaScriptHost.java:91)
>         at
> com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException_FieldSerializer.instantiate
> (transient source for
> com.google.gwt.user.client.rpc.IncompatibleRemoteServiceException_FieldSerializer)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> 103)
>         at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> 71)
>         at com.google.gwt.dev.shell.OophmSessionHandler.invoke
> (OophmSessionHandler.java:146)
>         at
> com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn
> (BrowserChannel.java:1573)
>         at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript
> (BrowserChannelServer.java:124)
>         at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke
> (ModuleSpaceOOPHM.java:120)
>         at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
> 502)
>         at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject
> (ModuleSpace.java:275)
>         at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject
> (JavaScriptHost.java:91)
>         at com.google.gwt.user.client.rpc.impl.SerializerBase$MethodMap
> $.instantiate$(SerializerBase.java)
>         at com.google.gwt.user.client.rpc.impl.SerializerBase.instantiate
> (SerializerBase.java:140)
>         at
> com.google.gwt.user.client.rpc.impl.ClientSerializationStreamReader.deserialize
> (ClientSerializationStreamReader.java:114)
>         at
> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamReader.readObject
> (AbstractSerializationStreamReader.java:61)
>         at
> com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived
> (RequestCallbackAdapter.java:199)
>         at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl
> (Request.java:316)
>         at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch
> (Request.java:288)
>         at com.google.gwt.http.client.Request.fireOnResponseReceived
> (Request.java:270)
>         at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange
> (RequestBuilder.java:396)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> 103)
>         at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> 71)
>         at com.google.gwt.dev.shell.OophmSessionHandler.invoke
> (OophmSessionHandler.java:146)
>         at com.google.gwt.dev.shell.Browser

HandlerRegistration.removeHandler() is NOT WORKING

2009-05-20 Thread Tristan

Hello,
I am stuck with the fact that HandlerRegistration.removeHandler() is
not removing my handler.
I have two controllers, say ParentController and ChildController,
each
implements ValueChangeHandler to handle history events
The root class extended by both parent and child controllers:
public abstract class RootController implements
ValueChangeHandler{
  protected Controller parent = null;
  protected HandlerRegistration historyHandler = null;
  protected HashMap childControllers = new
HashMap(4);
  public RootController(Controller parent){
this.parent = parent;
  }
  public giveHistoryControlTo(RootController controller){
historyHandler.removeHandler();
controller.setHistoryHandler( History.addValueChangeHandler
(controller));
History.fireCurrentHistoryState();
  }
}

public class ParentController extends RootController implements Entry
Point {
  public void onModuleLoad() {
childControllers.put( ChildController.NAME, new ChildController
(this));
historyHandler = History.addValueChangeHandler(this);
History.fireCurrentHistoryState():
  }
   at some point ParentController executes:
  giveHistoryControlTo( childController.get
(ChildController.NAME));
   the above works fine, handler is removed and new event is
     handled by the child controller
}

public class ChildController extends RootController{
  public ChildController(ParentController parent){
super(parent);
  }
   at some point ChildController executes:
  giveHistoryControlTo( (ParentController) parent );
   the above fails!!!
     it appears as though handler is not removed as the
     History.fireCurrentHistoryState() inside
giveHistoryControlTo
()
     is being handled by the ChildController, instead of parent :
(
}

Feels like a bug. Is there a reason why .removeHandler() would not
immediately
do what it is supposed to?

- Tristan

ps.

"God helps those who help themselves"
I hacked a workaround. But the bug still remains.
(workaround was setting historyHandler to null when
 giving up control and then explicitly calling the
 parent's onValueChange() if historyHandler == null)

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