Re: Changing application path in production

2009-03-28 Thread Peter Ondruška

You can use Apache's mod_redirect but I find it easier just to put all
files in com.foo.bar.gwt.client.Main to web application root directory
and use welcome-files directive in web.xml (in your case it would be
Main.html). This makes Tomcat to serve xyz.com/abc/Main.html as
xyz.com/abc

On Mar 28, 3:25 am, "imran...@gmail.com"  wrote:
> Hi,
>
> I was wondering if there is a way to set up your gwt application such
> that something which I normally access as:
>
> http://xyz.com/abc/com.foo.bar.gwt.client.Main/Main.html
>
> could be accessed as
>
> http://xyz.com/abc/
>
> I am using apache infront of tomcat at the moment, and I thought about
> using something like mod-proxy or one of the similar apache plugins to
> map 
> fromhttp://xyz.com/abctohttp://xyz.com/abc/com.foo.bar.gwt.client.Main/Main.html.
> However I was hoping people may have been using a different/better
> approach to this.
>
> Thanks in advance,
>
> Imran
--~--~-~--~~~---~--~~
You received 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: Building toCollege-net Web site

2009-03-28 Thread Der Der
Probably you don't have the dependencies defined in your pom.xml If i
remember well the book has a source code. Find the source code from that
book and read the help. I think that you can doownload the source from here
:

http://code.google.com/p/tocollege-net/

On Thu, Mar 26, 2009 at 11:31 AM, lan  wrote:

>
> Hello
> Being new to GWT, I wanted to follow the application toCollege.net
> Unfortunately, I couldn't build it, I'm following the "Building
> toCollege.net" pdf document, I checked out the code using svn, no
> problem. But when I try "mvn compile", I got this unexpected
> exception:
>
> [ERROR] Exception in thread "main" java.lang.NoClassDefFoundError: com/
> google/gwt/dev/GWTCompiler
> Caused by: java.lang.ClassNotFoundException:
> com.google.gwt.dev.GWTCompiler
>at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>
> Any ideas??
> 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-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 set horizontalPanel to width 100%

2009-03-28 Thread asianCoolz


simplePanel.add(new HTML("test title..."));
  simplePanel.setWidth("100%");
  horizontalPanel.add(simplePanel);
  horizontalPanel.setCellWidth(title, "100%");

  horizontalPanel.setWidth("100%");
  horizontalPanel.setStyleName("debug");  //when show on screen, the
horizontalPanel is not 100% fit to screen width. it only encapsulate
the html title.

  initWidget(horizontalPanel);
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



How to handle different CSS

2009-03-28 Thread maks

hi,

Recently i have been working with emails using Javamail. Everything
works fine however things get's complicated whenever I view the
content of my email built using GWT+Javamail.

My question is how do you deal with CSS? Whenever I open the content
of my email it also affects my object's like the buttons, bars, etc.
depending on the content of the email that has css links.

Do you have any best practice on dealing with mail content? like
whenever I view my emails on Gmail the interface seems separate with
its content. It's like it has a other ways of dealing with content
which protects the objects from being affected with css or any form of
transaction.

thanks,

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



Re: Exception when add spring.jar in project GWT 1.6

2009-03-28 Thread Gilles B

It seems to works fine. I reproduce the problem, insert the jar in my
Eclipse libraries and run with success my app (using multiple servlet
classes).
I have not noticed other problems in my application but it not a
proof ;-)
Thank you
Gilles.

On 24 mar, 04:45, Scott Blum  wrote:
> Hey, can you guys do me a favor and try out a fix?
>
> Just take the attached jar and put it on your classpath ahead of
> gwt-dev-.jar.  See if it fixes the "not and instance of Servlet"
> problem (and doesn't cause other problems).
>
> Lemme know if that works, thanks,
> Scott
>
> On Sun, Mar 22, 2009 at 10:14 AM, Gilles B wrote:
>
>
>
>
>
> > I have the same problem with Hibernate. When I check the error line in
> > jetty classes sources using Jade I see that my Servlet class is not an
> > instance of "javax.servlet.Servlet", but this seems to be false
> > looking to my servlet class inheritance.
>
> > In fact this problem is due to a duplication of Servlet class in my
> > libraries. Inside Eclise I check it using Ctl-Shift-T to find class
> > Servlet locations, This class appears in "servlet-api.jar" but also
> > inside GWT libraries. Il solve it removing "servlet-api.jar", I
> > presume the Servlet class version doesn't match between jetty and the
> > class version my compiler generate. May be you have something close to
> > this with your servlet. May be an upgraded jar version, a change in
> > libraries order or removeing duplicate (if it's not necessary) help to
> > solve.
>
> > On 19 mar, 14:03, magbyr  wrote:
> > > I'm having the same problem. Same project worked well on 1.5.3, but
> > > not on 1.6RC.
>
> > > Fails on jsp and default servlet from
> > Jetty:javax.servlet.UnavailableException: Servlet class
> > > org.apache.jasper.servlet.JspServlet is not a
> > javax.servlet.Servletjavax.servlet.UnavailableException: Servlet class
> > > org.mortbay.jetty.servlet.DefaultServlet is not a
> > > javax.servlet.Servlet
>
> > > Have you found a solution yet?
>
> > > wiltonj skrev:
>
> > > > Hi,
> > > > I have a problem (exception) when add "spring.jar" in my project gwt
> > > > 1.6 (WEB-INF/lib).
>
> > > >  javax.servlet.UnavailableException: Servlet class
> > > > org.apache.jasper.servlet.JspServlet is not a javax.servlet.Servlet
> > > >    at org.mortbay.jetty.servlet.ServletHolder.checkServletType
> > > > (ServletHolder.java:377)
> > > >    at
> > org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
> > > > 234)
> > > >    at org.mortbay.component.AbstractLifeCycle.start
> > > > (AbstractLifeCycle.java:39)
> > > >    at org.mortbay.jetty.servlet.ServletHandler.initialize
> > > > (ServletHandler.java:616)
> > > >    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> > > >    at org.mortbay.jetty.webapp.WebAppContext.startContext
> > > > (WebAppContext.java:1220)
> > > >    at org.mortbay.jetty.handler.ContextHandler.doStart
> > > > (ContextHandler.java:513)
> > > >    at
> > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:
> > > > 448)
> > > >    at br.gov.senado.lib.util.jetty.CustomJettyLauncher
> > > > $WebAppContextWithReload.doStart(CustomJettyLauncher.java:387)
> > > >    at org.mortbay.component.AbstractLifeCycle.start
> > > > (AbstractLifeCycle.java:39)
> > > >    at org.mortbay.jetty.handler.HandlerWrapper.doStart
> > > > (HandlerWrapper.java:130)
> > > >    at org.mortbay.jetty.handler.RequestLogHandler.doStart
> > > > (RequestLogHandler.java:115)
> > > >    at org.mortbay.component.AbstractLifeCycle.start
> > > > (AbstractLifeCycle.java:39)
> > > >    at org.mortbay.jetty.handler.HandlerWrapper.doStart
> > > > (HandlerWrapper.java:130)
> > > >    at org.mortbay.jetty.Server.doStart(Server.java:222)
> > > >    at org.mortbay.component.AbstractLifeCycle.start
> > > > (AbstractLifeCycle.java:39)
> > > >    at br.gov.senado.lib.util.jetty.CustomJettyLauncher.start
> > > > (CustomJettyLauncher.java:437)
> > > >    at
> > com.google.gwt.dev.HostedMode.doStartUpServer(HostedMode.java:367)
> > > >    at
> > com.google.gwt.dev.HostedModeBase.startUp(HostedModeBase.java:590)
> > > >    at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:397)
> > > >    at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)
>
> > --
> > > > [WARN] Failed startup of context
> > > > br.gov.senado.lib.util.jetty.CustomJettyLauncher
> > > > $webappcontextwithrel...@1f5b5fd{/,D:\Prodasen\ADMU\admu\war}
> > > > org.mortbay.util.MultiException: Multiple exceptions
> > > >    at org.mortbay.jetty.servlet.ServletHandler.initialize
> > > > (ServletHandler.java:587)
> > > >    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
> > > >    at org.mortbay.jetty.webapp.WebAppContext.startContext
> > > > (WebAppContext.java:1220)
> > > >    at org.mortbay.jetty.handler.ContextHandler.doStart
> > > > (ContextHandler.java:513)
> > > >    at
> > org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.jav

Re: how to set horizontalPanel to width 100%

2009-03-28 Thread Ian Bambury
Need to see more code - everything between the screen and the panel which
fails to display properly.
Another point is that if you are putting it all in an eastern section of the
dockpanel, then of course it won't fill the full width of the screen.

Ian

http://examples.roughian.com


2009/3/28 asianCoolz 

>
>
> simplePanel.add(new HTML("test title..."));
>  simplePanel.setWidth("100%");
>  horizontalPanel.add(simplePanel);
>  horizontalPanel.setCellWidth(title, "100%");
>
>  horizontalPanel.setWidth("100%");
>  horizontalPanel.setStyleName("debug");  //when show on screen, the
> horizontalPanel is not 100% fit to screen width. it only encapsulate
> the html title.
>
>  initWidget(horizontalPanel);
> >
>

--~--~-~--~~~---~--~~
You received 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 1.5.3 Compiler error with org.cobogw.gwt-1.2.2.jar file

2009-03-28 Thread Hilbrand

Hi Nick,

The configuration you mention is correct, so it should work.
It might be the jar file is somehow not added to the class path.

Can you post the exact error and line in the ant file that adds the
jar file to the class path, in order to help you further.

Regards,
Hilbrand.


On Mar 27, 1:23 pm, nickle  wrote:
> All:
>
> I am receiving a compilation error stating that the source file for
> the classes I import from the org.cobogw.gwt-1.2.2.jar cannot be
> found.
>
> 1. I have the following line     name='org.cobogw.gwt.user.User'/> in my .gwt.xml file
> 2. org.cobogw.gwt-1.2.2.jar is in the classpath during compilation
> 3. Using an ant build script
>
> Any help would be greatly appreciated,
>
> thanks
> nick
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Permission denied when trying to call native method on parent object

2009-03-28 Thread a_martinez

Hi,
imagine the following situation:
I have a gwt application in which I open a Gwt-Ext window. In this I
place a Frame object with a html-page in it. On some interactions in
this html-page I want to call a JSNI function that was declared in
onModuleLoad().

Unfortunately the call of the native method in the html-pages
javascript "parent.doSomething()" does not work. I get an Javascript
error message that says "Permission denied". I read in multiple posts
in the www that the problem could be that the frames (hosted.html and
the created Frame object?) are in different domains and the IE7s cross
site scripting mode avoids the execution.

So, how can I get to know what frames are used here and how can I set
their domains to equal?

Thx,
 a_ma
--~--~-~--~~~---~--~~
You received 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: Whats the GWT equivalent of urlencode?

2009-03-28 Thread Thomas Broyer


On 27 mar, 17:45, darkflame  wrote:
> I got data being recieved in my GWT program from a PHP function which
> is using urlencode(string) to encode the data.
>
> What do I need to do on the GWT to correctly decode this data?
>
> I tried just  " URL.decode(string) " but this clearly isnt decodeing
> it correctly (slash's, for example, are still "+%2F")
>
> What other decodeing functinos are there?

URL.decodeComponent(String) is the thing to use to decode PHP's
urlencode(string) result.

URL.encode()/URL.decode() is designed to work with full URLs (i.e.
turn "http://example.net/foo bar/bâz?q=uüx" into "http://example.net/
foo%20bar/b%C3%A2z?q=u%C3%BCx")

See:
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/decodeURI
(the thing behind URL.decode())
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Functions/decodeURIComponent
(the thing behind URL.decodeComponent())

And if you plan using URL.encodeComponent, see
http://code.google.com/p/google-web-toolkit/issues/detail?id=3374


--~--~-~--~~~---~--~~
You received 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: dumb question... but driving me nuts

2009-03-28 Thread Kevin Telford

You could also use an HTML element if you wanted and then add it to
whatever kind of panel you have.

SimplePanel sp = new SimplePanel();
HTML html = new HTML();
String myHtml = "";
myHtml+ = "Something";
myHtml += "Something2";
myHtml += "";
html.setHTML(myHtml);
sp.add(html);
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



customized CSS for gwt

2009-03-28 Thread asianCoolz

I wanted to customize gwt so that the look and feel more superb by
including my own css and image files.  May I know where can I get the
css selector tag name for all component widget ?  any reference
url?

2. any tool to assit in designing css would be good
--~--~-~--~~~---~--~~
You received 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: customized CSS for gwt

2009-03-28 Thread Ian Bambury
Tried the Javadocs?
Ian

http://examples.roughian.com


2009/3/28 asianCoolz 

>
> I wanted to customize gwt so that the look and feel more superb by
> including my own css and image files.  May I know where can I get the
> css selector tag name for all component widget ?  any reference
> url?
>

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



Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-28 Thread Ian Bambury
But it's OK in IE and FF
Any ideas? Workarounds?

The line is

Window.Location.replace(Window.Location.getHref() + "#" +
newToken);

And you can see it working (or not) here http://kivivi.com/

When you first go there, I'm trying to replace http://kivivi.com/ with
http://kivivi.com/#Home, but Safari and Chrome aren't overwriting the
http://kivivi.com/, they are adding the http://kivivi.com/#Home


Ian

http://examples.roughian.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-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: New to GWT

2009-03-28 Thread vijay

Hi,
I faced the same problem and figured out that the problem was PATH
variable which i set as environment variable, can you try removing/
correcting that variable if you have set that else check that the path
where you created your project is inside gwt directory

On Feb 11 2008, 9:58 am, SBTECH  wrote:
> I am new to the GWT. Have been a JSF developer for awhile. I am going
> through the GWT in action book and working on the Dashboard exercise.
> I am using Eclipse Europa 3.2. I am having problem when trying to
> execute the application as described in the book. When I right click
> the project and select RUN. I get an alert the says "Could not find
> main class. Program will exit." Also the console displays the
> following:
>
> java.lang.NoClassDefFoundError: com/google/gwt/util/tools/ToolBase
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(Unknown Source)
>         at java.security.SecureClassLoader.defineClass(Unknown Source)
>         at java.net.URLClassLoader.defineClass(Unknown Source)
>         at java.net.URLClassLoader.access$100(Unknown Source)
>         at java.net.URLClassLoader$1.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> Exception in thread "main"
>
> I am I missing a jar file that has the ToolBase? Another interesting
> thing is that I can run the application if I just double click on the
> "Dashboard-shell.cmd" file. Any insightwould be appreciated. I really
> would like to get through this book and get up to speed with GWT. JSF
> is just not giving me everything my users want.
>
> Thanks,
> SBTECH

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



RichTextArea javascript

2009-03-28 Thread alberto

Hi

This is my problem:

I create a gwt RichTextArea. Then I add it into a panel.
When I run the project the RichtextArea compares correctly.

Then I wuold like to get and manage the richTextArea with javascript.

the question is how can i get the RichTextArea with javascript within
the Html document?

If I try: document.getElementsByTagName("textarea") the result in
null.

Is there a way to get the html element within the html document that
corresponds to the RichTextArea created in gwt??

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



Cannot execute .launch file

2009-03-28 Thread hezjing
Hi
Argh ... my Windows cannot execute the launch file anymore!

Here is what I did in the command window,
> webAppCreator -out mygwt -XonlyEclipse com.my.gwt.TestModule
> cd mygwt
> TestModule.launch


and Windows complaints that it cannot open TestModule.launch, and asks to
use the Web service to find the appropriate program or select from a list.

I don't think this is a GWT program, but it was working before :-(
I thought it could be the Windows registry problem and executed
CCleaner
 too ...


Do you have a quick idea of this problem?


Appreciate your help, thank you!


-- 

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: Cannot execute .launch file

2009-03-28 Thread Ian Bambury
.launch files are for Eclipse - use the *-shell.cmd files for the command
line
Ian

http://examples.roughian.com


2009/3/29 hezjing 

> Hi
> Argh ... my Windows cannot execute the launch file anymore!
>
> Here is what I did in the command window,
> > webAppCreator -out mygwt -XonlyEclipse com.my.gwt.TestModule
> > cd mygwt
> > TestModule.launch
>
>
> and Windows complaints that it cannot open TestModule.launch, and asks to
> use the Web service to find the appropriate program or select from a list.
>
> I don't think this is a GWT program, but it was working before :-(
> I thought it could be the Windows registry problem and executed 
> CCleaner
>  too ...
>
>
> Do you have a quick idea of this problem?
>
>
> Appreciate your help, thank you!
>
>
> --
>
> 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
-~--~~~~--~~--~--~---



XML User Interface Language for GWT

2009-03-28 Thread georgopoulos.georg...@gmail.com

Hi,

I just want to show a small demo (proof of concept) of a XUL
implementation for GWT using GWT Mosaic.

In the screenshot (http://imagebin.ca/view/q3LPurg.html) you see how
the following XML file is rendered by FF3 as a XUL file (top) and with
GWT Mosaic XUL library (bottom).





















GWT Mosaic XUL does a little bit more than the default mozilla XUL by
allowing to associate  elements with any other element and
not only with  elements (see broadcaster & Observer:
https://developer.mozilla.org/en/XUL_Tutorial/Broadcasters_and_Observers).

The GWT EntryPoint class that loads the XUL and also defines the
button command="add" is:

import org.gwt.beansbinding.core.client.util.GWTBeansBinding;
import org.gwt.mosaic.actions.client.Action;
import org.gwt.mosaic.actions.client.ActionMap;
import org.gwt.mosaic.actions.client.CommandAction;
import org.gwt.mosaic.ui.client.MessageBox;
import org.gwt.mosaic.ui.client.Viewport;
import org.gwt.mosaic.xul.client.application.Application;
import org.gwt.mosaic.xul.client.ui.Element;
import org.gwt.mosaic.xul.client.ui.Textbox;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;

public class XUL extends Application implements EntryPoint {

  static {
GWTBeansBinding.init();
  }

  private final XULParserServiceAsync xulParserService = GWT.create
(XULParserService.class);

  public void onModuleLoad() {
Application.launch(this);
  }

  @Override
  protected void initialize() {
final ActionMap actionMap = getContext().getActionMap();

final CommandAction addCmd = new CommandAction(new Command() {
  public void execute() {
Textbox tb1 = (Textbox) getContext().getElementMap().get
("value1");
Textbox tb2 = (Textbox) getContext().getElementMap().get
("value2");
Textbox tb3 = (Textbox) getContext().getElementMap().get
("result");
try {
  double v1 = Double.parseDouble(tb1.getValue());
  double v2 = Double.parseDouble(tb2.getValue());
  tb3.setValue(Double.toString(v1 + v2));
} catch (Exception e) {
  MessageBox.alert(Window.getTitle(), e.toString());
}
  }
});
addCmd.put(Action.SHORT_DESCRIPTION, "Action ShortDescription");

actionMap.put("add", addCmd);
  }

  @Override
  protected void startup() {
final Viewport viewport = new Viewport();

xulParserService.parse("calculator.xml", new AsyncCallback
() {
  public void onFailure(Throwable caught) {
Window.alert(caught.getLocalizedMessage());
  }

  public void onSuccess(Element result) {
if (result != null) {
  viewport.getLayoutPanel().add(result.getUI());
  viewport.getLayoutPanel().setPadding(5);
  viewport.attach();
}
  }
});
  }

}


The calculator demo can be found here: http://69.20.122.77:8880/gwt-mosaic-xul/
(its on port 8880, if you have any problems with that port let me
know).

Project homepage: http://code.google.com/p/gwt-mosaic-xul/

Any comments are welcome.

Kind Regards,
George.
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



How to implement 'Bounded Buffer'

2009-03-28 Thread wsstop

Hey,


Please help me.

Can you tell me how Bounded buffer can be made?

I made server-client model with RPC.

I also want to add Bounded Buffer that is shared by the server and
client.

Throught the buffer, I'll send ojbect element.



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



Including Java script in HTML Widget hangs

2009-03-28 Thread Jaeho

Hello

I am  putting all my advertisements code in a Ads.html file in server
and my gwt application gets the the whole html file and displays the
ads into right side of the page in a HTML widget.This works as longs
there is no java script in my Ads.html, but, when I start adding java
script ads in Ads.html, my gwt application hangs when it starts
loading in browser. The purpose of keeping Ads.html in separate file
is, some one will keep updating the ads in it more frequently. Could
any one help to identify what's wrong with my code ?. Thanks

Code:


package com.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.RequestBuilder;
import com.google.gwt.http.client.RequestCallback;
import com.google.gwt.http.client.Response;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.VerticalPanel;


public class Index implements EntryPoint {

private DockPanel template = new DockPanel();
HorizontalPanel top = new HorizontalPanel();
VerticalPanel rightMenu = new VerticalPanel(); /// It will be used
third party Ads, like, Google Ads etc.
VerticalPanel leftMenu = new VerticalPanel();
VerticalPanel contentBody =  new VerticalPanel();

public void onModuleLoad() {
top();
rightMenu();
contentBody();
leftMenu();

template.add(top, DockPanel.NORTH);
template.add(leftMenu, DockPanel.WEST);
template.add(contentBody, DockPanel.CENTER);
RootPanel.get().add(template);

}

public void top()
{
Label lbl = new Label("Masthead Panel");
top.add(lbl);
}

public void rightMenu()
{

RequestBuilder builder = new RequestBuilder(RequestBuilder.GET,
"Ads.html");
try {
builder.sendRequest(null, new RequestCallback () {

public void onError(Request request, Throwable 
exception) {
Window.alert("Error occured on your 
request.")  ;
}

public void onResponseReceived(Request request, 
Response response)
{
GWT.log(response.getText(), null);
HTML rightMenuHtml = new 
HTML(response.getText());
rightMenu.add(rightMenuHtml);
template.add(rightMenu, DockPanel.EAST);

}

});
} catch (Exception e) {

e.printStackTrace();
}

}

public void contentBody()
{
Label lbl = new Label("Content Body");
contentBody.add(lbl);

}

public void  leftMenu()
{
Label lbl = new Label("Left Menus");
leftMenu.add(lbl);
}

}


Ads.html
===

http://www.buy.com/retail/
affiliates/promo_fades125.asp?aid=10390502&pid=&sid=">http://www.buy.com";>http://ak.buy.com/buy_assets/v5/
img/clear.gif" width="1" height="60" border="0">



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.log doesn't generate messages to console

2009-03-28 Thread Guy Rouillier

I work with GWT (and GXT) from within MyEclipse.  We have 2 large
production apps with a server component, and GWT.log works fine with
them.  Then I have a small, no function app with no server component
that I use to test out some UI things - my playground app.  GWT.log
messages do not show up in the console for this playground app.  If I
force an error, those error messages show up in the console.  If I
call GWT.getVersion() and put the result into a GUI element, I'm
seeing the correct version string.

I found a forum message reporting this behavior back in 2007 but no
response.  Any ideas on why GWT.log doesn't work for this small app?
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: Window.Location.replace() doesn't work in Safari or Chrome or Opera

2009-03-28 Thread Adam T

Ian, maybe it's a Windows thing as it works fine on a my Mac with
Safari and Opera (and Firefox).

I was going to suggest trying JSNI instead, but looking at
Window.Location.replace it is just a simple call to
$wnd.location.replace(newURL) with no deferred binding to make a
difference between Firefox and others, so I can't see why it doesn't
work.

If you're using it for GWT history, you could alternatively set #Home
as the token when you initialise that subsystem.

//Adam

On 28 Mar, 19:28, Ian Bambury  wrote:
> But it's OK in IE and FF
> Any ideas? Workarounds?
>
> The line is
>
>                 Window.Location.replace(Window.Location.getHref() + "#" +
> newToken);
>
> And you can see it working (or not) herehttp://kivivi.com/
>
> When you first go there, I'm trying to 
> replacehttp://kivivi.com/withhttp://kivivi.com/#Home, but Safari and Chrome 
> aren't overwriting thehttp://kivivi.com/, they are adding 
> thehttp://kivivi.com/#Home
>
> Ian
>
> http://examples.roughian.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-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
-~--~~~~--~~--~--~---