Advanced GWT Components

2013-11-22 Thread Duff
I am very curious about the Advanced GWT Components project but I feel 
really stupid. I don't seem to get the quick start guide 
(http://advanced-gwt.sourceforge.net/quickstart.html) to work, either I try 
with maven based or an ant based project. The project builds and all, but 
no grid is visible in the application. Does anybody know if this guide is 
up-to-date and supposed to work? 

/Duff

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


Re: Get font-family from external css?

2013-11-22 Thread Thomas Wrobel
Bingo, that was far easier then expected. Thanks a bunch.

~~~
Thomas & Bertines online review show:
http://randomreviewshow.com/index.html
Try it! You might even feel ambivalent about it :)


On 22 November 2013 20:06, Jens  wrote:

> I think you could read the computed style of an element by using a simple
> JSNI method.
>
> Here is an example:
> https://code.google.com/p/gwt-examples/source/browse/trunk/GoneVertical-Core/src/org/gonevertical/core/client/style/ComputedStyle.java?spec=svn3084&r=3084
>
> -- J.
>
> --
> 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/8Qja9HPsmEk/unsubscribe
> .
> 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-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+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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Get font-family from external css?

2013-11-22 Thread Jens
I think you could read the computed style of an element by using a simple 
JSNI method.

Here is an 
example: 
https://code.google.com/p/gwt-examples/source/browse/trunk/GoneVertical-Core/src/org/gonevertical/core/client/style/ComputedStyle.java?spec=svn3084&r=3084

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


Re: IncompatibleRemoteServiceException after new deployment

2013-11-22 Thread Jens


> The server's log showed a SerializationExeption (see below): The enum 
> AnnouncementType was not assignable to IsSerializable.
>
> And indeed, AnnouncementType was not implementing IsSerializable, that's 
> correct. But this code is running for years.
> Why does this exception occurr now?
>

Because you have updated your server side code while you have used your app 
in the browser. This exception could have occurred all the years while your 
app is running. Maybe you were just lucky that you have never deployed your 
app while anyone is using it.

Your log file should also have a warning, something like "Could not find 
serialization policy file . falling back to legacy GWT 1.3 
serialization..." (the exact wording is likely different). This warning 
only occurs once when the first server request has been made.

Once GWT is in that GWT 1.3. serialization mode on your server then it 
expects classes to implement IsSerializable but an enum implements 
java.io.Serializable. If GWT is not in that legacy 1.3 mode it also 
understands java.io.Serializable. But GWT only allows java.io.Serializable 
classes that are white listed in the .rpc file and if that file can 
not be found on the server you get the above warning and finally the error 
you have posted.

I would recommend to always use java.io.Serializable instead of 
IsSerializable. Because if you do so all your serializable classes will 
fail to work if anything is wrong with the .rpc file. If you mix both 
then IsSerializable classes will work even if something is wrong with your 
.rpc file. In this case you only get errors when you hit a class that 
implements Serializable but not IsSerializable (like an enum).

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


Using DatePicker in CellTable

2013-11-22 Thread jaga
For 1) just override the render() method of the cell or column. If the value is 
null do nothing otherwise render as normal .
For 2) I suggest you look at the cell validation example in the gwt showcase. 
You could also probably just as well ignore the modified value and just call 
CellTable.redraw() or refresh your data provider. 

Jaga

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


Get font-family from external css?

2013-11-22 Thread darkflame
Is it possible to get the font information set by a Class (ie, not on the 
element directly).
I assume it can be done by looking at the Css file and sort-of parsing it 
for the information needed.but this seems a bit of a thudge.
Is there a better method?

Background;

I would like to get the font information at run time so I can recreate the 
look of a bit of text in a canvas object.  I wish to keep the css file 
editable, and not burnt into the project as a bundle. (Its a fairly small 
project, not concerned with loading times)


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


GWT Compiler just stops for some reason..? (split points)

2013-11-22 Thread VW
Hello,

im working on a relatively big gwt project and apparently my compiler just 
freezes for no obvious reason.

Last line of compiler log:


[java]Looking up initial load sequence for split points


And nothing else happens from there.
Any ideas?


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


Re: IncompatibleRemoteServiceException after new deployment

2013-11-22 Thread Magnus
Hi,

ok, I opened my app in a browser, then made a change to a class 
implementing IsSerializable:
I made a change to the class Announcement, which in turn uses an enum 
AnnouncementType.

Then I redeployed the app and used the app within the still open browser.
I expected my exception handler to show the nice message, but it simply 
showed "The call failed on the server."

The server's log showed a SerializationExeption (see below): The enum 
AnnouncementType was not assignable to IsSerializable.

And indeed, AnnouncementType was not implementing IsSerializable, that's 
correct. But this code is running for years.
Why does this exception occurr now?

The stacktrace below does not contain one of my methods. So how can I catch 
this exception and show a more user friendly message?

Magnus

-

SEVERE: Exception while dispatching incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type 
'bcs.shared.mod.portal.AnnouncementType' was not assignable to 
'com.google.gwt.user.client.rpc.IsSerializable' and did not have a custom 
field serializer.For security purposes, this type will not be serialized.: 
instance = GAMEBEAT
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:667)
at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:587)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeClass(ServerSerializationStreamWriter.java:757)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:796)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:669)
at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
at 
com.google.gwt.user.client.rpc.core.java.util.Collection_CustomFieldSerializerBase.serialize(Collection_CustomFieldSerializerBase.java:44)
at 
com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serialize(ArrayList_CustomFieldSerializer.java:39)
at 
com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serializeInstance(ArrayList_CustomFieldSerializer.java:51)
at 
com.google.gwt.user.client.rpc.core.java.util.ArrayList_CustomFieldSerializer.serializeInstance(ArrayList_CustomFieldSerializer.java:28)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:788)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:669)
at 
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:126)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
at 
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:587)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:605)
at 
com.google.gwt.user.server.rpc.RPC.encodeResponseForSuccess(RPC.java:471)
at 
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:563)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
at 
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
at 
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapte

Re: Thoughts on GWT 3.0 re: Java 8 and IE 8/9

2013-11-22 Thread Piotr Kosmowski
I think this is very important feature. We are using UIBinder extensively 
and we think it is a great step forward in therm of declarative design, 
however it is still hard to use and produce XML's by our UI designers. 
The best template engine I've ever seen for UI designers is Thymeleaf and 
Angular's so I'm looking forwart to seeing such feature in GWT.
Another great engine I know is that comes with Errai. The drawback is that 
it needs live application context and cannot be used separatelly.

On Friday, 25 October 2013 23:19:12 UTC+2, Ray Cromwell wrote:
>
>
> We're thinking about introducing a way of developing UI that is more like 
> traditional HTML design, you create HTML, CSS, and then attach behavior via 
> Java. UiBinder is sort of like this, but it is not HTML and still requires 
> building. What we want to do is follow the Web Components spec, which is a 
> standards-based, browser supported, way of doing templating, which means 
> GWT could interop with widgets developed in JS or Dart or any other 
> language easily. There's not even an internal proposal for this yet, we 
> expect to hash it out before the gwt.create conference.
>
> But I could see it working something like this:
>
> 
> 
> 
> 
> 
> Your final cost is {{cost}}
> 
> 
>
> /* Foo.java */
> class Foo {
>   AcmeShipping ship; // auto-injected
>   double cost; // auto-injected, both two-way databinding
>
>   onChange() {
>  cost = ship.calculateCost();
>   }
> }
>
>
> Another option is angular-style, see my AngularGwt TodoMVC example:
>
> https://github.com/cromwellian/angulargwt/blob/master/src/main/java/com/google/gwt/angular/client/todomvc/TodoController.java
>
> https://github.com/cromwellian/angulargwt/blob/master/src/main/webapp/angulargwt.html
>
> We don't expect you to 'port' your existing apps to this. Those can keep 
> using the old way, but if you are designing a new mobile phone or mobile 
> tablet app, than it will be recommended to use this lighter weight 
> approach. The way mobile browsers work, the less JS is involved in layout 
> and DOM manipulation, the better in terms of performance. Daniel Kurka will 
> have a talk on this.
>
> -Ray
>
>
> On Friday, October 25, 2013 10:32:27 AM UTC-7, Timothy Spear wrote:
>>
>> Ray,
>>
>> There is already two existing versions of most container components. Are 
>> you stating GWT will introduce a third? Or just migrate the Layout ones?
>> In addition, do you know if there will be significant changes to UiBinder?
>>
>> Tim
>>
>> On Oct 25, 2013, at 1:21 PM, Ray Cromwell  wrote:
>>
>>
>> I think what we're really thinking about doing is preserving IE8 for the 
>> existing gwt widget stuff, but any features (APIs) we add going forward are 
>> going to leverage modern browser stuff, and we are not going to design 
>> (poorly performing, hacky) fallback/polyfill workarounds. 
>>
>> For GWT 3.0, we are looking at making a new, parallel way of writing Web 
>> UIs that is based on the emerging Web Components standard, and we will lean 
>> heavily on modern browser layout engines, e.g. flexible box model.  We're 
>> not going to break your existing apps, but we're not going to make these 
>> new models work on old browsers. For example, to make data-binding working 
>> efficiently in Web Components, you need mutation observers, Node.bind, 
>> Object.observe(), etc. 
>>
>> We are not going to require Java7 or Java8 to run servlet code or even 
>> invoke the compiler, but we will support compiling Java8 code to JS, and 
>> we'll have super-sourced versions of java.util.function/java.util.stream.
>>
>> Basically, the future is easier interop with the browser APIs, external 
>> libraries, and web components, and less reliance on heavy weight widgets 
>> that run lots of JS and shield the browser. This is a vision more in tune 
>> with the fact that mobile is increasingly becoming a bigger and bigger 
>> chunk of the web, and the original GWT metaphor of a Desktop-like 
>> AWT/Swing-like UI library with layout done by executing code is less 
>> efficient on mobile and is suboptimal for fast browser jank-free execution. 
>>  We don't want to break existing applications, and we don't want to hamper 
>> designs for the future by requiring them to work on ancient browsers.
>>
>>
>>
>> On Friday, October 25, 2013 8:59:28 AM UTC-7, Andy wrote:
>>>
>>> Thanks for your input. It sounds like we're in the identical situation.
>>>
>>> Regarding onFailure, do you use an abstract implementation of 
>>> AsyncCallback, like I mention in this post?
>>>
>>> http://stackoverflow.com/

Problem with UIbinder Tutorial

2013-11-22 Thread cedjoubert
Hi,

I'm trying this example, but all works fine, except the style "Login.css" 
is not applied...

http://www.tutorialspoint.com/gwt/gwt_uibinder.htm

Could you tell for which reason the Login.css style is not applied please 
?  (it is exactly the same code than the URL)

Regards
Cédric

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


GWTTestCase et Cucumber

2013-11-22 Thread oussama abid
























*Bonjour ma question est simple j'ai des tests dans une application GWT, 
ses tests sont passant[code]public class TestMyClass extends 
GWTTestCase{public void 
test_un_ensemble_de_compte_facturation_dans_la_vue() {   
 assertNotNull(view.getAccount());}}[/code]Mon but est de piloter ses 
tests via cucumber c.a.d :surcharger mes tests un truc du genre : 
[code]@Given("un ensemble de compte facturation")public void 
test_un_ensemble_de_compte_facturation_dans_la_vue() {   
 assertNotNull(view.getAccount());}[/code]le problème est que je suis 
dans un monde GWT et non JAVA c.a.d quand j'utilise des composants 
graphique tel qu'un [code]MonObjet  extends IsWidget[/code]ben ça ne marche 
pas normal IsWidget  est une interface GWT .je n'ai pas de piste humm*

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


Re: Is there way to compile GWT in production mode?

2013-11-22 Thread Thomas Broyer
You don't need to compile your module differently depending on which one 
you want to in devmode or prod mode; this can be done at runtime; 
see https://code.google.com/p/google-web-toolkit/issues/detail?id=2079#c21

On Friday, November 22, 2013 1:35:50 AM UTC+1, Vikram Dave wrote:
>
> Thanks for the explanation, Thomas. The issue is, I have two GWT 
> application (two separate projects compiled using GWT)  running on the same 
> page. I am trying to debug an application, but the "isHostedMode" code in 
> the other JS file, generates an alert. 
> What I am trying to do is to get rid of "isHostedMode" method generated by 
> GWT in my JS file (I wouldn't want alerts in my production file). 
>
> function isHostedMode(){
> var result = false;
> try {
>   var query = $wnd_0.location.search;
>   return (query.indexOf('gwt.codesvr=') != -1 || 
> (query.indexOf('gwt.hosted=') != -1 || $wnd_0.external && 
> $wnd_0.external.gwtOnLoad)) && query.indexOf('gwt.hybrid') == -1;
> }
>  catch (e) {
> }
> isHostedMode = function(){
>   return result;
> }
> ;
> return result;
>   }
>
> if (isHostedMode()) {
> alert('Cross-site hosted mode not yet implemented. See issue ' + 
> 'http://code.google.com/p/google-web-toolkit/issues/detail?id=2079' 
> );
> return;
>   }
>
>
> I changed the linker to use 'xsiframe' as suggested and the code change in 
> the generated code are as follows.
>
>
> function isHostedMode(){
> var query = $wnd_0.location.search;
> return query.indexOf('gwt.codesvr.Hello=') != -1 || 
> query.indexOf('gwt.codesvr=') != -1;
>   }
>
>
> if (isHostedMode()) {
>   return computeUrlForResource('Hello.devmode.js');
> }
>
>
> Is the any flag/property I can set so that above method doesn't get generated?
>
>
>
>
> On Tuesday, November 19, 2013 2:49:34 AM UTC-8, Thomas Broyer wrote:
>>
>> What GWT calls "production mode" is running the JavaScript generated from 
>> the Java code by the GWT compiler, so the very fact of compiling from Java 
>> to JavaScript gives you "production mode"; there's no such thing as 
>> "compiling in production mode" and "compiling in some other mode" (there's 
>> "draftMode" but it's just one way to tweak the compilation process and its 
>> output, it's still "production mode").
>>
>> The  configuration in the gwt-maven-plugin applies to the 
>> gwt:test goal, not to gwt:compile.
>>
>> The gwt:compile goal is exactly equivalent to the Ant snippet you gave: 
>> it launches the GWT Compiler to compile the Java code to JavaScript.
>>
>> Note: the other modes are "dev mode" and "super dev mode": "dev mode" 
>> runs your code in Java (not JS), and "super dev mode" runs your code in 
>> "production mode" but in a way that makes it fast to (re)compile (i.e. not 
>> optimized) and using a resilient compiler, which makes it unsuitable for 
>> production (you don't just compile your code to JS, you also highjack code 
>> into your page with a bookmarklet so that you ask the super dev mode 
>> codeserver to recompile the code before serving it)
>>
>> I thus don't understand what you mean by “I still see Dev mode code in my 
>> JS files”, what kind of code are you referring to?
>>
>> On Tuesday, November 19, 2013 3:41:57 AM UTC+1, vikram dave wrote:
>>>
>>> Hi,
>>>
>>> I am trying to compile my GWT code in production mode using Maven. I set 
>>> production mode true (as seen below) in my pom, but I still see Dev mode 
>>> code in my JS files. I don't want any dev mode code in my production JS 
>>> file. Is there a way to do this using Maven? Can I set some flag/ property 
>>> in my pom or *.gwt.xml file? 
>>>
>>> 
>>>
>>> 
>>>
>>> org.codehaus.mojo
>>>
>>> gwt-maven-plugin
>>>
>>> 2.5.1
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> compile
>>>
>>> 
>>>
>>> 
>>>
>>> true
>>>
>>> war
>>>
>>> src/main/webapp>> warSourceDirectory>
>>>
>>> war
>>>
>>> ${Module Name}
>>>
>>> ${gwt.extraJvmArgs}>> extraJvmArgs>
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>>
>>> I see that Ant lets you compile in production mode  by using following 
>>> in build.xml file. Is there a way I can do this in maven? Or using Ant 
>>> plugin in Maven? (If yes please share an example or point me to a good doc)
>>>
>>>   
>>>
>>> >> classname="com.google.gwt.dev.Compiler">
>>>
>>>   
>>>
>>> 
>>>
>>> 
>>>
>>> 
>>>
>>> >> location="../../validation-api-1.0.0.GA-sources.jar" />
>>>
>>>   
>>>
>>>   
>>>
>>>   
>>>
>>>   

One-To-Many and RequestFactory Proxy

2013-11-22 Thread almagnit
I have two entities:

class A {
 @ ManyToOne
 @ Fetch (FetchMode.SELECT)
 @ JoinColumn (name = "b_id")
 B b;
}

class B {
 @ OneToMany (mappedBy = "b")
 @ Fetch (FetchMode.SELECT)
 List  a;
}

interface AProxy {
 B getB ();
 setB (B b);
}

interface BProxy {
 List  getA ();
 set (List  a);
}

If you do not use OneToMany list, then the ComboBox b in the editor does 
not work, but if you add a OneToMany to a class B then all is well.

Why is this happening?

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


Re: GWT Serialization Broken?

2013-11-22 Thread Jens
You must refresh/reload your server if you change serializable classes. GWT 
generates a file called .rpc and this file changes whenever you 
modify a serializable class. Your server must have the up-to-date version 
of that file. 

Your both example classes look fine. It's just a deployment issue.

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


Using DatePicker in CellTable

2013-11-22 Thread Nermin
Dear Group,

I have two "probably simple" questions for using DatePicker in CellTable:

*1. In case, no date had been specified yet, Is it possible to show a empty 
Datepicker field?*
I get NPE if date is null, which is probably fine. At this moment, I 
populate the date field with current date, which works but is wrong.
I would like to show a message "not specified" and to pop-up a DatePicker 
when user clicks on it. ... How do I do this?

*2. I ask user to confirm the new date before it is changed in the DB. How 
do I set date shown in the DatePickerCell back to the old one?*
Basically what happens is that the new date shown in the DatePickerCell is 
changed to the new date as soon as user chooses a new date from the 
DatePicker.
I ask via: Window.confirm() if he is sure to change the date to the new 
one, and in case NO, I would like to set the date shown in the CellTable 
back to the old one. ... How do I do this?

Thank you in advance for your help:

Nermin B.

Here is my code. The blue marked part is concerned with Question1 and Red 
part with Question2.

//=== JobOffeer VALID UNTIL COLUMN
DatePickerCell jobOfferExipreDateCell = new 
DatePickerCell(DateTimeFormat.getFormat("dd.MM.yyy hh:mm"));
Column jobExpireDateColumn = new Column(jobOfferExipreDateCell) {
@Override
public Date getValue(JobProxy object) {
if(object.getExpireDate() == null) {
   return new Date();
} else {
   return object.getExpireDate();
}
}
};
jobExpireDateColumn.setFieldUpdater(new FieldUpdater() {
@Override
public void update(int index, JobProxy currentJob, Date 
changedExpiredDate) {
if(Window.confirm("Do you want to change expire date to 
"+DateTimeFormat.getFormat("dd.MM.yyy").format(changedExpiredDate)+"?")) {
//update job
JobRequest jobRequest = 
cp.getRequestFactory().jobRequest();
JobProxy editedJob = jobRequest.edit(currentJob);
//Set New Date
editedJob.setExpireDate(changedExpiredDate);
//(1)Receiver
Receiver receiver = new 
Receiver(){
@Override
public void onSuccess(ProcessResponseProxy 
response) {
cp.getEventBus().fireEvent(new 
LoadDataRequestEvent(LoadDataRequestType.LOGIN_USER));
}
};
//(2) Fire
jobRequest.update().using(editedJob).fire(receiver);
} else {
//ToDo: Reset DatePicker back to 
currentJob.getExpireDate();
}
}
});

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