In Skyve is there a way of making a document in a listgrid not editable after zooming in?

Viewed 12

I have a list grid in a tab, which is populated by a query.

Is there anyway of disabling edits on this document when zooming in from this list grid? In particular the save on the action bar.

The document in question needs to be editable in another view so I can't do it with permissions.

I have considered using a proxy document and setting read only permissions, but the document contains a fairly in depth UI already and a few non-persisted calculated values i.e rather unpleasant to duplicate that in a proxy.

1 Answers

You could use a view parameter to inform a view condition as to when to disable the various widgets on the view.

In the calling view list grid...

<listGrid query="myQuery">
    <parameter name="edit" value="false" />
</listGrid>

In the document for the zoomed in view

<attributes>
    ...
    <boolean name="edit" persistent="false">
        ...
    </boolean>
</attributes>
<conditions>
    ...
    <condition name="editable">
        <![CDATA[
            other conditions && (! Boolean.FALSE.equals(edit))
        ]]>
    </condition>
</attributes>

In the zoomed in view

<view name="edit....>
    <parameter name="edit" />
    ...
    <actions>
        <save disabled="editable" />
    </actions>
</view>

OR if your list grid is already continuing on the conversation, you could use the stash to achieve the same thing.

Related