|
Hello all,
I've just run into a possible bug when using xxforms:maxlength on an xforms:input that is initially non-relevant. The maxlength attribute is not being applied when the input becomes relevant. I'm currently using a fairly recent nightly build of Orbeon. Here is the code that doesn't work:
XHTML:
<xforms:input id="applicant-guardian-name-control"
bind="applicant-guardian-name-bind" xxforms:maxlength="50"> <xforms:label ref="$form-resources/applicant-guardian-name/label" /> <xforms:alert> <xforms:output value="if(string-length(.) gt 50) then ('Exceeds 50 character limit') else 'Required'" /> </xforms:alert> </xforms:input>
Bind:
<xforms:bind id="applicant-guardian-name-bind" nodeset="LegallyResponsiblePerson/LegalRepresentivesName"
type="xs:string" xxforms:default="xxforms:get-request-attribute('applicantGuardianName')"
constraint="string-length(.) le 50" relevant="instance('fr-form-instance')/ApplicantInformation/PersonalDetails/ResponsibilityHasGuardian cast as xs:integer = 2" required="true()"/>
If I remove the relevant attribute, the maxlength is applied successfully. Is there something I'm missing?
|