Das Notes Forum

Domino 9 und frühere Versionen => ND8: Entwicklung - XPages => Thema gestartet von: oxyd21 am 25.07.11 - 12:08:32

Titel: [Erledigt] 2. Datasource in CustomControl
Beitrag von: oxyd21 am 25.07.11 - 12:08:32
Hi,

irgendwie Zweifel ich an mir selbst. Eine Custom Control, 2 Data Sources.

Die erste Source is das aktuelle Dokument, die zweite ein Konfig-Doc. Ich nehme die Kategorie des ersten und lese aus einem View die UNID des zweiten aus. Die ID passt.

Das komische ist aber, dass beim öffnen des Konfig-Docs nicht diese geöffnet wird, sondern die 2. Data Source gleich die erste ist.

Sieht jemand meinen Fehler?

VG, Michael

Code
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" xmlns:xe="http://www.ibm.com/xsp/coreex">

	<xp:this.data>
		<xp:dominoDocument var="document1" formName="faProject">
		</xp:dominoDocument>

		<xp:dominoDocument var="document2" action="editDocument"
			formName="faSetting">
			<xp:this.documentId><![CDATA[#{javascript:value=document1.getItemValueString("fdCategory");
if (value !="") {
	docID=@DbLookup(@DbName(), "LookupSettings",value,2);
	return docID;
}
return;}]]></xp:this.documentId>
		</xp:dominoDocument>
	</xp:this.data>

	<xp:table>
		<xp:tr>
			<xp:td>
				<xp:label value="Color:" id="fdColor1_Label1" for="fdColor11">
				</xp:label>
			</xp:td>
			<xp:td>
				<xp:inputText value="#{document2.fdColor1}" id="fdColor11">
				</xp:inputText>
			</xp:td>
		</xp:tr>
	</xp:table>
</xp:view>
Titel: Re: 2. Datasource in CustomControl
Beitrag von: atbits am 25.07.11 - 12:39:29
Verwende mal
Code
ignoreRequestParams
s.a.
http://www.jmackey.net/groupwareinc/johnblog/johnblog.nsf/d6plinks/GROC-7G3GF7

Grüße David
Titel: Re: 2. Datasource in CustomControl
Beitrag von: oxyd21 am 25.07.11 - 12:48:03
Das hat geholfen.

Danke.