Monday, September 30, 2013

Tablet and Desktop usage of GWT

I have been doing research on porting my application to run in the Andriod tablets and iPads.
Most point to M-GWT with a few references to nextinterfaces.com

Does anyone have comments? Are they both still under active development?

Tim

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT Chat applications

I used get-eventservice to build a custom solution. 
Requirements were for system to client and client to client messaging. Uses one of the two RPC connections most browsers allow JS.
So far working well.

Tim

On Sep 30, 2013, at 11:03 AM, David Levesque <dlevesque@primalogik.com> wrote:

I have built a chat front-end using GWT, Strophe.js and gwt-strophe (bindings for GWT). Strophe simulates persistent XMPP connections through BOSH. For the server I used Tigase, but it should work with any XMPP complient server. There are many good open source chat servers that allow you to write custom plugins in java (e.g. for authentication and integration with your back-end). Openfire is a popular one.

The advantage of having a separate chat server is that it removes a lot of load (and at lot of long lived connections) from your servlet container. The drawback is that it makes integration with your webapp harder, because you have to write plugins to talk to your backend. But imo it scales better, especially if you're going to have hundreds or thousands of simultaneous chat users.

Basically my GWT app uses GWT-RPC to talk to Tomcat, but the chat stuff does not go to Tomcat. It goes to the standalone Tigase server living on the same machine. All traffic go through port 80 (or 443) and it is routed to either Tomcat or Tigase using reverse proxy rules in Apache Web server.

Unfortunately I can't show you the code or point you to a live example because it was developped for a company I worked for (closed source) and the application is not open to public.

--
David


On Wednesday, December 9, 2009 7:13:16 AM UTC-5, abhiram wrote:
Hi All,

   Can someone tell me which is the best (and convenient) method to
implement a chat application for my web page using GWT?

  I believed using the comet.jar would be neat but had lot of problem
implementin it. Can you please tell me which is the best possible
approach? with any working examples / links?

~ Abhiram

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT Chat applications

I have built a chat front-end using GWT, Strophe.js and gwt-strophe (bindings for GWT). Strophe simulates persistent XMPP connections through BOSH. For the server I used Tigase, but it should work with any XMPP complient server. There are many good open source chat servers that allow you to write custom plugins in java (e.g. for authentication and integration with your back-end). Openfire is a popular one.

The advantage of having a separate chat server is that it removes a lot of load (and at lot of long lived connections) from your servlet container. The drawback is that it makes integration with your webapp harder, because you have to write plugins to talk to your backend. But imo it scales better, especially if you're going to have hundreds or thousands of simultaneous chat users.

Basically my GWT app uses GWT-RPC to talk to Tomcat, but the chat stuff does not go to Tomcat. It goes to the standalone Tigase server living on the same machine. All traffic go through port 80 (or 443) and it is routed to either Tomcat or Tigase using reverse proxy rules in Apache Web server.

Unfortunately I can't show you the code or point you to a live example because it was developped for a company I worked for (closed source) and the application is not open to public.

--
David


On Wednesday, December 9, 2009 7:13:16 AM UTC-5, abhiram wrote:
Hi All,

   Can someone tell me which is the best (and convenient) method to
implement a chat application for my web page using GWT?

  I believed using the comet.jar would be neat but had lot of problem
implementin it. Can you please tell me which is the best possible
approach? with any working examples / links?

~ Abhiram

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

i m using this code,,,i get response when i hit url on browser but fail by a code,,,,empty response....

String url = "";
// typically it would be a good idea to
URL.encode(url);
RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, url);
//builder.setHeader("Content-Type", "text/xml");
try {
   builder.sendRequest(null, new RequestCallback() {

         @Override
         public void onResponseReceived(com.google.gwt.http.client.Request builder,Response response) {
           String text = response.getText();
           System.out.println("text"+text);
           
           
         }

         @Override
         public void onError(com.google.gwt.http.client.Request builder, Throwable throwable) {
           // handle errors
             System.out.println("Error occurred");
         }
       });
} catch (Exception e) {
   e.printStackTrace();
}

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Sunday, September 29, 2013

Re: Decimals acting wierd : 5.3 * 3 = 15.899999999999999

http://www.codinghorror.com/blog/2009/05/why-do-computers-suck-at-math.html

On Sunday, September 29, 2013 3:20:36 AM UTC-7, Martones wrote:
Hey guys,

I had this problem hounting me since quite a while. I'm using double types in the equation above and I have this wierd precision result : 
5.3 * 3 = 15.899999999999999

This is not the first time at all and I already saw this with floats / without multiplication and so on. Before I spend few hours figuring out some test cases, can anyone give me any directions of where and what to search ? :)

Many thanks everyone !

Ludovit

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT Chat applications

Maybe you want to go with websockets. Have a look at this example: Chat example

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: bean validation on server



On Sunday, September 29, 2013 3:04:48 PM UTC+3, Thomas Broyer wrote:
[+cc GWT group; why did you reply in private and not there?]

It was a little mistake.


 


On Sun, Sep 29, 2013 at 1:45 PM, ozgur aydinli <ozgura...@gmail.com> wrote:
thanks for your answer.

- Is the hibernate-validator JAR in WEB-INF/lib when you run DevMode?
I thought maven is handling that. but apparently there is a problem.

Maven handles it when you build (package) your project.
 
there is nothing about maven at the link.



Thanks for your help.
unchecking the box: launch and deploy from this directory. solved it. (under Google --> Web Application)


 
 


On Sunday, September 29, 2013 2:21:59 PM UTC+3, Thomas Broyer wrote:
Is the hibernate-validator JAR in WEB-INF/lib when you run DevMode?
See https://developers.google.com/eclipse/docs/faq#gwt_with_maven for more on using Maven+GWT in Eclipse with the Google Plugin for Eclipse.

On Sunday, September 29, 2013 12:16:13 PM UTC+2, ozgur aydinli wrote:
I am trying to use the bean validation (jsr303) on my project. It works perfectly on client side.
However, when i try the same validation on server side. I get "javax.validation.ValidationException: Unable to find a default provider".
I am using embedded jetty on devmode. 

If i compile my project and deploy to another server (tomcat) it works both on client and server.

It seems that the embedded jetty is causing the issue.

Does anyone else is having this problem?

btw, i am using maven and using the 4.1.0.Final version of the hibernate-validator.



--
Thomas Broyer
/tɔ.ma.bʁwa.je/

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Best way to Emulate Mobile Tabs using GWT

take a look at how mgwt does it in it's showcase app http://mobilegwt.appspot.com/showcase/

It will a combination of using the css3 flex box model and such to achieve the desired layout

On Friday, September 27, 2013 8:52:25 PM UTC+1, Paul Mazzuca wrote:
Many mobile applications have "Tabs" or buttons on the bottom of the View to move from different areas of the application.  Can this be emulated in pure GWT, and if so how would you recommend it?  My initial thought was to use a DockLayoutPanel with the "south" region containing a grid of buttons.  This kinda works, however I then began to think that what I really want is a TabLayoutPanel with the tabs on the bottom, stretched to the width.  Is this even possible in GWT?  After a cursory effort, I am unable to position the tabs on the bottom of the view relative to the tab page, and I am unable to modify the width of the tabs relative to the view.   I tried playing with the gwt-TabLayoutPanel css with no luck.   My other thought is that I need to go lower and use the TabBar and figure out the tab container separately, however I would rather just use the TabLayoutPanel.  Any suggestions would be much 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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Decimals acting wierd : 5.3 * 3 = 15.899999999999999

On 09/29/2013 03:20 AM, Martones wrote:
> Hey guys,
>
> I had this problem hounting me since quite a while. I'm using double
> types in the equation above and I have this wierd precision result :
> 5.3 * 3 = 15.899999999999999
>
> This is not the first time at all and I already saw this with floats /
> without multiplication and so on. Before I spend few hours figuring
> out some test cases, can anyone give me any directions of where and
> what to search ? :)

If you know that your floats will be of a certain precision: scale,
multiply, divide. Take advantage of what you know about the problem
domain to your advantage


>
> Many thanks everyone !
>
> Ludovit
> --
> 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+unsubscribe@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.
> 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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT Chat applications


I have created chat app using Gwt, Rpc call to store and retrieve, backend I used objectify and Google App engine, 
App link : http://my-health-care.appspot.com/Chat.html , works well and good :) 

Thanks,
Suresh

On Wednesday, December 9, 2009 5:43:16 PM UTC+5:30, abhiram wrote:
Hi All,

   Can someone tell me which is the best (and convenient) method to
implement a chat application for my web page using GWT?

  I believed using the comet.jar would be neat but had lot of problem
implementin it. Can you please tell me which is the best possible
approach? with any working examples / links?

~ Abhiram

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: bean validation on server

[+cc GWT group; why did you reply in private and not there?]


On Sun, Sep 29, 2013 at 1:45 PM, ozgur aydinli <ozguraydinli@gmail.com> wrote:
thanks for your answer.

- Is the hibernate-validator JAR in WEB-INF/lib when you run DevMode?
I thought maven is handling that. but apparently there is a problem.

Maven handles it when you build (package) your project.
 
there is nothing about maven at the link.

 


On Sunday, September 29, 2013 2:21:59 PM UTC+3, Thomas Broyer wrote:
Is the hibernate-validator JAR in WEB-INF/lib when you run DevMode?
See https://developers.google.com/eclipse/docs/faq#gwt_with_maven for more on using Maven+GWT in Eclipse with the Google Plugin for Eclipse.

On Sunday, September 29, 2013 12:16:13 PM UTC+2, ozgur aydinli wrote:
I am trying to use the bean validation (jsr303) on my project. It works perfectly on client side.
However, when i try the same validation on server side. I get "javax.validation.ValidationException: Unable to find a default provider".
I am using embedded jetty on devmode. 

If i compile my project and deploy to another server (tomcat) it works both on client and server.

It seems that the embedded jetty is causing the issue.

Does anyone else is having this problem?

btw, i am using maven and using the 4.1.0.Final version of the hibernate-validator.



--
Thomas Broyer
/tɔ.ma.bʁwa.je/

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: bean validation on server

Is the hibernate-validator JAR in WEB-INF/lib when you run DevMode?
See https://developers.google.com/eclipse/docs/faq#gwt_with_maven for more on using Maven+GWT in Eclipse with the Google Plugin for Eclipse.

On Sunday, September 29, 2013 12:16:13 PM UTC+2, ozgur aydinli wrote:
I am trying to use the bean validation (jsr303) on my project. It works perfectly on client side.
However, when i try the same validation on server side. I get "javax.validation.ValidationException: Unable to find a default provider".
I am using embedded jetty on devmode. 

If i compile my project and deploy to another server (tomcat) it works both on client and server.

It seems that the embedded jetty is causing the issue.

Does anyone else is having this problem?

btw, i am using maven and using the 4.1.0.Final version of the hibernate-validator.

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Decimals acting wierd : 5.3 * 3 = 15.899999999999999

That's because numbers are floating-points numbers; you'll find this in all languages/platforms whose types follow IEEE 754 Floating-points Arithmetics (Java/JVM, JS, C, .NET, etc.) that is, almost everywhere.
Java has BigDecimal if you need precision; it's emulated in GWT but performs much slower than doubles, which just map to JS numbers.

On Sunday, September 29, 2013 12:20:36 PM UTC+2, Martones wrote:
Hey guys,

I had this problem hounting me since quite a while. I'm using double types in the equation above and I have this wierd precision result : 
5.3 * 3 = 15.899999999999999

This is not the first time at all and I already saw this with floats / without multiplication and so on. Before I spend few hours figuring out some test cases, can anyone give me any directions of where and what to search ? :)

Many thanks everyone !

Ludovit

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Decimals acting wierd : 5.3 * 3 = 15.899999999999999

Hey guys,

I had this problem hounting me since quite a while. I'm using double types in the equation above and I have this wierd precision result : 
5.3 * 3 = 15.899999999999999

This is not the first time at all and I already saw this with floats / without multiplication and so on. Before I spend few hours figuring out some test cases, can anyone give me any directions of where and what to search ? :)

Many thanks everyone !

Ludovit

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

bean validation on server

I am trying to use the bean validation (jsr303) on my project. It works perfectly on client side.
However, when i try the same validation on server side. I get "javax.validation.ValidationException: Unable to find a default provider".
I am using embedded jetty on devmode. 

If i compile my project and deploy to another server (tomcat) it works both on client and server.

It seems that the embedded jetty is causing the issue.

Does anyone else is having this problem?

btw, i am using maven and using the 4.1.0.Final version of the hibernate-validator.

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Saturday, September 28, 2013

Re: DataGrid, updateRowData and setSelected

Ok, I could solve my problem.

Among others, I changed from SelectionModel.setSelected(item, true) to datagrid.setKeyboardSelectedRow().

I also had this issue.
http://code.google.com/p/google-web-toolkit/issues/detail?id=6787

This is a pretty old bug, Im wondering that this hasnt been fixed yet :/

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT and GSAP (Green Sock Animation Platform) ?

How was your experience with it ? (pro/cons?).
I am very interested in looking at your wrapper, so if you can share it please let/send me know (it saves me writing one myself ;)

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT and GSAP (Green Sock Animation Platform) ?

I wrote a GWT wrapper for GSAP that we are using internally.
One of  the thing that i m trying to open source (The other beeing a wrapper for Ext JS).
Hopefully soon :)


2013/9/28 Ed <post2edbras@gmail.com>
What is your experience of GWT in combination with the GSAP (Green Sock Animation framework, JS lib)?

--
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+unsubscribe@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.
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

GWT and GSAP (Green Sock Animation Platform) ?

What is your experience of GWT in combination with the GSAP (Green Sock Animation framework, JS lib)?

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Friday, September 27, 2013

Re: Problem with SuggextBox as table cell

jorge vasquez <jorgevasquezang@...> writes:

>
>
> Hi Christian Pelster ,I watched your code , because I need implement some
similar and I could solved your problem , you should modify the method
updateViewData
>  some like this:
>
>  private String updateViewData(final Context context, final Element
parent, final ViewData viewData,
>           final boolean isEditing, final NativeEvent event) {
>     deleteLastPopup ();
>     //final InputElement input = (InputElement) parent.getFirstChild();
>     final InputElement input = getInputElement(parent);
>     final String value = input.getValue();
>     viewData.setText(value);
>     viewData.setEditing(isEditing);
>     
>     SuggestBox suggestBox = suggestBoxes.get(getKeyFromKontext(context));
>     //suggestBox.removeFromParent();
>     if (suggestBox != null) {
>       suggestBox.setText(value);
>       
>       textBox = new MyTextBox(input);
>       suggestBox = new SuggestBox(suggestBox.getSuggestOracle(), textBox);
>       
>       implementarEstilos(suggestBox);
>       DomEvent.fireNativeEvent(event, textBox);
>       
>       
>     }
>     suggestBox.setFocus(true);
>     return value;
>   }
> you should call a new  textBox = new MyTextBox(input); because with this
he can found the coordenates where will show the results, also you should
add a method deleteLastPopup which delete the last popup of results showed.
> this is the method :
>
>
> private void deleteLastPopup () {
>     Element popupEmpresaServicio =
(Element)Document.get().getBody().getLastChild();
>     String classNameLastChild=popupEmpresaServicio.getClassName();
>     if(popupStyleName.equals(classNameLastChild)) {
>      
Document.get().getBody().removeChild(Document.get().getBody().getLastChild()
);
>     }
>   }
>
> always the popup is created in the last part of the code generated there
we can found (in my case i can found for the classname) and delete , then
the new result will be show
>
> I found other thing which need solve , for show the suggestbox better , if
you found others fix or solutions for solve you can put here for improve the
code :D
> regards,
>
> Jorge Vasquez
>
>
>

Hello, I know this is an old post, but it helped me and I was able to
improve so I thought I'd share my findings.

Jorge you're fix for the placement does work, but it opens up a new issue
with the multiple popups. That issue I wasn't able to solve, because the
SuggestBox is trying to do this cleanup itself and we're fighting each
other, so I had to backtrack a bit and find a new fix for the placement
issue.

Creating a new suggest box is what's causing the multiple popups to appear.
Just by taking this part out, it fixes the multiple popups.

Now is the issue of placement.

To handle this I simply created a new suggest box each time the edit method
is called, regardless if one exists in the map.

This way the suggest box always has a TextBox so it can place it's menus
correctly, and we never create more than one SuggestBox so we never get
duplicate menu's.


My edit method looks like below.

protected void edit(Context context, Element parent, String value) {
setValue(context, parent, value);
InputElement input = getInputElement(parent);

input.focus();
input.select();

// Always create a new SuggestBox so it opens at the correct
place.
// Never create more than one SuggestBox, otherwise you will
end up with multiple pop up menus.
TextBox textBox = new MyTextBox(input);
parent.replaceChild(input,
textBox.getElement()).getOwnerDocument();
SuggestBox suggestBox = getNewSuggestBox(context,
getSuggestOracle(), textBox);
suggestBoxes.put(getKeyFromContext(context), suggestBox);

}


In addition one big thing I had to do was handling the commits.

There is a bit of a conflict here, because a commit will be performed when
selecting a suggestion (blur). So to handle this part I save the commit
data, let the cell commit as normal in onBrowserEvent, then on the
SuggestBox select event I call the commit again with the saved data and the
selected value. Below is my SuggestBox handler which performs this.

suggestBox.addSelectionHandler(new
SelectionHandler<Suggestion>() {
@Override
public void onSelection(SelectionEvent<Suggestion>
event) {

CommitParameters cp =
SuggestCell.this.commitParameters.get(getKeyFromContext(context));

// A commit is always performed on blur,
// the selected text was inserted, but then
lost by the blur commit (this is needed in case a selection isn't made).
// Re-insert it so the commit can be
performed using the selection text.
InputElement input =
getInputElement(cp.parent);

input.setValue(event.getSelectedItem().getReplacementString());

SuggestCell.this.commit(cp.context,
cp.parent, cp.viewData, cp.valueUpdater, cp.event);
}
});


--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: synthesizing sounds in GWT application

I tried a few different ways to play dynamically generated sound for my emulator. Sound mostly works OK.  See JsSound and JsFallbackSound in the below source code tree.  

http://sourceforge.net/p/jsdosbox/code/HEAD/tree/src/src2/net/sourceforge/jsdosbox/client/replaced/

On Friday, 27 September 2013 16:23:38 UTC+10, Oded Wolff wrote:
turns out it's easy enough with Java Script


but I would think it would be cleaner to avoid using native JS is possible

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Client Logging Question

The logging example comes with the GWT SDK: https://gwt.googlesource.com/gwt/+/master/samples/
If you use Eclipse and the GWT update site the SDK should be installed in eclipse/plugins/com.google.gwt.eclipse.sdkbundle_2.5.1/gwt-2.5.1

If you want runtime log settings you must keep logging enabled with a reasonable default log level while compiling your app. If needed you can log more details by setting the root logger's log level through a URL parameter, e.g. "&logLevel=FINE"

Honestly I have no idea if you can set the log level per logger or only for the root logger. Something like logging.properties isn't possible as everything gets compiled to JS and I guess you don't want the browser to download such a runtime configuration file every now and then because you could have updated that file.

-- J.

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Best way to Emulate Mobile Tabs using GWT

Many mobile applications have "Tabs" or buttons on the bottom of the View to move from different areas of the application.  Can this be emulated in pure GWT, and if so how would you recommend it?  My initial thought was to use a DockLayoutPanel with the "south" region containing a grid of buttons.  This kinda works, however I then began to think that what I really want is a TabLayoutPanel with the tabs on the bottom, stretched to the width.  Is this even possible in GWT?  After a cursory effort, I am unable to position the tabs on the bottom of the view relative to the tab page, and I am unable to modify the width of the tabs relative to the view.   I tried playing with the gwt-TabLayoutPanel css with no luck.   My other thought is that I need to go lower and use the TabBar and figure out the tab container separately, however I would rather just use the TabLayoutPanel.  Any suggestions would be much 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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Client Logging Question

I think I am missing a few simple things, and even Google Search has failed me this time. :D

The following covers some of the concepts fairly well:
http://www.gwtproject.org/doc/latest/DevGuideLogging.html

However a few simple questions:
1. I cannot find the actuating logging example project.
2. I want client logging enabled/disabled based on run time settings not compile time (I have a logging.properties file to control server logging). Has anyone done this?


Thanks,

Tim

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Async calls trigger by itself automatically after one hour

Hi,

I am working on a project where the Async RPC call made takes more than a hour to get the result.
After exactly one hour the same async call is triggered automatically by itself.

Any idea on how to solve this

Aruna

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: jsni - overlay types - js arrays Java API

This will NOT work in GWT > 2.2


Workaround provided there works.

On Monday, December 24, 2012 3:22:11 AM UTC+1, Sebastián Gurin wrote:
Thank you Thomas for your reply, I learned new things. Didn't know about

if ( GWT.isScript() ) {you can cast the js array to java arrays directly }.

I will definetly use those classes for my projects. Thanks again

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: jsni - overlay types - js arrays Java API

This will now work in GWT > 2.2


Workaround provided there works.

On Monday, December 24, 2012 3:22:11 AM UTC+1, Sebastián Gurin wrote:
Thank you Thomas for your reply, I learned new things. Didn't know about

if ( GWT.isScript() ) {you can cast the js array to java arrays directly }.

I will definetly use those classes for my projects. Thanks again

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT 2.5.1 now available

When will release 2.6 will come out? (4 nov?)

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Client Logging Question

I think I am missing a few simple things, and even Google Search has failed me this time. :D

The following covers some of the concepts fairly well:

However a few simple questions:
1. I cannot find the actuating logging example project.
2. I want client logging enabled/disabled based on run time settings not compile time (I have a logging.properties file to control server logging). Has anyone done this?


Thanks,

Tim

Re: how to align composite cell element vertically

Thanks :) Yes, I have implemented it and resolved this issue.

@Override
public void render(com.google.gwt.cell.client.Cell.Context context,
SearchItem value, SafeHtmlBuilder sb) {
for (HasCell<SearchItem, ?> hasCell : searchCells) {
      render(context, value, sb, hasCell);
    }
}
  protected <X> void render(Context context, SearchItem value,
      SafeHtmlBuilder sb, HasCell<SearchItem, X> hasCell) {
    Cell<X> cell = hasCell.getCell();
    sb.appendHtmlConstant("<div style='display:block;padding-bottom:5px;'>");
    cell.render(context, hasCell.getValue(value), sb);
    sb.appendHtmlConstant("</div>");
  }
 
Thanks,
Bhumika


On Friday, 27 September 2013 18:27:34 UTC+5:30, Thomas Broyer wrote:
The default implementation of render(Context,Element,C) in CompositeCell is:

```java
    for (HasCell<C, ?> hasCell : hasCells) {
      render(context, value, sb, hasCell);
    }
```

You can easily override it with code that wraps each call to render(Context,C,SafeHtmlBuilder,HasCell) into a <div>, or builds a <table>, or whatever.

On Friday, September 27, 2013 1:51:04 PM UTC+2, Bhumika Thaker wrote:
Hi All,

I want to show CompositeCell 's  cells vertically as It's coming horizontally.

How can I do it?

Thanks,
Bhumiak.


--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: how to align composite cell element vertically

The default implementation of render(Context,Element,C) in CompositeCell is:

```java
    for (HasCell<C, ?> hasCell : hasCells) {
      render(context, value, sb, hasCell);
    }
```

You can easily override it with code that wraps each call to render(Context,C,SafeHtmlBuilder,HasCell) into a <div>, or builds a <table>, or whatever.

On Friday, September 27, 2013 1:51:04 PM UTC+2, Bhumika Thaker wrote:
Hi All,

I want to show CompositeCell 's  cells vertically as It's coming horizontally.

How can I do it?

Thanks,
Bhumiak.


--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT RPC and DevMode

I will be responding to myself,

It looks like the rubber duck approach really works. If figured it out just after writing down my question :-S.

I just had to compare the contents of the .gwt.rpc files from the deployed ear/war and what DevMode was creating in the work directory.

There I found an extra little class from the gwt-user.jar, that was the cause. The DevMode setup  was still referring to an old gwt-user.jar from GWT 2.0 (while it also included the gwt2.5.1 jars).

So if anybody sees this gwt.rpc issue again in DevMode: locate the gwt.rpc files and compare them, it can give you a very good idea what is wrong!

David

On Friday, September 27, 2013 11:48:25 AM UTC+2, stuckagain wrote:
Hi,

I am failing to get DevMode working with a huge project. The main issue is that as soon as I do a first RPC call I get a IncompatibleRemoveServiceException.
I cannot use the build in Jetty (this project uses EJBs, MQ, and zillions of other technologies that require a full J2EE stack to run the server side). I just need to be able to perform work on the GUI, which is impossible unless I have DevMode working from Eclipse).

I am assuming (since that has always been the case in other more simple projects) that the root cause is that my sourcepath is different then when the EAR was build. So I must be missing some serializable classes.

Is there a way to find out what I am missing to make this work ? I get an error that RPCMap was not assignable (while it certainly is). Can I easily find out what subclasses of RPCMap devmode is expecting vs what the compiled version was using ?

I really would love to see GWT-RPC be replaced with something that does not require a perfectly in sync client and server codebase!

David

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

how to align composite cell element vertically

Hi All,

I want to show CompositeCell 's  cells vertically as It's coming horizontally.

How can I do it?

Thanks,
Bhumiak.


--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

GWT RPC and DevMode

Hi,

I am failing to get DevMode working with a huge project. The main issue is that as soon as I do a first RPC call I get a IncompatibleRemoveServiceException.
I cannot use the build in Jetty (this project uses EJBs, MQ, and zillions of other technologies that require a full J2EE stack to run the server side). I just need to be able to perform work on the GUI, which is impossible unless I have DevMode working from Eclipse).

I am assuming (since that has always been the case in other more simple projects) that the root cause is that my sourcepath is different then when the EAR was build. So I must be missing some serializable classes.

Is there a way to find out what I am missing to make this work ? I get an error that RPCMap was not assignable (while it certainly is). Can I easily find out what subclasses of RPCMap devmode is expecting vs what the compiled version was using ?

I really would love to see GWT-RPC be replaced with something that does not require a perfectly in sync client and server codebase!

David

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: How to create event on safe html

Hi Thomas,

Thanks, But I want to have two feature that used input, select so I have to implement TextInputCell and SelectionCellon header. right? how can I achieve both? I could not found any way that's why I am looking for Dom element. 

Thanks,
Bhumika

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: How to create event on safe html

I just answered on StackOverflow: http://stackoverflow.com/a/19045668/116472

On Friday, September 27, 2013 7:34:16 AM UTC+2, Bhumika Thaker wrote:
Hi,

 
How to create event on safe html. As  I want to do filtering for column in celltable.
So I added search box at header in table. I want to access textbox and do some event on textbox.




Code:

         SafeHtmlBuilder builder = new SafeHtmlBuilder();
        builder.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Name</b></center>");
        cell.addColumn(namecolumn,builder.toSafeHtml());
        SafeHtmlBuilder builder1 = new SafeHtmlBuilder();
        builder1.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Last name</b></center>");
        cell.addColumn(lastNameColumn,builder1.toSafeHtml());
        SafeHtmlBuilder builder2 = new SafeHtmlBuilder();
        builder2.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Age</b></center>");
        cell.addColumn(ageColumn,builder2.toSafeHtml());

Thanks,
Bhumika

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Thursday, September 26, 2013

Re: synthesizing sounds in GWT application

turns out it's easy enough with Java Script


but I would think it would be cleaner to avoid using native JS is possible

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: How to create event on safe html

I have added event as below:

SafeHtmlBuilder builder = new SafeHtmlBuilder();      builder.appendHtmlConstant("<input type=\"text\" id=\"nameInput\" /><br/><br/><select><option>one</option></select><br/><center><b>Name</b></center>");      SafeHtml html= builder.toSafeHtml();      cell.addColumn(namecolumn,builder.toSafeHtml());      SafeHtmlBuilder builder1 = new SafeHtmlBuilder();      builder1.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Last name</b></center>");      cell.addColumn(lastNameColumn,builder1.toSafeHtml());      SafeHtmlBuilder builder2 = new SafeHtmlBuilder();      builder2.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Age</b></center>");      cell.addColumn(ageColumn,builder2.toSafeHtml());      personCollection.addDataDisplay(cell);      verticalPanel.add(searchpanel);      verticalPanel.add(cell);        final Element nameInput = DOM.getElementById("nameInput");      if(nameInput!=null)      {      Event.sinkEvents(nameInput, Event.ONCHANGE);      Event.setEventListener(nameInput, new EventListener() {            @Override          public void onBrowserEvent(Event event) {              personCollection.setFilter(nameInput.getInnerText());              personCollection.refresh();          }      });

First problem I am getting nameInput is null every time.

and Second that This is just sample. I want to create this column dynamically. so is it possible to add DOM event dynamically for run time generated DOM element?

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

How to create event on safe html

Hi,

 
How to create event on safe html. As  I want to do filtering for column in celltable.
So I added search box at header in table. I want to access textbox and do some event on textbox.




Code:

         SafeHtmlBuilder builder = new SafeHtmlBuilder();
        builder.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Name</b></center>");
        cell.addColumn(namecolumn,builder.toSafeHtml());
        SafeHtmlBuilder builder1 = new SafeHtmlBuilder();
        builder1.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Last name</b></center>");
        cell.addColumn(lastNameColumn,builder1.toSafeHtml());
        SafeHtmlBuilder builder2 = new SafeHtmlBuilder();
        builder2.appendHtmlConstant("<input type=\"text\"/><br/><br/><select><option>one</option></select><br/><center><b>Age</b></center>");
        cell.addColumn(ageColumn,builder2.toSafeHtml());

Thanks,
Bhumika

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: synthesizing sounds in GWT application

Try wrapping something like http://mudcu.be/midi-js/ with GWT? Or use Elemental to use the web audio api

On Thursday, September 26, 2013 5:53:36 AM UTC-4, Oded Wolff wrote:
Hello, 

I wanted to ask whether it would be possible to synthesize sounds in a GWT application (I don't mean playing a sound file of some format, but actually playing a PCM 
signal held by a byte array, or something similar that will allow me to synthesize and manipulate it, or at least to have  the option to play given sounds with pith as parameter). 
If not, would it be possible with JS on HTML5, using JS native interface (I'm not really familiar with JS just yet, sorry)

Thank you

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: Diagnose GWT DMP Plugin crashes on Chrome

For what it's worth:

I have ran in the same issue when I recently started to work on a medium "sized" laptop.

I have never had (and have) this issue with the same and other projects running on a good desktop.

Hence it seems not to be project but more machine dependent. I suspect memory, but don't know how to verify this.

R

On Thursday, 28 March 2013 17:57:29 UTC+1, Michael Prentice wrote:
No luck. Just ran into this again. Restarting Chrome, again, fixed it.

On Wednesday, March 27, 2013 2:28:50 PM UTC-4, Michael Prentice wrote:
OK, I'll give that a shot with:

-XX:MaxPermSize=384m

Thanks a lot.

On Wednesday, March 27, 2013 10:03:08 AM UTC-4, xsee wrote:
Try setting your maxPermSize in the VM args section of your launch config (mine is at 384). This keeps my Chrome plugin running all day with no problems on a medium sized project.

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.

Re: GWT Requestfactory JSR-303 Problems when updating entity

Dear Thomas,

Following your text, this is exactly how I would expect Validation to behave.

But, let me explain you my problem a little bit in more detail:
In my case validation works fine when creating a entirely new entity. (PRE-PERSIST works just fine.)

Validation does not work properly when editing an existing entity e.g. on client side "entityEdited = request.edit(sampleEntity);" followed by calling update() method on server.
In case of an edited entity, which contains a wrong parameter that should cause a constraint violation .... GWT validates it .... than it throws the ConstraintViolationException which you can see below (this is what I would expect because the entity is not valid) .... but instead of calling onConstraintViolations() method on clients callback object, it calls onFailure() method ... (and this is not what I would expect).

As previously mentioned, this behavior occur only in case of edited entities.

Question: What could be the reason for GWT treating the ConstraintViolationException as on ordinary Exception in case an edited entity sent to server using RequestFactory?
This is not how it should be .... Right?

BTW: The service method is never called!

Thank you in advance:

Nermin


Am Mittwoch, 25. September 2013 19:18:38 UTC+2 schrieb Thomas Broyer:
RequestFactory validates domain objects after it deserialized them but before it calls your service methods. If they fail validation, service methods are not called and onConstraintViolations is called on the client-side (and the proxies and request context are unfrozen so you could fix things and resubmit). Any exception throw from within a service method results in onFailure to be called on the client-side for the Request corresponding to the service method.

So the question is: why validation fails on pre-persist but on from RequestValidation? (could be validation groups, could depend on the state of the DB –e.g. unique constraints–, etc.)

On Wednesday, September 25, 2013 1:19:54 PM UTC+2, Nermin wrote:
Dear Group,

I am using GWT Requestfactory for accessing server-side entities (JPA entities).
For validating data I apply JSR 303 validation.

Here is my situation:
1. On Persist everything works fine. Entity is validated on pre-persit and in case of constraint violations the "onConstraintViolation(..)" is called.
Persisting entities works fine.

2. Problem occurs when I try to edit an existing entity using  "entity2 = request.edit(sampleEntity);", write new data to it and send it to the server.
In that case a ConstraintViolation is thrown (probably this should be the case) but "onFailure(...)" method is called .... instead of the "onConstraintViolation(..)"?

What could be the reason for this??? Why is the "onConstraintViolation(..)" not called when updating the entity?
The error message is displayed below:

Thank you in advance:

Nermin


javax.validation.ConstraintViolationException: Validation failed for com.emajstor.server.persistence.PrivatePerson@2b85ffb8 during pre-update for groups [interface javax.validation.groups.Default] - exceptions are attached
    at org.datanucleus.validation.BeanValidatorHandler.validate(BeanValidatorHandler.java:71)
    at org.datanucleus.validation.BeanValidatorHandler.preStore(BeanValidatorHandler.java:86)
    at org.datanucleus.api.jpa.JPACallbackHandler.preStore(JPACallbackHandler.java:102)
    at org.datanucleus.state.JDOStateManager.flush(JDOStateManager.java:3827)
    at org.datanucleus.ObjectManagerImpl.flushInternalWithOrdering(ObjectManagerImpl.java:3888)
    at org.datanucleus.ObjectManagerImpl.flushInternal(ObjectManagerImpl.java:3811)
    at org.datanucleus.ObjectManagerImpl.flush(ObjectManagerImpl.java:3751)
    at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:4141)
    at org.datanucleus.ObjectManagerImpl.transactionPreCommit(ObjectManagerImpl.java:428)
    at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:398)
    at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:287)
    at org.datanucleus.ObjectManagerImpl.close(ObjectManagerImpl.java:1090)
    at org.datanucleus.api.jpa.JPAEntityManager.close(JPAEntityManager.java:193)
    at com.emajstor.server.AppHandlerFilter.doFilter(AppHandlerFilter.java:91)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:123)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:125)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.DevAppServerServersFilter.doDirectRequest(DevAppServerServersFilter.java:369)
    at com.google.appengine.tools.development.DevAppServerServersFilter.doDirectServerRequest(DevAppServerServersFilter.java:352)
    at com.google.appengine.tools.development.DevAppServerServersFilter.doFilter(DevAppServerServersFilter.java:115)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:97)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:480)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:938)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

--
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+unsubscribe@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.
For more options, visit https://groups.google.com/groups/opt_out.