Problem with scrollable checkbox not retaining selection

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

Problem with scrollable checkbox not retaining selection

James Newcombe
I have a curious problem with scrollable checkboxes.

I had a number of standard dropdowns, populated on form load with data from an underlying SQLServer database, and that worked perfectly. I was asked to make them multi-select dropdowns, which translates to a scrollable checkbox. I did that, linked them to the action/DB service that populated the previous dropdowns, and now they don't work so well.

What I'm seeing is that the scrollable list is populated on form load as the previous dropdown was, but when I select an option from the list the form 'reloading' indicator comes up to indicate that the form is talking to the server, and anything I selected in the scrollable checkbox is unselected when the form refresh is complete. The rest of the form is as I left it.

I'm on Orbeon 4.8.0.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scrollable checkbox not retaining selection

Alessandro  Vernet
Administrator
Hi James,

Are you saying that the reload indicator stays "stuck", that is the doesn't go away when you select something in the scrollable checkbox list? What do your service/action do? Are they just running just when the form loads, or also when a selection is made?

Alex

On Wed, Mar 11, 2015 at 7:16 AM James Newcombe <[hidden email]> wrote:
I have a curious problem with scrollable checkboxes.

I had a number of standard dropdowns, populated on form load with data from
an underlying SQLServer database, and that worked perfectly. I was asked to
make them multi-select dropdowns, which translates to a scrollable checkbox.
I did that, linked them to the action/DB service that populated the previous
dropdowns, and now they don't work so well.

What I'm seeing is that the scrollable list is populated on form load as the
previous dropdown was, but when I select an option from the list the form
'reloading' indicator comes up to indicate that the form is talking to the
server, and anything I selected in the scrollable checkbox is unselected
when the form refresh is complete. The rest of the form is as I left it.

I'm on Orbeon 4.8.0.

--
View this message in context: http://discuss.orbeon.com/Problem-with-scrollable-checkbox-not-retaining-selection-tp4659658.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
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].

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scrollable checkbox not retaining selection

James Newcombe
Alex,

No, the reload indicator is behaving as normal. I see it flashing happily away in the top left of the screen every 30 seconds or so.

I have a database service that selects two columns from a database (probably 50 rows of information). There is an action that uses that to populate the label/value pair in a scrollable checkbox. The action was set to trigger on form load, run always. Set like that, it happily populates a dropdown menu from which I select a single value. It will also populate a scrollable checkbox, and if I'm quick I can select multiple values, but as soon as the reload indicator flashes the checkboxes in the scrollable checkbox get reset. When it was a single-choice dropdown menu, it worked as expected, with no resetting of the selected value.

I tried setting the action to trigger on form load, and run on creation only, and the scrollable checkbox doesn't get populated at all, althought it will now let me set multiple checks from the 'first choice, second choice, third choice' defaults, and it doesn't reset them when the reload indicator flashes.

James.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scrollable checkbox not retaining selection

Alessandro  Vernet
Administrator
Hi James,

First, you don't want to mark an action you use to populate a selection control as running on creation only: the choices are not persisted with the data, so if you don't run the service at least on every form load, when users edit existing data, the list will be empty.

I am trying to reproduce this with this form: https://gist.github.com/avernet/960c1d46d6cab757e1b4. Things are working for me, but you have to be careful: the values for your choices must be different, and must not contain any space. The issue you're describing sounds like something that would happen if you have spaces in the values. If the values "naturally" have spaces, you can replace the spaces by some other character, as done in the sample form linked above. Could that explain your problem?

Alex

On Wed, Mar 11, 2015 at 9:26 AM James Newcombe <[hidden email]> wrote:
Alex,

No, the reload indicator is behaving as normal. I see it flashing happily
away in the top left of the screen every 30 seconds or so.

I have a database service that selects two columns from a database (probably
50 rows of information). There is an action that uses that to populate the
label/value pair in a scrollable checkbox. The action was set to trigger on
form load, run always. Set like that, it happily populates a dropdown menu
from which I select a single value. It will also populate a scrollable
checkbox, and if I'm quick I can select multiple values, but as soon as the
reload indicator flashes the checkboxes in the scrollable checkbox get
reset. When it was a single-choice dropdown menu, it worked as expected,
with no resetting of the selected value.

I tried setting the action to trigger on form load, and run on creation
only, and the scrollable checkbox doesn't get populated at all, althought it
will now let me set multiple checks from the 'first choice, second choice,
third choice' defaults, and it doesn't reset them when the reload indicator
flashes.

James.

--
View this message in context: http://discuss.orbeon.com/Problem-with-scrollable-checkbox-not-retaining-selection-tp4659658p4659662.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
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].

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scrollable checkbox not retaining selection

James Newcombe
Alex,

The values do have spaces. Assuming that the PDF shows the labels of the selected choices rather than the values (and I haven't tried to produce one to check), replacing the spaces would be OK for this application, but not for everything we're planning

I'll try that and let you know if it works.

Thanks,
James.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scrollable checkbox not retaining selection

Alessandro  Vernet
Administrator
Hi James,

OK, if your values have spaces, I would say that this is very likely the reason for the problem you're seing. You'll let us know if replacing the spaces by some other character works for you.

Alex

On Fri, Mar 13, 2015 at 3:02 AM James Newcombe <[hidden email]> wrote:
Alex,

The values do have spaces. Assuming that the PDF shows the labels of the
selected choices rather than the values (and I haven't tried to produce one
to check), replacing the spaces would be OK for this application, but not
for everything we're planning

I'll try that and let you know if it works.

Thanks,
James.

--
View this message in context: http://discuss.orbeon.com/Problem-with-scrollable-checkbox-not-retaining-selection-tp4659658p4659668.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
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].

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scrollable checkbox not retaining selection

James Newcombe
Alex,

That seems to have worked perfectly, thanks.

James.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with scrollable checkbox not retaining selection

Alessandro  Vernet
Administrator
Hi James,

Perfect, and thank you for confirming this.

Alex

On Fri, Mar 13, 2015 at 5:36 PM James Newcombe <[hidden email]> wrote:
Alex,

That seems to have worked perfectly, thanks.

James.

--
View this message in context: http://discuss.orbeon.com/Problem-with-scrollable-checkbox-not-retaining-selection-tp4659658p4659675.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.com.

--
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].

--
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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet