t) Verify the most commonly uses attributes of this component.
i) Test Steps:
- drag a textField onto designer
- drag a button onto designer
- drag a message group onto designer
- drag a hiddenField onto designer
- bind its text value to #{Page1.textField1.text}
- add a length validator to it max=8, min=2
- right click in outline and add a validation event:
info("hiddenField1: validate method called");
- right click in outline and add a processValue change event
info("hiddenField1: processValueChange method called");
- drag a message component onto designer and set its for property to hiddenField1
- drag hiddenField2 onto designer and set its disabled property = true
- drag hiddenField3 onto designer and set its rendered property = false
- drag hiddenField4 onto designer and set its text to: Star light, star bright...
- drag hiddenField5 onto designer and set its converter to dateTimeConverter1
- drag hiddenField6 onto designer and set its immediate flag = true
- 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());
- deploy/run
o) Expected Results:
- enter a value in the field a press the button. (Note: validation does not
get called)
- System Messages shows
- processValueChange
- hiddenField1 has validator: #{Page1.hiddenField1_validate}
- hiddenField2 is disabled: true
- hiddenField3 is rendered: false
- hiddenfield4 has text: Start light, Star bright...
- hiddenfield5 has converter: javax.faces.convert.DateTimeConverter@bb9819
- hiddenfield6 is immediate: true