springjsffaceletsspring-webflowtrinidad

How to freeze or disable an update input form


I wonder if it is possible for me to freeze or disable the entire update form? I have an input h:form with a check box in it. when users check the box, I would like to freeze or disable the entire form so that disallow users from changing inputs.

Thanks, and I am using JSF, Spring Web Flow, Facelets, and Trinidad.


Solution

  • If you want to disable only certain inputs, It is a good idea to enumerate them:

    function OptCheckBox(chkd) {
     if (chkd == 'y') {
      document.frm.input1.disabled = true;
      document.frm.input2.disabled = true;
     }
    }