Two separate repeats with the same nodeset - one editable and second readonly

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

Two separate repeats with the same nodeset - one editable and second readonly

Jarosław Kowalewski
Hi.
Let's consider example  below. I want to have two repeats with the same nodeset but one editable and second one readonly. Is it possible? 
Or there is another way to disable all buttons in the repeat configuraiton? 

<root>
<Items>
<Item>
<Name>Name1</Name>
<Costs>
<Cost>
<Category>A</Category>
<Value>1</Value>
</Cost>
<Cost>
<Category>B</Category>
<Value>2</Value>
</Cost>
</Costs>
            <TotalCost>3</TotalCost>
</Item>
</Items>
</root>

<!-- EDITABLE -->
<xf:repeat nodeset="/root/Items/Item">
    <!-- NAME input -->
    <xf:repeat nodeset="Costs/cost">
        <!-- COST fields -->
    </xf:repeat>
</xf:repeat>

<!-- NON-EDITABLE summary part -->
<xf:repeat nodeset="/root/Items/Item" readonly="true()">
     <xf:output ref="Name"/>
     <xf:output ref="TotalCost"/>
</xf:repeat>

BR,
Jarek

--
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: Two separate repeats with the same nodeset - one editable and second readonly

Alessandro  Vernet
Administrator
Hi Jarek,

In this case, you can just use an `<xf:input>` in the repeat where you want
users to be able edit the data, and an `<xf:output>` in the repeat where you
just want to show the values. Since the `<xf:output>` will be read-only by
default, you won't need to add any `<xf:bind readonly="…"/>`. You'll let me
know if this works for you.

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: Two separate repeats with the same nodeset - one editable and second readonly

Alessandro  Vernet
Administrator
Hi Jarek,

Did you get a chance to try using a mix of `<xf:input>` and `<xf:output>`,
depending on whether you want the data to be writeable or not? If so, did it
work for your use case?

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: Two separate repeats with the same nodeset - one editable and second readonly

Jarosław Kowalewski
Hi,
sorry for no replay. I wasn't enough precise. I needed a repeated section with a repeated grid inside but have disabled add/delete buttons for a section and only have it in the repeated grid. The workaround is to use min="1" max="1" in repeated section. 
I need to add a node on the section level in another place in the form and in that place without nested repeat inside. 

Jarek



2018-05-12 1:14 GMT+02:00 Alessandro Vernet <[hidden email]>:
Hi Jarek,

Did you get a chance to try using a mix of `<xf:input>` and `<xf:output>`,
depending on whether you want the data to be writeable or not? If so, did it
work for your use case?

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: Two separate repeats with the same nodeset - one editable and second readonly

Alessandro  Vernet
Administrator
OK Jarek, I'm not sure to fully understand, but I'm glad you found a solution
to 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