Login  Register

Re: Re: Error-Summary fr:accordion

Posted by bsteuhl on Oct 28, 2010; 3:51pm
URL: https://discuss.orbeon.com/Error-Summary-fr-accordion-tp3016416p3017517.html

I have a dialog that opens up and the id includes the path to the case and I take the substring after the - which provides me with the case and then I toggle there and setfocu to control.  See below.

<xxforms:dialog id="errorsDialog" level="modeless" appearance="full" close="true" draggable="true" visible="false">
                <xforms:group>
                                    <xforms:group ref="instance('errors-instance')">
                                      <xforms:group ref=".[error]">
                                          <xhtml:table class="errors-table">
                                              <xhtml:tr>
                                                  <xhtml:th colspan="3" class="error-title">
                                                     <xforms:output value="concat('Your Form Has ', count(error), ' ', if (count(error) &gt; 1) then 'Items That Require Attention' else 'Item That Requires Attention')"/>
                                                  </xhtml:th>
                                              </xhtml:tr>
                                              <xhtml:tr>
                                                    <xhtml:th style="text-align:center">Location</xhtml:th>
                                                    <xhtml:th style="text-align:center">Message</xhtml:th>
                                                    <xhtml:th style="text-align:center">Row</xhtml:th>
                                              </xhtml:tr>
                                              <xforms:repeat nodeset="error" id="errors-repeat">
                                                  <xhtml:tr>
                                                      <xhtml:th>
                                                          <xforms:trigger class="triggerErrorLoc">
                                                              <xforms:label><xforms:output value="substring-after(@id, '-')"/></xforms:label>
                                                              <xforms:action ev:event="DOMActivate">
                                                                  <xforms:toggle case="{substring-after(@id, '-')}"/>
                                                                  <xforms:setfocus control="{@id}"/>
                                                              </xforms:action>
                                                          </xforms:trigger>
                                                      </xhtml:th>
                                                      <xhtml:td>
                                                          <xforms:output value="@alert"/>
                                                      </xhtml:td>
                                                       <xhtml:td>
                                                          <i>
                                                              <xforms:output value="if (string-length(@indexes) > 0) then concat('(Row ', @indexes, ')') else ''"/>
                                                          </i>
                                                      </xhtml:td>
                                                  </xhtml:tr>
                                              </xforms:repeat>
                                          </xhtml:table>
                                      </xforms:group>
                                      <xforms:group ref=".[not(error)]">
                                          <xhtml:table class="no-errors-table">
                                              <xhtml:tr>
                                                  <xhtml:th colspan="3" class="no-error-title">
                                                      Your Form Does Not Have Any Errors/Omissions
                                                  </xhtml:th>
                                              </xhtml:tr>
                                          </xhtml:table>
                                      </xforms:group>
                                  </xforms:group>
                                </xforms:group>
                </xxforms:dialog>
 

Brian Steuhl
website: http://BTMSoftwareSolutions.com
business email: [hidden email]
cell: 908-421-0742

home office: 732-961-3187
RSS Feed To My Blog:

Business Process Modeling - BTMSoftwareSolutions.com




From: Alessandro Vernet <[hidden email]>
To: [hidden email]
Sent: Thu, October 28, 2010 11:31:04 AM
Subject: [ops-users] Re: Error-Summary fr:accordion

Brian,

How to you handle this when the controls are in a number of <xforms:case>?

Alex

On Wed, Oct 27, 2010 at 5:10 PM, bsteuhl <[hidden email]> wrote:

>
> Is there anyway to have the accordion case open if it is closed where a
> control is located with an error when the user selects the link in the
> error-summary?  Currently if you select the link nothing happens if the
> accordion case is closed.  In the switch case I was able to have code that
> would take them to the correct case and the control.  But in the xbl
> component how would this be done?
>
> Thanks.
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Error-Summary-fr-accordion-tp3016416p3016416.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> 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
>
>



--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet



--
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