Re: About nested RPC call

2012-06-15 Thread RAlfoeldi
"*First create methods for the different requests, and call the next method 
when the previous request is done. That way you avoid that chain of nested 
callback classes and its easier to read. *"

But you will never get around the nested call backs. Whatever you do, it 
might LOOK better, but it won't BE better. It's just the nature of async...

On Friday, June 15, 2012 12:22:10 PM UTC+2, Jens wrote:
>
> First create methods for the different requests, and call the next method 
> when the previous request is done. That way you avoid that chain of nested 
> callback classes and its easier to read.
>
> Second, it seems like you could do all three steps at once on the server 
> with just a single request. In your example you would send the criteria 
> information to your server, which then fetches the contents based on the 
> criteria information and puts the criteria into the session. Then the 
> server sends back the fetched records. Now you have the fetched records and 
> their count (fetchedRecords.size()) on the client and the session contains 
> the criteria. Same final situation but with a single request. If an error 
> occurs on server side, well then your search has failed and you need to 
> handle that on the client.
> In general you can say, if there is no additional client logic involved 
> between chained requests, its very likely that you can merge these chained 
> requests into a single one. And a single request is always faster than 
> three chained requests.
>
> -- J.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/M1-m_chp21IJ.
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 & Spring Security

2012-06-15 Thread Jordi P.S.
I have a login JSP that uses the remember me feature.so I have my login 
under Spring Security.

I have method security enabled in the RPC layer. All my RPCs extend a base 
class and then I used annotations on the methods to check for the 
permissions.

Here the RPC Base Servlet class:  http://pastebin.com/Z6mj4pZi 

On Wednesday, June 13, 2012 2:47:47 AM UTC+2, dhoffer wrote:
>
> I'd like to get feedback on the best way to secure GWT apps with 
> Spring Security.  I read several existing blogs about this online but 
> they are all (that I have found) quite old at this point. 
> Specifically what's the best way with GWT 2.4 and Spring Security 
> 3.1?  Or is there a better way other than Spring Security?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/zuzUmMKxwMoJ.
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.



Work with guava-gwt 12.0

2012-06-15 Thread Juan Pablo Gardella
Hi,

Yesterday I try to add guava-gwt in my GWT module but have the same
problems mention
http://stackoverflow.com/questions/4904344/using-guava-in-a-maven-gwt-project,
but I can't fix with the solutions mention there. The error is simple:

Unable to find 'com/google/common/collect/Collect.gwt.xml' on your classpath...

But I added in my module this line:



And don't works. In the pom.xml I add guava-gwt as provided. Why
happen this error?

Thanks,
Juan

-- 
You received 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 Web Workers - multiple modules on same page

2012-06-15 Thread Derek
I am trying to use GWT Web Workers (code based on the speedtracer Web 
Worker implementation), but I am not able to make the worker module 
participate in dev mode, requiring me to recompile the worker every time I 
change code in it. Has anyone else worked on this code and dealt with this 
problem?

When I create a separate module for my web worker and try to run my code, I 
get the error "alert is not defined" because the permutation is not created 
and the worker is trying to run alert("Module 'myworker' may need to be 
(re)compiled"), which fails since workers don't have access to window.alert.

If I compile the worker module, I get a permutation created which is served 
up correctly when my main module tries to load the worker at 
../myworker/myworker.nocache.js. No errors, everything seems to work 
correctly, but the myworker module is not participating in dev mode despite 
my main module participating. So I can modify the code that calls the 
workers in dev mode, but any changes to the workers requires a recompile of 
the worker module.

Is there a way to make the worker work with the code server? The Worker 
linker is based on a SelectionScriptLinker, but I'm not sure if it's the 
linker that's refusing to generate a dev mode permutation, or the code 
server, or dev mode, or what.

Has anyone dealt with this problem? Does anyone have any ideas?

Thanks,
Derek

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/aB9Ncefh-DkJ.
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: accessing web service in gwt

2012-06-15 Thread Daniel Mauricio Patino León
This need be done on the server side.

Use wsimport to generate the jaxb clasess ot the wsdl (SOAP)

then on the implementation of yourRPC or your DAO (Request factory) make
your calls to the ws.

send to the client what do you need.

2012/6/15 Harshal Patil 

> Hello,
>
> I have to access the web service of Microsoft Dynamic Nav in GWT.
>
> Can anyone plz help me ?
>
>
> Regards,
>
> Harshal
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/WjGDbhYce9wJ.
> 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.
>



-- 
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.

-- 
You received 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 Application Patches

2012-06-15 Thread Paul Robinson

On 15/06/12 04:10, jfiallo wrote:

I'm fairly new to developing with GWT. I was wondering if there's a way to 
'patch' an existing gwt application, that is: update just a portion of an app 
that a customer might already be using (ex. a java class that was modified).

The simple answer is no. It's not the way the compilation to javascript works. 
You have recompile and deploy the whole thing.

Paul

--
You received 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: Firefox 13 DevMode Plugin

2012-06-15 Thread trappedIntoCode
Thanks Alan!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/uLcv9aBkxmMJ.
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 Application Patches

2012-06-15 Thread jfiallo
Hello All, 

I'm fairly new to developing with GWT. I was wondering if there's a way to 
'patch' an existing gwt application, that is: update just a portion of an 
app that a customer might already be using (ex. a java class that was 
modified). Any ideas on how to accomplish this would be appreciated. 

-Juan Fiallo

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/lUHF-_k8wuQJ.
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: ScriptEngineManager throws an Error but works... why?

2012-06-15 Thread Thomas Broyer


On Tuesday, June 12, 2012 12:26:52 PM UTC+2, Jepse wrote:
>
> Hi there and hello to this group! (First Post)
>
> First i have to say gwt changed my programmer-life ;) Thanks for that!
>
> My Question:
>
> I'm using SctriptEngineManager in gwt shared package on client side to 
> evaluate String based Conditions (4>2?) or formulas. Every time GWT 
> executes the code, i receive an error in the development console... It says:
> *12:13:13.012 [ERROR] [contacts] Line 253: No source code is available 
> for type javax.script.ScriptEngineManager; did you forget to inherit a 
> required module?*
>
> For some other modules it simply doesn't work because the code is not 
> applicable for converting into javascript. So far all i need to know - fine.
>
> But ScriptEngineManager throws the same error but works... Not that i 
> don't appreciate this behaviour. But i still want to know why it throws 
> this error?
>
> Can anybody point me the reason? Or a better way to evaluate String based 
> conditions or formulars?
>
> My Code:
> ScriptEngineManager manager = new ScriptEngineManager();
> ScriptEngine engine = manager.getEngineByName("js");
> Object result = engine.eval("4>3");
> Boolean boolResult = (Boolean)result;
>

Because it's referenced from within your "source path" (you have a  in your gwt.xml right?), GWT searches for its source code 
(and here doesn't find it and logs an error; even if you had the JRE's 
sources, it'll still log an error because there's no module with 
javax.script in its source path).
But because you don't use it in your client-side code, there's no reason it 
would fail.

Solution: move it out of your "shared" package, as it's a "server" thing 
more than a "shared" thing.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/o3pFgPLDsPsJ.
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.



accessing web service in gwt

2012-06-15 Thread Harshal Patil
Hello,
 
I have to access the web service of Microsoft Dynamic Nav in GWT.
 
Can anyone plz help me ?
 
 
Regards,
 
Harshal

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/WjGDbhYce9wJ.
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: Display images from external folder

2012-06-15 Thread Philippe Lhoste

On 07/06/2012 15:20, Pablo wrote:

I would like to display images in my GWT webapp from a $HOME folder.
Those images are regularly updated by a local process which has no
permissions to write into the WAR folder.

I've been googling and I've found some suggestions at Tomcat's forums
proposing to modify the web.xml file to expose a local file in the
server:



But this doesn't seem to work with GWT...


Can't you make a hard-link (or symbolic link) to this folder from your Web 
folder?
Honestly, I don't know if it can work...

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received 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: make a transparent image with gwt or css have you an idea ?

2012-06-15 Thread Assiya EL
hi

i resolved my problem with : starImg.getElement().setAttribute("style",
"filter: alpha(opacity=5);opacity: 0.95");

2012/6/15 Philippe Lhoste 

> On 12/06/2012 13:15, Assiya EL wrote:
>
>>
>>
>> --
>> Assiya EL
>> Master Qualité du Logiciel
>>
>
> I think you forgot to put a message there...
>
> What kind of transparent image? A single totally transparent pixel?
> Something complex with variable alpha level?
> What will be the usage of such image? In which context?
> Etc.
>
> --
> Philippe Lhoste
> --  (near) Paris -- France
> --  http://Phi.Lho.free.fr
> --  --  --  --  --  --  --  --  --  --  --  --  --  --
>
> --
> You received 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
> **.
>
>


-- 

Assiya EL
Master Qualité du Logiciel



Plz consider environment - Only print this if necessary

-- 
You received 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: gxt, gin and guice example application

2012-06-15 Thread Philippe Lhoste

On 11/06/2012 11:49, lingesh wrote:

i need an application developed by using GXT, front end GIN and
backend GUICE.


GXT 2 or 3?

Anyway, this one can be useful:
http://code.google.com/p/gwt-cx/

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received 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: ScriptEngineManager throws an Error but works... why?

2012-06-15 Thread Philippe Lhoste

On 12/06/2012 12:26, Jepse wrote:

I'm using SctriptEngineManager in gwt shared package on client side to evaluate 
String
based Conditions (4>2?) or formulas. Every time GWT executes the code, i 
receive an error
in the development console... It says:
*/12:13:13.012 [ERROR] [contacts] Line 253: No source code is available for type
javax.script.ScriptEngineManager; did you forget to inherit a required module?/*

For some other modules it simply doesn't work because the code is not 
applicable for
converting into javascript. So far all i need to know - fine.

But ScriptEngineManager throws the same error but works... Not that i don't 
appreciate
this behaviour. But i still want to know why it throws this error?

Can anybody point me the reason? Or a better way to evaluate String based 
conditions or
formulars?


Duplicate message? I already answered the second message, but since it had less 
information, I also answer this one.


You use the ScriptEngineManager to run JS on a browser? Do you know that JavaScript is 
already available out of the box in browsers?
GWT allows you to access directly the JS layer, via JSNI. I actually have little 
experience in the domain, so I let you explore yourself this feature.


Note: for simple formula evaluation, there are also pure Java solutions.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received 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: make a transparent image with gwt or css have you an idea ?

2012-06-15 Thread Philippe Lhoste

On 12/06/2012 13:15, Assiya EL wrote:



--
Assiya EL
Master Qualité du Logiciel


I think you forgot to put a message there...

What kind of transparent image? A single totally transparent pixel? Something complex with 
variable alpha level?

What will be the usage of such image? In which context?
Etc.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received 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: About nested RPC call

2012-06-15 Thread Jens
First create methods for the different requests, and call the next method 
when the previous request is done. That way you avoid that chain of nested 
callback classes and its easier to read.

Second, it seems like you could do all three steps at once on the server 
with just a single request. In your example you would send the criteria 
information to your server, which then fetches the contents based on the 
criteria information and puts the criteria into the session. Then the 
server sends back the fetched records. Now you have the fetched records and 
their count (fetchedRecords.size()) on the client and the session contains 
the criteria. Same final situation but with a single request. If an error 
occurs on server side, well then your search has failed and you need to 
handle that on the client.
In general you can say, if there is no additional client logic involved 
between chained requests, its very likely that you can merge these chained 
requests into a single one. And a single request is always faster than 
three chained requests.

-- J.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Ud2NGWKx3bgJ.
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: Using GWT with UCSC Genome Browser

2012-06-15 Thread Philippe Lhoste

On 12/06/2012 23:58, CF wrote:

I have a basic GWT setup and we want to be able to use this:
http://genome.ucsc.edu/cgi-bin/hgCustom from the UCSC genome browser group.


No luck when I tried it, all I get is an error message:
hashMustFindVal: 'db' not found


Basically, the form lets you upload a file or a url pointing to a file and you 
end up with
a visualization of genomic data which can be found at a formatted url, eg:
http://genome.ucsc.edu/cgi-bin/hgTracks?org=human&position=chr22&hgt.customText=http://genome.ucsc.edu/goldenPath/help/regulatory.txt

where the hgt.customText parameter gives the location of your file.

Is there a way of doing this from GWT? Can I create the file in java and send 
it to the
UCSC website somehow?
The end goal is to have the user provide information about chromosome number, 
start and
end locations, etc., then create the file, and then send it to UCSC to show a
visualization on their website in a new tab.


You can create a file on your server, then provide it to the form you point to.
Actually, you can send directly a POST request with the form information and the content 
of your file (Mime-encoded) to the URL referenced in the form.


--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received 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 check whether the email or website is real website or email

2012-06-15 Thread Philippe Lhoste

On 13/06/2012 07:24, lucky wrote:

Here i need to check whether this website or email exist or not?


Try to read data from it. If it fails, either you are unlucky (perhaps temporarily down, 
but can have many other causes, like not answering to port 80) or it doesn't exist.


The only reliable way to test an e-mail validity is to send a message to a user and ask 
them to click on a link leading to your server, validating the said e-mail (of course with 
data in the link indicating which e-mail/user account is to validate). If you registered 
to a good site, you probably had such e-mail confirmation.


--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received 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: Problem installign gwt in eclipse

2012-06-15 Thread Philippe Lhoste

On 14/06/2012 02:40, Jeff Silverman wrote:

On Friday, June 8, 2012 4:56:20 AM UTC-7, Ed wrote:

If your using AVG turn off link checker.


Ed,

I am something of a Newbie to Eclipse. What is AVG and what is the link 
checker? How do I
turn it off?


I think the advice is about shutting off anti-virus software / security suites / 
firewalls, at least for the time of update.


--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

--
You received 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: Firefox 13 DevMode Plugin

2012-06-15 Thread Bas
Today, I downgraded to Firefox 11. The devmode plugin of firefox 13 (Mac OS 
10.6.8) seems to have a memoryleak. Are more people experiencing memory 
problems?


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/N1rnvd0wxh4J.
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: ScriptEngineManager

2012-06-15 Thread Philippe Lhoste

On 14/06/2012 14:39, Jepse wrote:

I'm curious about the gwt behavior with ScriptEngineManager. Everytime it comes 
over this
class it throws an error in development console. But it works fine - feels more 
like a
warning in this case:
/*No source code is available for type javax.script.ScriptEngineManager; did 
you forget to
inherit a required module?*/

But when i want to compile my projects the error is geeting:
/*[ERROR] at Field.java(271): ScriptEngineManager manager = new 
ScriptEngineManager();
org.eclipse.jdt.internal.compiler.ast.LocalDeclaration*/

What can i do?


Do you mean you try to use the ScriptEngineManager on the client side? Like so many Java 
libraries, it cannot be converted by GWT to JavaScript... It would be interesting to see a 
Python or Groovy script to be run in the browser, but I am not sure the performance would 
be there...


Note: the development console is a different beast, actually running Java in 
the browser.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --

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



About nested RPC call

2012-06-15 Thread tong123123
just for example of nested server call, assume I need the following three 
server call in sequence
1) call server to select the count of records satisfy the criteria
2) if call1 success, call server to select the content of records satisfy 
the criteria
3) if call1 and call2 success, call server to put the criteria in session

as RPC is Async., so I need to write something like the following?

> AsyncCallback callback1 = new AsyncCallback(){
>
>   public void onSuccess(){
>   AsyncCallback callback2 = new AsyncCallback(){
> public void onSuccess(){
> AsyncCallback callback3 = new AsyncCallback(){
> public void onSuccess(){
>
> }
> @Override
> public void onFailure(Throwable caught){
>   
> }
> }
> }
> @Override
> public void onFailure(Throwable caught){
>   
> }
>   }
>   }
>   @Override
>   public void onFailure(Throwable caught){
>   
>   }
> }
>

As shown, it is very ugly and difficult to trace...
any better method?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/4NvFVZK99noJ.
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: HTML-safety best practices

2012-06-15 Thread Thomas Broyer

On Friday, June 15, 2012 5:28:54 AM UTC+2, tong123123 wrote:
>
> I found in gwt 2.4, the ImageCell Class is 
>  
> interface Template extends SafeHtmlTemplates{
>@Template ("">
>SafeHtml img(String url);
> }
>
> so it will rise the warning
> "Template with variable in URL attribute context:The template code 
> generator cannot guarantee HTML-safety of the temp;ate --"
> so to eliminate this warning, need extend the GWT 2.4 ImageCell Class?
>

GWT 2.5 will add a SafeImageCell based on SafeUri, so I'd advise you to 
just wait for 2.5 and switch to SafeImageCell (using UriUtils to build a 
SafeUri out of a String), or possibly copy SafeImageCell in your project to 
start using it now.
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/9j4V89zi6D4J.
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: SuperDevMode and APT

2012-06-15 Thread Thomas Broyer


On Friday, June 15, 2012 9:00:55 AM UTC+2, Paul Robinson wrote:
>
>  Here are code fragments for you. It would be good if something like this 
> could be built in to GWT rather than having everybody implement similar 
> code.
>

Keep in mind that SuperDevMode is experimental.
It will probably evolve to the point where GWT-RPC won't be an issue, and 
this workaround won't be needed anymore, so there's no point in building it 
within GWT at this point.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/5RnxUsoXTrUJ.
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.



Custom Widget extending textfield

2012-06-15 Thread arian
Hi there

Will it be possible just to simple extend textfield in creating a custom 
widget that consists of a textbox and label and subsequently inheriting the 
functionality of the textfield as well as the eventhandling. 

>From what I understand is that one would normaly extend Composite and the 
init the widget in the constructor ( 
initWidget(binder.createAndBindUi(this));)

Can I do the same with textfield or how would I go about in doing this. 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/OXVPlJFLsZwJ.
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: SuperDevMode and APT

2012-06-15 Thread Paul Robinson

Here are code fragments for you. It would be good if something like this could 
be built in to GWT rather than having everybody implement similar code.

private static final String CODE_SERVER_URL_KEY = "CodeServerURL";

public void init(ServletConfig config) throws ServletException
{
m_codeServerURL = config.getInitParameter(CODE_SERVER_URL_KEY);

if (m_codeServerURL != null && 
m_codeServerURL.charAt(m_codeServerURL.length()-1) != '/')
m_codeServerURL = m_codeServerURL + "/";
}

Then, I override doGetSerializationPolicy and the part of the code that loads 
from the code server looks like this:
boolean endsWithSlash = 
moduleBaseURL.charAt(moduleBaseURL.length()-1) == '/';

String tmp = moduleBaseURL;
if (endsWithSlash)
tmp = tmp.substring(0, tmp.length()-1);

int lastSlash = tmp.lastIndexOf('/');
String moduleName = lastSlash < 0 ? tmp : 
tmp.substring(lastSlash+1, tmp.length());
try
{
url = new URL(m_codeServerURL + moduleName + "/"
+ 
SerializationPolicyLoader.getSerializationPolicyFileName(strongName));
}
 catch (MalformedURLException mue)
{
s_logger.debug("Could not read the policy file '" + url + "'", 
ioe);
return null; // null return is then converted into throwing an 
exception
}

InputStream is = null;

try
{
is = url.openStream();
s_logger.debug("Loading serialization policy from code server");
}
catch (IOException ioe2)
{
s_logger.debug("Could not read the policy file '" + url + "'", 
ioe);
return null; // null return is then converted into throwing an 
exception
}

Paul


On 14/06/12 22:15, Stefano Ciccarelli wrote:

Great idea!

It should work on GAE too using UrlFetch api to talk with the code server.

Could you share some pieces of code, please?

--
Inviato con Sparrow 

Il giorno giovedě 14 giugno 2012, alle ore 11:33, Paul Robinson ha scritto:


On 13/06/12 18:53, Andrea Boscolo wrote:

I can confirm that copying the CodeServer's .gwt.rpc files in the local war 
dir, works but it's a pain: every time they change, they need to be copied.

There's an alternative to copying gwt.rpc files. I've changed my app so that 
when it looks for the serialization policy, and it can't find it, it will ask 
the code server for it. You just need to parse the module base URL to get the 
module name, and then use the strong name provided to generate the appropriate 
URL, something like:
http://localhost:9876/modulename/strongname.gwt.rpc

All I need to do now is to add the codeserver URL as a parameter in web.xml 
 so that this feature can be enabled/disabled so it doesn't 
happen in production.

I don't know whether this technique would work on GAE as well.

Paul

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


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


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