PlaceholderData combined usage Example

This example uses three separate ways of adding data to a placeholder. At the same time, it shows the usage of a default value in a FieldNames collection member in placeholder.

Smartsite SXML CopyCode image Copy Code
<se:placeholder localid="test" resultformat="{page.setforcedresult(this.result())}">
    <se:parameters>
        <se:parameter name="fieldnames">
            <se:collection>
                <se:member name="Nr" primarykey="true" type="integer"/>
                <se:member name="Name" type="string">Mies</se:member>
            </se:collection>
        </se:parameter>
        <se:parameter name="rowformat" trim="both">
            {this.field(1)}:{this.field(2)}{char.crlf()}
        </se:parameter>
    </se:parameters>
</se:placeholder>

<se:placeholderdata targetid="test">
    <se:parameters>
        <se:parameter name="columndata">
            <se:collection>
                <se:member>1</se:member>
                <se:member>Aap</se:member>
            </se:collection>
        </se:parameter>
    </se:parameters>
</se:placeholderdata>

<se:placeholderdata targetid="test">
    <se:collection>
        <se:member>2</se:member>
        <se:member>Noot</se:member>
    </se:collection>
</se:placeholderdata>

<se:placeholderdata targetid="test" value="3" />
Example Result CopyCode image Copy Code
1:Aap
2:Noot
3:Mies