Strange bug in xforms repeat in Orbeon 2018.1CE

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

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Alessandro  Vernet
Administrator
Hi Gerrit,

Indeed, maybe not. What is the use case for making such a distinction? That
is, what action would you like to take if users switch to another iteration
that you don't want to take if that switch is done because of, say, an
instance replacement?

-Alex

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

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Gerrit Boers
Hi Alex,

Here’s a screenshot of the application I’m working on:
It’s essentially a master-detail view with a search function and result view and below a detail view of the selected concept. When a user changes the selection in the result the detail should change accordingly, so far so good. The user can define a value set using the buttons in the detail view. After each action the search result is validated against the value set definition, this no longer works because the index is moved to the last position after instance replacement. Storing and restoring the index position does not work in this case because the user can navigate (using the links in the detail view) to a concept not in the search result, hence the need for a separate nodeset-changed event to distinguish user actions from system actions. The way it is now (Orbeon 2018) there’s no distinction anymore as the index-changed event will now always fire when the nodeset is replaced, this is a significant change of behaviour from the last version. IMHO the index-chaged event should not fire when a nodeset is replaced.

Kind regards,

Gerrit



On 1 Oct 2018, at 22:58, Alessandro Vernet <[hidden email]> wrote:

Hi Gerrit,

Indeed, maybe not. What is the use case for making such a distinction? That
is, what action would you like to take if users switch to another iteration
that you don't want to take if that switch is done because of, say, an
instance replacement?

-Alex

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

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Alessandro  Vernet
Administrator
Hi Gerrit,

I am not sure I am following: if the "detail" part is updated when the
current selected line in the "master" is updated, wouldn't you want that to
happen if users change the selection, say with a click, but *also* if the
selection changes for some other reason, say a search returning new items?

-Alex

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

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Gerrit Boers
Hi Alex,

Sure, when the user changes the selection in the repeat the detail view should be updated. But while composing a value set in the detail view the the search result is validated against the value set, the content of the repeat does not change in this case just some item attribute indicating wether an item is in the set or not. The index should not change because the context in the detail view will be lost. Because the user can use the detail view to navigate to a concept not present in the repeat I cannot use a stored index position to restore the concept in detail view.
I guess I have to figure something out using a separate instance for the validation part of the items in the repeat.

Kind regards,

Gerrit

> On 2 Oct 2018, at 18:02, Alessandro Vernet <[hidden email]> wrote:
>
> Hi Gerrit,
>
> I am not sure I am following: if the "detail" part is updated when the
> current selected line in the "master" is updated, wouldn't you want that to
> happen if users change the selection, say with a click, but *also* if the
> selection changes for some other reason, say a search returning new items?
>
> -Alex
>
> -----
> --
> Follow Orbeon on Twitter: @orbeon
> Follow me on Twitter: @avernet
> --
> Sent from: http://discuss.orbeon.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].
Reply | Threaded
Open this post in threaded view
|

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Alessandro  Vernet
Administrator
Hi Gerrit,

So if I understand you, as users type in fields inside the repeat, you are
submitting the whole instance, which comes back with some annotation
informing you about fields validity, and when that happens you don't want
the index be reset. Is that an accurate summary the problem?

-Alex

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

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Gerrit Boers
Hi Alex,

Yes, this is exactly the case.

Kind regards,

Gerrit

> On 4 Oct 2018, at 18:50, Alessandro Vernet <[hidden email]> wrote:
>
> Hi Gerrit,
>
> So if I understand you, as users type in fields inside the repeat, you are
> submitting the whole instance, which comes back with some annotation
> informing you about fields validity, and when that happens you don't want
> the index be reset. Is that an accurate summary the problem?
>
> -Alex
>
> -----
> --
> Follow Orbeon on Twitter: @orbeon
> Follow me on Twitter: @avernet
> --
> Sent from: http://discuss.orbeon.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].
Reply | Threaded
Open this post in threaded view
|

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Alessandro  Vernet
Administrator
OK Gerrit, then I would try the following:

1. Before running the submission, call `xxf:index()` and save the current
index somewhere, in some node of an instance.
2. On `xforms-submit-done`, call `xf:setindex()` with the value you saved.

You'll let us know if this works.

https://doc.orbeon.com/xforms/xpath/extension-functions/extension-controls#xxf-index

-Alex

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

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

General Brainworking
Hi Alex,

This will not work because the user can navigate (in the detail view) away from the concepts in the repeat so storing and restoring the index does not work. I came up with workaround by using a separate instance for the validation so I was able to solve this particular issue but then I ran into the next problem (see other mail).


Kind regards,

Gerrit

> On 5 Oct 2018, at 20:52, Alessandro Vernet <[hidden email]> wrote:
>
> OK Gerrit, then I would try the following:
>
> 1. Before running the submission, call `xxf:index()` and save the current
> index somewhere, in some node of an instance.
> 2. On `xforms-submit-done`, call `xf:setindex()` with the value you saved.
>
> You'll let us know if this works.
>
> https://doc.orbeon.com/xforms/xpath/extension-functions/extension-controls#xxf-index
>
> -Alex
>
> -----
> --
> Follow Orbeon on Twitter: @orbeon
> Follow me on Twitter: @avernet
> --
> Sent from: http://discuss.orbeon.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].
Reply | Threaded
Open this post in threaded view
|

Re: Strange bug in xforms repeat in Orbeon 2018.1CE

Alessandro  Vernet
Administrator
Hi Gerrit, I don't quite get what you mean by "the user can navigate away
from the concepts in the repeat so storing and restoring the index does not
work", but if you have a workaround (which we can discuss in another
thread), we can leave it at that ;).

-Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.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].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
12