Table or Spreadsheet visibility

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

Table or Spreadsheet visibility

akail
Hello,

Maybe You can help me. How in Orbeon can hide spreadsheet, like we can controls visibility in Orbeon contro-1 and etc.

For example, if you write in another field, which doesn't is in spreedsheet, number 2, then your spreedsheet become visible, others way it would be invisible.
Jez
Reply | Threaded
Open this post in threaded view
|

Re: Table or Spreadsheet visibility

Jez
HI Akail

Can you explain what you mean by spreadsheet?

How do you display it currently (before controlling its visibility)?

Regards

Jez
Reply | Threaded
Open this post in threaded view
|

Re: Table or Spreadsheet visibility

akail
In orben blog is display spreadsheet http://blog.orbeon.com/2013/10/spreadsheet-like-forms.html.

I just want create a table, in which user can set or select data. And this table must have visibility control. If I in previous field write for example if you have enter "2", then the table appears in other cases it is invisible.

When you create form with existing controls (input, radio and ...) its has visibility settings, but I create a table in source, writing <xh:tr>, <xh:td> and etc. so this table doesn't has a visibility settings automatically. So maybe you know how to do this?
Jez
Reply | Threaded
Open this post in threaded view
|

Re: Table or Spreadsheet visibility

Jez
This post was updated on .
Section visibility can be controlled programatically, so maybe the simplest way to do it would be to create a new section for the spreadsheet-type table.

By hand, I would create a run-time instance:

            <!-- Run-time instance to hold control details so that we can control visibility on sections, groups, buttons, etc. -->
            <xf:instance id="controls-instance">
                <controls>
                    <spreadsheet-section-control/>
                </controls>
            </xf:instance>

And a bind to include the logic (this one will show the section if control-1 contains '2'):

            <!-- Controls Data Binds -->
            <xf:bind id="controls-binds" ref="instance('controls-instance')">
                <xf:bind id="spreadsheet-section-control-bind" ref="spreadsheet-section-control"
                    name="spreadsheet-section-control" relevant="$control-1='2'"/>
            </xf:bind>

And the control:
     <fr:section id="spreadsheet-section-control" bind="spreadsheet-section-control-bind">
        <!--Your spreadsheet controls go here-->
     </fr:section>

Regards

Jez