Hi,
Before invoking the javascript client side json.getContentObject() method, I want to see the parameters for the json component. Their values sit in text boxes on my page. Two text boxes:
<text id="objectClass" label="ClassName"
/>
<text id="objectID" label="Id"
/>
I have tried the following:
var jprov=zen("json")
jprov.parameters['classname'].value=zen("objectClass").value
jprov.parameters['objectID'].value=zen("objectID").value
however, in the callback server side method pointed to by the attribute OnGetTargetObject:
Method GetJSONObject(ByRef pParameters,
Output pObject As %Library.RegisteredObject)
As %Status
{
set tStatus=$$$OK
set tClass=$g(pParameters("classname"))
set tID=$g(pParameters("objectID"))
quit:tClass="" $$$OK
quit:tID="" $$$OK
/// simplest case - return object
set pObject=$classmethod(tClass,"%OpenId",tID)
quit tStatus
}
This always QUITS, because ‘tClass’ and indeed pParameters is empty.
How can I programmatically set the parameters of the <jsonProvider> component from javascript ??
Thanks in advance –
Steve Pisani
--
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To post to this group, send email to InterSys...@googlegroups.com
To unsubscribe from this group, send email to InterSystems-Z...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/InterSystems-ZEN?hl=en
Zen Community Terms and Conditions: http://groups.google.com/group/InterSystems-ZEN/web/community-terms-and-conditions
---
You received this message because you are subscribed to the Google Groups "InterSystems: Zen Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to intersystems-z...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Dale –
Like this:
<jsonProvider id="json" OnGetTargetObject="GetJSONObject" >
<parameter paramName="classname" id="parClassname" />
<parameter paramName="objectID" id="parObjectID"/>
</jsonProvider>
Steve
Ok thanks.
For reference therefore:
Addressing the parameter directly rather than as an element of the property array associated with the jsonProvider component solved the problem:
So this works
zen(<idOfParameter>).value = <value>
and this does not:
var jprov=zen("json")
jprov.parameters[<paramName>].value=<value>
Thanks Dale.
(in truth I thought I had tried that and dismissed it, but I obviously did not…!)