ajax2
Ajax tag embedded -- Temperature Converter
event keyup reg-ex validation and multi-render with nested IDs. No need to specify IDs of parents
1. The Ajax2 constructor is called once, even though we have 2 h:forms, upon rendering. ( see Glassfish Log and line 20 of Ajax2.java)
2. Upon entering numbers in h:form id="idForm1" at LINE 34, we execute the inputText and we render all
ids that exits within h:form id="idForm1". We cannot render IDs outside this form.
We CANNOT render outPutText id_nested_cField2
3. Upon entering numbers in h:form id="idForm2" at LINE 51, we execute the inputText and we render all
ids that exists within h:form id="idForm2".
We CAN render outputText id_nested_cField2 becuase it is in within the form idForm2.
4. Upon every number typed in inputText id="id_in1" of form id="idForm1"
the constructor of the bean is called , then its setter. The output to celcius and the grown are called when we render.
5. The nested ID= id_nested_cField2 can be accessed only from with form
id="idForm2"
6. The command button of id=id_cm2 only updates the upper form with id="idForm1", because it has ajax=true
while the command button id=id_cm2 updates both upper and lpwer form forms
nested Ids
Temperature in Celsius: