xforms:set-value action raises IllegalStateException

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

xforms:set-value action raises IllegalStateException

Tars Joris-2

Hi,

 

When I run the attached form (dependent-lists.xhtml) with the latest release of Orbeon (orbeon-4.3.0.1.201308150213-CE), it does not behave as I’d expect. The attached error message is raised (log.txt).

 

It contains 3 select1 controls (in a repeat).

·         The first has two items, a and b (apart from the empty value).

·         The second’s items depend on the first’s value (if a is selected, it has items c and d).

·         The third’s items depend on the second’s value (if c is selected, it has items e and f).

 

Initially, a, c and e are selected. When you select b in the first dropdown, the error is raised.

 

I try to accomplish that the values of the second and the third dropdown are set to the empty string when their value becomes out-of-range. Unfortunately, the xforms-out-of-range is not triggered when the items of a dropdown change, but its value doesn’t (or am I missing something?). So I registered an event listener and searched for the dropdowns whose items depend on the current dropdown. If their value is out-of-range, I set it to the empty string (this action fails).

 

Am I doing something wrong or is there a better way to do this?

 

I use:

-          Apache tomcat 7.0.26

-          Windows 7

-          Chrome 30.0.1599.69 m

 

Thanks in advance,

 

Tars Joris

Development Manager

Inventive Designers




Inventive Designers' Email Disclaimer:
http://www.inventivedesigners.com/email-disclaimer

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].

log.txt (14K) Download Attachment
dependent-lists.xhtml (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xforms:set-value action raises IllegalStateException

Alessandro  Vernet
Administrator
Hi Tars,

Thank you for the easily reproducible test case. I was able to reproduce it and for now created an issue for this. We'll investigate this further and will let you know what we find.

https://github.com/orbeon/orbeon-forms/issues/1334

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: xforms:set-value action raises IllegalStateException

Erik Bruchez
Administrator
Tars,

This is because the action name is `<xf:set-value>` instead of `<xf:setvalue>`.

I have entered an RFE to output a "better" error message when that happens:

https://github.com/orbeon/orbeon-forms/issues/1337

-Erik
Reply | Threaded
Open this post in threaded view
|

Re: xforms:set-value action raises IllegalStateException

Tars Joris
Hi Erik and Alex,

Thanks for the quick response and the heads up.

It works perfectly now.

Kind regards,

Tars