BUG: The non-relevant fields having embedded output elements in label or hint elements are lost

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

BUG: The non-relevant fields having embedded output elements in label or hint elements are lost


i have found a bug that i think it relates to output's problems when
it is embeded into label or hints (i haven't checked alerts).

    on form construction,
    an xform control's data is non-relevant (so the controls gets born
as "hidden"),
    and this control contains labels or hints with embedded output
then when the relevancy changes (and the control becomes visible),
    the contents of labels or hints are not displayed!
    (The computed CSS properted 'display' is 'none'.)

NOTE that for our project, this is a show-stopper for 'relevant'
attribute since we prefer to be able to dynamically generate labels
and hints.

We managed to work-around this problem by using read-only property
(with display: hidden;), which does not have similar problems, BUT
makes validation code very complicated (since all data remain

I think there are similar open bugs, but i can't be sure that they
cover the above case, so i'm considering to post it separately.

Should i go and file the BUG?
(Also i need some help on how to make a test-case).

Here is a code reproducing the bug:
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/
  xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xsd="http://

<title>Irrelevant fields with an output-embeded-in-label</title>
<style type="text/css">
* :disabled { /*display: none;*/
  background-color: green;

<xf:model id="main-model">

  <xf:instance id="data">
    <root xmlns=""> <data1 /> <data2 /> <data3 /></root>

  <xf:bind id="data-data1" nodeset="data1" type="xsd:boolean" />
  <xf:bind id="data-data2" nodeset="data2" relevant="../data1 !=
'true'" />
  <xf:bind id="data-data3" nodeset="data3" relevant="../data1 =
'true'" />


<xf:input bind="data-data1" incremental="true">
  <xf:label>Switch vivibility of controls having labels-with-embedded-
output: </xf:label>

<p>The next input-control will keeps it's label and hint while
<p><xf:input bind="data-data2">
    <xf:output>Preserved Label: "</xf:output>
    <xf:output value="'Preserved Hint.'" />
<p>The next input-control will 'loose' it's label and hint!</p>
<xf:input bind="data-data3">
    <xf:output>Lost Label: "</xf:output>
    <xf:output value="'Lost hint!'" />

Thank you in advance,

dev-tech-xforms mailing list
[hidden email]