t) Verify the most commonly uses attributes of this component.

i) Test Steps:

  1. drag a textField onto designer
  2. drag a button onto designer
  3. drag a message group onto designer
  4. drag a hiddenField onto designer
    1. bind its text value to #{Page1.textField1.text}
    2. add a length validator to it max=8, min=2
    3. right click in outline and add a validation event:

      info("hiddenField1: validate method called");

    4. right click in outline and add a processValue change event

      info("hiddenField1: processValueChange method called");

  5. drag a message component onto designer and set its for property to hiddenField1
  6. drag hiddenField2 onto designer and set its disabled property = true
  7. drag hiddenField3 onto designer and set its rendered property = false
  8. drag hiddenField4 onto designer and set its text to: Star light, star bright...
  9. drag hiddenField5 onto designer and set its converter to dateTimeConverter1
  10. drag hiddenField6 onto designer and set its immediate flag = true
  11. double click button and add following source:

    info("hiddenField1 has validator: " + hiddenField1.getValidator().getExpressionString());
    info("hiddenField2 is disabled: " + hiddenField2.isDisabled());
    info("hiddenField3 is rendered: " + hiddenField3.isRendered());
    info("hiddenField4 has text: " + hiddenField4.getValue());
    info("hiddenField5 has converter: " + hiddenField5.getConverter().toString());
    info("hiddenField6 is immediate: " + hiddenField6.isImmediate());

  12. deploy/run

 

o) Expected Results:

  1. enter a value in the field a press the button. (Note: validation does not get called)
    1. System Messages shows
      1. processValueChange
      2. hiddenField1 has validator: #{Page1.hiddenField1_validate}
      3. hiddenField2 is disabled: true
      4. hiddenField3 is rendered: false
      5. hiddenfield4 has text: Start light, Star bright...
      6. hiddenfield5 has converter: javax.faces.convert.DateTimeConverter@bb9819
      7. hiddenfield6 is immediate: true