Question

It is pleasure to ask you directly as you are the one of the author of "Xpages Extension library: Step by Step Guide to the Next Generation of Xpage Component".

This is a link Save button using SSJS does not open xe:dialog in web xpage but works on mobile xpage to a posted question.

In the above post save button is making sure that field has value based on the value of another field. If that field is blank, then this field must have value.

I also tried field validation with computed required value based on another field but that is also not working. Here is a code:

var checkBox31:com.ibm.xsp.component.xp.XspInputCheckbox = getComponent("checkBox31");
if (checkBox31.getValue()== '' | checkBox31.getValue()== null){
return true;
}
{
return false;
}

Your help will be greatly appreciated.

Thanks in advance

Best regards, Mohan Gangan

Was it helpful?

Solution

As posted in the duplicate question, the checkbox has a value of 'true' or 'false'.

var checkBox31:com.ibm.xsp.component.xp.XspInputCheckbox = getComponent("checkBox31");
if (checkBox31 != null && checkBox31.getValue()== 'false'){
    return true;
}else{
    return false;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top