1
votes

Is there a way to display views containing response documents in a dataView control that is included inside of XPages Mobile Controls? There does not appear to be a way to set a different column name to be used for response documents or to expand/collapse the response document.

2
Try to imagine, how should response view look like with mobile controls: dojotoolkit.org/reference-guide/1.8/dojox/….Frantisek Kossuth

2 Answers

0
votes

This isn't something that is available in the Data View for Mobile. A possible workaround would be to build something yourself using Repeats. In the meantime, we'll take this back and will look to build this into the Data View in the future for Mobile.

0
votes

The answer worked out to be to:

1) Build my own control that surrounds the dataView. I had this anyway.

2) Pass custom properties as needed, including a new one for responseColumn.

3) Instead of using a summaryColumn, use the summary facet

4) Place the code to display the normal column inside a control that has

rendered="#{javascript:viewEntry.getColumnIndentLevel()==0 || !compositeData.responseColumn}">

5) Place the code to display the response column inside a control that has

rendered="#{javascript:!(viewEntry.getColumnIndentLevel()==0 || !compositeData.responseColumn)}">

Example (here I am supporting multiple summary columns and a response column):

<xp:this.facets>
    <xp:div xp:key="summary">
        <xp:repeat value="#{compositeData.summaryColumns}" indexVar="summaryIndex"
            rendered="#{javascript:viewEntry.getColumnIndentLevel()==0 || !compositeData.responseColumn}">
                <xp:div style="float:left;margin-right:5px;">
                <xp:text>
                    <xp:this.value><![CDATA[#{javascript:try {viewEntry.getColumnValue(compositeData.summaryColumns[summaryIndex])} catch(e) {return ""};}]]></xp:this.value>
                </xp:text>
            </xp:div>
        </xp:repeat>
        <xp:text rendered="#{javascript:!(viewEntry.getColumnIndentLevel()==0 || !compositeData.responseColumn)}">
            <xp:this.value><![CDATA[#{javascript:try {return viewEntry.getColumnValue(compositeData.responseColumn)} catch(e) {return ""};}]]></xp:this.value>
        </xp:text>
    </xp:div>
</xp:this.facets>