acton before page load

We are in a real bind. How can we mimic the functionality of “Before Open” in an action sequence on a “form” or “Responsive Grid” for V2? Cannot move forward on V2 without this functionality.

Bill - lets step back and ask what you are trying to get done?  A grid does not typically have its own show / hide scenarios.  Any rendering control of the grid is going to happen in some parent component? You should be able to use the interaction on the parent component to trigger actions before exposing the grid. 

Sure.  Thanks, Rob. 
 I have an object that gets queried when loaded.  I have 6 other objects depending on the selection in a field in the first object.  The six other objects are not yet queried as we do not know the option selected. 

The user makes a selection and I save the first object by pressing the “Continue” button then and query the record again.

Each of the 6 objects has a collapsible wrapper that is “rendered” to show based on the different selections in the picklist in the first object.  I then create actions to  “set and activate the model condition”, then query the record.

This is a simple example.

Cheers,
Bill




Do you have an example code on how this would work?

All you are doing here can be bound to the continue button. 
1. Values from user selection field is passed into conditions on 6 "child"models
2. Models queried. 

Then rendering conditions on your wrappers are set on each of those 6 child models (or a combinations on conditions) and only show when there are records in those models. 

You could also do this set of actions whenever the user selection field is updated - but the constant re-query on user change might create a negative user experience. 

won’t that require querying all six models?

Not necessarily.  You could structure your action fwk sequence with a series of branch statements that look at your first model field and only trigger a model re-query if it has particular values. 

How do I do this without collapsable wrappers?
https://drive.google.com/file/d/119sX3vbz3KHs7XvgyfyHHz-xsPGnqYyh/view?usp=drivesdk

Here is the code.

<components>
    <grid uniqueid="sk-SXl-3913" columngutter="5px">
        <divisions>
            <division behavior="flex" minwidth="100px" ratio="1">
                <components>
                    <buttonset model="Offer_Main_Edit" uniqueid="sk-UGH-1774" position="left">
                        <buttons>
                            <button type="multi" label="Save" uniqueid="sk-UGH-1781" icon="sk-webicon-font-awesome:save">
                                <actions>
                                    <action type="save" rollbackonanyerror="true">
                                        <models>
                                            <model>Offer_Main_Edit</model>
                                            <model>Offer_Party_Person_1</model>
                                        </models>
                                        <onerroractions>
                                            <action type="blockUI" message="There was an error" timeout="3000"/>
                                        </onerroractions>
                                    </action>
                                    <action type="closeTopmostPopup"/>
                                </actions>
                            </button>
                        </buttons>
                    </buttonset>
                    
                </components>
            </division>
        </divisions>
        <styles>
            <styleitem type="background" bgtype="none"/>
        </styles>
    </grid>
    <richtext multiple="false" uniqueid="sk-XQ0-686">
        <contents>&amp;lt;p style="margin-left: 40px;"&amp;gt;&amp;lt;strong&amp;gt;&amp;lt;span style="font-size:18px;"&amp;gt;Seller(s)&amp;lt;/span&amp;gt;&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;
Seller Party 1 Seller Contract Name 1 Offer_Main_Edit Listing_Party_Person_1_Edit

Not sure if this is a fix.

We have several actions that occur on page load now.

We create an action sequence covering these actions all off that is of a type “event triggered” … we set this to run on event name “Skuid: page rendered”

Does the job perfectly.