In my sample project the UI is powered by JSF, overall application architecture is J2EE.
In a scenario,we have a page where we toggle between radio buttons and page reloads everytime we toggle, with different forms.
In specific we have three radion buttons namely x ,y and z.
When the default page loads x is selected and when i shift my selection to y the page reloads with different forms and no error is seen.
Next when i select z page reloads with different forms but error is displayed on the top of the page as below
"Validation error:Value is not valid."
Once the error is dispalyed on the page the error continues to remain eventhough we revert back the radio selection.
In the above case jsp calls the js and the snippet of the same is as below
JSP snippet:
-------------------
<TD><h:selectOneRadio styleClass="selectOneRadio" id="radio1"
value="#{sessionScope.sameJam}"
onclick=return jump_onclick(this,event);>
<f:select itemValue="x"
itemLabel="#{labels.label_x}" />
<f:select itemValue="y"
itemLabel="#{labels.label_y}" />
<f:select itemValue="z"
itemLabel="#{labels.label_z}" />
</h:selectOneRadio></TD>
JS snippet:
-----------------
function jump_onclick(thisObj,thisEvent){
thisObj.form.submit();
}
Java code:
-------------
protected HtmlSelectOneRadio getRadio1() {
if (radio1 == null) {
radio1 = (HtmlSelectOneRadio) findComponentInRoot("radio1");
}
return radio1;
Thanks in advance.
This message was edited 1 time. Last update was at 11/13/2007 20:15:43
|