<s:iterator value="fieldErrors">
<s:hidden value="%{value}" id="%{key}" />
</s:iterator>
Above, we are linking hidden textfield whose id equals to %{key}i.e. fieldError Textfield name and value equals to %{value} i.e. fieldError message.
By this way, we can take different actions on every FieldError:
On Body Onload Function, now we can check for different hidden textbox values as follows:
if(document.getElementById("FieldErrorTextBox1").value!="")
{
}
if(document.getElementById("FieldErrorTextBox2").value!="")
{
}
<s:hidden value="%{value}" id="%{key}" />
</s:iterator>
Above, we are linking hidden textfield whose id equals to %{key}i.e. fieldError Textfield name and value equals to %{value} i.e. fieldError message.
By this way, we can take different actions on every FieldError:
On Body Onload Function, now we can check for different hidden textbox values as follows:
if(document.getElementById("FieldErrorTextBox1").value!="")
{
}
if(document.getElementById("FieldErrorTextBox2").value!="")
{
}