0

Is there any way to create an Object using the ObjectBuilder with an id property that is bound to another value?

The following does not work since "id" is reserved:

<ObjectBuilder generator="{Object}" cache="none">
    <Properties id="{event.list}" />
</ObjectBuilder>

The following does not work either since event.list should be bound:

<RemoteObjectInvoker instance="{jobService}" method="DeleteJob"
    arguments="{{id:event.list}}">

Is there any other way to send an "id" to a server API?

Just to clarify: this code is inside an EventHandler in the mapping file:

<EventHandlers type="{JobEvent.DELETE}">
    <ObjectBuilder .../>
    <RemoteObjectInvoker instance="{jobService}" method="DeleteJob" arguments="{{id:event.list}}">
        <resultHandlers>
        ...
        </resultHandlers>
    </RemoteObjectInvoker>
</EventHandlers>
Ofir
  • 1,565
  • 3
  • 23
  • 41

2 Answers2

0

Looking at the first ObjectBuilder, is this invoked upon pre-initialize or what's the event to which you're referring for the id?

On the RemoteObjectInvoker, is this part of a series of handlers in the map or what fires the event that the map should capture?

John Hall
  • 23
  • 4
0

My memory is that the arguments parameter is looking for an array. Have you tried

arguments="{[argument1]}"

Back when I used Mate more, I would be using a custom event (which you are) with an id parameter. From the way it's written, I assume that the list parameter of the event is actually the id, correct?

John Hall
  • 23
  • 4
  • Hi John, the arguments parameter can get either an array or a scalar (passed as the first argument to the method). the list parameter is an array of id's, yes ... – Ofir Mar 06 '13 at 16:12
  • Frustrating, I'm sure. I'll play a little myself this afternoon. Out of curiosity, is the RemoteObject PHP, Colfusion CFC, or what? Is it getting the primary call and id is simply null when it hits? – John Hall Mar 06 '13 at 20:06
  • The server is in transition from PHP to Python. In both, the id is received as the following object '{u'source': u'event', u'sourceKey': u'list'}' – Ofir Mar 07 '13 at 07:22