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.
1
votes
2 Answers
0
votes
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>