Expand my Community achievements bar.

SOLVED

FDS and Read-Only Properties

Avatar

Level 1
Hi,



I am pretty new to FDS and am trying to get it to work in my
Object model. A few of my Java objects have read only properties.
i.e. They only have a getter and not a setter. It seems that FDS
doesn't really like this.



When i use <mx:TraceTarget /> on the client, i get an
error that says "Item retrieved from fill/page response from server
is missing and id", and my client side object has a null id.



My Java POJO object is not missing an id property. It has
only a getId() property on the POJO, but not a setId property.



As soon as I add a setId property, everything works fine and
my id is populated on the client. For other reasons, i do not want
to have a setter on all my POJOs. Is there a way to tell FDS that
it is okay to have a read only property? I just want it to read the
ID, and bring it down to the client.



Thanks!
1 Accepted Solution

Avatar

Correct answer by
Former Community Member
Yes, you need the getters and setters in FDS, however you can
make this work with a custom IExternalizable. Check out Peter
Farland's blog for an example:




http://blogs.adobe.com/pfarland/2006/11/custom_serialization_using_iex_1.html#more

View solution in original post

3 Replies

Avatar

Level 1
I am a bit surprised that i haven't gotten a single response.
If someone can confirm or deny the behavior that i am seeing, i
would be most grateful. Thanks!

Avatar

Correct answer by
Former Community Member
Yes, you need the getters and setters in FDS, however you can
make this work with a custom IExternalizable. Check out Peter
Farland's blog for an example:




http://blogs.adobe.com/pfarland/2006/11/custom_serialization_using_iex_1.html#more
The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----