From cce174cbdcb80eb1920ff932dcccee09014f0ef0 Mon Sep 17 00:00:00 2001 From: ebruchez Date: Tue, 13 Mar 2018 16:14:21 -0700 Subject: [PATCH] Fix #3513 "Wizard: cannot activate TOC subsection links" --- .../resources/xbl/orbeon/wizard/wizard.xbl | 25 +++++++++++++------ .../main/scala/org/orbeon/xbl/Wizard.scala | 6 ++--- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/form-runner/jvm/src/main/resources/xbl/orbeon/wizard/wizard.xbl b/form-runner/jvm/src/main/resources/xbl/orbeon/wizard/wizard.xbl index 3765792e7d..a26dee72cc 100644 --- a/form-runner/jvm/src/main/resources/xbl/orbeon/wizard/wizard.xbl +++ b/form-runner/jvm/src/main/resources/xbl/orbeon/wizard/wizard.xbl @@ -136,8 +136,8 @@ - - + + @@ -517,7 +517,7 @@ exists($next-top-level-case-id) and exists( index-of( - xxf:split(xxf:instance('available-sections')), + xxf:split(xxf:instance('available-top-level-sections')), frf:controlNameFromIdOpt(replace($next-top-level-case-id, '-case$', '')) ) )"/> @@ -553,13 +553,13 @@ + value="Wizard:gatherTopLevelSectionStatusJava($relevant-top-level-section-ids)"/> diff --git a/form-runner/jvm/src/main/scala/org/orbeon/xbl/Wizard.scala b/form-runner/jvm/src/main/scala/org/orbeon/xbl/Wizard.scala index db2ee44524..932ffa0f5c 100644 --- a/form-runner/jvm/src/main/scala/org/orbeon/xbl/Wizard.scala +++ b/form-runner/jvm/src/main/scala/org/orbeon/xbl/Wizard.scala @@ -79,8 +79,8 @@ object Wizard { findWizardVariableValue("fr-wizard-is-first-nav") exists booleanValue //@XPathFunction - def gatherSectionStatusJava(relevantTopLevelSectionIds: Array[String]): SequenceIterator = - gatherSectionStatus(relevantTopLevelSectionIds.to[List]) map { sectionStatus ⇒ + def gatherTopLevelSectionStatusJava(relevantTopLevelSectionIds: Array[String]): SequenceIterator = + gatherTopLevelSectionStatus(relevantTopLevelSectionIds.to[List]) map { sectionStatus ⇒ MapFunctions.createValue( Map[AtomicValue, ValueRepresentation]( (SaxonUtils.fixStringValue("name") , sectionStatus.name), @@ -136,7 +136,7 @@ object Wizard { case _ ⇒ false } - def gatherSectionStatus(relevantTopLevelSectionIds: List[String]): List[SectionStatus] = { + def gatherTopLevelSectionStatus(relevantTopLevelSectionIds: List[String]): List[SectionStatus] = { val topLevelSectionNamesWithErrorsMap = ErrorSummary.topLevelSectionsWithErrors(