Reputation: 315
I have an xe:dialog control on my xpage, with a view contol as a sort of picklist. The view shows entries of the current db. It's in a custom control, which is embedded in
A) an xpage with data of the current database,
B) an xpage with 2 data sources, doc1 is from a different db, doc2 is from the current db.
When I open (show) the dialog in case B), the view is always empty. The xpage B) is opened from a view of the different db.
the dialog code:
<xe:dialog id="diaSnippet" title="Textbaustein auswählen">
<xp:panel>
<xe:dialogContent id="dialogContent1">
<xp:panel>
<xp:inputText id="viwStartkey1"
value="#{viewScope.viwStartkey}">
</xp:inputText>
<xp:button iconAlt="Starts with" icon="/Search" id="bviwStartkey">
<xp:eventHandler event="onclick" submit="true"
refreshMode="partial" refreshId="viwOrgDB1">
</xp:eventHandler>
</xp:button>
<xp:viewPanel rows="30" id="viwOrgDB1" var="kbEntry">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager2">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1"
startKeys="#{javascript:if (hasContent(viewScope.viwStartkey)) viewScope.viwStartkey}"
keys="#{javascript:viewScope.UpdateField}" keysExactMatch="true"
viewName="lookupSnippet" databaseName="xpages\chhp1017.nsf">
</xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="ID" id="viewColumn1"
displayAs="link" openDocAsReadonly="true">
<xp:viewColumnHeader value="Kurzbez."
id="viewColumnHeader1">
</xp:viewColumnHeader>
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:var mySnippet = kbEntry.getColumnValue("Snippet");
fback.replaceItemValue(viewScope.UpdateField,mySnippet)
getComponent("diaSnippet").hide(viewScope.UpdateField + "1");
</xp:eventHandler>
</xp:viewColumn>
<xp:viewColumn columnName="Snippet" id="viewColumn2">
<xp:viewColumnHeader value="Textbaustein"
id="viewColumnHeader2">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="Comment" id="viewColumn3">
<xp:viewColumnHeader value="Kommentar"
id="viewColumnHeader3">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:panel>
</xe:dialogContent>
<xe:dialogButtonBar id="dialogButtonBar1">
<xp:panel>
<xp:button id="button3" value="OK">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action>
<xp:actionGroup>
<xp:executeScript>
<xp:this.script><![CDATA[#{javascript:getComponent("diaSnippet").hide()}]]></xp:this.script>
</xp:executeScript>
</xp:actionGroup>
</xp:this.action>
</xp:eventHandler>
</xp:button>
</xp:panel>
</xe:dialogButtonBar>
</xp:panel>
<xp:eventHandler event="onHide" submit="true"
refreshMode="norefresh">
</xp:eventHandler>
</xe:dialog>
I tried a few things with the data source of the dominoView, current db, chosen db like in my code above, computed db path, but all with the same result.
Looks for me as if the dialog only works when "everything" is from the current db.
Thanks in advance, Uwe
Upvotes: 1
Views: 254
Reputation: 315
Maybe it's of any interest ....:
We found the reason: The data definition of the view was missing the
ignoreRequestParams="true"
that does the trick.
Upvotes: 2