Home
TeamSite
TeamSite, LiveSite and OpenDeploy
Unable to trigger setReadOnly when using onReplicantAdded function
System
I have a very simple script that basically needs to set a text field within a replicant container to read only whenever a replicant is added.
This line is called in my fnInit script:
IWEventRegistry.addItemHandler("/promotions/message","onReplicantAdded",fnHandleImageSizeReadOnlyOnAdd)
and the script is straight forward:
function fnHandleImageSizeReadOnlyOnAdd(item)
var width = item.getChildByName("image_path_width").getName();
IWDatacapture.getItem(width).setReadOnly(true);
This doesn't work. I've done alerts to confirm it's getting the correct container path and I get the correct path (/promotions/message[2]/image_path_width). I can also change the script to setValue() and set that field value with no problem. BUT, it seems setReadOnly specifically does not work.
I'm wondering if anyone else has ever seen this issue and if there's any solution or workaround.
Find more posts tagged with
Comments
There are no comments yet