I have a button in an xpage application that executes some server side javascript when clicked.
After upgrading the server to version 8.5.1 this button no longer worked (set a sessionScope variable and refresh the page, but a print() statement doesn’t get executed either).
I finally found that the server side javascript does not get executed when I:
-
put the button in a custom control (CC_1)
-
put the custom control in another custom control (CC_2)
-
add a new custom property “property_1” to CC_2 with a default value of “yes”
-
drag CC_2 on an xpage ( in the source you see: <xc:CC_2 property_1=“yes”></xc:CC_2> )
-
in CC_2 put a “visible when” formula on CC_1: compositeData.property_1 == “yes”
The script in the button executes fine until the final step.
With another “Visible when” formula the button works fine.
When I use compositeData.property_1 somewhere else on CC_2 (in a computed field) everything works fine.
But when I try to create a workaround by adding a computed field with value compositeData.property_1 and put
getComponent(“computedField1”).getValue() in the “Visible when” formula I have the same problem again.
I solved it for now (by using the same formula in my “Visible when” as I use to calculate the custom property), I justed wanted to share.