Library section as repeatable in a Form Instances

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

Library section as repeatable in a Form Instances

bruno.buzzi
Alex,Erik, (Orbeon 2017.2)

This is about Form Instances.

A repeatable section (section-6) in a form has the following structure:
        [section-6]
                [section-6-iteration]
                        [command]sudo[/command]
                [/section-6-iteration]
                [section-6-iteration]
                        [command]startStone[/command]
                [/section-6-iteration]
        [/section-6]

But a section created from a Library has the following structure:
(in Library is section-2 in the host form is section-5)
        [section-5]
                [section-5-iteration]
                        [section-2-iteration]
                                [userName]juan[/userName]
                        [/section-2-iteration]
                [/section-5-iteration]
                [section-5-iteration]
                        [section-2-iteration]
                                [userName]pedro[/userName]
                        [/section-2-iteration]
                [/section-5-iteration]
        [/section-5]

Is this a feature or a bug ?

No preference for neither i just want to know the intented structure...
 
regards,
bruno

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

Re: Library section as repeatable in a Form Instances

Alessandro  Vernet
Administrator
Hi Bruno,

Are you saying that you get the second case by defining a section as
repeatable in the library, and then including it in a form?

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: Library section as repeatable in a Form Instances

Alessandro  Vernet
Administrator
Bruno, I tried to reproduce this on 2017.2, but marking the section as
repeated in the library has no effect, and when doing so in the host form, I
get the expected structure: `my-section/my-section-iteration`, assuming that
the section was named `my-section` in the host form. So I'll need more info
to be able to reproduce this one.

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: Library section as repeatable in a Form Instances

bruno.buzzi
This post was updated on .
Alex,

Test_Case.rar <http://discuss.orbeon.com/file/t374762/Test_Case.rar

I have attached 3 forms in order to reproduce this:
1) orbeon library
2) test library
3) test test

The form (3) is composed of sections of (1) and (2).

When save a form instance of (3) i got the "double xml node" structure.
(tested with MySql  and GemStone/S - same behaviour).

[section-5][section-5-iteration][section-2-iteration][users]bruno[/users][/section-2-iteration][/section-5-iteration][/section-5]

regards,
bruno

--
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 orbeon+unsubscribe@googlegroups.com.
To post to this group, send email to orbeon@googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Library section as repeatable in a Form Instances

bruno.buzzi
Alex,

I think (i have to confirm this) there is a problem when upgrading libraries
from XML format (upto 2017.1) to new XML format in 2017.2.

The element [fr:c y="1" x="1" w="6"] is not updated correctly.

regards,
bruno

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

Re: Library section as repeatable in a Form Instances

Alessandro  Vernet
Administrator
Hi Bruno,

With Orbeon Forms 2017.2, taking the 3 forms you provided, adding them to
Form Builder, publishing them, going to `/fr/test/test/new` adding items to
the first 2 repeated sections, and saving, I get the following in MySQL:

<form xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
fr:data-format-version="4.0.0">
    <section-1>
        <section-1-iteration>
            <command>a1</command>
        </section-1-iteration>
        <section-1-iteration>
            <command>a2</command>
        </section-1-iteration>
    </section-1>
    <section-5>
        <section-5-iteration>
            <section-2-iteration>
                <users>b1</users>
            </section-2-iteration>
        </section-5-iteration>
        <section-5-iteration>
            <section-2-iteration>
                <users>b2</users>
            </section-2-iteration>
        </section-5-iteration>
    </section-5>
    <section-4>
        <formId/>
    </section-4>
    <section-3>
        <phone/>
        <address/>
    </section-3>
    <section-2>
        <name/>
        <surname/>
    </section-2>
</form>

This looks right to me. Are you seeing something different? Should I follow
different steps to reproduce the issue you're seeing?

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: Library section as repeatable in a Form Instances

bruno.buzzi
Hi Alex,

Take a look at [section-5] node.
    <section-5>
        <section-5-iteration>
            <section-2-iteration>
                <users>b1</users>
            </section-2-iteration>
        </section-5-iteration>
        <section-5-iteration>
            <section-2-iteration>
                <users>b2</users>
            </section-2-iteration>
        </section-5-iteration>
    </section-5>

Section-5 is the name of the section on the host form but also there is a
node [section-2-iteration] which is the name of the section on the Lirabry.

Is this the normal behavior ?

[repeat-section]
   [host-form-section-name]
      [library-section-name]
         [field-name]


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

Re: Library section as repeatable in a Form Instances

Alessandro  Vernet
Administrator
Hi Bruno,

Yes! Apparently my eyes must not have been quite open when I wrote that
message :). I've created a bug (linked below), and we'll look into it. But
for now, you can just avoid this by not marking the section as repeated in
the library, correct? Or is there more to it?

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

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