Good Morning,
I am currently experiencing a problem with the client side validation on
the tr:selectOneRadio component. The xhtml for this component appears
as follows:
<tr:selectOneRadio
id="gender"
layout="vertical"
label="#{bundle.bioGender}"
required="true"
value="#{visit.candidate.gender}"
disabled="#{formReadOnly}"
shortDesc="#{bundle.bioGender}">
<f:selectItems value="#{applicationSelectItems.genderList}" />
</tr:selectOneRadio>
This is wrapped in a tr:form and the body uses the normal xhtml <body>
tag. The problem is that if this is the first element validated via the
JavaScript when the form is submitted, an error occurs and the
submission process aborts. No validation message occurs and as no post
back has taken place, no messages etc are rendered. The user thus gets
no feedback other than a form that fails to submit. However, if there
are more required components with no values and a tr:selectOneRadio
iteem is not first in the list validated, then the clientside message
appears correctly and lists the tr:selectOneRadio as requiring a value.
Using FireBug in FireFox, the JavaScript stack trace shows the problem
occurring as follows:
a0.ownerDocument has no properties Common11-m7.js (line 4507)
_isShowing Common11-m7.js
(line 4507)
_setFocus Common11-m7.js
(line 4240)
_multiValidate Common11-m7.js
(line 4332)
_personalDataValidator personalDetails.x...
(line 234)
_validateForm Common11-m7.js
(line 3484)
submitForm Common11-m7.js
(line 3735)
onclick
personalDetails.x... (line 1)
The actual code affect appears as:
4505
if(!_agent.isNav&&!_agent.isSafari&&!_agent.isPIE&&!_agent.isBlackBerry)
4506 {
4507 var a2=a0.ownerDocument.defaultView.getComputedStyle(a0,
4508 null);
4509 return((a2["visibility"]!="hidden")&&
4510 (a2["display"]!="none"));
4511}
The inspector shows a0 as an array with 2 elements:
0 - <input id="gender:_0"> etc
1 - <input id="gender:_1"> etc
Has anyone else experienced this problem? Or should I have trh tags or
some other item that could be missing. I can work around this by using
the following, but this skips the client side validation.
<tr:panelLabelAndMessage
for="gender"
label="#{bundle.bioGender}"
shortDesc="#{bundle.bioGender}"
showRequired="true">
<h:selectOneRadio
id="gender"
layout="pageDirection"
label="#{bundle.bioGender}"
required="true"
value="#{visit.candidate.gender}"
disabled="#{formReadOnly}" >
<f:selectItems value="#{applicationSelectItems.genderList}" />
</h:selectOneRadio>
<tr:message
for="gender" />
</tr:panelLabelAndMessage>
Additional information that may be helpful appears as follows:
Using: Facelets 1.1.11
Sun Java System Application Server 9_01 patch 1
JDK 1.6.0
JSF 1.2 faces-1_2-070102 branch
Is this a known error or my error ?
Thank you.
Regards,
Graeme Steyn
Senior Analyst/Programmer
Corporate Information Systems
Information Technology Division
Central Queensland University
Tel: +61 7 4930 9256
Fax: +61 7 4930 6814
E-mail: [EMAIL PROTECTED]
This e-mail message is intended only for the use of the individual or
entity to which it is addressed and may contain information that is
privileged, confidential and exempt from disclosure under applicable
law. If you are not the intended recipient, any dissemination,
distribution or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify me
immediately by facsimile or telephone.