Re: Gwt code where locales can be changed be dynamically

2009-03-19 Thread Vitali Lovich
Best way would be to actually redirect them to your app with the
localization set.  That way, they load the app compiled for that
localization.

The only tricky thing is maintaining persistence across the switch if that
is important.

Otherwise, there's really no way to do it the GWT-way (AFAIK).  You're only
other approach would be to walk over all DOM elements on the page that
display text & set it to the localized version, but I have a feeling you're
going to find the difficult to do, and possibly quite slow (not to mention
the difficulty of figuring out a way to actually load the localized
strings).

You must remember that the localization that GWT does is at compile time -
it'll automagically create several different versions of your code with all
the different localizations you've set.  All those strings actually get
inlined into your code & are static.  When the browser loads your code, GWT
actually includes some preamble code that determines which code to load
depending on user-agent, localization, and any other pivots you may have
defined.

On Thu, Mar 19, 2009 at 1:18 AM, deeps  wrote:

>
> Hi, I am trying to design a code where locales can be changed both
> dynamically n statically within a calendar widget like datepicker. I
> would be  grateful if any of u helped me in this. Thank u.
>
> Regards
> Deepthi
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Vitali Lovich
AFAIK - just loading the javascript should suffice.  You'll notice in the
nocache.js, the last line of the code calls the function which initializes
GWT & invokes your module.

Are you having any problems with this?  One hint I have is that in your
onModuleLoad, make sure you use the appropriate RootPanel (RootPanel.get()
returns ).  Since you're loading the GWT dynamically into an existing
page, you probably want to create a div with an appropriate iD for it to use
(i.e. ).  Then use RootPanel.get("DynamicGWT")
instead.

On Wed, Mar 18, 2009 at 10:48 PM, markmac  wrote:

>
> Hi All,
>
> I am currently trying to integrate GWT into my existing application,
> but Im having trouble doing that at the moment.
>
> Currently I have heaps of custom JavaScript that I will eventually
> migrate to GWT, but for now, I need to figure out how to add some
> custom GWT widgets into my page, but not on page load (as heaps of
> stuff is not yet loaded by the user, etc...) but rather on the
> response callback from an existing AJAX call, can this be done?
>
> Im imagining that I could call some externally exposed method that
> resided within the *.nocache.js file? But Im not sure how that all
> works, etc... If anyone has any resources that I could read up on or
> experience in this area, that would be great!
>
> Cheers,
> 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
-~--~~~~--~~--~--~---



How to sort a list with objects on client side?

2009-03-19 Thread Danny Schimke
Hello!

I have a list with objects I've got from "backend-side". Every object has a
getSort() method, which returns an integer value. I've never worked with
Comparator before, but I tried like the following:

public List getObjectListe() {
List sortedList = model.getObjects();
Collections.sort(sortedList, new Comparator() {
public int compare(Objecttype o1, Objecttype o2) {
// compare the o1.getSort() value with o2.getSort() value here
}
});
return sortedList;
}

And this is the error I got:

[ERROR] Uncaught exception escaped
java.lang.UnsupportedOperationException: null
at
com.incowia.tkbase.unternehmenspflege.core.client.BaseReferenceList.toArray(BaseReferenceList.java:166)
at java.util.Collections.sort(Collections.java:158)

What have I to do, to sort my list?

-Danny

--~--~-~--~~~---~--~~
You received 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 sort a list with objects on client side?

2009-03-19 Thread gregor

Hi Danny,

I think it may be because you have not implemented the compare method?
One simple comparator I use for sorts looks like this:

public class TermComparator implements Comparator  {
public int compare(Object term1, Object term2) {
String first = ((Term) term1).getText().toUpperCase();
String second = ((Term) term2).getText().toUpperCase();
return first.compareTo(second);
}

This is pre-1.5 so not generic etc, and it obviously uses the built in
String.compareTo(..) method, so for integers you need to replace with
code to comply with the Comparator.compare(..) contract:

"Compares its two arguments for order. Returns a negative integer,
zero, or a positive integer as the first argument is less than, equal
to, or greater than the second."

I actually use this on the server before list to the client since I
thought it would probably be faster in Java than in javascript and it
always has to be done and in alpha order only. Subsequently I have
considered that this puts additional pressure on the server, so even
if it would be technically slower on client, if not materially so,
then maybe better on the client.

regards
gregor

On Mar 19, 7:49 am, Danny Schimke  wrote:
> Hello!
>
> I have a list with objects I've got from "backend-side". Every object has a
> getSort() method, which returns an integer value. I've never worked with
> Comparator before, but I tried like the following:
>
> public List getObjectListe() {
>     List sortedList = model.getObjects();
>     Collections.sort(sortedList, new Comparator() {
>         public int compare(Objecttype o1, Objecttype o2) {
>             // compare the o1.getSort() value with o2.getSort() value here
>         }
>     });
>     return sortedList;
>
> }
>
> And this is the error I got:
>
> [ERROR] Uncaught exception escaped
> java.lang.UnsupportedOperationException: null
>     at
> com.incowia.tkbase.unternehmenspflege.core.client.BaseReferenceList.toArray(BaseReferenceList.java:166)
>     at java.util.Collections.sort(Collections.java:158)
>
> What have I to do, to sort my list?
>
> -Danny
--~--~-~--~~~---~--~~
You received 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: Announcing GWT 1.6 Release Candidate

2009-03-19 Thread hezjing
Hi

I'm sorry, but I'm able to download gwt-windows-1.6.2.zip from the
other PC.There
must be something wrong with my environment :-(


Please ignore my problem!


On Thu, Mar 19, 2009 at 5:27 PM, hezjing  wrote:

> Hi
>
> The gwt-windows-1.6.2.zip seems to be invalid when downloaded from IE 7 and
> Chrome.
> I'm not sure if anyone has successfully download and
> extract gwt-windows-1.6.2.zip?
>
>
> On Thu, Mar 19, 2009 at 4:32 AM, Bruce Johnson  wrote:
>
>> Good news! Google Web Toolkit 1.6 RC is ready for you to download and try
>> out:
>>
>> http://code.google.com/p/google-web-toolkit/downloads/list?q=1.6.2
>>
>> For background on what's new in GWT 1.6, please see the still-in-progress
>> doc:
>>
>>
>> http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=ReleaseNotes_1_6
>>
>> as well as previous 1.6-related announcements:
>>
>> "Announcing GWT 1.6 Milestone 1"
>>
>> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/3e7e6cc3b35ad98a
>>
>> and
>>
>> "Announcing GWT 1.6 Milestone 2"
>>
>> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/33df9cc75aead5a1
>>
>> For complete details, the GWT issue tracker has the full list of changes:
>>
>>
>> http://code.google.com/p/google-web-toolkit/issues/list?can=2&q=milestone:1_6_RC%20status:FixedNotReleased,Fixed&sort=priority
>>
>> We expect this to be a short RC cycle, so a more comprehensive blog post
>> with an overview of the features in GWT 1.6 should be just around the
>> corner.
>>
>> -- Bruce, on behalf of the GWT team
>>
>>
>> >>
>>
>
>
> --
>
> 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread markmac

Hi Vitali,

That is actually what we just thought of doing after I posted the
question! Thanks for the help, but so far its not working, actually it
looks like its doing nothing... I will investigate and find out whats
going on, and post back once I find out.

Thanks again
Mark

On Mar 19, 6:21 pm, Vitali Lovich  wrote:
> AFAIK - just loading the javascript should suffice.  You'll notice in the
> nocache.js, the last line of the code calls the function which initializes
> GWT & invokes your module.
>
> Are you having any problems with this?  One hint I have is that in your
> onModuleLoad, make sure you use the appropriate RootPanel (RootPanel.get()
> returns ).  Since you're loading the GWT dynamically into an existing
> page, you probably want to create a div with an appropriate iD for it to use
> (i.e. ).  Then use RootPanel.get("DynamicGWT")
> instead.
>
> On Wed, Mar 18, 2009 at 10:48 PM, markmac  wrote:
>
> > Hi All,
>
> > I am currently trying to integrate GWT into my existing application,
> > but Im having trouble doing that at the moment.
>
> > Currently I have heaps of custom JavaScript that I will eventually
> > migrate to GWT, but for now, I need to figure out how to add some
> > custom GWT widgets into my page, but not on page load (as heaps of
> > stuff is not yet loaded by the user, etc...) but rather on the
> > response callback from an existing AJAX call, can this be done?
>
> > Im imagining that I could call some externally exposed method that
> > resided within the *.nocache.js file? But Im not sure how that all
> > works, etc... If anyone has any resources that I could read up on or
> > experience in this area, that would be great!
>
> > Cheers,
> > 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: Announcing GWT 1.6 Release Candidate

2009-03-19 Thread hezjing
Hi

The gwt-windows-1.6.2.zip seems to be invalid when downloaded from IE 7 and
Chrome.
I'm not sure if anyone has successfully download and
extract gwt-windows-1.6.2.zip?


On Thu, Mar 19, 2009 at 4:32 AM, Bruce Johnson  wrote:

> Good news! Google Web Toolkit 1.6 RC is ready for you to download and try
> out:
>
> http://code.google.com/p/google-web-toolkit/downloads/list?q=1.6.2
>
> For background on what's new in GWT 1.6, please see the still-in-progress
> doc:
>
>
> http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=ReleaseNotes_1_6
>
> as well as previous 1.6-related announcements:
>
> "Announcing GWT 1.6 Milestone 1"
>
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/3e7e6cc3b35ad98a
>
> and
>
> "Announcing GWT 1.6 Milestone 2"
>
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/33df9cc75aead5a1
>
> For complete details, the GWT issue tracker has the full list of changes:
>
>
> http://code.google.com/p/google-web-toolkit/issues/list?can=2&q=milestone:1_6_RC%20status:FixedNotReleased,Fixed&sort=priority
>
> We expect this to be a short RC cycle, so a more comprehensive blog post
> with an overview of the features in GWT 1.6 should be just around the
> corner.
>
> -- Bruce, on behalf of the GWT team
>
>
> >
>


-- 

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: Gwt code where locales can be changed be dynamically

2009-03-19 Thread deeps

Can i pls have the code for localisation set.


On Mar 19, 12:15 pm, Vitali Lovich  wrote:
> Best way would be to actually redirect them to your app with the
> localization set.  That way, they load the app compiled for that
> localization.
>
> The only tricky thing is maintaining persistence across the switch if that
> is important.
>
> Otherwise, there's really no way to do it the GWT-way (AFAIK).  You're only
> other approach would be to walk over all DOM elements on the page that
> display text & set it to the localized version, but I have a feeling you're
> going to find the difficult to do, and possibly quite slow (not to mention
> the difficulty of figuring out a way to actually load the localized
> strings).
>
> You must remember that the localization that GWT does is at compile time -
> it'll automagically create several different versions of your code with all
> the different localizations you've set.  All those strings actually get
> inlined into your code & are static.  When the browser loads your code, GWT
> actually includes some preamble code that determines which code to load
> depending on user-agent, localization, and any other pivots you may have
> defined.
>
>
>
> On Thu, Mar 19, 2009 at 1:18 AM, deeps  wrote:
>
> > Hi, I am trying to design a code where locales can be changed both
> > dynamically n statically within a calendar widget like datepicker. I
> > would be  grateful if any of u helped me in this. Thank u.
>
> > Regards
> > Deepthi- Hide quoted text -
>
> - Show quoted 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-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
-~--~~~~--~~--~--~---



setting up locales statically n dynamically

2009-03-19 Thread deeps

I tried implementing some code i got in the forum and now i am getting
the fol errors...
No resource key found for the key element dateFormat.unable to laod
picker.Format module.
Will be grateful if u could help me. this is the code implemented in
GWT datepicker.
DatesConstant_us.properties
dateFormat=m/d/Y
  timeFormat=hh:MM:ss 

Thanks and Regards
Deepthi
--~--~-~--~~~---~--~~
You received 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-rpc + webservices hang glassfish 2.1

2009-03-19 Thread tetsuo

if you consider it well:
> http://code.google.com/webtoolkit/tutorials/1.5/RPC.html
will claims a special note :
"Important: GWT RPC services are not the same as web services based on
SOAP or REST. They are simply as a lightweight method for transferring
data between your server and the GWT application on the client. To
compare single and multi-tier deployment options for integrating GWT
RPC services into your application, see the Developer's Guide,
Architectural Perspectives."

if you´r not paying attention or respect to the different rules of
communication, you can tell us later, how to involve a webservice from
a gwt.client. my chain is:
gwt (js-client) -> rpc(remoteservice(proxy)) -> interface(@remote)-
>serviceclass(@statefull/@stateless) and the way back.

> Being that that service is a servlet there's no reason why one shouldn't use 
> an access to a db,
right, dont let a client directly on your db ;)

> a call to a webservice or whatever
not what ever, if your programming it with that behavior, then i is it
no wonder, that your fish in the aquarium going to dive.

> permitted by a servlet itself.
therefore the beans are created, the servlet (to serve) is to
satisfied the client, not as a "workerbean"

> I'm doing a browser -> (gwt) servlet -> webservice.
thats your choice

> I don't care about the rpc communication between the browser and the server,
what do you care for ?

> the webservice can take much time to answer, and being the call asynchronous 
> it's all ok: when the method returns the
> callback on javascript will be executed.
take care with your deductive logic
--~--~-~--~~~---~--~~
You received 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: SerializationException when serialize a HashMap over RPC

2009-03-19 Thread Alejandro D. Garin
Hi,

I try your suggestion but the same problem. This seems to happend only in
hosted mode. I'm using windows GWT 1.5.3 .

On Wed, Mar 18, 2009 at 7:15 PM, Vitali Lovich  wrote:

> I think I see it.  List is not generally serializable.  The recommendation
> I recall reading somewhere is to try to use super-classes as infrequently as
> possible because it makes the compiler's job more difficult - also, in this
> particular case, the GWT compiler is unable to determine the type to
> serialize to.
>
> Try:
>
> private Map> mapData = new
> HashMap>();
>
> or even more preferable, change mapData to a HashMap as well.
>
>
> On Wed, Mar 18, 2009 at 6:05 PM, Vitali Lovich  wrote:
>
>> That depends on the version of GWT he's using.  As of 1.5 (or 1.4 - can't
>> recall the exact version), Serializable is a synonym for IsSerializable
>>
>>
>> On Wed, Mar 18, 2009 at 5:15 PM, George Holler wrote:
>>
>>>
>>>
>>> The class WeeklyAppointmentData does not appear to implement
>>> IsSerializable. That's in the first line of the error stack trace.
>>>
>>> G
>>>
>>> --- On Wed, 3/18/09, Alejandro D. Garin  wrote:
>>>
>>> > From: Alejandro D. Garin 
>>> > Subject: SerializationException when serialize a HashMap over RPC
>>> > To: Google-Web-Toolkit@googlegroups.com
>>> > Date: Wednesday, March 18, 2009, 5:13 PM
>>> > Hello,
>>> >
>>> > I can't serialize a HashMap and I don't understand
>>> > why. Could you help me
>>> > please?
>>> > If I remove the following hashMap the RPC work just fine:
>>> >
>>> > private
>>> > Map> mapData
>>> > = new
>>> > HashMap>();
>>> >
>>> > *Tomcat error log:*
>>> >
>>> > com.google.gwt.user.client.rpc.SerializationException: Type
>>> > 'com.tasktimer.web.gwt.domain.WeeklyAppointmentData'
>>> > was not assignable to
>>> > 'com.google.gwt.user.client.rpc.IsSerializable' and
>>> > did not have a custom
>>> > field serializer.  For security purposes, this type will
>>> > not be serialized.
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.impl.LegacySerializationPolicy.validateSerialize(LegacySerializationPolicy.java:140)
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:591)
>>> > at
>>> >
>>> com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:129)
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:146)
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:530)
>>> > at
>>> > com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:573)
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:441)
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:529)
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:164)
>>> > at
>>> >
>>> com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
>>> > at
>>> > javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>>> > at
>>> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>>> > at
>>> >
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>>> > at
>>> >
>>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>>> > at
>>> >
>>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>>> > at
>>> >
>>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>>> > at
>>> >
>>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>> > at
>>> >
>>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>> > at
>>> >
>>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>>> > at
>>> >
>>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>>> > at
>>> >
>>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>>> > at
>>> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>>> > at java.lang.Thread.run(Unknown Source)
>>> >
>>> > *The demo clases:*
>>> >
>>> > public class SimpleFacadeImpl extends RemoteServiceServlet
>>> > implements
>>> > SimpleFacade {
>>> >
>>> >   private static final long serialVersionUID =
>>> > 1164908101444531503L;
>>> >
>>> >   public SimpleFacadeImpl() {
>>> >
>>> >   }
>>> >   @Override
>>> >   public WeeklyAppointmentData getWeeklyData() {
>>> > WeeklyAppointmentData data = new
>>> > WeeklyAppointmentData();
>>> > DayHourCoordenate

Re: Announcing GWT 1.6 Release Candidate

2009-03-19 Thread Lance Weber

Awesome! Go team go!

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



Timezone with DateTimeFormat

2009-03-19 Thread rb

Is there a way to display the time zone in the client?
The gwt DateTimeFormat for time zone "v" is returning the GMT offset
and not the time zone text.

The following code:
DateTimeFormat dtf = DateTimeFormat.getFormat("hh 'o''clock' a,
");
RootPanel.get().add( new Label( dtf.format(new Date()) ) );
returns:
GMT-04:00

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



Change GWT locale dynamically

2009-03-19 Thread Mamadou Alimou DIALLO
Hello group,

I develop big entreprise application using GWT. My application is
multilanguage (FR, EN, GB). I would like to change dynamically the
application language automaticaly. For example when I lunch application, I
would like to detect the client language and automatically load a good
propertie file. For example when your browser is in French, I would like to
load my application in French. Please do you have an idea about this problem
?

The other think I would like to do is, when I click for example on a button
to change language, I would like to change language without reloading all of
my application (just the current context). How can I do this please ?

thanks in advance

-- 
Cordialement,
DIALLO M. Alimou
http://dialloma.blogspot.com/
Cel. 00336 13 39 81 88

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



Basic Keyboard listener keyCode == KEY_ENTER test fails

2009-03-19 Thread wayne

My code looks like:
suggestBox.addKeyboardListener(new KeyboardListenerAdapter() {
public void onKeyDown(Widget sender, char keyCode, int 
modifiers) {
if(keyCode == KEY_ENTER);
{

System.out.println(suggestBox.getText());
}
}
The problem is, whenever I hit ANY key the console will print anything
in the suggestbox.
What's up with this, I'm pretty sure everything is in order.

--~--~-~--~~~---~--~~
You received 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-19 Thread magbyr

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.Servlet
javax.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.java:
> 448)
>   at br.gov.senado.lib.util.jetty.CustomJettyLauncher
> $WebAppContextWithReload.doStart(CustomJettyLauncher.java:387)
>   at org.mortbay.component.AbstractLifeCycle.start
> (AbstractLifeCycle.java:39)
> ---
> Spring WebApplictation initialization completed... But, the
> application not start...
>
> INFO: Using context class
> [org.springframework.web.context.support.XmlWebApplicationContext] for
> root WebApplicationContext
> Root WebApplicationContext: initialization completed in 157 ms
>
> Thanks in advance for your help!
> Wilton

--~--~-~--~~~---~--~~
You received 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 be used with a templete languge sush as Django

2009-03-19 Thread Coonay

can gwt be used with a templete languge sush as Django

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



Spring and GWT 1.6RC

2009-03-19 Thread magbyr

I'm having a problem with 1.6RC / Jetty and Spring 2.5. 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.Servlet
javax.servlet.UnavailableException: Servlet class
org.mortbay.jetty.servlet.DefaultServlet is not a
javax.servlet.Servlet

Seems like some kind of classloader issue.

Anybody running 1.6RC with Spring successfully?

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



File Upload

2009-03-19 Thread Bhaumik

I have tried one single example for to read Excel File in my SMS
application.By using this component i got whole path at client side
but i m not getting full path at server side.i m getting only file
name.
Below is my code for client side :
fuImportContact=new FileUpload();
fuImportContact.setName("File Import");

submitButton = new Button("Submit");
submitButton.setIconCls("arrowup-icon");

submitButton.addListener(new ButtonListenerAdapter()
{

public void onClick(Button button, EventObject e)
{


fileNameUpload=fuImportContact.getFilename();

Can anyone give me solution as i have to complete this application by
day after tomorrow.

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



Sharing GWT classes between two projects with a Maven build

2009-03-19 Thread Domenec

Hello, my setup is:

Application #1 is a GWT app. There is RPC, so the interfaces and
associated POJO's that define the RPC call are within the client
package, so that they can be translated into JavaScript.

On the server side of app#1 there is a call to web services. Those web
services are implemented in app#2. App#2 exposes web services with
XFire. XFire uses an interface and POJO's for exposing web services.

The interfaces and POJO's in both app#1 and app#2 are the same
classes, this lets RPC server side of app#1 seamlessly act as a client
of app#2. Reason is that app#1 is exposed to the Internet and app#2
deals with critical data in a more protected network. Server side of
#1 is just a bridge towards #2.

All of the above, works. Now I've been asked to manage builds with
Maven, shouldn't be an issue, but...

It is clear that common objects of #1 and #2 require their source code
in client package of #1 for getting translated into JavaScript. Having
them as a common jar generated by a third Maven project would not work
as the source code would not be exposed to the GWT compiler.

So, does any one see an elegant solution? So far I see:

- With an ant task, WAR of #1 can be unpacked and needed classes be
JAR'd and added to the Maven repository and let #2 use them.

- There are attachClasses options of war:war MOJO which I have to try,
they seem to generate an attached JAR, haven't tried this yet.

I'll try the second option first (and update this post), but external
opinions are welcome.


--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Thomas Broyer



On 19 mar, 11:23, markmac  wrote:
> Hi Vitali,
>
> That is actually what we just thought of doing after I posted the
> question! Thanks for the help, but so far its not working, actually it
> looks like its doing nothing... I will investigate and find out whats
> going on, and post back once I find out.

AFAICT, it waits for the page to be loaded (DOMContentLoaded or
similar, or onload as a last resort); so if the page already *is*
loaded when the script executes, it won't load the app.

You'd have to use a custom selection script (and therefore a custom
Linker) that doesn't wait for DOMContentLoaded/onload. Or if you could
come up with a patch to the existing selection script template that
would make it work in either situation, I guess the GWT team would
happily integrate 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-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: Announcing GWT 1.6 Release Candidate

2009-03-19 Thread El Mentecato Mayor

I downloaded the file under openSUSE.  After bunzip2 does its thing,
the tar file has the mozilla* directory containing an extra "./" at
the start, and I get this error when trying to untar (for each file
under this mozilla* subdirectory):

gwt-linux-1.6.2/./mozilla-1.7.12/gwt-dl-loadorder.conf: Cannot open:
No such file or directory
tar: Error exit delayed from previous errors

Do you know of a way to extract it regardless of that? Or could you
provide a different file?
Thanks.

On Mar 19, 1:36 pm, Lance Weber  wrote:
> Awesome! Go team go!
--~--~-~--~~~---~--~~
You received 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: Change GWT locale dynamically

2009-03-19 Thread Thomas Broyer



On 19 mar, 15:34, Mamadou Alimou DIALLO  wrote:
> Hello group,
>
> I develop big entreprise application using GWT. My application is
> multilanguage (FR, EN, GB). I would like to change dynamically the
> application language automaticaly. For example when I lunch application, I
> would like to detect the client language and automatically load a good
> propertie file. For example when your browser is in French, I would like to
> load my application in French. Please do you have an idea about this problem
> ?

We have the very same need, and the way we're going to do it is to use
content negotiation on the server.
In other words, duplicate the HTML host page in each 4 languages
(index.html.fr, index.html. en, index.html. de, index.html. es) with
the corresponding  and
let Apache choose the appropriate file.

That's kind of a "poor man"'s approach, but I know I won't get into
tricky things: it is known to work and it "just works".

(the GWT-Incubator includes some server-side Java code to do content-
negotiation from within a servlet/jsp/etc. and allows you to keep a
single HTML host page and generate the appropriate  within it
using conneg against the locales your application do support; we won't
use this approach as a) the app is served straight from Apache and b)
our HTML host page contains some localizable text: "loading",
"JavaScript support is mandatory; enable JavaScript or use a browser
that supports it", you know those kind of things)

> The other think I would like to do is, when I click for example on a button
> to change language, I would like to change language without reloading all of
> my application (just the current context). How can I do this please ?

We won't go this road as I don't think it is compelling enough for the
implied additional work (and performance downgrade). If you do want to
explore this scenario, here are some notes:
 - do not use GWT's I18N support (the "locale" property, Constants,
Messages, etc.), you'd have to build your own.
 - each and every localizable widget would have to register for a
global "locale changed" event that you'd fire when the user wants to
switch from e.g. French to English. This has serious performance
impacts if you have many such widgets.
 - beware of other locale peculiarities: RTL, some changes needed in
styles so your widgets align properly (text don't wrap, etc.) and/or
you don't offense or misguide your users (colors have different
"meanings" depending on countries/cultures). That's true even if you
use GWT's I18N, but it becomes trickier when you change the locale
dynamically as you might have to re-layout your page "on the go")
--~--~-~--~~~---~--~~
You received 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 mix content with style?

2009-03-19 Thread Coonay

like old html,gwt mix content with style again?
in gwt ,most dynamic UI element have to set style with addStyleName
method?
such as the following,
public class FirstGWT implements EntryPoint {
private FlexTable stocksFlexTable = new FlexTable();
}

if i define the style in the css
. stocksFlexTable {
}

can gwt apply  this to stocksFlexTable  automatically without manually
calling addStyleName?
--~--~-~--~~~---~--~~
You received 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 code where locales can be changed be dynamically

2009-03-19 Thread Vitali Lovich
Like I said, just reload the page with locale=locale_to_use: e.g.

public static native void redirect(String url)/*-{
  $wnd.location = url;
  }-*/;

redirect("http://mydomain.com/MySuperDuperApp?locale=en_US";);


Refer to GWT's Internalization
Guidefor
more information.

On Thu, Mar 19, 2009 at 7:10 AM, deeps  wrote:

>
> Can i pls have the code for localisation set.
>
>
> On Mar 19, 12:15 pm, Vitali Lovich  wrote:
> > Best way would be to actually redirect them to your app with the
> > localization set.  That way, they load the app compiled for that
> > localization.
> >
> > The only tricky thing is maintaining persistence across the switch if
> that
> > is important.
> >
> > Otherwise, there's really no way to do it the GWT-way (AFAIK).  You're
> only
> > other approach would be to walk over all DOM elements on the page that
> > display text & set it to the localized version, but I have a feeling
> you're
> > going to find the difficult to do, and possibly quite slow (not to
> mention
> > the difficulty of figuring out a way to actually load the localized
> > strings).
> >
> > You must remember that the localization that GWT does is at compile time
> -
> > it'll automagically create several different versions of your code with
> all
> > the different localizations you've set.  All those strings actually get
> > inlined into your code & are static.  When the browser loads your code,
> GWT
> > actually includes some preamble code that determines which code to load
> > depending on user-agent, localization, and any other pivots you may have
> > defined.
> >
> >
> >
> > On Thu, Mar 19, 2009 at 1:18 AM, deeps  wrote:
> >
> > > Hi, I am trying to design a code where locales can be changed both
> > > dynamically n statically within a calendar widget like datepicker. I
> > > would be  grateful if any of u helped me in this. Thank u.
> >
> > > Regards
> > > Deepthi- Hide quoted text -
> >
> > - Show quoted 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-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
-~--~~~~--~~--~--~---



problem when running gwt application with eclipse

2009-03-19 Thread eta2009

hello

when I create an application with "projectCreator" and
"applicationCreator" then a import it to eclipse, it runs just when I
click the "run" button in the eclipse IDE.
after any modification the application crashes, it doesn't run with
this button (but it run with "MyApp-shell.cmd" script). And I obtain
this error:

An internal error occurred during: "Launching
com.google.gwt.sample.MyApp.MyClass".
Path for project must have only one segment.

since 4 days I tried to resolve this but I can't.


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



Minor error in Event Handler documentation sample code

2009-03-19 Thread Zak

Hi-

Just wanted to point out what I think is an error in the Event Handler
documentation sample code.

page:
http://code.google.com/docreader/?p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=ReleaseNotes_1_6#p=google-web-toolkit-doc-1-6&s=google-web-toolkit-doc-1-6&t=DevGuideEventsAndHandlers

code (second example):
Widget sender = (Widget) click.getSource();

should be:
Widget sender = (Widget) event.getSource();


-zak

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



Fwd: GWT 1.6.2 fails to load

2009-03-19 Thread Søren Brønsted

I just downloaded 1.6.2 and converted my project so that I have no
errors and warnings, but my application will not load.
I have compiled with style DETAILED and loaded the application i
Firefox, and firebug reports an error in this code:

       function maybeStartModule() {
               if (scriptsDone && loadDone) {
                       var iframe = $doc.getElementById($intern_1);
                       var frameWnd = iframe.contentWindow;
                       if (isHostedMode()) {
                               frameWnd.__gwt_getProperty = function(name) {
                                       return computePropValue(name);
                               };
                       }
                       groupapp = null;
--                  frameWnd.gwtOnLoad(onLoadErrorFunc, $intern_1, base);
                       $stats && $stats( {
                               moduleName :$intern_1,
                               subSystem :$intern_2,
                               evtGroup :$intern_6,
                               millis :(new Date()).getTime(),
                               type :$intern_7
                       });
               }
       }

with they message "frameWnd is undefined". I stops marked by ""

I guess that this is an entry point and the error does not say much,
and I am not an expert on javascript.
I there anyway to get more information on whats is going on?

I have tryed to debug my application but the error happens before
entry point is reached.

Any suggestions?

regards
Søren


--
Søren Brønsted
Kirkebjergvej 2
4623 Lille Skensved
+45 30 64 63 50
www.bronsted.dk

--~--~-~--~~~---~--~~
You received 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 code where locales can be changed be dynamically

2009-03-19 Thread Thomas Broyer



On 19 mar, 16:58, Vitali Lovich  wrote:
> Like I said, just reload the page with locale=locale_to_use: e.g.
>
> public static native void redirect(String url)/*-{
>       $wnd.location = url;
>   }-*/;
>
> redirect("http://mydomain.com/MySuperDuperApp?locale=en_US";);

Window.Location.assign("?locale=en_US") should be enough.


--~--~-~--~~~---~--~~
You received 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: Announcing GWT 1.6 Release Candidate

2009-03-19 Thread Jewel

Does Google have any plan to include comet support officially in GWT
in near future?

On Mar 19, 9:32 pm, El Mentecato Mayor 
wrote:
> I downloaded the file under openSUSE.  After bunzip2 does its thing,
> the tar file has the mozilla* directory containing an extra "./" at
> the start, and I get this error when trying to untar (for each file
> under this mozilla* subdirectory):
>
> gwt-linux-1.6.2/./mozilla-1.7.12/gwt-dl-loadorder.conf: Cannot open:
> No such file or directory
> tar: Error exit delayed from previous errors
>
> Do you know of a way to extract it regardless of that? Or could you
> provide a different file?
> Thanks.
>
> On Mar 19, 1:36 pm, Lance Weber  wrote:
>
> > Awesome! Go team go!
--~--~-~--~~~---~--~~
You received 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: Spring and GWT 1.6RC

2009-03-19 Thread Luciano

Hi,

I'm unable to use JSPs in the embedded Jetty too. A simple test: with
JAVA_HOME pointing to the latest JDK, I've created an application
named "JspTest" using webAppCreator. Then I renamed the JspTest.html
file to JspTest.jsp and modified build.xml to launch that file. With
"ant hosted" I get an error:

Unable to compile class for JSP

Generated servlet error:
GRAVE: Env: Compile: javaFileName=/C:/DOCUME~1/.../Temp/
Jetty_0_0_0_0__warmasbuh/jsp//org/apache/jsp\JspTest_jsp.java
... plus many other lines.

Any idea?

On 19 Mar, 15:28, magbyr  wrote:
> I'm having a problem with 1.6RC / Jetty and Spring 2.5. Same project
> worked well on 1.5.3, but not on 1.6RC.
>
> Fails onjspand default servlet from Jetty:
> javax.servlet.UnavailableException: Servlet class
> org.apache.jasper.servlet.JspServlet is not a javax.servlet.Servlet
> javax.servlet.UnavailableException: Servlet class
> org.mortbay.jetty.servlet.DefaultServlet is not a
> javax.servlet.Servlet
>
> Seems like some kind of classloader issue.
>
> Anybody running 1.6RC with Spring successfully?

--~--~-~--~~~---~--~~
You received 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 code where locales can be changed be dynamically

2009-03-19 Thread Vitali Lovich
Thanks - I tried looking for that online & couldn't find it.

On Thu, Mar 19, 2009 at 12:49 PM, Thomas Broyer  wrote:

>
>
>
> On 19 mar, 16:58, Vitali Lovich  wrote:
> > Like I said, just reload the page with locale=locale_to_use: e.g.
> >
> > public static native void redirect(String url)/*-{
> >   $wnd.location = url;
> >   }-*/;
> >
> > redirect("http://mydomain.com/MySuperDuperApp?locale=en_US";);
>
> Window.Location.assign("?locale=en_US") should be enough.
>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: File Upload

2009-03-19 Thread Thomas Broyer



On 19 mar, 14:39, Bhaumik  wrote:
> I have tried one single example for to read Excel File in my SMS
> application.By using this component i got whole path at client side

Note that not all browser will give you a full path (Opera will, but
it'll be a *fake* one; and HTML5 dictates an Opera-like behavior, so
expect more and more browser to *not* give you a full path in the near
future)

> but i m not getting full path at server side.i m getting only file
> name.

Why do you need the full path of the uploaded file on the server side?

> Below is my code for client side :
> fuImportContact=new FileUpload();
>                 fuImportContact.setName("File Import");

You shouldn't use a space in an input name (see the HTML spec). It
works on most browsers but it's just not good 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-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: Sharing GWT classes between two projects with a Maven build

2009-03-19 Thread Vitali Lovich
AFAIK, it's possible to add the stuff using  in your gwt.xml
(just google super-source gwt).

http://roberthanson.blogspot.com/2006/05/how-to-package-gwt-components.html

There's some discussion in the comments there I believe regarding the same
thing you're trying to do.

On Thu, Mar 19, 2009 at 9:45 AM, Domenec wrote:

>
> Hello, my setup is:
>
> Application #1 is a GWT app. There is RPC, so the interfaces and
> associated POJO's that define the RPC call are within the client
> package, so that they can be translated into JavaScript.
>
> On the server side of app#1 there is a call to web services. Those web
> services are implemented in app#2. App#2 exposes web services with
> XFire. XFire uses an interface and POJO's for exposing web services.
>
> The interfaces and POJO's in both app#1 and app#2 are the same
> classes, this lets RPC server side of app#1 seamlessly act as a client
> of app#2. Reason is that app#1 is exposed to the Internet and app#2
> deals with critical data in a more protected network. Server side of
> #1 is just a bridge towards #2.
>
> All of the above, works. Now I've been asked to manage builds with
> Maven, shouldn't be an issue, but...
>
> It is clear that common objects of #1 and #2 require their source code
> in client package of #1 for getting translated into JavaScript. Having
> them as a common jar generated by a third Maven project would not work
> as the source code would not be exposed to the GWT compiler.
>
> So, does any one see an elegant solution? So far I see:
>
> - With an ant task, WAR of #1 can be unpacked and needed classes be
> JAR'd and added to the Maven repository and let #2 use them.
>
> - There are attachClasses options of war:war MOJO which I have to try,
> they seem to generate an attached JAR, haven't tried this yet.
>
> I'll try the second option first (and update this post), but external
> opinions are welcome.
>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Basic Keyboard listener keyCode == KEY_ENTER test fails

2009-03-19 Thread Thomas Broyer



On 19 mar, 09:54, wayne  wrote:
> My code looks like:
>                 suggestBox.addKeyboardListener(new KeyboardListenerAdapter() {
>                         public void onKeyDown(Widget sender, char keyCode, 
> int modifiers) {
>                                 if(keyCode == KEY_ENTER);
>                                 {
>                                         
> System.out.println(suggestBox.getText());
>                                 }
>                         }
> The problem is, whenever I hit ANY key the console will print anything
> in the suggestbox.
> What's up with this, I'm pretty sure everything is in order.

I wouldn't be surprised that you don't get the KEY_ENTER (and
KEY_ARROW_xxx, FWIW) in your keyboard listener because the SuggestBox
handles (and cancels) them for the "suggestion menu".

If you want to know when a suggestion is selected use the appropriate
listener/handler (see the javadoc), but you won't be able to tell
whether it was by keyboard or by mouse (well, actually, when selecting
a suggestion by mouse, the box looses focus; I've run into troubles
with a custom RPCSuggestOracle because of this, doing something onBlur
and thus overriding the selected suggestion, which happens a few
"ticks" later)
--~--~-~--~~~---~--~~
You received 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: Spring and GWT 1.6RC

2009-03-19 Thread magbyr

I tried creating a completely blank / new 1.6RC project. When I put
spring.jar and a blank applicationContext.xml the project stops
working.
Tried both with the spring context-listener and the spring servlet.

[WARN] failed springServlet
java.lang.LinkageError: loader constraint violation: loader (instance
of com/google/gwt/dev/shell/jetty/JettyLauncher$WebAppContextWithReload
$WebAppClassLoaderExtension) previously initiated loading for a
different type with name "org/apache/commons/logging/Log"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at com.google.gwt.dev.shell.jetty.JettyLauncher
$WebAppContextWithReload$WebAppClassLoaderExtension.findClass
(JettyLauncher.java:303)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass
(WebAppClassLoader.java:366)
at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass
(WebAppClassLoader.java:337)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at
org.springframework.core.CollectionFactory.createConcurrentMapIfPossible
(CollectionFactory.java:195)
at org.springframework.web.context.ContextLoader.
(ContextLoader.java:153)
at
org.springframework.web.context.ContextLoaderServlet.createContextLoader
(ContextLoaderServlet.java:89)
at org.springframework.web.context.ContextLoaderServlet.init
(ContextLoaderServlet.java:80)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.mortbay.jetty.servlet.ServletHolder.initServlet
(ServletHolder.java:433)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
256)
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 com.google.gwt.dev.shell.jetty.JettyLauncher
$WebAppContextWithReload.doStart(JettyLauncher.java:397)
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 com.google.gwt.dev.shell.jetty.JettyLauncher.start
(JettyLauncher.java:449)
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)



On 19 Mar, 15:28, magbyr  wrote:
> I'm having a problem with 1.6RC / Jetty and Spring 2.5. 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.Servlet
> javax.servlet.UnavailableException: Servlet class
> org.mortbay.jetty.servlet.DefaultServlet is not a
> javax.servlet.Servlet
>
> Seems like some kind of classloader issue.
>
> Anybody running 1.6RC with Spring successfully?
--~--~-~--~~~---~--~~
You received 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 mix content with style?

2009-03-19 Thread Danny Schimke
You could do something like this:

Style style = tmpElement.getElement().getStyle();
style.setProperty("border", "1py solid #00;");

-Danny

2009/3/19 Coonay 

>
> like old html,gwt mix content with style again?
> in gwt ,most dynamic UI element have to set style with addStyleName
> method?
> such as the following,
> public class FirstGWT implements EntryPoint {
>private FlexTable stocksFlexTable = new FlexTable();
> }
>
> if i define the style in the css
> . stocksFlexTable {
> }
>
> can gwt apply  this to stocksFlexTable  automatically without manually
> calling addStyleName?
> >
>

--~--~-~--~~~---~--~~
You received 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: can gwt be used with a templete languge sush as Django

2009-03-19 Thread Tony Strauss

I might not understand fully what you want to do, but yes, it can.
While I have not used it with Django, I have used JSP templating in
the GWT application HTML file.  For instance, in one application, I
have a different GWT module loaded depending on the type of user
(admin, client, etc).  Here is what the header of my JSP file looks
like:

  




Share and Enjoy!






/.nocache.js">
  

The particular GWT javascript file loaded depends on the value of
applicationClass, which is substituted by the server.

In general, GWT is an entirely client-side technology and thus can be
used with whatever server-side technology you desire.  The one
exception to this is the GWT RPC mechanism, which requires a Java
servlet on the server (there is, however, a 3rd party library that
provides a GWT RPC backend in python: http://code.google.com/p/python-gwt-rpc/).

Tony
--
Tony Strauss
Designing Patterns, LLC
http://www.designingpatterns.com
http://blogs.designingpatterns.com

On Mar 19, 3:42 am, Coonay  wrote:
> can gwt be used with a templete languge sush as Django
--~--~-~--~~~---~--~~
You received 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
-~--~~~~--~~--~--~---



Recommend server framework

2009-03-19 Thread sgkannan

Hi,

We are having several years of domain expertise in manufacturing with
intermediate programming skills - having worked with Java, JSP,
Servlets, Web Services and DB.

We are developing an application (enterprise, web based, each
application instance should handle 2000+ users) from scratch and we've
decided to use Ext GWT as front end (extjs.com/products/gxt/)

We are looking for something like Force.com for the server side
processing.

We are looking for the server side framework with some or all of the
following capabilities available out of the box:
- user management (add/delete/edit users; assign them to groups and
roles)
- ability to create new types of objects and assign fields (applying
security on fields) and relate objects
- search (full text and object)
- document management (check in, checkout, lock)
- workflow approvals
- audit trials
- discussion and other collaborative tools

Can you please recommend some framework?

Thanks in advance.





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

2009-03-19 Thread Vitali Lovich
Do not do it that way.  Style's should always be in a separate CSS document
- it's better that way any way you look at it.

GWT is not mixing content with style I don't think.  How you would write the
equivalent HTML?

  (that's not the element FlexTable
uses, but this is for demonstration purposes only).

If you don't specify the class, how is the CSS supposed to realize which
particular table you wanted to style?  The variable name is just a
javascript variable - has absolutely no relation to CSS.

The addStyleName simply modifies the class attribute (so that you can style
it with CSS as you want).  If you don't like that, you could always do
getElement().setId("") (but remember that id uniquely identifies an element)

AFAIK, mixing content with style is a different problem where, for instance,
elements in HTML used to represent both the visual style & the document
structure.

Am I completely wrong?

On Thu, Mar 19, 2009 at 2:16 PM, Danny Schimke wrote:

> You could do something like this:
>
> Style style = tmpElement.getElement().getStyle();
> style.setProperty("border", "1py solid #00;");
>
> -Danny
>
> 2009/3/19 Coonay 
>
>
>> like old html,gwt mix content with style again?
>> in gwt ,most dynamic UI element have to set style with addStyleName
>> method?
>> such as the following,
>> public class FirstGWT implements EntryPoint {
>>private FlexTable stocksFlexTable = new FlexTable();
>> }
>>
>> if i define the style in the css
>> . stocksFlexTable {
>> }
>>
>> can gwt apply  this to stocksFlexTable  automatically without manually
>> calling addStyleName?
>>
>>
>
> >
>

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



Help! My Generators don't work for Web Mode :(

2009-03-19 Thread Marcelo Emanoel

Hi guys I have a problem with generators... I've manage to do 2
generators and they work fine on hosted mode however they don't
work when I compile code to web mode :( What I'm trying to acomplish
is to build an API for binding... An important thing is that my
generators work on hosted mode and they are called when the code start
is compiled
--~--~-~--~~~---~--~~
You received 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: Spring and GWT 1.6RC

2009-03-19 Thread Flemming Boller
I can also confirm the above experience. "loader constraint violation"

/Flemming

On Thu, Mar 19, 2009 at 6:56 PM, magbyr  wrote:

>
> I tried creating a completely blank / new 1.6RC project. When I put
> spring.jar and a blank applicationContext.xml the project stops
> working.
> Tried both with the spring context-listener and the spring servlet.
>
> [WARN] failed springServlet
> java.lang.LinkageError: loader constraint violation: loader (instance
> of com/google/gwt/dev/shell/jetty/JettyLauncher$WebAppContextWithReload
> $WebAppClassLoaderExtension) previously initiated loading for a
> different type with name "org/apache/commons/logging/Log"
>at java.lang.ClassLoader.defineClass1(Native Method)
>at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
>at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
> 124)
>at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>at java.security.AccessController.doPrivileged(Native Method)
>at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>at com.google.gwt.dev.shell.jetty.JettyLauncher
> $WebAppContextWithReload$WebAppClassLoaderExtension.findClass
> (JettyLauncher.java:303)
>at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass
> (WebAppClassLoader.java:366)
>at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass
> (WebAppClassLoader.java:337)
>at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>at
> org.springframework.core.CollectionFactory.createConcurrentMapIfPossible
> (CollectionFactory.java:195)
>at org.springframework.web.context.ContextLoader.
> (ContextLoader.java:153)
>at
> org.springframework.web.context.ContextLoaderServlet.createContextLoader
> (ContextLoaderServlet.java:89)
>at org.springframework.web.context.ContextLoaderServlet.init
> (ContextLoaderServlet.java:80)
>at javax.servlet.GenericServlet.init(GenericServlet.java:212)
>at org.mortbay.jetty.servlet.ServletHolder.initServlet
> (ServletHolder.java:433)
>at
> org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:
> 256)
>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 com.google.gwt.dev.shell.jetty.JettyLauncher
> $WebAppContextWithReload.doStart(JettyLauncher.java:397)
>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 com.google.gwt.dev.shell.jetty.JettyLauncher.start
> (JettyLauncher.java:449)
>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)
>
>
>
> On 19 Mar, 15:28, magbyr  wrote:
> > I'm having a problem with 1.6RC / Jetty and Spring 2.5. 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.Servlet
> > javax.servlet.UnavailableException: Servlet class
> > org.mortbay.jetty.servlet.DefaultServlet is not a
> > javax.servlet.Servlet
> >
> > Seems like some kind of classloader issue.
> >
> > Anybody running 1.6RC with Spring successfully?
> >
>

--~--~-~--~~~---~--~~
You received 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: JsArray.length giving error: HostedModeException: Expected primitive type int; actual value was undefined

2009-03-19 Thread Farrukh Najmi


Dear GWT dev team,

I would be grateful if someone could respond to this issue. Ideally I
would appreciate:

 * Validation that this is a GWT bug. If so, I will file an issue. BTW
where is the issue tracker for GWT/webtoolkit project?
 * Suggestions for a workaround
 * Best guess when the fix may be available in svn

Thanks.

On Mar 18, 6:49 pm, Farrukh Najmi  wrote:
> I have the following code that processes a JavaScriptObject that is expected
> to be a JsArray:
>
>         JavaScriptObject jso = ...
>         JsArray jsa = jso.cast();
>         int cnt = jsa.length();
>
> I am finding that if the JsArray has a single element then jsa.length()
> results in following exception.
> All is well if there are 2 or more elements:
>
> com.google.gwt.dev.shell.HostedModeException: Expected primitive type int;
> actual value was undefined
>         at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:51)
>         at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeInt(ModuleSpace.java:206)
>         at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:75)
>         at com.google.gwt.core.client.JsArray$.length$(JsArray.java)
>         at
> com.wellfleetsoftware.gis.gui.gwt.client.editor.PartyEditor.getAttributeAsListGridRecords(PartyEditor.java:108)
>         at
> com.wellfleetsoftware.gis.gui.gwt.client.editor.PartyEditor.fetchRelatedData(PartyEditor.java:93)
>         at
> com.wellfleetsoftware.gis.gui.gwt.client.editor.RegistryObjectEditor$1.execute(RegistryObjectEditor.java:77)
>         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.moz.MethodDispatch.invoke(MethodDispatch.java:80)
>         at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native
> Method)
>         at
> org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:1428)
>         at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2840)
>         at com.google.gwt.dev.GWTShell.pumpEventLoop(GWTShell.java:720)
>         at com.google.gwt.dev.GWTShell.run(GWTShell.java:593)
>         at com.google.gwt.dev.GWTShell.main(GWTShell.java:357)
>
> Is this a known issue or am I doing something wrong?
>
> An example JSON fragment for the 1 element JsArray is:
>
>             "Email" : [ { "id" : 245081,
>                   "address" : "farr...@work.com",
>                   "type" : "OfficeEmail"
>                 } ],
>
> Thanks for any help on this issue.
>
> --
> Regards,
> Farrukh
--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread markmac

Hmmm,
Thats not good news, could you provide more information about the
custom selection script/linkers?

Also, I was wondering, if we were to mimic, the .nocache.js file, by
calling its internal methods, would this be a problem when we deploy
to production code and obfuscate the javascript code? (i.e. as all the
method names/variables change to smaller less significant names)

On Mar 20, 2:18 am, Thomas Broyer  wrote:
> On 19 mar, 11:23, markmac  wrote:
>
> > Hi Vitali,
>
> > That is actually what we just thought of doing after I posted the
> > question! Thanks for the help, but so far its not working, actually it
> > looks like its doing nothing... I will investigate and find out whats
> > going on, and post back once I find out.
>
> AFAICT, it waits for the page to be loaded (DOMContentLoaded or
> similar, or onload as a last resort); so if the page already *is*
> loaded when the script executes, it won't load the app.
>
> You'd have to use a custom selection script (and therefore a custom
> Linker) that doesn't wait for DOMContentLoaded/onload. Or if you could
> come up with a patch to the existing selection script template that
> would make it work in either situation, I guess the GWT team would
> happily integrate 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-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: Help! My Generators don't work for Web Mode :(

2009-03-19 Thread Marcelo Emanoel B. Diniz

this is my entry point

package br.com.gwt.symbiosis.client;

import br.com.gwt.symbiosis.client.mock.FormView;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;

public class Symbiosis implements EntryPoint {

public void onModuleLoad() {
FormView binded = GWT.create(FormView.class);
Label label = new Label();
label.setText(binded.getClass().getName());
RootPanel.get().add(binded);
RootPanel.get().add(label);
}
}

on hosted mode the label text is
"br.com.gwt.symbiosis.client.mock.Bound_FormView_View" wich is in fact
what is expected to be...
but at web mode the label text is
''br.com.gwt.symbiosis.client.mock.FormView" which in turn is not what
I need... and doesn't work as expected either... :(

by the way... there's no complain on the console

On Mar 19, 3:53 pm, Marcelo Emanoel  wrote:
> Hi guys I have a problem with generators... I've manage to do 2
> generators and they work fine on hosted mode however they don't
> work when I compile code to web mode :( What I'm trying to acomplish
> is to build an API for binding... An important thing is that my
> generators work on hosted mode and they are called when the code start
> is compiled
--~--~-~--~~~---~--~~
You received 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: NumberFormat getCurrenyFormat()

2009-03-19 Thread fatjack1...@googlemail.com

Anyone have any suggestions?

On Mar 18, 5:21 pm, "fatjack1...@googlemail.com"
 wrote:
> Or at least change it to £2.57 instead of $?
>
> On Mar 17, 8:58 pm, "fatjack1...@googlemail.com"
>
>  wrote:
> > Ok,
>
> > The reason I wasparsing it back in was to convert it from a String to
> > an integer. I think I have fixed part of the problem. My code now
> > looks like this:
>
> > NumberFormat fmt = NumberFormat.getCurrencyFormat();
> > String formatted = fmt.format(discountAmount);
> > discountAmount = Integer.parse(formatted);
>
> > However, it now comes up with US$2.57...How do I get it to remove the
> > US$ part?!
>
> > Regards,
> > Jack
>
> > On Mar 17, 6:38 pm, MN  wrote:
>
> > > please provide your full code.
>
> > > you print out formatted oder discountAmount?
> > > why you parse again the formatted string back to discountAmount?
>
> > > On 17 Mrz., 15:18, "fatjack1...@googlemail.com"
>
> > >  wrote:
> > > > Hi,
>
> > > > I am having some problems correctly displaying currency. Here is the
> > > > code I am using:
>
> > > > //Format the discount to two decimal places
> > > > NumberFormat fmt = NumberFormat.getCurrencyFormat();
> > > > String formatted = fmt.format(discountAmount);
> > > > discountAmount = NumberFormat.getCurrencyFormat().parse(formatted);
>
> > > > The discount amount field is set to some currency value for example
> > > > 2.5. Now, it works fine if the value is set to 2 or more decimal
> > > > places, so it would format 2.5 to 2.58. However, if the value is
> > > > intitial set to say 3, it formats the value to 3.0!
>
> > > > Now, as I am using this to display the price of something, £3.0 is not
> > > > really much use. Can someone see where I am going wrong in my code or
> > > > if I need to add something??
>
> > > > 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-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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Ian Bambury
I might be being a bit thick here, but why do you want to delay the
onModuleLoad routine?
Why not:

 * create a GWT method to insert the widgets into the page

 * in the onModuleLoad, create a JS function to call the insertWidgets
method

 * When the Ajax call returns, just call the GWT routine from JS

Or have I missed something?

Ian

http://examples.roughian.com


2009/3/19 markmac 

>
> Hmmm,
> Thats not good news, could you provide more information about the
> custom selection script/linkers?
>

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



uncaught Exception java.lang.IllegalArgumentException

2009-03-19 Thread greatness

Hi all,
I have got this problem since migrating to GWT 1.5.3 from 1.4.62. I
get this exception only in the web mode. I do not get this in the
hosted mode. I am kind of new to the GWT and I am not sure how I can
fix this. I have a tree structure that pages are shown on the right by
selecting tree items on the tree. When I click on the tree item,
nothing is displayed on the right frame. I get this
java.lang.illegalArgumentException.
FYI-- I installed firebug, I see weird messages such as "urchinTracker
is not defined
[Break on this error] urchinTracker("\x2Fgroup\x2FGoogle...oin=y
\x26als_sstat=s\x26als_usc=1\x26");". As far as I know, we don't use
urchine software.
I am totally lost. any help is highly appreciated.


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



ImageBundle and polling very often

2009-03-19 Thread GhostNr1

Hi!

I'm trying to use ImageBundle to paint all my images. That's work very
good except from one thing.

Every 3 secound I poll the server to check if an ohtello plan have
changed and then I try to paint it

for (int i = 0; i < gamePlan.getColumnCount(); 
i++) {
for (int j = 0; j < 
gamePlan.getRowCount(); j++) {
if 
(result.getGamePlan()[i][j].equals("B")) {
gamePlan.setWidget(i,j, 
blackImgPrototype.createImage());
} else if 
(result.getGamePlan()[i][j].equals("W")) {
gamePlan.setWidget(i,j, 
whiteImgPrototype.createImage());
} else {
gamePlan.setWidget(i,j, 
greenImgPrototype.createImage());
}
}
}

I use that one, the problem is I use blackImgPrototype.createImage()
so it create 64 new images every 3:rd secound and the memory stall.
Any suggestion how I can fix this.

Image black = blackImgPrototype.createImage();
Image white = whiteImgPrototype.createImage();
Image green = greenImgPrototype.createImage();
for (int i = 0; i < gamePlan.getColumnCount(); 
i++) {
for (int j = 0; j < 
gamePlan.getRowCount(); j++) {
if 
(result.getGamePlan()[i][j].equals("B")) {
gamePlan.setWidget(i,j, 
black);
} else if 
(result.getGamePlan()[i][j].equals("W")) {
gamePlan.setWidget(i,j, 
white);
} else {
gamePlan.setWidget(i,j, 
green);
}
}
}

I have tryed that but then it only paint one black one white and one
green image.

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



RequestBuilder.setPassword on IE6

2009-03-19 Thread Geoff

I've encountered an issue with the RequestBuilder that only crops up
on IE6. If I set a username and password using RequestBuilder.setUser
() and RequestBuilder.setPassword(), and then call
RequestBuilder.sendRequest(), my onResponseReceived() immediately gets
called with a Response object that has a status code of zero, no
status message, and no response text. On all other browsers, the
expected response to download an XML document is received. I've had to
temporarily resort to not setting the user and password in my request
and letting the browser pop up its authentication dialog, which then
produces a valid Response object.

Any ideas as to what's going on here? Have I stumbled on a bug?
Something to look forward to in 1.6?
--~--~-~--~~~---~--~~
You received 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: body bgcolor issue

2009-03-19 Thread Tony Paul
Hello again,

This issue does not exist outside of GWT, so it's not that trivial, please
try to reproduce it and see for yourself. If you know of a solution, please
let me know.

Thank you,
Tony


On Mon, Mar 16, 2009 at 4:46 PM, tony.p..  wrote:

>
> Hello all,
>
> I tried to change the background color of my gwt app, but couldn't.
> I'm using this code:
>
> 
>  
> src="com.adc.IDD.nocache.js">
>  
>  
>
>  
> 
>
> I tried different styles for the values for the bgcolor, eg: "blue" or
> blue, etc..., but that did not change the color at all. If you know
> how to set the bgcolor in the body please tell me how.
>
> Thank you.
> Tony
>
> >
>

--~--~-~--~~~---~--~~
You received 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 code where locales can be changed be dynamically

2009-03-19 Thread flyingb...@gmail.com

Why dont u do redirect the google way with Window.open


just use target as _self

also if you really if u want to be able to change local on the fly you
would need to create all the strings as variables that can get
changed.
Make a class an abstract while the differnet languages extends it.

so than you can call the class.



On Mar 19, 10:23 am, Vitali Lovich  wrote:
> Thanks - I tried looking for that online & couldn't find it.
>
> On Thu, Mar 19, 2009 at 12:49 PM, Thomas Broyer  wrote:
>
> > On 19 mar, 16:58, Vitali Lovich  wrote:
> > > Like I said, just reload the page with locale=locale_to_use: e.g.
>
> > > public static native void redirect(String url)/*-{
> > >       $wnd.location = url;
> > >   }-*/;
>
> > > redirect("http://mydomain.com/MySuperDuperApp?locale=en_US";);
>
> > Window.Location.assign("?locale=en_US") should be enough.
>
>
--~--~-~--~~~---~--~~
You received 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 someone covert a 1.5 run file to 1.6 for me?

2009-03-19 Thread flyingb...@gmail.com

Well the project i did is already using gwt 1.6 but the test is still
using the old method

i used gwt4nb to generate the project layout for 1.5

but there is no gwt4nb for 1.6 yet so I cant get it converted to the
new test layout.
--~--~-~--~~~---~--~~
You received 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: body bgcolor issue

2009-03-19 Thread Ian Bambury
Try getting rid of the standard theme you left in the module.gwt.xml?
Just a guess.

Ian

http://examples.roughian.com


2009/3/19 Tony Paul 

> Hello again,
>
> This issue does not exist outside of GWT, so it's not that trivial, please
> try to reproduce it and see for yourself. If you know of a solution, please
> let me know.
>
> Thank you,
> Tony
>
>
>
> On Mon, Mar 16, 2009 at 4:46 PM, tony.p..  wrote:
>
>>
>> Hello all,
>>
>> I tried to change the background color of my gwt app, but couldn't.
>> I'm using this code:
>>
>> 
>>  
>>> src="com.adc.IDD.nocache.js">
>>  
>>  
>>
>>  
>> 
>>
>> I tried different styles for the values for the bgcolor, eg: "blue" or
>> blue, etc..., but that did not change the color at all. If you know
>> how to set the bgcolor in the body please tell me how.
>>
>> Thank you.
>> Tony
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: body bgcolor issue

2009-03-19 Thread Tony Paul
Ian,

You gave me the idea, I added the color in the css file and used it in the
html file and that fixed it.

Thank you,
Tony

On Thu, Mar 19, 2009 at 6:01 PM, Ian Bambury  wrote:

> Try getting rid of the standard theme you left in the module.gwt.xml?
> Just a guess.
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/3/19 Tony Paul 
>
> Hello again,
>>
>> This issue does not exist outside of GWT, so it's not that trivial, please
>> try to reproduce it and see for yourself. If you know of a solution, please
>> let me know.
>>
>> Thank you,
>> Tony
>>
>>
>>
>> On Mon, Mar 16, 2009 at 4:46 PM, tony.p..  wrote:
>>
>>>
>>> Hello all,
>>>
>>> I tried to change the background color of my gwt app, but couldn't.
>>> I'm using this code:
>>>
>>> 
>>>  
>>>>> src="com.adc.IDD.nocache.js">
>>>  
>>>  
>>>
>>>  
>>> 
>>>
>>> I tried different styles for the values for the bgcolor, eg: "blue" or
>>> blue, etc..., but that did not change the color at all. If you know
>>> how to set the bgcolor in the body please tell me how.
>>>
>>> Thank you.
>>> Tony
>>>
>>>
>>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Performance of history handling with IE - The larger the app the worse the performance

2009-03-19 Thread jay

We experienced a very similar problem, though we're not using GXT.
Doing a navigation in IE was taking a crazy amount of time, whereas in
other browsers the navigation was fine.

We wound up doing the navigations by getting the user
"gesture" (click, or whatever) indicating that they want to navigate.
When this happens, we do the work as if our history listener got an
event In addition, we manually track the history token. Then, in a
DeferredCommand, we do the History.newItem() call to update the
history stack. Of course, this means that we have to handle the case
that when our history listener gets a notification, but we're already
at that history token. It's not fun (and possibly bug-prone), but at
least our customers aren't cursing us...

jay

On Mar 13, 10:02 am, maku  wrote:
> Hi,
>
> we have a very strange performance problem especially in context with
> history handling and IE6 / IE7
>
> Our application is based on GXT and is already a rather large one (1.6
> MB).
>
> On less powerfull computers (e.g. Netbooks -> Asus EEE 1000h) the
> performance of history handling is really bad (calling
> History.newItem)
>
> E.g. time performing History.newItem(...) lasts ca. 4.5 seconds
>
> It seems that it depends on the size of the application.
>
> When I try the same with a reduced app (size 980 KB) the performance
> is dramatically better (but of course not satisfying) -> Time to
> perform History.newItem(..) reduced from 4.5 seconds to 1.6 seconds.
>
> Is it possible that the reason for this is IE's IFrame handling?
>
> Does anybody of you know the reason for these kind of problems. Is
> there a solution to solve the problem (or to improve the situation)?
>
> TIA
>
> Martin
--~--~-~--~~~---~--~~
You received 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 mix content with style?

2009-03-19 Thread Coonay

public class FirstGWT implements EntryPoint {
private FlexTable stocksFlexTable = new FlexTable();
}

FirstGWT.css:
. stocksFlexTable {
   border:solid;
}

if i want to  apply the stocksFlexTabl style,
do i have to call
stocksFlexTable.addStyleName("stocksFlexTable ") or something else gwt
api interface,
if yes ,i think gwt mix the content with style.

what i expect is that GWT will apply style to the elment using css
style selector with the same name as element name,gwt user need not to
call addStyleName explicitly(make this just a optional )






On Mar 20, 2:51 am, Vitali Lovich  wrote:
> Do not do it that way.  Style's should always be in a separate CSS document
> - it's better that way any way you look at it.
>
> GWT is not mixing content with style I don't think.  How you would write the
> equivalent HTML?
>
>   (that's not the element FlexTable
> uses, but this is for demonstration purposes only).
>
> If you don't specify the class, how is the CSS supposed to realize which
> particular table you wanted to style?  The variable name is just a
> javascript variable - has absolutely no relation to CSS.
>
> The addStyleName simply modifies the class attribute (so that you can style
> it with CSS as you want).  If you don't like that, you could always do
> getElement().setId("") (but remember that id uniquely identifies an element)
>
> AFAIK, mixing content with style is a different problem where, for instance,
> elements in HTML used to represent both the visual style & the document
> structure.
>
> Am I completely wrong?
>
> On Thu, Mar 19, 2009 at 2:16 PM, Danny Schimke 
> wrote:
>
> > You could do something like this:
>
> > Style style = tmpElement.getElement().getStyle();
> > style.setProperty("border", "1py solid #00;");
>
> > -Danny
>
> > 2009/3/19 Coonay 
>
> >> like old html,gwt mix content with style again?
> >> in gwt ,most dynamic UI element have to set style with addStyleName
> >> method?
> >> such as the following,
> >> public class FirstGWT implements EntryPoint {
> >>        private FlexTable stocksFlexTable = new FlexTable();
> >> }
>
> >> if i define the style in the css
> >> . stocksFlexTable {
> >> }
>
> >> can gwt apply  this to stocksFlexTable  automatically without manually
> >> calling addStyleName?
--~--~-~--~~~---~--~~
You received 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 code where locales can be changed be dynamically

2009-03-19 Thread Vitali Lovich
That is not a great way because it bypasses the whole internationalization
framework of GWT for no good reason.  Essentially, you're going to have to
duplicate the effort to make your own for no good reason.

At that point, just make RPC calls (or regular Ajax calls) to fetch the
strings from the server, and make sure that you have some kind of global
Map> that you update based upon the Map
you get back from the server (or you can use Dictionary if the server is
generating the page).

On Thu, Mar 19, 2009 at 6:42 PM, flyingb...@gmail.com
wrote:

>
> Why dont u do redirect the google way with Window.open
>
>
> just use target as _self
>
> also if you really if u want to be able to change local on the fly you
> would need to create all the strings as variables that can get
> changed.
> Make a class an abstract while the differnet languages extends it.
>
> so than you can call the class.
>
>
>
> On Mar 19, 10:23 am, Vitali Lovich  wrote:
> > Thanks - I tried looking for that online & couldn't find it.
> >
> > On Thu, Mar 19, 2009 at 12:49 PM, Thomas Broyer 
> wrote:
> >
> > > On 19 mar, 16:58, Vitali Lovich  wrote:
> > > > Like I said, just reload the page with locale=locale_to_use: e.g.
> >
> > > > public static native void redirect(String url)/*-{
> > > >   $wnd.location = url;
> > > >   }-*/;
> >
> > > > redirect("http://mydomain.com/MySuperDuperApp?locale=en_US";);
> >
> > > Window.Location.assign("?locale=en_US") should be enough.
> >
> >
> >
>

--~--~-~--~~~---~--~~
You received 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 mix content with style?

2009-03-19 Thread Vitali Lovich
Of course you need to do: stocksFlexTable.addStyleName("stocksFlexTable ") .

You seem to be completely missing the point that the variable
stocksFlexTable is not the name of the HTML element.  I think you need to
review what an HTML page looks like.  This is the pseudocode GWT will
generate when it compiles your code:


  var stocksFlexTable = HTML.createDiv();
  DOM.insert(stocksFlexTable);


So please explain to me how it would be meaningful in any way to apply a
style to a Javascript variable name?

On Thu, Mar 19, 2009 at 8:15 PM, Coonay  wrote:

>
> public class FirstGWT implements EntryPoint {
>private FlexTable stocksFlexTable = new FlexTable();
> }
>
> FirstGWT.css:
> . stocksFlexTable {
>   border:solid;
> }
>
> if i want to  apply the stocksFlexTabl style,
> do i have to call
> stocksFlexTable.addStyleName("stocksFlexTable ") or something else gwt
> api interface,
> if yes ,i think gwt mix the content with style.
>
> what i expect is that GWT will apply style to the elment using css
> style selector with the same name as element name,gwt user need not to
> call addStyleName explicitly(make this just a optional )
>
>
>
>
>
>
> On Mar 20, 2:51 am, Vitali Lovich  wrote:
> > Do not do it that way.  Style's should always be in a separate CSS
> document
> > - it's better that way any way you look at it.
> >
> > GWT is not mixing content with style I don't think.  How you would write
> the
> > equivalent HTML?
> >
> >   (that's not the element
> FlexTable
> > uses, but this is for demonstration purposes only).
> >
> > If you don't specify the class, how is the CSS supposed to realize which
> > particular table you wanted to style?  The variable name is just a
> > javascript variable - has absolutely no relation to CSS.
> >
> > The addStyleName simply modifies the class attribute (so that you can
> style
> > it with CSS as you want).  If you don't like that, you could always do
> > getElement().setId("") (but remember that id uniquely identifies an
> element)
> >
> > AFAIK, mixing content with style is a different problem where, for
> instance,
> > elements in HTML used to represent both the visual style & the document
> > structure.
> >
> > Am I completely wrong?
> >
> > On Thu, Mar 19, 2009 at 2:16 PM, Danny Schimke  >wrote:
> >
> > > You could do something like this:
> >
> > > Style style = tmpElement.getElement().getStyle();
> > > style.setProperty("border", "1py solid #00;");
> >
> > > -Danny
> >
> > > 2009/3/19 Coonay 
> >
> > >> like old html,gwt mix content with style again?
> > >> in gwt ,most dynamic UI element have to set style with addStyleName
> > >> method?
> > >> such as the following,
> > >> public class FirstGWT implements EntryPoint {
> > >>private FlexTable stocksFlexTable = new FlexTable();
> > >> }
> >
> > >> if i define the style in the css
> > >> . stocksFlexTable {
> > >> }
> >
> > >> can gwt apply  this to stocksFlexTable  automatically without manually
> > >> calling addStyleName?
> >
>

--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread markmac

Hi Ian,

That sounds like a good idea, dont know why i didnt think of that...
nice one!

Im assuming you mean that I need to define a JSNI method in my GWT
code, that my own custom client code calls to invoke the insertion of
the widget on to the page?

thanks for the thoughts!

On Mar 20, 9:10 am, Ian Bambury  wrote:
> I might be being a bit thick here, but why do you want to delay the
> onModuleLoad routine?
> Why not:
>
>  * create a GWT method to insert the widgets into the page
>
>  * in the onModuleLoad, create a JS function to call the insertWidgets
> method
>
>  * When the Ajax call returns, just call the GWT routine from JS
>
> Or have I missed something?
>
> Ian
>
> http://examples.roughian.com
>
> 2009/3/19 markmac 
>
>
>
> > Hmmm,
> > Thats not good news, could you provide more information about the
> > custom selection script/linkers?
--~--~-~--~~~---~--~~
You received 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: ImageBundle and polling very often

2009-03-19 Thread Vitali Lovich
Try doing an initialization first:
   for (int i = 0; i < gamePlan.getColumnCount(); i++)
   for (int j = 0; j <
gamePlan.getRowCount(); j++)

 gamePlan.setWidget(i,j, new Image());

Then in your actual paint do:
imagePrototype.applyTo(gamePlan.getWidget(i, j))


On Thu, Mar 19, 2009 at 6:30 PM, GhostNr1  wrote:

>
> Hi!
>
> I'm trying to use ImageBundle to paint all my images. That's work very
> good except from one thing.
>
> Every 3 secound I poll the server to check if an ohtello plan have
> changed and then I try to paint it
>
>for (int i = 0; i <
> gamePlan.getColumnCount(); i++) {
>for (int j = 0; j <
> gamePlan.getRowCount(); j++) {
>if
> (result.getGamePlan()[i][j].equals("B")) {
>
>  gamePlan.setWidget(i,j, blackImgPrototype.createImage());
>} else if
> (result.getGamePlan()[i][j].equals("W")) {
>
>  gamePlan.setWidget(i,j, whiteImgPrototype.createImage());
>} else {
>
>  gamePlan.setWidget(i,j, greenImgPrototype.createImage());
>}
>}
>}
>
> I use that one, the problem is I use blackImgPrototype.createImage()
> so it create 64 new images every 3:rd secound and the memory stall.
> Any suggestion how I can fix this.
>
>Image black =
> blackImgPrototype.createImage();
>Image white =
> whiteImgPrototype.createImage();
>Image green =
> greenImgPrototype.createImage();
>for (int i = 0; i <
> gamePlan.getColumnCount(); i++) {
>for (int j = 0; j <
> gamePlan.getRowCount(); j++) {
>if
> (result.getGamePlan()[i][j].equals("B")) {
>
>  gamePlan.setWidget(i,j, black);
>} else if
> (result.getGamePlan()[i][j].equals("W")) {
>
>  gamePlan.setWidget(i,j, white);
>} else {
>
>  gamePlan.setWidget(i,j, green);
>}
>}
>}
>
> I have tryed that but then it only paint one black one white and one
> green image.
>
> Thx for 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
-~--~~~~--~~--~--~---



getOffsetWidth() and getOffsetHeight()

2009-03-19 Thread logan

Hi all, I would like to attach a composite widget that contains a
HorizontalPanel and some other widgets into an AbsolutePanel. My
problem is that I need to know the height and the width of the widget
before I can calculate the correct location to place it in the
AbsolutePanel, but getOffsetHeight() and getOffsetWidth() return 0
until the widget is attached to the RootPanel(). What possible
solutions are there for me to calculate the height and the width,
before the widget is attached? 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: ImageBundle and polling very often

2009-03-19 Thread Vitali Lovich
Also, make sure that the stall is actually because you're swapping memory &
not because your trying to repaint a large board (look at your OS resource
monitor).  You should see almost no CPU usage in user-space if it's memory
swapping.

If it's the CPU, you'll want to do the traditional trick of doing your work
in multiple steps:

private static final STEP_SIZE = 100;

Timer repainter = new Timer() {
public GameResult result;
private GameResult current;
private int row = 0;
private int col = 0;
public void run() {
   int steps = 0;
   if (current != result) {
row = col = 0;
current = result;
   }
   ResultGamePlan rGamePlan = current.getGamePlan();
   for (; steps < STEP_SIZE && row < gamePlan.getRowCount(); row++)
{
for (; steps < STEP_SIZE && col < gamePlan.getColumnCount();
col++, steps++) {
  if (rGamePlan[col][row].equals("B"))
  //paint black
  else if (rGamePlan[col][row].equals("W"))
 // paint white
  else
 // paint green
}
}
if (row == gamePlan.getRowCount() && col ==
gamePlan.getColumnCount) {
  // finished painting
  cancel();
  current = null;
}
};

/// when you get an update from server
repainter.result = serverResult;
repainter.scheduleRepeating(10);

That'll actually make things slower in terms of throughput, but the UI will
remain responsive, so it'll seem faster.

Another thing you can try is to use initialize like in my previous e-mail,
except use HTML instead of Image.

Then cache the HTML representation of the images in 3 global variables
(getHTML of AbstractImagePrototype).  Then when you iterate, simple call
setHTML - that should be even faster & should give you pretty good memory
savings.

On Thu, Mar 19, 2009 at 8:24 PM, Vitali Lovich  wrote:

> Try doing an initialization first:
>for (int i = 0; i < gamePlan.getColumnCount(); i++)
>for (int j = 0; j <
> gamePlan.getRowCount(); j++)
>
>  gamePlan.setWidget(i,j, new Image());
>
> Then in your actual paint do:
> imagePrototype.applyTo(gamePlan.getWidget(i, j))
>
>
> On Thu, Mar 19, 2009 at 6:30 PM, GhostNr1  wrote:
>
>>
>> Hi!
>>
>> I'm trying to use ImageBundle to paint all my images. That's work very
>> good except from one thing.
>>
>> Every 3 secound I poll the server to check if an ohtello plan have
>> changed and then I try to paint it
>>
>>for (int i = 0; i <
>> gamePlan.getColumnCount(); i++) {
>>for (int j = 0; j <
>> gamePlan.getRowCount(); j++) {
>>if
>> (result.getGamePlan()[i][j].equals("B")) {
>>
>>  gamePlan.setWidget(i,j, blackImgPrototype.createImage());
>>} else if
>> (result.getGamePlan()[i][j].equals("W")) {
>>
>>  gamePlan.setWidget(i,j, whiteImgPrototype.createImage());
>>} else {
>>
>>  gamePlan.setWidget(i,j, greenImgPrototype.createImage());
>>}
>>}
>>}
>>
>> I use that one, the problem is I use blackImgPrototype.createImage()
>> so it create 64 new images every 3:rd secound and the memory stall.
>> Any suggestion how I can fix this.
>>
>>Image black =
>> blackImgPrototype.createImage();
>>Image white =
>> whiteImgPrototype.createImage();
>>Image green =
>> greenImgPrototype.createImage();
>>for (int i = 0; i <
>> gamePlan.getColumnCount(); i++) {
>>for (int j = 0; j <
>> gamePlan.getRowCount(); j++) {
>>if
>> (result.getGamePlan()[i][j].equals("B")) {
>>
>>  gamePlan.setWidget(i,j, black);
>>} else if
>> (result.getGamePlan()[i][j].equals("W")) {
>>
>>  gamePlan.setWidget(i,j, white);
>>} else {
>>
>>  gamePlan.setWidget(i,j, green);
>>}
>>}
>>}
>>
>> I have tryed that but then it only paint one black one white and one
>> green image.
>>
>> Thx for 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...@goog

Re: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Ian Bambury
Something like this:

package com.whatever.client;

public class Main implements EntryPoint
{
public void onModuleLoad()
{
createJsFunction();
}

private static native void createJsFunction()
/*-{
$wnd.jsToGWT = function(parm)
{

 @com. whatever.client.Main::gwtMethod(Ljava/lang/String;)(parm);
};
}-*/;

@SuppressWarnings("unused")
private static void gwtMethod(String parm)
{
RootPanel.get().add(new Label(parm));
}
}

and then you can test with this

Click

in the html

Ian

http://examples.roughian.com


2009/3/20 markmac 

>
> Hi Ian,
>
> That sounds like a good idea, dont know why i didnt think of that...
> nice one!
>
> Im assuming you mean that I need to define a JSNI method in my GWT
> code, that my own custom client code calls to invoke the insertion of
> the widget on to the page?
>
> thanks for the thoughts!

--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Vitali Lovich
Slight modification - why are you making it a static call?  What about the
way below.

Also, don't forget to include the nocache.js file in your HTML - it actually
needs to be there statically (well - inserted onto the page before it
finishes loading).

On Thu, Mar 19, 2009 at 8:44 PM, Ian Bambury  wrote:

> Something like this:
>
> package com.whatever.client;
>
> public class Main implements EntryPoint
> {
> public void onModuleLoad()
> {
> createJsFunction();
> }
>
> private native void createJsFunction()
> /*-{
> $wnd.jsToGWT = function(parm)
> {
> th...@com.
>  whatever.client.Main::gwtMethod(Ljava/lang/String;)(parm);
> };
> }-*/;
>
> @SuppressWarnings("unused")
> protected void gwtMethod(String parm)
> {
> RootPanel.get().add(new Label(parm));
> }
> }
>
> and then you can test with this
>
> Click
>
> in the html
>
> Ian
>
> http://examples.roughian.com
>
>
> 2009/3/20 markmac 
>
>>
>> Hi Ian,
>>
>> That sounds like a good idea, dont know why i didnt think of that...
>> nice one!
>>
>> Im assuming you mean that I need to define a JSNI method in my GWT
>> code, that my own custom client code calls to invoke the insertion of
>> the widget on to the page?
>>
>> thanks for the thoughts!
>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Ian Bambury
Sorry, I don't understand. What static call? What 'way below'?
And obviously it won't work if you don't include the GWT app in the page.

Ian

http://examples.roughian.com


2009/3/20 Vitali Lovich 

> Slight modification - why are you making it a static call?  What about the
> way below.
>
> Also, don't forget to include the nocache.js file in your HTML - it
> actually needs to be there statically (well - inserted onto the page before
> it finishes loading).
>
> On Thu, Mar 19, 2009 at 8:44 PM, Ian Bambury  wrote:
>
>> Something like this:
>>
>> package com.whatever.client;
>>
>> public class Main implements EntryPoint
>> {
>> public void onModuleLoad()
>> {
>> createJsFunction();
>> }
>>
>> private native void createJsFunction()
>> /*-{
>> $wnd.jsToGWT = function(parm)
>> {
>> th...@com.
>>  whatever.client.Main::gwtMethod(Ljava/lang/String;)(parm);
>> };
>> }-*/;
>>
>> @SuppressWarnings("unused")
>> protected void gwtMethod(String parm)
>> {
>> RootPanel.get().add(new Label(parm));
>> }
>> }
>>
>> and then you can test with this
>>
>> Click
>>
>> in the html
>>
>> Ian
>>
>> http://examples.roughian.com
>>
>>
>> 2009/3/20 markmac 
>>
>>>
>>> Hi Ian,
>>>
>>> That sounds like a good idea, dont know why i didnt think of that...
>>> nice one!
>>>
>>> Im assuming you mean that I need to define a JSNI method in my GWT
>>> code, that my own custom client code calls to invoke the insertion of
>>> the widget on to the page?
>>>
>>> thanks for the thoughts!
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread markmac

I think he means the call to createJsFunction() and gwtMethod() which
are both static, BTW, I found this in the GWT Doco:

http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJavaFromJavaScript

which shows how to avoid the need for static calls...

I have tried getting this to work, but I see, to have some trouble
calling the window.jsToGWT method, its giving me the error "this
$static is null" you ever seen this?

On Mar 20, 11:54 am, Ian Bambury  wrote:
> Sorry, I don't understand. What static call? What 'way below'?
> And obviously it won't work if you don't include the GWT app in the page.
>
> Ian
>
> http://examples.roughian.com
>
> 2009/3/20 Vitali Lovich 
>
> > Slight modification - why are you making it a static call?  What about the
> > way below.
>
> > Also, don't forget to include the nocache.js file in your HTML - it
> > actually needs to be there statically (well - inserted onto the page before
> > it finishes loading).
>
> > On Thu, Mar 19, 2009 at 8:44 PM, Ian Bambury  wrote:
>
> >> Something like this:
>
> >> package com.whatever.client;
>
> >> public class Main implements EntryPoint
> >> {
> >>     public void onModuleLoad()
> >>     {
> >>         createJsFunction();
> >>     }
>
> >>     private native void createJsFunction()
> >>     /*-{
> >>         $wnd.jsToGWT = function(parm)
> >>         {
> >>             th...@com.
> >>  whatever.client.Main::gwtMethod(Ljava/lang/String;)(parm);
> >>         };
> >>     }-*/;
>
> >>     @SuppressWarnings("unused")
> >>     protected void gwtMethod(String parm)
> >>     {
> >>         RootPanel.get().add(new Label(parm));
> >>     }
> >> }
>
> >> and then you can test with this
>
> >>     Click
>
> >> in the html
>
> >> Ian
>
> >>http://examples.roughian.com
>
> >> 2009/3/20 markmac 
>
> >>> Hi Ian,
>
> >>> That sounds like a good idea, dont know why i didnt think of that...
> >>> nice one!
>
> >>> Im assuming you mean that I need to define a JSNI method in my GWT
> >>> code, that my own custom client code calls to invoke the insertion of
> >>> the widget on to the page?
>
> >>> thanks for the thoughts!
--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Vitali Lovich
Sorry - if you use gmail, you'll have to open the quoted text (that's where
I made the change).

On Thu, Mar 19, 2009 at 10:00 PM, markmac  wrote:

>
> I think he means the call to createJsFunction() and gwtMethod() which
> are both static, BTW, I found this in the GWT Doco:
>
>
> http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=google-web-toolkit-doc-1-5&t=DevGuideJavaFromJavaScript
>
> which shows how to avoid the need for static calls...
>
> I have tried getting this to work, but I see, to have some trouble
> calling the window.jsToGWT method, its giving me the error "this
> $static is null" you ever seen this?
>
> On Mar 20, 11:54 am, Ian Bambury  wrote:
> > Sorry, I don't understand. What static call? What 'way below'?
> > And obviously it won't work if you don't include the GWT app in the page.
> >
> > Ian
> >
> > http://examples.roughian.com
> >
> > 2009/3/20 Vitali Lovich 
> >
> > > Slight modification - why are you making it a static call?  What about
> the
> > > way below.
> >
> > > Also, don't forget to include the nocache.js file in your HTML - it
> > > actually needs to be there statically (well - inserted onto the page
> before
> > > it finishes loading).
> >
> > > On Thu, Mar 19, 2009 at 8:44 PM, Ian Bambury 
> wrote:
> >
> > >> Something like this:
> >
> > >> package com.whatever.client;
> >
> > >> public class Main implements EntryPoint
> > >> {
> > >> public void onModuleLoad()
> > >> {
> > >> createJsFunction();
> > >> }
> >
> > >> private native void createJsFunction()
> > >> /*-{
> > >> $wnd.jsToGWT = function(parm)
> > >> {
> > >> th...@com.
> > >>  whatever.client.Main::gwtMethod(Ljava/lang/String;)(parm);
> > >> };
> > >> }-*/;
> >
> > >> @SuppressWarnings("unused")
> > >> protected void gwtMethod(String parm)
> > >> {
> > >> RootPanel.get().add(new Label(parm));
> > >> }
> > >> }
> >
> > >> and then you can test with this
> >
> > >> Click
> >
> > >> in the html
> >
> > >> Ian
> >
> > >>http://examples.roughian.com
> >
> > >> 2009/3/20 markmac 
> >
> > >>> Hi Ian,
> >
> > >>> That sounds like a good idea, dont know why i didnt think of that...
> > >>> nice one!
> >
> > >>> Im assuming you mean that I need to define a JSNI method in my GWT
> > >>> code, that my own custom client code calls to invoke the insertion of
> > >>> the widget on to the page?
> >
> > >>> thanks for the thoughts!
> >
>

--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread markmac

Yeah ok I see what you did, that removes the need for the static call
like its stated in the Google GWT Doco.

Now it looks like everything is firing, but there is nothing, at all,
inside the jsToGWT function body (according to FireBug anyway). So
nothing at all happens when I call jsToGWT...

any thoughts?

On Mar 20, 1:03 pm, Vitali Lovich  wrote:
> Sorry - if you use gmail, you'll have to open the quoted text (that's where
> I made the change).
>
> On Thu, Mar 19, 2009 at 10:00 PM, markmac  wrote:
>
> > I think he means the call to createJsFunction() and gwtMethod() which
> > are both static, BTW, I found this in the GWT Doco:
>
> >http://code.google.com/docreader/#p=google-web-toolkit-doc-1-5&s=goog...
>
> > which shows how to avoid the need for static calls...
>
> > I have tried getting this to work, but I see, to have some trouble
> > calling the window.jsToGWT method, its giving me the error "this
> > $static is null" you ever seen this?
>
> > On Mar 20, 11:54 am, Ian Bambury  wrote:
> > > Sorry, I don't understand. What static call? What 'way below'?
> > > And obviously it won't work if you don't include the GWT app in the page.
>
> > > Ian
>
> > >http://examples.roughian.com
>
> > > 2009/3/20 Vitali Lovich 
>
> > > > Slight modification - why are you making it a static call?  What about
> > the
> > > > way below.
>
> > > > Also, don't forget to include the nocache.js file in your HTML - it
> > > > actually needs to be there statically (well - inserted onto the page
> > before
> > > > it finishes loading).
>
> > > > On Thu, Mar 19, 2009 at 8:44 PM, Ian Bambury 
> > wrote:
>
> > > >> Something like this:
>
> > > >> package com.whatever.client;
>
> > > >> public class Main implements EntryPoint
> > > >> {
> > > >>     public void onModuleLoad()
> > > >>     {
> > > >>         createJsFunction();
> > > >>     }
>
> > > >>     private native void createJsFunction()
> > > >>     /*-{
> > > >>         $wnd.jsToGWT = function(parm)
> > > >>         {
> > > >>             th...@com.
> > > >>  whatever.client.Main::gwtMethod(Ljava/lang/String;)(parm);
> > > >>         };
> > > >>     }-*/;
>
> > > >>     @SuppressWarnings("unused")
> > > >>     protected void gwtMethod(String parm)
> > > >>     {
> > > >>         RootPanel.get().add(new Label(parm));
> > > >>     }
> > > >> }
>
> > > >> and then you can test with this
>
> > > >>     Click
>
> > > >> in the html
>
> > > >> Ian
>
> > > >>http://examples.roughian.com
>
> > > >> 2009/3/20 markmac 
>
> > > >>> Hi Ian,
>
> > > >>> That sounds like a good idea, dont know why i didnt think of that...
> > > >>> nice one!
>
> > > >>> Im assuming you mean that I need to define a JSNI method in my GWT
> > > >>> code, that my own custom client code calls to invoke the insertion of
> > > >>> the widget on to the page?
>
> > > >>> thanks for the thoughts!
--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Ian Bambury
What is wrong with using static methods?
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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread markmac

nothing, just personal preference I guess, but that really doesnt
matter, it obviously supports both, which is important and good to
know.

Any ideas about it rendering nothing inside the function body?

On Mar 20, 1:47 pm, Ian Bambury  wrote:
> What is wrong with using static methods?
> 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Ian Bambury
Well, I never managed to get instance methods to work inside JS functions
which is why I used static methods :-) Also, I only ever have one entrypoint
class.
It works the way I showed you, and instance methods will get called from
within a JSNI method, but as soon as you put it in a JS function, it stops
working.

If Vitali actually tested the amended code, perhaps he could help explain
what he did to fix that problem.

Ian

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



Differences

2009-03-19 Thread jagadesh

What are the differences between

GWT RPC,
Request Builder
HttpSession

why do we need 3 for the same thing .

thank u,
jagadesh
--~--~-~--~~~---~--~~
You received 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 i found the real name of a obfuscated function? How i find the code lines?

2009-03-19 Thread Adligo

Hi,

   I would use the i_log commons logging port that I wrote,
send your errors (Exceptions and other log messages) through http to a
server side log file through a servlet , log4j and/or email to them to
your email account.
   You should at least be able to determine the Class name where your
error is happening, and you will be able to at least work by halves to
diagnose your issue.

www.adligo.com

Cheers,
Scott

On Mar 18, 9:13 am, Thomas Broyer  wrote:
> On 18 mar, 15:08, Thomas Broyer  wrote:
>
> > On 18 mar, 12:43, MN  wrote:
>
> > > i just googled around this SOYC feature in the trunc, but in a sample
> > > output of soyc-vis i dont see this mappings:
>
> > >http://code.google.com/p/google-web-toolkit/source/browse/changes/kpr...
>
> > > maybe there is more of information in the xml file (in sampleInput-
> > > folder):
>
> > > in the last part with js / storyref... but i miss there also the line
> > > numbers of the function.
>
> > This change branch looks like it is out-dated.
>
> It actually is, as it has been deleted ;-)
>
> Search for " inhttp://google-web-toolkit.googlecode.com/svn-history/r4195/changes/kp...
>
> I don't know how to process this info though (but as soyc-vis will do
> it for you, no need to worry that much ;-)
--~--~-~--~~~---~--~~
You received 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: Invoke GWT entry point via custom JavaScript?

2009-03-19 Thread Vitali Lovich
Lol no.  I didn't test the code.  I have absolutely no time - my own GWT
project is taking up all my time.

On Thu, Mar 19, 2009 at 10:56 PM, Ian Bambury  wrote:

> Well, I never managed to get instance methods to work inside JS functions
> which is why I used static methods :-) Also, I only ever have one entrypoint
> class.
> It works the way I showed you, and instance methods will get called from
> within a JSNI method, but as soon as you put it in a JS function, it stops
> working.
>
> If Vitali actually tested the amended code, perhaps he could help explain
> what he did to fix that problem.
>
> Ian
>
>
>
> >
>

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