XForm labels not disabled when inserting new instances

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

XForm labels not disabled when inserting new instances

jhumphries82
Hi

I'm fairly new to Orbeon Forms but I *think* I may have found some kind of bug.

I have an XForms with a number of input fields that only appear if a selection input is set to a certain value (using the 'relevant' attribute of xforms:bind).

It appears to work ok at first, but if I add in a new blank instance into the form instance (using a trigger), all the labels in the new instance are displayed (when they should be hidden by default). You can however get rid of them by cycling through the selection input.

I've uploaded my html source file to http://www.jah-dev.co.uk/research/orbeon/createPipe.xhtml and if you run this in Orbeon Forms you'll see the problem I'm experiencing.

On a partly related note, is there any possible way to display and hide triggers in a similar fashion?

This makes up part of my final year project, so I would really appreciate any help you can offer.

Thanks
Julian
Reply | Threaded
Open this post in threaded view
|

Re: XForm labels not disabled when inserting new instances

fl.schmitt
Hi,

jhumphries82 schrieb:

> I have an XForms with a number of input fields that only appear if a
> selection input is set to a certain value (using the 'relevant' attribute of
> xforms:bind).
>
> It appears to work ok at first, but if I add in a new blank instance into
> the form instance (using a trigger), all the labels in the new instance are
> displayed (when they should be hidden by default). You can however get rid
> of them by cycling through the selection input.
>
> I've uploaded my html source file to
> http://www.jah-dev.co.uk/research/orbeon/createPipe.xhtml and if you run
> this in Orbeon Forms you'll see the problem I'm experiencing.
I tested it in the online Sandbox [1] and couldn't reproduce the
problem. I suppose you want to hide the "Element to delete" / "Tag to
rename" fields until the component type was selected? This works
perfectly in the Sandbox. I used Firefox 2.0.0.11 under WinXP, maybe
it's a browser matter?

> On a partly related note, is there any possible way to display and hide
> triggers in a similar fashion?

You could use the ref attribute to conditionally hide the trigger. To do
so, one has to formulate the condition as a XPath predicate:
<xforms:trigger ref=".[condition]"> - if the condition evaluates to
false, there's no instance element as reference, so the trigger is hidden.

Alternatively, you could try to implement a "control instance" and set
the elements relevant / irrelevant with respect to the content of the
main data instance. Then you could ref(erence) the trigger to the
control instance.


HTH
florian


[1] http://www.orbeon.com/ops/xforms-sandbox/



--
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
Reply | Threaded
Open this post in threaded view
|

Re: XForm labels not disabled when inserting new instances

jhumphries82
Interesting - I have just tried it in the online sandbox too, and you're right it is fine. However, if I run the same file on my local installation (in the same browser - Firefox), I still have the problem. I'm running version 3.5.1.200703310056 and the online sandbox is running 3.6.0.200712071655 - is it likely that this is a recently fixed problem?

Thanks for the tips on controlling the display of triggers - I will give that a go...

fs(gmx) wrote
I tested it in the online Sandbox [1] and couldn't reproduce the
problem. I suppose you want to hide the "Element to delete" / "Tag to
rename" fields until the component type was selected? This works
perfectly in the Sandbox. I used Firefox 2.0.0.11 under WinXP, maybe
it's a browser matter?

> On a partly related note, is there any possible way to display and hide
> triggers in a similar fashion?

You could use the ref attribute to conditionally hide the trigger. To do
so, one has to formulate the condition as a XPath predicate:
<xforms:trigger ref=".[condition]"> - if the condition evaluates to
false, there's no instance element as reference, so the trigger is hidden.

Alternatively, you could try to implement a "control instance" and set
the elements relevant / irrelevant with respect to the content of the
main data instance. Then you could ref(erence) the trigger to the
control instance.

HTH
florian

[1] http://www.orbeon.com/ops/xforms-sandbox/
Reply | Threaded
Open this post in threaded view
|

Re: XForm labels not disabled when inserting new instances

Erik Bruchez
Administrator
Yes, this bug was fixed since 3.5.1.

-Erik

On Dec 11, 2007, at 3:43 AM, jhumphries82 wrote:

>
> Interesting - I have just tried it in the online sandbox too, and  
> you're
> right it is fine. However, if I run the same file on my local  
> installation
> (in the same browser - Firefox), I still have the problem. I'm running
> version 3.5.1.200703310056 and the online sandbox is running
> 3.6.0.200712071655 - is it likely that this is a recently fixed  
> problem?
>
> Thanks for the tips on controlling the display of triggers - I will  
> give
> that a go...
>
>
> fs(gmx) wrote:
>>
>> I tested it in the online Sandbox [1] and couldn't reproduce the
>> problem. I suppose you want to hide the "Element to delete" / "Tag to
>> rename" fields until the component type was selected? This works
>> perfectly in the Sandbox. I used Firefox 2.0.0.11 under WinXP, maybe
>> it's a browser matter?
>>
>>> On a partly related note, is there any possible way to display and  
>>> hide
>>> triggers in a similar fashion?
>>
>> You could use the ref attribute to conditionally hide the trigger.  
>> To do
>> so, one has to formulate the condition as a XPath predicate:
>> <xforms:trigger ref=".[condition]"> - if the condition evaluates to
>> false, there's no instance element as reference, so the trigger is  
>> hidden.
>>
>> Alternatively, you could try to implement a "control instance" and  
>> set
>> the elements relevant / irrelevant with respect to the content of the
>> main data instance. Then you could ref(erence) the trigger to the
>> control instance.
>>
>> HTH
>> florian
>>
>> [1] http://www.orbeon.com/ops/xforms-sandbox/
>>
>
> --
> View this message in context: http://www.nabble.com/XForm-labels-not-disabled-when-inserting-new-instances-tp14255079p14272384.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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