Re: Re: Re: Error-Summary fr:accordion
Posted by
bsteuhl on
Mar 29, 2011; 1:37pm
URL: https://discuss.orbeon.com/Error-Summary-fr-accordion-tp3016416p3414831.html
Alex,
Getting back to this since it is now coming close to being rolled out in a production environment. I unpacked orbeon-resources-private.jar and opened up the accordion.xbl file. At the bottom of the code is where you set focus of the control through the label. I have attempted to add the toggle action as you mention above to this action but it does not expand the case. Any insight would be helpful.
The short term was just to hard code in the case id to test:
<xforms:action ev:event="DOMActivate">
<xforms:dispatch target="intakeInformation" name="fr-toggle" />
<xforms:setfocus control="{{$effective-id-outer}}" xxbl:scope="outer"/>
</xforms:action>
and then to replace the hard code id with a dynamic id. This would be as you mentioned above a naming convention in the control id in which the second part of the id would be the case id. For example, a case with id='intakeInformation' and a control id within this case id="control1-intakeInformation'. Then within the xbl, create a variable as follows:
<xxforms:variable name="target" as="element(error)" select="substring-after($error/@id, '-')"/>
And then implement the toggle and the setfocus.
<xforms:action ev:event="DOMActivate">
<xforms:dispatch target="$target" name="fr-toggle" />
<xforms:setfocus control="{{$effective-id-outer}}" xxbl:scope="outer"/>
</xforms:action>
I attempted above recompiling the jar file and restarting server, but the code does not work. Where I am going wrong? Is this possible as I have described above?
Thanks
Brian Steuhl
BTM Software Solutions