Tab View - Label generated by xforms:output does not work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Tab View - Label generated by xforms:output does not work

inanda.menezes
I have to use xforms:output as a content of the tab label, but it seems that it is not possible to access models and instances.

Code:

<fr:tabview>
<fr:tab id="exttab">
<fr:label><xforms:output ref="exttab/label"/><xhtml:span class="error"><xforms:output ref="exttab/countfilledtabs"/></xhtml:span> </fr:label>
</tab>
</fr:tabview>

It will not be able to find the reference and the label will be empty.

I also tried to define the model attribute, but it shows the following error: (Reference to non-existing model id: fr-form-model)

I am sure that the XPath expression is correct, because if I use the xforms:output outside the fr:label tag, then the value is printed.
Reply | Threaded
Open this post in threaded view
|

Re: Tab View - Label generated by xforms:output does not work

inanda.menezes
Hi all,

The problem was with the Tab view XBL component.
The content was in inner scope.

I have changed the following code of this XBL component:

Before
<xsl:when test="empty($label/(@ref | @bind | @value))">   
         <xsl:copy-of select="$label/node()"/>
 </xsl:when> 

After
 <xsl:when test="empty($label/(@ref | @bind | @value))">
    <xforms:group xxbl:scope="outer">
         <xsl:copy-of select="$label/node()"/>
     </xforms:group>
 </xsl:when>


Now, I am able to access the models and instances.
Reply | Threaded
Open this post in threaded view
|

Re: Tab View - Label generated by xforms:output does not work

Alessandro  Vernet
Administrator
Hi Inanda,

This is a good change, and I merged it in. It will be in the next nightly build. We haven't thought that you could put XForms (instead of just text) inside the <fr:label>. I also used appearance="xxforms:internal" on the group, so no markup is generated for this group in the HTML, which, when not needed, is always a good thing to do as it makes the HTML lighter.

https://github.com/orbeon/orbeon-forms/commit/e2df1789bab519ffa3a64ba2ae53654fbfbc6a1a

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet