Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

is data passed back to responder a read-only copy?

Avatar

Level 2
I have a service that I call, adding a responder:



var modelingDataResponder:IResponder = new
ModelingDataResponder();

var modelingDataService:DataService =
EnterpriseServiceLocator.getInstance().getDataService("ModelingDataService");

var token:AsyncToken = modelingDataService.fill(myModel,
clientName);

token.addResponder(modelingDataResponder);



This causes the variable myModel to be filled. It adds a
responder called modelingDataResponder which implements IResponder.
modelingDataResponder is called when the fill completes.



My question is this. modelingDataResponder is called with
data that's a copy of the myModel object that was filled. But it
seems to be only a copy. It seems like executing code inside
modelingDataResponder that changes data fields inside the parameter
that is passed in just changes the data in a local copy, not in the
myModel object that was filled. The two objects have separate
addresses when looked at in the debugger, and changing a value in
one has no effect on the other.



So it's like the data that is passed back is a copy. The copy
can be read. Writing in the copy is OK, but it is just writing on a
copy, on on the object that was filled. Right?

3 Replies

Avatar

Level 1
I think that this is a bug... I think that today the
responder's token is receiving the raw array of objects received
from the server. It should be given the same object - i.e. the
"myModel" object -- in the result event. I'll make sure a fix gets
into the next release. In the meantime, a workaround would be to
do:



token.myResult = myModel



just after the fill call... then use "myResult" instead of
token.result.

Avatar

Level 1

Hi Jeff,

We use LiveCycle Data Services ES 2.6 and we currently have this  issue.

When using LiveCycle Data Services ES 3.0 (I only replaced  following swc's: fds.swc and airfds.swc) we don't have this problem any  more.

Thanks for the workaround.

We still have a few questions could you answer these for me?
- Since what version of LCDS is this issue resolved?

- Is their a Jira issue for this?

- Is a patch available?

Avatar

Employee

- Since what version of LCDS is this issue resolved?

LCDS 3.0 and above.

- Is their  a Jira issue for this?

No, as we use an private bug tracking system for LCDS.

- Is a patch available?

No, sorry.  You would have to work through Adobe Technical support to get a hotfix for this, and I do not believe that one exists.  I would recommend upgrading to 3.1 if you can.

Tom