質問

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

役に立ちましたか?

解決

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;
}
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top