Re: Multiple instances of a view

2013-04-12 Thread deepak chauhan
Thanks Andrea. It worked.


On Sat, Apr 13, 2013 at 4:18 AM, Andrea Boscolo  wrote:

> This is how GIN works, it always inject a new instance when requested. If
> you want to inject the same instance, bind the dependency into Singleton
> scope, using bind(YourClass.class).in(Singleton.class), inside you
> GinModule.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Deepak Chauhan

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




Re: Multiple instances of a view

2013-04-12 Thread Andrea Boscolo
This is how GIN works, it always inject a new instance when requested. If 
you want to inject the same instance, bind the dependency into Singleton 
scope, using bind(YourClass.class).in(Singleton.class), inside you 
GinModule.

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




Re: GWT 2.5 compiler is running out of memory

2013-04-12 Thread Antonio Petrelli
Il giorno venerdì 1 febbraio 2013 18:02:11 UTC+1, dhoffer ha scritto:

> With that set I was able to remove ...but just wondering 
> what  means when using threads.  Does that control the 
> number of threads, have no effect?
>

You have to set the "gwt.jjs.maxThreads" property, in my case:
-Dgwt.jjs.maxThreads=8 
The number of threads is calculated as the minimum between the number of 
local workers and the above property value.

HTH
Antonio

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




Multiple instances of a view

2013-04-12 Thread deepak chauhan
Hi,

I am using GIN in my project and facing a weird issue. If I inject a
dependency in a single class then I see only one instance of the the
dependency. But, when I inject the same dependency into more than one
class, I see more then one instance of the same dependency and breaking the
application.

Somebody help me to solve this issue.

-- 
Deepak Chauhan

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




Fwd: Issue: Gwt-RadioButton Grouping.

2013-04-12 Thread Satyarao Kambapu
Hello all,
   I am using same group name for two of my GWT-RadioButtons. When I click
one of these, another one gets disabled, which is good. But
programmatically (when i do debug) the other radio button value is still
remained as 'true' . As per my requirement it should be false. I am
thinking that it is problem of GWT-RadioButton Group concept.

Does this problem of GWT - RadioButton?

Please let me know the solution for it.

-- 
Satya

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




Sending Mail with GWT+Spring

2013-04-12 Thread vinu raju

can anybody help me , how to send the mail using gwt and spring.

i tried but getting error as : no source code is available for type 
org.springframework.core.io.Resource,did you forget the inherit a required 
module?

my code is this:

*Client side:*
Resource res = new 
ClassPathResource("classpath:context/applicationContext.xml");
BeanFactory factory = new XmlBeanFactory(res);

Object o = factory.getBean("id2");
GreetingServiceImpl mail = (GreetingServiceImpl)o;
//String password =result.getPassword();
 
try {
mail.sendMail("fromvinu1","fromvinu1","forgotpassword",password);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

*Server side*:

private MailSender mail;
 public void setMail(MailSender mail)
 {
 this.mail = mail;
 }
public String sendMail(String from, String to,String subject,String msg) {
 SimpleMailMessage message = new SimpleMailMessage();

message.setFrom(from);
message.setTo(to);
message.setSubject(subject);
message.setText(msg);

mail.send(message); 
System.out.println("Mail Sent Successfully...!");
   // return UserInfo;
return msg;

*XML file:*

 
 
 
 
 
 
   
 true
 javax.net.ssl.SSLSocketFactory
 465
 true
 true
   
 
 
 



*
*

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




CSS Attribute *= and ^= selectors

2013-04-12 Thread Robert Pofuk
Hi, 

In my CSS i have:

@Sprite  [class*="icon-"], [class^=" icon-"] {
  gwt-image: "myImage1";
}

@Sprite .icon-white {
gwt-image: "myImage2";
}

[ERROR]- The @sprite rule [] must specify the gwt-image property

While using some other selectors:
@Sprite  [class|="icon-"], [class~=" icon-"] {
  gwt-image: "myImage1";
}
works as espected!

I'm I doing something wrong or is this a bug?

Tnx!

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




Re: Repainting a canvas - clear or create new object?

2013-04-12 Thread Dean S. Jones
Well, you could save yourself a bit of work and take a look at Lienzo

http://www.emitrom.com/lienzo

/open-source-public-service-announcement-only ;-)

On Wednesday, April 3, 2013 10:13:34 AM UTC-4, membersound wrote:
>
> Hi,
>
> when a Canvas is often cleared and redrawn (for example during a drag and 
> drop action): would it be better to call ctx.clearRect(0, 0, 
> clientWidth(), clientHeight())?
> Or just create a new Canvas by Canvas.createIfSupported() and replace the 
> currently drawn canvas by the new one?
>
> Thanks
>

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




Fwd: Adding DOM script throws JavaScriptException in IE

2013-04-12 Thread Néstor Boscán
Hi

I'm using GWT and adding some dynamic javascript using the following code:

script = DOM.createElement("script");
script.setId("validation");
builder.append("function validate(validationId) {\n");
...
builder.append("}\n");
DOM.setElementAttribute(script, "type", "text/javascript");
DOM.setInnerText(script, builder.toString());
DOM.appendChild(RootPanel.getBodyElement(), script);

In firefox works OK but in IE it throws JavaScript: Unknown Error.

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




RequestFactory polymorphic arguments issue, is it possible?

2013-04-12 Thread GWTter
Hi all,

I'm having an issue using an implementation of an extended EntityProxy. I 
have the setup below, now when I call setBarProxyExt(BarProxyExt 
barProxyExt) I get no errors and I am sure that the setBar method is 
receiving the correct bar however the field is not set. 

This however is not the case if I inside setBarProxyExt(...) I call 
setBar(barProxyExt.getBarProxy()) instead of just on the barProxyExt.

Now I'm thinking it may be because the setter is looking for a particular 
instance managed by the autobeans. But if that's not the case shouldn't 
this work?

Many thanks in advance,

-seth

public interface BarProxy extends EntityProxy{...}
public class BarProxyExt implements BarProxy{
private BarProxy mutableBarProxy;
public BarProxy getBarProxy(){
return mutableBarProxy;
}
}

public interface FooProxy extends EntityProxy{
public BarProxy getBar();
public void setBar(BarProxy bar);
}

public class FooProxyExt implements FooProxy{
private FooProxy mutableFooProxy; //this has already been set and is 
editable

@Override
public BarProxy getBar(){
return mutableFooProxy.getBar();
}
@Override
public void setBar(BarProxy bar){
mutableFooProxy.setBar(bar);
}


//issue is using this method
public void setBarProxyExt(BarProxyExt barProxyExt){
setBar(barProxyExt);
}

...
}

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




Re: GWT Sticky Sessions

2013-04-12 Thread Lohmar ASHAR
Hi there
look, I apologize if my way of speaking offended, it was intended as a joke.
but it's common courtesy to give a feed-back to one's solution, this way 
anybody else reading it knows if it worth's something and thous 
should/could try it.

See ya


On Thursday, March 28, 2013 10:52:43 PM UTC+1, Lohmar ASHAR wrote:
>
> Hi there
>
> from my experience ... you are barking at the wrong tree so to speak.
> it's a long time that I'm not using GWT anymore (not my choice, but i had 
> to) but i don't think that it's GWT's problem
>
> to check the jsessionid you could use the Chrome's developer tools o 
> firefox - firebug and look at the network tab there you should see the 
> headers sent to the back-end (the jsessionid should be present in a cookie 
> or in the request).
> anyway you said mod_jk that says to me that you have an Apache HTTPD 
> before the Tomcat
> I usually use mod_proxy_ajp (which i would recommend, but about that we 
> could talk some other time) 
> a very important thing when implementing load balancing it's the jvmRoute 
> parameter on the tomcat.
> In every tomcat you shold edit in the server.xml the line saying
> 
> adding the an attribute jvmRoute, with a string at your discretion but 
> different for every server.
> 
> 
> ...
> that makes the Tomcat add that little string at the end of the jsessionid (
> *jsessionid*=AS348AF929FK219CKA9FK3B79870H would become 
> *jsessionid*=AS348AF929FK219CKA9FK3B79870H.t1 
> on the first server t1 and so on).
>
> that little string there says to the Apache on which node the session  was 
> created and therefore where it should send the request.
> from what I've understand from reading this 
> http://blogs.encodo.ch/news/view_article.php?id=18 looks like the 
> jvmRoute value should be the same as the worker name or/and vice-versa.
>  
> that's about it, hope it helped
>
> See ya
>
>
>
> On Wednesday, March 27, 2013 3:32:25 PM UTC+1, xsee wrote:
>>
>> You don't even need a filter or set the cookie yourself. Just make a call 
>> to getSession(true) and it will automagically be set in the Cookies. 
>> Typically, you will have some sort of 'initialization' RPC in your module 
>> entry point. This is usually a good place to create the session by calling 
>> "getLocalThreadRequest().getSession(true). Once your RPC returns, go check 
>> your cookies in the browser and you will see the jsessionid there. No need 
>> for special filters or any of the rest of it.
>>
>> On Wednesday, January 23, 2008 4:57:41 AM UTC-7, jas_tat wrote:
>>>
>>> Hi All, 
>>>
>>> I fixed my problem. "Does anyone know how I can pass a plain, 
>>> unencoded, jsessionid with all http POST requests which the GWT client 
>>> frontend makes?" 
>>>
>>> In the end I used a servlet filter in order to set a jsessionid as a 
>>> cookie for every http response my GWT application made: 
>>>
>>> import java.io.IOException; 
>>> import javax.servlet.*; 
>>> import javax.servlet.http.*; 
>>>
>>> import org.apache.log4j.Logger; 
>>>
>>> public class JsessionidSetter implements Filter 
>>> { 
>>> public static Logger log = Logger.getLogger(JsessionidSetter 
>>> .class); 
>>>
>>> public void init(FilterConfig arg0) throws ServletException 
>>> { 
>>> } 
>>>
>>> public void destroy() 
>>> { 
>>> } 
>>>
>>> public void doFilter(ServletRequest req, ServletResponse res, 
>>> FilterChain chain) throws IOException, ServletException 
>>> { 
>>> HttpServletResponse response = (HttpServletResponse) 
>>> res; 
>>> HttpSession session = 
>>> ((HttpServletRequest)req).getSession(true); 
>>> response.addCookie(new Cookie("JSESSIONID", 
>>> session.getId())); 
>>> chain.doFilter(req, res); 
>>> } 
>>> } 
>>>
>>> With supporting xml in my web.xml: 
>>>
>>>  
>>> JsessionidSetter 
>>> JsessionidSetter 
>>>  
>>>  
>>> JsessionidSetter 
>>> /* 
>>>  
>>>
>>> Thank you all for your comments anyway!
>>
>>

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




Re: SplitLayoutPanel not working for me in GWT 2.5.1

2013-04-12 Thread Greg George
Thanks for the pointer.  Using RootLayoutPanel instead of LayoutPanel did 
the trick for my problem.  I just always used LayoutPanel because that's 
what the GWT sample does.

On Friday, April 12, 2013 3:43:32 AM UTC-4, Thomas Broyer wrote:
>
> Are you fulfilling the RequiresResize requirements?
>
> https://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels#Resize
> Also look for the "Using a LayoutPanel without RootLayoutPanel" recipe in 
> this page.
>
> On Thursday, April 11, 2013 8:13:53 PM UTC+2, Greg George wrote:
>>
>>
>> 
>>
>> I've created the GWT 2.5.1 sample project in Eclipse (Indigo) and tried 
>> replacing the sample GWT code with the SplitLayoutPanel code sample from 
>> http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSplitLayoutPanel.
>>   
>> But when I run, I don't get anything that looks like the sample page.  
>> Instead I get the attached image.  Any help is appreciated.
>>
>>
>>
>>
>>

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




Re: Request Factory: How can I return multiple versions of an Entity an a list

2013-04-12 Thread Thomas Broyer
Use a ValueProxy instead of EntityProxy for that specific case; or possibly 
use a distinct EntityProxy with a Locator that uses both the real ID and 
version in the ID (in getId and find, IIRC)

On Friday, April 12, 2013 10:12:51 AM UTC+2, stigrv wrote:
>
> I've run into the same problem. Did you find a solution?
>
> kl. 18:10:17 UTC+1 søndag 20. januar 2013 skrev Jeremy Raymond følgende:
>>
>> I'm using Hibernate envers to keep a history of my entities. To display 
>> the history of an entity I want to transfer a list of different versions of 
>> the entity to the client. When I return a list of different versions of the 
>> same entity through Request Factory I get the correct number of items 
>> client side, but they are all the same. I don't get the different versions 
>> of the entity. It looks like RF is detecting that all the entities in the 
>> list have the same ID, so it's only transferring the first item to the 
>> client then duplicating it in the list client side. If I fudge the entity 
>> IDs in the list so that they are all different all items come across the 
>> the client.
>>
>> Is there a better way to the different versions of the entity to come 
>> down to the client in a single list other than fudging the IDs?
>>
>

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




Re: Request Factory: How can I return multiple versions of an Entity an a list

2013-04-12 Thread stigrv
I've run into the same problem. Did you find a solution?

kl. 18:10:17 UTC+1 søndag 20. januar 2013 skrev Jeremy Raymond følgende:
>
> I'm using Hibernate envers to keep a history of my entities. To display 
> the history of an entity I want to transfer a list of different versions of 
> the entity to the client. When I return a list of different versions of the 
> same entity through Request Factory I get the correct number of items 
> client side, but they are all the same. I don't get the different versions 
> of the entity. It looks like RF is detecting that all the entities in the 
> list have the same ID, so it's only transferring the first item to the 
> client then duplicating it in the list client side. If I fudge the entity 
> IDs in the list so that they are all different all items come across the 
> the client.
>
> Is there a better way to the different versions of the entity to come down 
> to the client in a single list other than fudging the IDs?
>

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




Re: How to globally catch all exceptions?

2013-04-12 Thread Thomas Broyer


On Thursday, April 11, 2013 9:30:50 PM UTC+2, membersound wrote:
>
> Where can I find the logfile on the serverside if using the 
> standardgwt.logging.simpleRemoteHandler
> ?
>
> I see the console output in eclipse, but need this in some file.
> com.google.gwt.logging.server.RemoteLoggingServiceUtil logOnServer [...]
>

This is standard java.util.logging configuration: 
http://docs.oracle.com/javase/6/docs/technotes/guides/logging/overview.html#1.8
(and it'll depend on your servlet container, e.g. 
http://tomcat.apache.org/tomcat-7.0-doc/logging.html#Using_java.util.logging_(default)
 )
 

>
> 2013/4/10 Andrea Boscolo >
>
>> Use the GWT.setUncaughtExceptionHandler() [1].
>>
>> [1] 
>> http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/core/client/GWT.html#setUncaughtExceptionHandler%28com.google.gwt.core.client.GWT.UncaughtExceptionHandler%29
>>
>>  -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Google Web Toolkit" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/google-web-toolkit/XuA8Dybf9ho/unsubscribe?hl=en
>> .
>> To unsubscribe from this group and all its topics, send an email to 
>> google-web-toolkit+unsubscr...@googlegroups.com .
>> To post to this group, send email to 
>> google-we...@googlegroups.com
>> .
>> Visit this group at 
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

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




Re: SplitLayoutPanel not working for me in GWT 2.5.1

2013-04-12 Thread Thomas Broyer
Are you fulfilling the RequiresResize requirements?
https://developers.google.com/web-toolkit/doc/latest/DevGuideUiPanels#Resize
Also look for the "Using a LayoutPanel without RootLayoutPanel" recipe in 
this page.

On Thursday, April 11, 2013 8:13:53 PM UTC+2, Greg George wrote:
>
>
> 
>
> I've created the GWT 2.5.1 sample project in Eclipse (Indigo) and tried 
> replacing the sample GWT code with the SplitLayoutPanel code sample from 
> http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSplitLayoutPanel.
>   
> But when I run, I don't get anything that looks like the sample page.  
> Instead I get the attached image.  Any help is appreciated.
>
>
>
>
>

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




Re: RequestBuilder POST + setHeader() = OPTIONS

2013-04-12 Thread Thomas Broyer


On Thursday, April 11, 2013 7:17:21 PM UTC+2, Seray Uzgur wrote:
>
> Hi, i am facing with the same thing. I know its old but i wonderred if you 
> found and solution?
>

This looks like CORS http://www.w3.org/TR/cors/
When you do a cross-origin POST (which is a "simple method" in the CORS 
spec), then as soon as you use a request header that's not a "simple 
header"  the browser will make a 
"preflight request" in the form of an OPTIONS request.
So the "solution" is either to change your request so it doesn't need a 
preflight, or implement the preflight handling on the server-side (or avoid 
cross-origin requests if possible)
 

>
> 21 Ekim 2010 Perşembe 19:51:15 UTC+3 tarihinde Márcio Menezes yazdı:
>>
>> BTW... Browser Firefox 3.6
>>
>> 2010/10/21 Márcio Menezes 
>>
>>> Ok... but it happens with ANY header. Even if I add "Content-Type", 
>>> "application/x-www-form-urlencoded", as you suggested, it sends an OPTIONS 
>>> method, instead of POST.
>>>
>>>
>>>
>>> On Thu, Oct 21, 2010 at 4:46 PM, Brett Thomas wrote:
>>>
 POST values should be encoded in the request data string, not the 
 headers. Not sure why there isn't an addPostValue method too. Here's some 
 code I used recently: 

 class CustomPOSTBuilder extends RequestBuilder {
 
 private String request = "";
 
 public CustomPOSTBuilder(String url, RequestCallback callback) {
 super(RequestBuilder.POST, url);
 this.setHeader("Content-Type", 
 "application/x-www-form-urlencoded"); 
 this.setCallback(callback);
 }
 
 public void addPost(String key, String value) {
 request += key + "=" + value + "&";
 }

 public void go() {
 this.setRequestData(request);
 try {
 this.send();
 }
 catch (RequestException r){
 System.out.print(r.getMessage());
 }
 }

 }

 then send a request by: 
 CustomPOSTBuilder builder...
 builder.addPost("key1", "value1");
 builder.addPost("key2", "value2");
 builder.send();


 2010/10/21 Márcio Menezes 

>  Hi!.
> Why does everytime I try to send a POST through RequestBuilder class 
> and if I add some header into it, the method goes as an OPTIONS, instead 
> of 
> post?
>
> Has anyone experienced this? How can I work around it?
>
> Regards,
> Marcio
>
> -- 
> 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-we...@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-we...@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 unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Q: super-source issue

2013-04-12 Thread gernot . veith
hi,

I've a question to souper-source with bean validation.
I've an emulated class and GWT has no access to the source of the original 
class. This class is in use in 'client', 'server', 'shared'.
My first test was to transport this class via RPC to the client and log it 
to the console.  Runs fine.
Next I put this class into a bean that gets validated via Bean Validation. 
Now I get an error from the GWT compiler:
--
[ERROR] An internal compiler exception occurred
[java] com.google.gwt.dev.jjs.InternalCompilerException: Unexpected error 
during visit
[java] at 
com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
[java] at 
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
...
...
[java] at 
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:640)
...
...
 [java] Caused by: java.lang.NoClassDefFoundError: somepath/classToEmulate
 [java] at java.lang.Class.getDeclaredMethods0(Native Method)
 [java] at 
java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
 [java] at java.lang.Class.getDeclaredMethods(Class.java:1791)
 [java] at 
org.hibernate.validator.util.privilegedactions.GetDeclaredMethods.run(GetDeclaredMethods.java:38)

and so on...

The emulated class is just an ordinary enum.

Can I use emulated classes with bean validation at all?

TIA
Gernot




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