Re: Problem decoding complex AutoBean

2020-07-10 Thread Colin Alworth
uot;, > "component": "header", > "property": "text", > "value": "HELLO" > }, > { > "id": 3, > "themeConfigurationId": 1, > "chatScreen": "chatScreen", > "co

Re: Problem decoding complex AutoBean

2020-07-10 Thread Akshay Kumar
quot;: "rgba(0,191,255,0.5)" } ] } Interfaces are - public interface IWebchatThemeConfigurationBean { public Integer getThemeId(); public String getName(); public Boolean getEnabled(); public List getPropertiesList(); } public interface IWebchatThemeConfigurationPropertyBean { public In

Re: AutoBean sample not working for me?

2016-06-19 Thread sdfdsf dsfsdfds
Thanks all that worked - one other thing, I wanted to do the serialization without interfaces, found this project gwt-jackson which works, just wanted to post it in case it helps others: https://github.com/nmorel/gwt-jackson > ] >> >> > -- You received this message because you are subscribed

Re: AutoBean sample not working for me?

2016-06-17 Thread Michael McIntosh
To clarify, you need to add something like makeAddress to DoSomething: Address makeAddress() { // Construct the AutoBean AutoBean address = factory.address(); // Return the Address interface shim return address.as(); } Then you can change your code to: DoSomething test

Re: AutoBean sample not working for me?

2016-06-17 Thread Thomas Broyer
Either that or add a method to the AutoBeanFactory taking a Person as argument to be wrapped as an AutoBean. (From memory) -- You received this message because you are subscribed to the Google Groups "GWT Users" group. To unsubscribe from this group and stop receiving emails from i

Re: AutoBean sample not working for me?

2016-06-17 Thread Michael McIntosh
You need to create the person by calling makePerson. Sent from my iPhone > On Jun 17, 2016, at 3:35 PM, sdfdsf dsfsdfds > wrote: > > Hi, > > I copy / pasted the AutoBean serialization example from here: > > http://www.gwtproject.org/doc/latest/DevGuide

AutoBean sample not working for me?

2016-06-17 Thread sdfdsf dsfsdfds
Hi, I copy / pasted the AutoBean serialization example from here: http://www.gwtproject.org/doc/latest/DevGuideAutoBeans.html I've implemented the necessary interfaces etc to setup a quick test which can be summarized as follows: PersonImpl person = new Perso

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-09 Thread Ali Akhtar
So AutoBeans seem to be working now, however I'm still getting the 'xxx_classlit_xx not defined' exception when I try to use other gwt classes. For instance the following method: public Clerk setEvents(HasValue... fields) { for (HasValue f : fields) { f.addVal

Re: SDM bug when using AutoBean

2015-02-08 Thread Ali Akhtar
This seems to be a bug with IntelliJ. When I run SDM outside of IntelliJ (via the gwt:run-codeserver goal of the maven plugin), everything works. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop rece

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-08 Thread Ali Akhtar
Thanks for the pointer Jen. When I run SDM directly rather than via intellij (using gwt:run-codeserver goal of the maven plugin), everything works. Whew. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-08 Thread Ali Akhtar
er, in the snapshot, beans which have only primitives and Strings >> work. But, beans that have any collections ( lists / maps) don't work, >> giving a similar error as this. >> > > At work we use SDM with incremental compile, GWT 2.8.0-SNAPSHOT and an > AutoBean that cont

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-08 Thread Jens
se SDM with incremental compile, GWT 2.8.0-SNAPSHOT and an AutoBean that contains primitives (boolean, String), a Set as well as a Map>. We are decoding the JSON on client side without any problems (encoding happens on server). -- J. -- You received this message because you are subsc

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-08 Thread Ali Akhtar
This issue was fixed when i switched from 2.7.0 to 2.8.0-Snapshot . However, in the snapshot, beans which have only primitives and Strings work. But, beans that have any collections ( lists / maps) don't work, giving a similar error as this. I've posted a stacktrace and made a test project to b

Re: SDM bug when using AutoBean

2015-02-08 Thread Ali Akhtar
When I switch to 2.8.0-SNAPSHOT, then serializing the bean to json works. However, deserializing it from json fails. Updated code: Factory factory = GWT.create(Factory.class); Test test = factory.test().as(); GWT.log("Created bean"); Map testMap = new Hash

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-08 Thread Ali Akhtar
Hi Alberto, Were you running this in SDM mode? I've found that the bug I encounter is in SDM, but in regular / production, it runs without issue. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe from this group and stop re

SDM bug when using AutoBean

2015-02-08 Thread Ali Akhtar
In SDM mode, I can't seem to use AutoBean on beans that have a Map as one of their properties. Example bean + factory: public interface Test extends Serializable { public Map getTest(); public void setTest(Map test); } public interface Factory extends AutoBeanFactory { Aut

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Alberto Mancini
, >> just tested your code and actually seems to work using gwt/trunk so maybe >> it has something to do with the version you are using or the 'response' >> text. >> >> >> My EntryPoint: >> --- >> >>RequestBeanFactory factory

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Jens
> Is there a way to upgrade to the trunk version via maven? > SNAPSHOT builds are currently disabled. However you can use https://github.com/manolo/gwt-snapshot/raw/master/ as a temporary maven repo. -- J. -- You received this message because you are subscribed to the Google Groups "Goog

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Ali Akhtar
When I downgrade to gwt 2.6.0 , the code above works without any modification. It seems that this is a bug within 2.7.0 which appears to be fixed in trunk. Is there a way to upgrade to the trunk version via maven? -- You received this message because you are subscribed to the Google Groups "G

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Ali Akhtar
your code and actually seems to work using gwt/trunk so maybe > it has something to do with the version you are using or the 'response' > text. > > > My EntryPoint: > --- > >RequestBeanFactory factory = GWT.create(RequestBeanFactory.class); > > AutoBea

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Alberto Mancini
Hi, just tested your code and actually seems to work using gwt/trunk so maybe it has something to do with the version you are using or the 'response' text. My EntryPoint: --- RequestBeanFactory factory = GWT.create(RequestBeanFactory.class); AutoBean ab = AutoBeanCodex.deco

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Jens
AutoBean ab = AutoBeanCodex.decode(factory, MyBean.class, response. getText()); InitResult result = ab.as(); ab.as() returns MyBean and not InitResult. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To unsubscribe

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Ali Akhtar
Seems like this error only occurs when I try to access a property of the deserialized bean. I changed my code to the following: Console.debug("Response-- " + response.getText()); AutoBean ab = AutoBeanCodex.decode(factory, MyBean.class, response. getText()); Console.debug

Re: Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Ali Akhtar
Seems like this error only occurs when I try to access a property of the deserialized bean. I changed my code to the following: AutoBean ab = AutoBeanCodex.decode(factory, MyBean.class, response. getText()); Console.debug("Decode 1"); InitResult result = ab.as(); Console.debug

Autobean deserialize failing ( Ljava_util_List_2_classLit_0_g$ is not defined )

2015-02-06 Thread Ali Akhtar
I'm trying out AutoBean for the first time. Serializing a DTO to json on server works great, however when I attempt to deserialize it on the client side, I get this error: com.google.gwt.core.client.JavaScriptException: (ReferenceError) : Ljava_util_List_2_classLit_0_g$ is not de

creating multiple instance of same autobean

2014-06-23 Thread aditi
Is there a way of creating two instances of same autobean? We are creating an autobean by decoding the JSON response. -- 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 fro

AutoBean unstable on server side

2014-03-17 Thread Thad Humphries
etting out-of-sync with my client side methods. After reading more on AutoBean, I figured I could create objects with the as() method, populate them, and then dump the payload back to my client. It looked slicker, and, if a method name was changed, Eclipse would do the work of updating stuff I

Re: AutoBean polymorphism support

2014-02-28 Thread amer qarabsa
Hi , I am facing the same case in which i have to create a generic bean factory , this means that factory related to some super class , and all i have to do is to create sub classes from it and send and parse json data using it,the object coming from parsing json can be of any subclass of my su

2 instances of same autobean getting updated simultaneously

2014-01-23 Thread aditi
Have an autobean created after deserliazing the json response. Then I save it in two different files to the classmembers with getter and setter Class A MyBean bean = null; public MyBean getBean() { this.MyBean; } public void setBean(MyBean beanVal) { this.MyBean = beanVal; } Similarly

Re: AutoBean returning List

2014-01-08 Thread Thomas Broyer
diti wrote: > > have an autobean that returns List. The reason is the json key to > which the getListVal() is mapped is an array of string and Integer values. > After filling the autobean, I am able to get the size of getListVal > properly but while iterating through the retur

AutoBean returning List

2014-01-08 Thread aditi
have an autobean that returns List. The reason is the json key to which the getListVal() is mapped is an array of string and Integer values. After filling the autobean, I am able to get the size of getListVal properly but while iterating through the returned list, illegalArgument Exception is

autobean structure for a complex JSON

2013-09-23 Thread aditi
In autobeans, while decoding a complex json object , so we have to create an interface for every property in json object that has { } ?? If yes, then are we not creating large number of autobean interfaces even to fetch a simple json property value? Or is there a way to have a better hierarchy

update the property value in Autobean

2013-09-22 Thread aditi
Have a autobean that has get and set methods for property - status. String getStatus(); void setStatus(String status); There is a case where this status property will be updated by UI. Can we have the autobean property updated and get the updated value across application. Please suggest

Re: JSON object to AutoBean via JSNI in DevMode

2013-08-27 Thread Jens
> > Use native JSON.stringify through JSNI? > The problem with com.google.gwt.json is that it creates a lot of objects > and uses a lot of JSNI which slows down DevMode. > Ok JSON.stringify helps quite a bit. Now its basically if (GWT.isScript()) { dataBean = AutoBeanCodex.decode(factory, Dat

Re: JSON object to AutoBean via JSNI in DevMode

2013-08-27 Thread Thomas Broyer
Value) jsonDataFromJSNI).toJson(); (note: uses JSON.stringify under-the-hood) The next step will be to "port" AutoBean to use elemental.json instead of org.json and add an overload to AutoBeanCodex.decode that takes a JsonValue. (side note: the data you get from the page is JS, not JSON

JSON object to AutoBean via JSNI in DevMode

2013-08-27 Thread Jens
Hi, is there anything faster than final String payload = new JSONObject(jsonDataFromJSNI).toString(); dataBean = AutoBeanCodex.decode(factory, Data.class, payload); when in DevMode? The JSON data is embedded into the host page and not that tiny (worst case ~600kb uncompressed) and the above sol

Re: Problem decoding complex AutoBean

2013-08-20 Thread Jens
> JSONObject jobj = new JSONObject(JsonUtils.safeEval(response.getText())); > MQueryRoot root = > jobj.get("mquery").isObject().getJavaScriptObject().cast(); > If you want that code a bit easier to read you could use a MQueryWrapper JSO like in the AutoBean

Re: Problem decoding complex AutoBean

2013-08-20 Thread Thad Humphries
gt; MQuery getMquery(); >> } >> >> In BeanFactory, I changed "AutoBean mquery();" for >> "AutoBean mquery();" >> >> My onResponseReceived() now looks like >> >> AutoBean bean = >> AutoBeanCodex.decode(clientF

Re: Problem decoding complex AutoBean

2013-08-20 Thread Thomas Broyer
On Tuesday, August 20, 2013 1:47:58 PM UTC+2, Thad Humphries wrote: > > Thank you, Thomas. That worked. > > I added the interface > > public interface MQueryWrapper { > MQuery getMquery(); > } > > In BeanFactory, I changed "AutoBean mquery();&

Re: Problem decoding complex AutoBean

2013-08-20 Thread Thad Humphries
Thank you, Thomas. That worked. I added the interface public interface MQueryWrapper { MQuery getMquery(); } In BeanFactory, I changed "AutoBean mquery();" for "AutoBean mquery();" My onResponseReceived() now looks like AutoBean bean =

Re: Problem decoding complex AutoBean

2013-08-20 Thread Thomas Broyer
You don't seem to have an AutoBean interface with a "MQuery getMquery()" method. The object you're parsing has only a "mquery" property, so if you look at it as if it were an MQuery object, getScreenname and getFields would expectedly be null. On Tuesday, August 2

Problem decoding complex AutoBean

2013-08-19 Thread Thad Humphries
I've managed a simple AutoBean with a list. Now I've a more complex one, and I don't understand what's wrong. My get methods are returning null though the debugger shows the object has data. The JSON looks like this: { "mquery": { "scre

Re: Is ValueProxy similar to AutoBean type object?

2013-06-16 Thread Thomas Broyer
igger an update in > backend. > > So, I thought to change to use ValueProxy, that way, I do not have this > problem, as everything is sent to server. There is not that much data, so > it won't be a performance problem. > > But, is not using AutoBean more straightforward? Just de

Is ValueProxy similar to AutoBean type object?

2013-06-14 Thread Yan
have this problem, as everything is sent to server. There is not that much data, so it won't be a performance problem. But, is not using AutoBean more straightforward? Just define an interface, both client/server are serializing and unserializing the objects into JSON string. Is Value

Re: Problems with AutoBean Lists

2013-02-08 Thread Thomas Broyer
be a bug in the AutoBean List > implementation > > I solved it by simply: > > autoBean.setList(new ArrayList(autoBean.getList)); > > On Tuesday, January 31, 2012 10:51:17 PM UTC+1, Cypher wrote: >> >> I am having problems modifying a list property on an AutoBean

Re: Problems with AutoBean Lists

2013-02-05 Thread Sebastian Metzger
Just had the same problem Seems to be a bug in the AutoBean List implementation I solved it by simply: autoBean.setList(new ArrayList(autoBean.getList)); On Tuesday, January 31, 2012 10:51:17 PM UTC+1, Cypher wrote: > > I am having problems modifying a list property on an Au

Re: How to get JSONObject out of a deserialized AutoBean?

2013-02-04 Thread Thomas Broyer
On Monday, February 4, 2013 4:32:52 PM UTC+1, membersound wrote: > > Hi, > > I serialize one of my beans with AutoBeanCodex.encode(bean).getPayload(); > > But when I'm trying to import and decode the same string, I do not want > the AutoBean Proxy Object. I just w

How to get JSONObject out of a deserialized AutoBean?

2013-02-04 Thread membersound
Hi, I serialize one of my beans with AutoBeanCodex.encode(bean).getPayload(); But when I'm trying to import and decode the same string, I do not want the AutoBean Proxy Object. I just want to have the JSONObject itself. The following will still give me the AB Proxy. How can I get the

RequestFactory - AutoBean has been frozen - Reloading and editing

2013-01-31 Thread Steven Jardine
I realize this topic has been discussed before but I am having trouble finding a solution to my problem. Basically I have an editor that needs to edit the same entity in the database multiple times. I can edit the entity the first time but subsequent edits create the "AutoBean has been f

Re: AutoBean with Subclasses

2013-01-19 Thread Colin Alworth
... >> } >> public interface Cinterface extends Ainterface{ >>getRadius()/setRadius(); >> ... >> } >> public interface Dinterface { >>Ainterface getA(); >>void setA(Ainterface a); >> ... >> } >> >> I have incl

Re: AutoBean with Subclasses

2013-01-18 Thread vb8190
> ... > } > > I have included all interfaces in my AutoBeanFactory. > > Question: when I decode/encode Dinterface, how do I know if Ainterface is > extended by Binterface or Cinterface? How does AutoBean support > polymorphism? > > To make it easier, I can add a vari

Re: RequestFactory / AutoBean with non-bean value type

2013-01-03 Thread salk31
For what it is worth we have done the ServiceLayerDecorator and @SkipInterfaceValidation approach and it seems OK (keeps domain code cleaner at least) with GWT 2.5. On Thursday, September 15, 2011 11:31:37 AM UTC+1, Thomas Broyer wrote: > > I don't think ServiceLayerDecorator would work (interfa

Date in autobean

2013-01-02 Thread wargre
Hello, Is there a way to specify the format of the date with autobean? I'd like to use the ISO8601 format (-MM-dd hh:mm:ss.SSS), because the default transfer mode is the number of millisecond since 1970-01-01 and I cannot manage negative number for date older than 1970 on server

Date and Autobean

2013-01-01 Thread wargre
Hello, With Autobean Date must be a "long" in JSON structure. Is there a way to map Date to a specify pattern (like ISO-8601 -MM-DDThh:mm:ss.sTZD ) ? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view th

Re: AutoBean polymorphism support

2012-10-15 Thread Andrea Boscolo
Thanks, you confirmed my suspicions. Are you saying I can use Splittable to achieve polymorphism? How? Have you ever tried? Of course I can somehow get rid of polymorphism in my classes, but I'd rather do not. On Saturday, October 13, 2012 1:41:46 PM UTC+2, Thomas Broyer wrote: > > N

Re: AutoBean polymorphism support

2012-10-13 Thread Thomas Broyer
No, AutoBean has no mean to support polymorphism, and it specifically cannot be used for your use-case. You can possibly use Splittable, at a lower-level, or Elemental's JSON, JS overlays, or JSONObject. On Saturday, October 13, 2012 12:40:16 PM UTC+2, Andrea Boscolo wrote: > > Hi

AutoBean polymorphism support

2012-10-13 Thread Andrea Boscolo
looked everywhere but I haven't found some concrete answer, so I hope someone has already faced (and why not, solved) this problem. I created a really simple testcase that can be found on https://gist.github.com/3884099 I know AutoBean is behind RequestFactory so I though it supports polymorphi

AutoBean with Subclasses

2012-08-02 Thread rkulisas
(); ... } public interface Dinterface { Ainterface getA(); void setA(Ainterface a); ... } I have included all interfaces in my AutoBeanFactory. Question: when I decode/encode Dinterface, how do I know if Ainterface is extended by Binterface or Cinterface? How does AutoBean support

AutoBean Category Implementation Inheritance

2012-07-19 Thread Benjamin DeLillo
When using AutoBean Categories Given: I have two interfaces, A and B B extends A I have a Category class for each, ACategory and BCategory I have an @Category annotation on my ObjectFactory for each Question: will the AutoBean produced by factory.b() have the methods

Re: GWT 2.4 AutoBean example not working

2012-07-16 Thread Thomas Broyer
On Monday, July 16, 2012 12:53:47 PM UTC+2, brent...@gmail.com wrote: > > That worked. Thanks! > > We should get that added to the wiki documentation some how... > It should no longer be a problem with 2.5.0-rc1, as org.json classes are now bundled into gwt-dev.jar. -- You received this mes

Re: GWT 2.4 AutoBean example not working

2012-07-16 Thread brent.r...@gmail.com
That worked. Thanks! We should get that added to the wiki documentation some how... On Monday, July 16, 2012 2:38:42 AM UTC-4, Thomas Broyer wrote: > > You need org.json classes in your class path. gwt-servlet-deps.jar > contains them if you need it. -- You received this message because you a

GWT 2.4 AutoBean example not working

2012-07-15 Thread Thomas Broyer
You need org.json classes in your class path. gwt-servlet-deps.jar contains them if you need it. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/

Re: Hierachy of autobean for state serialization

2012-07-11 Thread amir
interface .. I created one interface that extends all subclasses of the base type .. Our process is somewhat convoluted ... using soap to import all possible models, params, and results .. Then running a script to sanitize the data and create autobean compatible interfaces out of this data.

Re: How to convert an object that contains List to json using AutoBean

2012-07-02 Thread Joseph Lust
Code, error? We need more than that to help you. Did you follow the AutoBean tutorial<http://code.google.com/p/google-web-toolkit/wiki/AutoBean> ? Sincerely, Joseph -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view

How to convert an object that contains List to json using AutoBean

2012-07-02 Thread Kelvin Kao
Does anyone have successfully convert List of objects to JSON by using AutoBean? it seems it's giving me error like null cannot be in getter method.. anyone has an simple example to share? thx. -- You received this message because you are subscribed to the Google Groups "Google W

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Tiago
On Monday, April 23, 2012 4:21:50 PM UTC+2, Thomas Broyer wrote: > > You can use a custom JSR303 validator that does the select and the check; > so that in case of a unique constraint violation, a ConstraintViolation > would be sent back to the client (and in this case, the proxy is unfrozen > s

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Thomas Broyer
On Monday, April 23, 2012 2:57:09 PM UTC+2, Tiago wrote: > > Hello Thomas, > > On Monday, April 23, 2012 11:49:54 AM UTC+2, Thomas Broyer wrote: >> >> In RequestFactory's design, onFailure is really an exception, and should >> never happen: errors should be conveyed as special return values. Tha

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Tiago
Hello Thomas, On Monday, April 23, 2012 11:49:54 AM UTC+2, Thomas Broyer wrote: > > In RequestFactory's design, onFailure is really an exception, and should > never happen: errors should be conveyed as special return values. That > doesn't quite change your issue here, as the proxy wouldn't be r

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Thomas Broyer
On Monday, April 23, 2012 10:29:35 AM UTC+2, Tiago wrote: > > Hello Brandon, > > My problem isn't always "autobean is frozen", it changes, but the summary > is that I cannot resubmit a proxy after a server error (like an unique > constraint violation,

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-23 Thread Tiago
Hello Brandon, My problem isn't always "autobean is frozen", it changes, but the summary is that I cannot resubmit a proxy after a server error (like an unique constraint violation, for example) that ends up calling Receiver.onFailure(). The error I tend to get is DeadEntityEx

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-21 Thread Brandon Donnelson
I've has those too. I'm not sure there is enough source to diagnose. Do you have a list in your bean? 1. how do you init your driver? 2. do you have list that is null from server. 3. do you have a list that is null when you start then you add to list then edit it again. always init a list as em

Re: AutoBean

2012-04-21 Thread Aidan O'Kelly
problem. Have you solved it? How? >> >> >> >> On Monday, October 17, 2011 4:38:53 PM UTC-2, Aidan OK wrote: >>> >>> Is anyone using AutoBean in a JRE environment successfully? When trying >>> a very simple test I get a NPE when I try to use Aut

Re: AutoBean

2012-04-21 Thread govindan govindan
(n);* Thanks *Govindan* On Wed, Apr 11, 2012 at 7:40 PM, italobb wrote: > I'm experiencing the same problem. Have you solved it? How? > > > > On Monday, October 17, 2011 4:38:53 PM UTC-2, Aidan OK wrote: >> >> Is anyone using AutoBean in a JRE environment suc

Re: AutoBean

2012-04-20 Thread italobb
I'm experiencing the same problem. Have you solved it? How? On Monday, October 17, 2011 4:38:53 PM UTC-2, Aidan OK wrote: > > Is anyone using AutoBean in a JRE environment successfully? When trying a > very simple test I get a NPE when I try to use > AutoBeanCodex.encode(my

Re: RequestFactory/Editor AutoBean has been frozen error

2012-04-19 Thread Tiago Rinck Caveden
workaround doesn't work anymore. I get a ClassCastException when I try it. My RequestContext implementation is casted to AbstractRequestContext$State. I can't find a way to access the state of a RequestContext in order to attribute the new one to the old AutoBean. The attribute is private.

Re: AutoBean encoding on server-side with overriden method causes duplicate key

2012-04-12 Thread Thomas Broyer
37 AM UTC+2, kjordan wrote: > > I'm trying to use the AutoBean encoding so I can pass and parse types over > a websocket connection I have. However, there seem to be some bugs with > trying to encode AutoBeans on the server side. > > I had a structure like > >>

AutoBean encoding on server-side with overriden method causes duplicate key

2012-04-11 Thread kjordan
I'm trying to use the AutoBean encoding so I can pass and parse types over a websocket connection I have. However, there seem to be some bugs with trying to encode AutoBeans on the server side. I had a structure like > public interface Foo { > } > public interface Bar { > } &

Re: Create autobean as RF does it

2012-04-02 Thread JoseM
nto a ValueProxy. On Friday, March 30, 2012 3:32:03 AM UTC-4, Thomas Broyer wrote: > > Have a look at AbstractRequestContext (particularly the > processReturnOperations method; also look for calls to setTag), but > basically you'll have to transport more than the AutoBean data: you&

Re: Create autobean as RF does it

2012-03-30 Thread Thomas Broyer
Have a look at AbstractRequestContext (particularly the processReturnOperations method; also look for calls to setTag), but basically you'll have to transport more than the AutoBean data: you'll have to send its stableId and version (have a look at SimpleRequestContext et al. for h

Create autobean as RF does it

2012-03-29 Thread Eugene Ivlev
let | | | | | | | | | | | | AutoBean obj |<--Atmosphere notification-|<-| Atmosphere Servlet creates AutoBean | with entity to a

Re: What is autobean wrapping is good for?

2012-03-20 Thread Thomas Broyer
On Tuesday, March 20, 2012 10:55:37 AM UTC+1, Konstantin Solomatov wrote: > > I am investigating the usage of gwt autobean in my projects. When I was > reading about this component, I came across a concept of autobean wrapping > but found neither explanation why it was created nor

What is autobean wrapping is good for?

2012-03-20 Thread Konstantin Solomatov
I am investigating the usage of gwt autobean in my projects. When I was reading about this component, I came across a concept of autobean wrapping but found neither explanation why it was created nor examples of how to use it. What is it good for? Where can I use it? -- You received this

NullPointerException when dealing with HashMap and AutoBean

2012-02-12 Thread SaWo
Hi Guys, I have some problem when decoding some JSON data using the AutoBeanCodex. I have an AutoBean that contains getters and setters for some privitive types and also for some Map too. When i deserialize a json with the AutoBeanCodex, i can deserialize the primitive types without any problem

Problems with AutoBean Lists

2012-01-31 Thread Cypher
I am having problems modifying a list property on an AutoBean deserialized from JSON with AutoBeanCodex. When I call List<>.add(position, value) it appears to be overwriting the value at that position instead of shifting values right to make room for the new item. Here's a JUni

Re: RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-30 Thread Jeff Rodriguez
That was it. *facepalm* Thanks for the help guys. On Dec 29, 3:56 pm, Thomas Broyer wrote: > I confirm the need to always use the same instance on the server side in a > given request. I do believe it's a bug though fwiw. -- You received this message because you are subscribed to the Google

Re: RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-29 Thread Thomas Broyer
I confirm the need to always use the same instance on the server side in a given request. I do believe it's a bug though fwiw. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google

Re: RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-29 Thread Aidan O'Kelly
In your addOrUpdate() method, check to see you are returning the exact same instance that was passed in, just remembered I did actually run into the same problem when you return a different instance that has the same identity. On Thu, Dec 29, 2011 at 4:38 PM, Jeff Rodriguez wrote: > Yeah, I put

Re: RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-29 Thread Jeff Rodriguez
Yeah, I put that code into a click handler for a button so I can just repeatedly fire it off. It's the only code in the function. It seems like something is trying to edit the result before my receiver callbacks are called. I say that because it works on the server side every single time. If I cli

Re: RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-28 Thread Aidan O'Kelly
>From the code you posted, it should work fine (even the original code). Is it all executed in one function? It sounds like there's some paths of execution which differ from it, and somehow end up calling setName() on a frozen proxy. -- You received this message because you are subscribed to the

Re: RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-28 Thread Jeff Rodriguez
Hi Aidan, thanks for the reply. I just tried with the corrected edit() call, and I'm seeing the same behavior as before. If I remove the edit call entirely, it also behaves the same. I've noticed that it actually behaves a bit more erratically than I first thought. Not every subsequent call su

Re: RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-28 Thread Aidan O'Kelly
Well, one thing to be aware of is, that RequestContext.edit(), returns a new, mutable version of the proxy, rather than unlocking the one you pass in, so instead of : ctx.edit(gdp); gdp.setName("xxx"); It should be, gdp2 = ctx.edit(gdp); gdp2.setName("xxx"); That still doesn't explain why you a

RequestFactory - Intermittent "The AutoBean has been frozen" on newly created

2011-12-28 Thread Jeff Rodriguez
I'm running the Request Factory client code below. The first time I invoke it, I receive an IllegalStateException: The AutoBean has been frozen. Subsequent invocations work just fine. The odd thing is, the object is created whether I get the exception or not. If I *do* get the exception,

Re: RequestFactory/Editor AutoBean has been frozen error

2011-12-09 Thread Thomas Broyer
It's "by design", so nothing has changed in 2.4; and http://code.google.com/p/google-web-toolkit/issues/detail?id=5794 hasn't yet been fixed (patches welcome! ;-) ). -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion

Re: RequestFactory/Editor AutoBean has been frozen error

2011-12-08 Thread bloo
Hi, I'm glad I found this thread as I've run into the same pattern. Is the AutoBean hack on onFailure still required, as of 2.4.0? Or is there a more elegant control to be able to reuse the RequestContext and EntityProxy? -- You received this message because you are subscribed to

Example of GWT+Autobean+REST web services?

2011-11-21 Thread David Vree
Looking for a good example of this stack to see how if/how the autobean capability can create client side proxies for the service and entity Java class we have on our server. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To po

Re: AutoBean: decoding JSON with an array at the root?

2011-10-19 Thread alexp
Hi Colin, Thanks so much for clarifying and including those URLs. Very good to know! Cheers, Alex -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe

Re: AutoBean: decoding JSON with an array at the root?

2011-10-18 Thread Colin Alworth
Quoting from http://www.sitepen.com/blog/2008/09/25/security-in-ajax/ "It is only possible to hijack JSON data with a root that is an array. When the root is a primitive, primitive values do not trigger a constructor. When the root is an object, it is not valid JavaScript syntax, and therefore can’

Re: AutoBean: decoding JSON with an array at the root?

2011-10-18 Thread alexp
Hi Colin, Thanks for replying Can you elaborate a little on your response? I am not sure I quite got the context of the response. Are you stating that not having an array at the root would prevent that data from being injected into another JSON structure? What makes it not possible to do what

Re: AutoBean: decoding JSON with an array at the root?

2011-10-18 Thread Colin Alworth
Yes, your JSON is expected to have an object, not a collection, at its root. This turns out to be a good idea in general as well - in some browsers it is possible to load json that starts in an array from another site, and read the contents of those objects, something which is not possible if yo

AutoBean

2011-10-17 Thread Aidan O'Kelly
Is anyone using AutoBean in a JRE environment successfully? When trying a very simple test I get a NPE when I try to use AutoBeanCodex.encode(myAutoBean) My Bean interfaces look like this: public static interface Point { Long getX(); Long getY(); void setX(Long x); void setY(Long y); } public

  1   2   >