Re: Calling servlet from server

2009-05-02 Thread Michel


Hi,

I still haven't figured this out. Is this such a dumb question that it
isn't worth answering, or does no one know the answer?

Thank you for your help, and with kind regards,


Michel





On Mar 5, 10:23 pm, Michel  wrote:
> Hi,
>
> Forgive me for asking a simple question, but I can't figure this out.
>
> I have a plain servlet, which streams out a video. This works fine
> when called from the client. I can call it like this:
>
> GWT.getHostPageBaseURL() +      "ImageServlet?videoId=" + videoId;
>
> Now I have some code running on the server, which needs to do this:
>
> String s = ? (some url)
> javax.media.MediaLocator s = new javax.media.MediaLocator(s);
>
> What I can't figure out is what to assign to s. I can do:
>
> http://localhost:/com.lm.MyApplication/ImageServlet?videoId=3
>
> and that will work in hosted mode, but obviously not when I deploy it.
>
> Thank you very much for your help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: GWT best Practices - JS Library Wrappers & Overlay Types

2009-05-02 Thread Bobby

I'm going over the following pages carefully:
http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis&t=Overview

Some GWT APIs, such as the Maps API, already have an implementation of
the AjaxLoader for loading Google JS libraries, so that's one less
thing to do.

Bobby

On Apr 27, 2:58 am, Bobby  wrote:
> I just came across some interesting docs, this one in particular
> covers almost all the questions i had in my original post (lots of
> TBDs 
> though):http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis...
>
> Also, check out what's underneath the "large efforts" heading in the
> wishlist 
> page:http://code.google.com/docreader/#p=gwt-google-apis&s=gwt-google-apis...
>
> That's right, and here i am going it alone, you ought to be
> ashamed. :)
>
> Bobby
>
> On Apr 27, 2:21 am, Bobby  wrote:
>
>
>
> > I would prefer having a GWT library for GData, it seems within reach.
>
> > Bobby
>
> > On Apr 26, 11:55 pm, Vitali Lovich  wrote:
>
> > > Couldn't arbitrary JS support be added using deferred binding?  Sure, you
> > > wouldn't be able to do code completion, but you could call arbitrary JS
> > > functions & variables with 0-overhead.  Might be a cool project to do (if
> > > Ray hasn't already done it :D).
>
> > > On Sun, Apr 26, 2009 at 11:43 PM, Bobby  wrote:
>
> > > > I finally got the GData library to compile inside a GWT 1.6 test app.
> > > > Now it's down to testing.
>
> > > > I'm considering auto generating a test app as well, otherwise i won't
> > > > be able to find out what's broken, otherwise i have to test each class
> > > > manually.
>
> > > > It looks good at this point but i'm antecipating plenty of headaches
> > > > in testing.
>
> > > > Bobby
>
> > > > On Apr 20, 6:51 pm, Bobby  wrote:
> > > > > The GData JS API is doing some fancy stuff to be able to POST data
> > > > > across domains, etc, it's also fairly large (in number of classes) and
> > > > > it's missing some large GData components (for Google Docs and
> > > > > Spreadsheets). All of this i'm guessing is why Google doesn't have a
> > > > > GWT library out for GData yet. I wouldn't want to code this manually
> > > > > but i if i can automate it then it's ok.
>
> > > > > > I'd rather wait to see some code ;-)
> > > > > > (and I have so many projects yet that I don't have time to 
> > > > > > update...)
>
> > > > > Oh right, no chance, it's now or never (or whenever you feel like up
> > > > > to it, just let me know).
>
> > > > > I'm counting on being able to auto-generate a decent wrapper without
> > > > > much difficulty, if this becomes complex or beyond my means i'll just
> > > > > let Google worry about it. This is why i want to test a rough version
> > > > > of the wrapper ASAP.
>
> > > > > Anyway thanks for all the pointers, i'll post more questions here as
> > > > > they come up.
>
> > > > > Bobby
>
> > > > > On Apr 20, 6:04 pm, Thomas Broyer  wrote:
>
> > > > > > On Mon, Apr 20, 2009 at 6:38 PM, Bobby wrote:
>
> > > > > > > I realize that your getConstant approach has an initialization
> > > > > > > overhead but i'm going to overlook that so that i can get the
> > > > > > > generated library to a point where i can test it and then come 
> > > > > > > back
> > > > > > > and revisit this. This will be more complex because the GData JS
> > > > > > > implementation allows "namespaces" to be loaded dynamically as
> > > > needed.
>
> > > > > > Given that the protocol is clearly defined and documented, I wonder 
> > > > > > if
> > > > > > a "pure GWT" implementation wouldn't be better...
> > > > > > Well, eventually, that could be your "v2.0" ;-)
>
> > > > > > > On the return type of the JS methods that receive callbacks, most
> > > > > > > likely these methods return void, i think that's just the way the
> > > > > > > JSDocs display - otherwise they would have to display that as
> > > > > > > void updateEntry( 
> > > > > > > continuation,
> > > > > > >  opt_errorHandler).
>
> > > > > > Er, you probably mean void updateEntry( > > > > > function(google.gdata.Entry)> continuation, 
> > > > > > opt_errorHandler)
>
> > > > > > > This type of ambiguity is why an 100% auto-generate is not going 
> > > > > > > to
> > > > > > > happen - in addition to this there are a couple of classes missing
> > > > > > > from the JS Docs (i'll just fill those in from the GData Java 
> > > > > > > docs).
>
> > > > > > Well, I don't know what you're generating from, but it could be as
> > > > > > easy as "if the method takes 2 arguments of type function, the 
> > > > > > second
> > > > > > one taking an Error argument, then convert them to an 
> > > > > > AsyncCallback
> > > > > > where T is the method's documented return type, and make the method
> > > > > > actually have a void return type".
>
> > > > > > > I like the idea of using an intermediate class to handle the
> > > > > > > callbacks, i think you mentioned this in your original reply and i
> > > > > > > missed it.
>
> > > > > > Hmm, not quite sure what you're talk

Re: Inserting header and footer into DecoratorPanel

2009-05-02 Thread Adam T

Hi Hez,

So, the top of the DecoratorPanel is one colour and the bottom
another?  Couldn't you have an image in the css for the vertical
borders that faded between the two colours (though that might not look
so good as the panel increases in height)?

//A

On 2 Maj, 11:12, hezjing  wrote:
> Hi Adam
>
> Please be patience while I try my best to describe the problem :-)
>
> Here is my code:
>
> public void onModuleLoad() {
>
>     // create a label for header and apply a background color
>     Label header = new Label("Header");
>     header.addStyleName("header");
>
>     // create a label for footer and apply a background color
>     Label footer = new Label("Footer");
>     footer.addStyleName("footer");
>
>     DockPanel dockPanel = new DockPanel();
>     dockPanel.setSize("100%", "100%");
>
>     // add the header
>     dockPanel.add(header, DockPanel.NORTH);
>     dockPanel.setCellHeight(header, "5%");
>
>     // add the footer
>     dockPanel.add(footer, DockPanel.SOUTH);
>     dockPanel.setCellHeight(footer, "5%");
>
>     DecoratorPanel decoratorPanel = new DecoratorPanel();
>     decoratorPanel.setSize("30%", "50%");
>     decoratorPanel.add(dockPanel);
>
>     RootPanel root = RootPanel.get();
>     root.setSize("100%", "100%");
>     root.add(decoratorPanel);
>
> }
>
> You will need to add the following CSS styles in order to display the
> DecoratorPanel correctly:
>
> .gwt-DecoratorPanel .middleCenter {
> height: 100%;
> width: 100%;
> background: #d0e4f6;
>
> }
>
> .header,.footer {
> background: #f6ef32;
>
> }
>
> If we take a look athttp://www.ebay.com/, the header and footer starts from
> the edge of the rounded rectangle.
> So the background color of the topLeft, topCenter and topRight should be the
> same as the header.
> Whereas the background color of the bottomLeft, bottomCenter and bottomRight
> should be the same as the footer.
> This can be done easily by replacing the corners and horizontal border with
> the same color as the header and footer.
>
> The problem now is the color of the middleLeft and middleRight, where the
> color of the top part of these vertical borders should be the same as the
> header, and the color of the bottom part should be the same as the footer.
> How do we create such vertical border so that the top and bottom color are
> aligned to the header (the DockPanel.NORTH) and footer (the
> DockPanel.SOUTH)?
>
>
>
> On Sat, May 2, 2009 at 12:18 PM, Adam T  wrote:
>
> > Hi,
>
> > I would say the best approach is to add a DockPanel as the single
> > content of the DecoratorPanel and then the header is DockPanel.NORTH,
> > the footer DockPanel.SOUTH and you content goes in DockPanel.CENTER
> > (the DecoratorPanel is a 9 celled table and topCenterInner is part of
> > the structure to give you nice edges).
>
> > //Adam
>
> > On 2 Maj, 05:08, hezjing  wrote:
> > > Hi
>
> > > I want to create a rounded corner panel which has a header and footer,
> > > similar to the one shown onhttp://www.ebay.com/
> > > Thanks to the community, I got the customized rounded corners on the
> > > DecoratorPanel :-)
>
> > > To add the header and footer to the DecoratorPanel, I think I need to set
> > > the header into the widget at topCenterInner,
> > > and the footer into the widget at bottomCenterInner.
>
> > > May I know how do we get/set the widget to the topCenterInner
> > > and bottomCenterInner cell?
>
> > > --
>
> > > Hez
>
> --
>
> Hez
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Absolute positioning relative to other widgets

2009-05-02 Thread Adam T

Hi Stephen, I feel this is just one of those challenging areas in
GWT.  There's no "event" in GWT that tells you DOM has finished layout
activities, but there is a point where you expect this to be the case
in the normal lifecycle of a widget.

In the Widget lifecycle there are four key points you can override
that in a way act as "events":

  * onAttach() - called when a widget is attached to the browser's
document.
  * onLoad() - called immediately after a widget becomes attached to
the browser's document.
  * onUnload() - called immediately before a widget will be detached
from the browser's document.
  * onDetach() - called when a widget is detached from the browser's
document

The one of interest here is onLoad(), where it's fairly safe to assume
that everything DOM attribute wise is sorted out by then.  I've still
found it wise to give the browser some time by wrapping any dimension
stuff in a DeferredCommand within the onLoad() method; I'm not 100%
convinced it is necessary, but I like to live on the safe side in an
effect library I'm building (http://code.google.com/p/gwt-fx/).

I have to admit, I'm not aware of a onResize() method to override in
Widget or Composite class, so can't really comment on how that would
work (out of interest, where is it in standard GWT?).

DeferredCommand itself is a little bit of a trick, although it says
"allows you to execute code after all currently pending event handlers
have completed" it's really based on timers rather than hooking into
the browser event queue and checking all is done before firing your
command - that said, it works.

Hope that gives you a bit more info.

//Adam

On 3 Maj, 02:00, Stephen Cagle  wrote:
> First of all, Thank You Adam. This is one of those things that I spent
> like 4 hours on and finally just asked about.
>
> I put my absolute positioning code inside a DefferedCommand. Have not
> seen it fail yet. So thank you, it seems to work.
>
> Still, I do wonder. What is the deterministically appropriate way to
> deal with this? For all I know the DefferedCommand may be the
> appropriate way to deal with this, as it may truly guarantee that code
> is not run till after all other events are run. Assuming that
> "repositioning stuff as things are added to the DOM" is just another
> event, then as long as DefferedCommand always guarantees that it will
> add to the end, then it is probably correct.
>
> However, is there some more direct way to do this. Like, could I wrap
> a widget in something (or override some handler) such that I can
> guarantee execution of code only after the widget has been fully
> positioned and their currently exist not other DOM modifying events in
> the queue?
>
> Also, in closing, is there more information somewhere on exactly how
> widgets are added, positioned, and rendered. I would also be
> interested in any callbacks (or equivalent) that I can override at any
> point in said process. Thanks all.
>
> On May 1, 11:14 pm, Adam T  wrote:
>
> > sometimes it's worth wrapping any repositioning up in a
> > DeferredCommand to give the browser a chance, i.e. take you code that
> > does something like this:
>
> > int x = X.getAbsoluteTop;
> > int h = X.getOffsetHeight();
> > W.setWidgetPostition(x,y);
> > W.setWidth(h/2+"px");
>
> > and make it
>
> > DeferredCommand.addCommand(new Command(){
> >    public void execute(){
> >       int x = X.getAbsoluteTop;
> >       int h = X.getOffsetHeight();
> >       W.setWidgetPostition(x,y);
> >       W.setWidth(h/2+"px");
> >    }
>
> > });
>
> > now the positioning code will execute a little later giving the
> > browser chance to have redrawn everything and you should get more
> > consistent answers.
>
> > //Adam
>
> > On 2 Maj, 01:12, Stephen Cagle  wrote:
>
> > > I have a Composite widget within which I have overridden the onResize
> > > () method. Some of the element widgets of this widget position
> > > themselves relative to other widgets. That is to say, I sometimes
> > > position widget X using .getAbsoluteTop() and .getOffsetHeight().
> > > Unfortunately, sometimes .getAbsoluteTop sometimes returns a pretty
> > > random value. I think this is because I am re-populating/creating a
> > > lot of the widgets upon resize. So maybe I am getting the size of the
> > > widget "as it is being built". What should I do to deal with this. I
> > > need to position things absolutely relative to other widgets, but
> > > within the onResize() method, I am getting (occasionally) odd results?
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Stockwatcher GAE tutorial

2009-05-02 Thread Randinn

Anyone have the complete GWT and Google App Engine Stockwatcher
tutorial, the tutorial for me is a bit unclear in places.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



GWT 1.6.4: .../war/WEB-INF/classes/log4j.properties trashed by Eclipse build

2009-05-02 Thread Allen Holub

I'd like to put the file .../war/WEB-INF/classes/log4j.properties into
my build, but it looks as if either the GWT 1.6.4 compiler or Eclipse
wipes out the entire classes directory as a side effect of the build
(when I launch the app under Eclipse).  That is,  I put
log4j.properties into .../war/WEB-INF/classes, but when I launch the
app from Eclipse, the file magically disappears. I'm guessing that
something is throwing away the entire classes directory during the
rebuild.

Is there any way for me either to get a properties file onto the
classpath inside the war?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: database backend best practice

2009-05-02 Thread Jim

Dreamsource ORM can solve all problems you have when you use
Hibernate. You don't need third party library for Dreamsource ORM.
Please go to http://www.gwtorm.com/mail/Mail.html for an example.

Jim
http://www.gwtorm.com
http://code.google.com/p/dreamsource-orm/downloads/list

On May 2, 2:07 pm, "Paul Grenyer"  wrote:
> Hibernate will save you time and code in the long run.
>
> Sent from my BlackBerry® wireless device
>
> -Original Message-
> From: Chris 
>
> Date: Sat, 2 May 2009 06:43:42
> To: Google Web Toolkit
> Subject: database backend best practice
>
> I'm about to start a new application using GWT 1.6. I have a lot of
> programming experience, but very little with java. In my application I
> want to load a dozen or so different record types from a mysql
> database, send them to the client where the user can display/modify
> them in various ways, then send the data back to the database.
>
> I've looked over the basic DynaTable example and some jdbc examples
> and I've also read some about Hibernate. I'm trying to determine if
> Hibernate is worth the extra setup and configuration, vs a direct jdbc
> approach. Or is there a better solution I'm missing?
>
> If you were starting a new database GWT app with 1.6 what would be the
> best approach? Where "best" means both easiest to configure and
> easiest to deal with the code.
>
> Thanks for any suggestions, especially pointers to 1.6 tutorials.
> --
> 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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Error while running a project in eclipse

2009-05-02 Thread Shri

Ritu,  How did you resolve your issue?
I am getting the same problem and all the configuration seems to be
fine.
Any help will be appreciated.

Thanks,
Shri

On Mar 31, 8:15 pm, ritu6386  wrote:
> Isrc directory is in my classpath. Now when i launch i get this
> error.
> Can anyone tell me where im going wrong.
>
> [TRACE] Finding entry point classes
> [ERROR]Unabletofindtype'com.apress.gwt.client.GWTasks'
> [ERROR] Hint: Check that thetypename 'com.apress.gwt.client.GWTasks'
> is really what you meant
> [ERROR] Hint: Check that your classpath includes all required source
> roots
> [ERROR] Failure to load module 'com.apress.gwt.GWTasks'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Justification of images, how?

2009-05-02 Thread hezjing
Hi Anders
Here is the code to display an image at the bottom right of the panel:

public void onModuleLoad() {
// logo.png is a 153x14 pixel image.
Image logo = new Image("images/logo.png");

HorizontalPanel panel = new HorizontalPanel();
// always good to set the border to see the panel size
panel.setBorderWidth(1);
panel.setSize("100%", "100%");
panel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);
panel.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);

panel.add(logo);

RootPanel root = RootPanel.get();
root.setSize("100%", "100%");
root.add(panel);
}


Hope this is useful to you :-)


On Sat, May 2, 2009 at 6:29 PM, dduck wrote:

>
> Hi,
>
> If I add an image to a panel, it is apparently always left-justified,
> no matter what horizontal justification I set the panel to use.
>
> Is there a way of doing this?
>
> Regards,
>  Anders
> >
>


-- 

Hez

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



Re: Absolute positioning relative to other widgets

2009-05-02 Thread Stephen Cagle

First of all, Thank You Adam. This is one of those things that I spent
like 4 hours on and finally just asked about.

I put my absolute positioning code inside a DefferedCommand. Have not
seen it fail yet. So thank you, it seems to work.


Still, I do wonder. What is the deterministically appropriate way to
deal with this? For all I know the DefferedCommand may be the
appropriate way to deal with this, as it may truly guarantee that code
is not run till after all other events are run. Assuming that
"repositioning stuff as things are added to the DOM" is just another
event, then as long as DefferedCommand always guarantees that it will
add to the end, then it is probably correct.

However, is there some more direct way to do this. Like, could I wrap
a widget in something (or override some handler) such that I can
guarantee execution of code only after the widget has been fully
positioned and their currently exist not other DOM modifying events in
the queue?

Also, in closing, is there more information somewhere on exactly how
widgets are added, positioned, and rendered. I would also be
interested in any callbacks (or equivalent) that I can override at any
point in said process. Thanks all.

On May 1, 11:14 pm, Adam T  wrote:
> sometimes it's worth wrapping any repositioning up in a
> DeferredCommand to give the browser a chance, i.e. take you code that
> does something like this:
>
> int x = X.getAbsoluteTop;
> int h = X.getOffsetHeight();
> W.setWidgetPostition(x,y);
> W.setWidth(h/2+"px");
>
> and make it
>
> DeferredCommand.addCommand(new Command(){
>    public void execute(){
>       int x = X.getAbsoluteTop;
>       int h = X.getOffsetHeight();
>       W.setWidgetPostition(x,y);
>       W.setWidth(h/2+"px");
>    }
>
> });
>
> now the positioning code will execute a little later giving the
> browser chance to have redrawn everything and you should get more
> consistent answers.
>
> //Adam
>
> On 2 Maj, 01:12, Stephen Cagle  wrote:
>
> > I have a Composite widget within which I have overridden the onResize
> > () method. Some of the element widgets of this widget position
> > themselves relative to other widgets. That is to say, I sometimes
> > position widget X using .getAbsoluteTop() and .getOffsetHeight().
> > Unfortunately, sometimes .getAbsoluteTop sometimes returns a pretty
> > random value. I think this is because I am re-populating/creating a
> > lot of the widgets upon resize. So maybe I am getting the size of the
> > widget "as it is being built". What should I do to deal with this. I
> > need to position things absolutely relative to other widgets, but
> > within the onResize() method, I am getting (occasionally) odd results?
>
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Can TextArea display RTF formatted text

2009-05-02 Thread ceeed

Hi,
I am returning RTF formatted text from the server and would like to
display this. I am using a TextArea widget and using setText() to
display the text - however, it is showing the raw RTF text and not
rendering it. is there any way to show the rendered text in a textarea
widget?

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



Re: database backend best practice

2009-05-02 Thread Paul Grenyer
Hibernate will save you time and code in the long run.

Sent from my BlackBerry® wireless device

-Original Message-
From: Chris 

Date: Sat, 2 May 2009 06:43:42 
To: Google Web Toolkit
Subject: database backend best practice



I'm about to start a new application using GWT 1.6. I have a lot of
programming experience, but very little with java. In my application I
want to load a dozen or so different record types from a mysql
database, send them to the client where the user can display/modify
them in various ways, then send the data back to the database.

I've looked over the basic DynaTable example and some jdbc examples
and I've also read some about Hibernate. I'm trying to determine if
Hibernate is worth the extra setup and configuration, vs a direct jdbc
approach. Or is there a better solution I'm missing?

If you were starting a new database GWT app with 1.6 what would be the
best approach? Where "best" means both easiest to configure and
easiest to deal with the code.

Thanks for any suggestions, especially pointers to 1.6 tutorials.
--
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-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Can GWT replace Struts Technology

2009-05-02 Thread Sairam

Hi
  I have an application developed in Struts 1.x, but I want to
develop the same by GWT technology.

Can you help me on how to replace each and every component
of struts application by GWT.

Thanks

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



GWT and Spring annotation

2009-05-02 Thread greg

Hi,

I have a problem with GWT and Spring integration. On Eclipse, I have 2
projects : GWT project (presentation) and Spring project (service). I
am calling the spring context from a GWT remote service
(WebApplicationContext).

If I declare spring beans in a spring XML, I see them no problem.
but if I try to declare beans with annotations I can't see them. If I
declare these beans in the presentation project, then I can see them !

In conclusion, I have to put annotated beans in the another project
than GWT one I can't see them...

Do you have an idea of the problem ?

Regards

Greg

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



database backend best practice

2009-05-02 Thread Chris

I'm about to start a new application using GWT 1.6. I have a lot of
programming experience, but very little with java. In my application I
want to load a dozen or so different record types from a mysql
database, send them to the client where the user can display/modify
them in various ways, then send the data back to the database.

I've looked over the basic DynaTable example and some jdbc examples
and I've also read some about Hibernate. I'm trying to determine if
Hibernate is worth the extra setup and configuration, vs a direct jdbc
approach. Or is there a better solution I'm missing?

If you were starting a new database GWT app with 1.6 what would be the
best approach? Where "best" means both easiest to configure and
easiest to deal with the code.

Thanks for any suggestions, especially pointers to 1.6 tutorials.
--
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-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
-~--~~~~--~~--~--~---



GWT 1.6.4 jsni doesn't like spaces in the signature

2009-05-02 Thread dean.mikel

In case anyone else is having problems with the "Expected a valid
parameter type signature in JSNI method reference" error after moving
from 1.4 to 1.6.4 here is a possible solution:

It appears that spaces are no longer allowed in the signature. For
example this works in 1.4, but not in 1.6.4:
$wnd.function1 = th...@com.example.test::function1( Ljava/lang/
String; );

Any spaces must be removed from the signature:
$wnd.function1 = th...@com.example.test::function1(Ljava/lang/
String;);

Not that I care about having to have spaces in the signature, it was
just out of habit that I added them when I first built the code in gwt
1.4. The result was a bunch of time spent trying to figure out what
was wrong.  Hope this helps someone else.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: build.xml for Netbeans and GWT 1.6

2009-05-02 Thread Sam Halliday

Well, I got stung by 
http://code.google.com/p/google-web-toolkit/issues/detail?id=3491
and updated the build.xml file accordingly to use Java 5.

I was able to update the compiler entrance class, but I still have to
use 'com.google.gwt.dev.GWTShell' because I couldn't get
'com.google.gwt.dev.HostedMode' to work. Advise here would be
appreciated.

I was passing in the "war" and "module" names (like the compiler
args)... but it complained that web.xml had a configuration error. My
web.xml doesn't have anything unusual in it and is auto-generated from
NetBeans, so should work in most Containers.

== build.xml ==


Builds, tests, and runs the project Muckraker.






































 














































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



Re: How to use the new WAR file to deploy a simple web application.

2009-05-02 Thread Danny

Jamie,
Thanks.  Yes, I must learn about Apache Ant.  GWT was forced me to
learn a whole host of new things.  But, learning is one of the more
fasinating aspects of life.

Regards,

Danny

On May 1, 1:46 pm, Jamie  wrote:
> I definitely understand wanting to know what is under the covers.  I
> have given up on JBoss SEAM because there is far too much stuff going
> on that is hidden away somewhere.
>
> But anyway, I suggest that:
>
> 1. You change MyProject.html to index.html in your source tree
> 2. Alter your project's web.xml before jarring it up
>
> that way you can skip steps 9 and 10.
>
> I would also recommend learning Apache Ant.http://ant.apache.org/
>
> Eclipse has a built-in ant window, to run ant scripts.
> Ant has commands to do almost everything you could want, including a
> WAR task.http://ant.apache.org/manual/CoreTasks/war.html
>
> Jamie.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



build.xml for Netbeans and GWT 1.6

2009-05-02 Thread Sam Halliday

Dear all,

I use NetBeans and the build.xml at the end of this post (based on one
by Jason Morris from this group). This worked great for 1.5 but I hear
there have been structural changes since then. Can anybody advise on
what might need to be changed? I have a project that I am going to
spend some time upgrading today... so expect a reply to this post if I
discover anything that affects the buildfile.

== build.xml ==


Builds, tests, and runs the project.


































 


















































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



Re: Adding the same widget more than once

2009-05-02 Thread dduck



On 1 Maj, 12:12, hezjing  wrote:
> It seems that we cannot add a same label more than once.


Yup. Took me a while to figure out.

Now I usually use a common interface like this for all my widget-
making code:

interface WidgetProvider {
  Widget createNewWidget();
}

This both ensures that I can introduce on-demand creation of objects
if I need it, and that I can create several instances configured in
identical ways by using this method, provided that it is implemented
in a sensible way.

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



Justification of images, how?

2009-05-02 Thread dduck

Hi,

If I add an image to a panel, it is apparently always left-justified,
no matter what horizontal justification I set the panel to use.

Is there a way of doing this?

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



GWT's default CSS styles in standard.css

2009-05-02 Thread hezjing
Hi

Why there is no CSS style of .gwt-DecoratorPanel .middleCenter
found in
the gwt-user.jar,
com\google\gwt\user\theme\standard\public\gwt\standard\standard.css?


Shouldn't all GWT's default CSS styles must be created and exist in
standard.css?


-- 

Hez

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



Re: Inserting header and footer into DecoratorPanel

2009-05-02 Thread hezjing
Hi Adam

Please be patience while I try my best to describe the problem :-)

Here is my code:

public void onModuleLoad() {

// create a label for header and apply a background color
Label header = new Label("Header");
header.addStyleName("header");

// create a label for footer and apply a background color
Label footer = new Label("Footer");
footer.addStyleName("footer");

DockPanel dockPanel = new DockPanel();
dockPanel.setSize("100%", "100%");

// add the header
dockPanel.add(header, DockPanel.NORTH);
dockPanel.setCellHeight(header, "5%");

// add the footer
dockPanel.add(footer, DockPanel.SOUTH);
dockPanel.setCellHeight(footer, "5%");

DecoratorPanel decoratorPanel = new DecoratorPanel();
decoratorPanel.setSize("30%", "50%");
decoratorPanel.add(dockPanel);

RootPanel root = RootPanel.get();
root.setSize("100%", "100%");
root.add(decoratorPanel);
}


You will need to add the following CSS styles in order to display the
DecoratorPanel correctly:

.gwt-DecoratorPanel .middleCenter {
height: 100%;
width: 100%;
background: #d0e4f6;
}

.header,.footer {
background: #f6ef32;
}

If we take a look at http://www.ebay.com/, the header and footer starts from
the edge of the rounded rectangle.
So the background color of the topLeft, topCenter and topRight should be the
same as the header.
Whereas the background color of the bottomLeft, bottomCenter and bottomRight
should be the same as the footer.
This can be done easily by replacing the corners and horizontal border with
the same color as the header and footer.

The problem now is the color of the middleLeft and middleRight, where the
color of the top part of these vertical borders should be the same as the
header, and the color of the bottom part should be the same as the footer.
How do we create such vertical border so that the top and bottom color are
aligned to the header (the DockPanel.NORTH) and footer (the
DockPanel.SOUTH)?



On Sat, May 2, 2009 at 12:18 PM, Adam T  wrote:

>
> Hi,
>
> I would say the best approach is to add a DockPanel as the single
> content of the DecoratorPanel and then the header is DockPanel.NORTH,
> the footer DockPanel.SOUTH and you content goes in DockPanel.CENTER
> (the DecoratorPanel is a 9 celled table and topCenterInner is part of
> the structure to give you nice edges).
>
> //Adam
>
> On 2 Maj, 05:08, hezjing  wrote:
> > Hi
> >
> > I want to create a rounded corner panel which has a header and footer,
> > similar to the one shown onhttp://www.ebay.com/
> > Thanks to the community, I got the customized rounded corners on the
> > DecoratorPanel :-)
> >
> > To add the header and footer to the DecoratorPanel, I think I need to set
> > the header into the widget at topCenterInner,
> > and the footer into the widget at bottomCenterInner.
> >
> > May I know how do we get/set the widget to the topCenterInner
> > and bottomCenterInner cell?
> >
> > --
> >
> > Hez
> >
>


-- 

Hez

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