I'm working with Orbeon in a Separate Deployment. Because of this,
I do not have access to XBL components such as the
fr:error-summary. So, I've created my own modal dialog box (defined
below). What I'm doing is displaying to the user a list of all of
the errors that currently exist in the form. To do this, I loop
through all of the items on the form and perform a
xxforms:invalid-binds() function call on that item. If bind id's
are returned, then the item has errors, and I display the id's of
the bindings as the error message. The full page and supporting
instance data samples are attached.
My question is, why, when I open this dialog, are there so many calls to setRepeatIterationRelevance? In my example, I have 4 different items that were invalid, but yet the setRepeatIterationRelevance method was called 62 times. This call is quite expensive in a larger form (such as the one I've attached). I tracked the caller to this function AjaxServer.handleResponseDom. It's iterating over the controls returned from the orbeon request, and if the relevant attribute was returned, then it calls the setRepeatIterationRelevance method. Is the server only filling in the relevant attribute for controls that need to be changed, or is it simply returning all controls and their relevancy status? If it is the latter, then I can see how a page with a lot of controls like mine would run into performance issues. I guess I'd like to know what the purpose of the call to setRepeatIterationRelevance is, and if there is something that I am doing to cause so many controls to be updated as apart of the Orbeon response? Thanks, <!-- Sample bind --> <xforms:bind id="[41]-Referral-Date-error:-Cannot-be-before-Date-of-Birth" nodeset="instance('odm-instance')//odm:ItemData[@ItemOID='41']/@Value" constraint="if ((normalize-space(instance('odm-instance')/odm:ClinicalData//odm:ItemData[@ItemOID = 6]/@Value)!='') and (. castable as xs:date)) then xs:date(.) >= xs:date(instance('odm-instance')/odm:ClinicalData//odm:ItemData[@ItemOID = 6]/@Value) else true()"/> <!-- Dialog box --> <xxforms:dialog id="errors-dialog" level="modal" close="false" draggable="false"> <xforms:label>Errors exist in the form</xforms:label> <xforms:group style="color:#ff0000; height:300px; width:400px; display:block" appearance="xxforms:fieldset" ref="if(instance('variables-instance')/ShowErrors = true()) then instance('odm-instance') else /NonExistentNode"> <xhtml:h1>Please correct the following errors:</xhtml:h1> <xhtml:ul style="overflow:auto; height:225px; width:375px;"> <xforms:repeat nodeset="instance('odm-instance')//odm:ItemData/@Value"> <xxforms:variable select="xxforms:invalid-binds(.)" name="invalid-binds"/> <xforms:group ref="if(count($invalid-binds) > 0) then . else /NonExistentNode"> <xforms:output value="string-join(for $bind in $invalid-binds return concat('<li>', replace($bind, '-', ' '), '</li>') ,'')" mediatype="text/html"/> </xforms:group> </xforms:repeat> </xhtml:ul> <xhtml:div align="center"> <xforms:trigger> <xforms:label> <xhtml:span>Close</xhtml:span> </xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance('variables-instance')/ShowErrors" value="false()"/> <xxforms:hide dialog="errors-dialog"/> </xforms:action> </xforms:trigger> </xhtml:div> </xforms:group> </xxforms:dialog> --
Jeremy Nix Senior Application Developer Cincinnati Children's Hospital Medical Center -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws patientdata.xml (15K) Download Attachment studydef.xml (567K) Download Attachment studydeftempl.xml (21K) Download Attachment output.xhtml (1M) Download Attachment |
Free forum by Nabble | Edit this page |