samples added for XPages design elements (.xsp) and affiliated NSF-based elements (.form, .view)

- demoServerRESTconsumption, src: https://gist.github.com/edm00se/15249dba8ff3fea38312, license: Creative Commons 3.0
- house.form, houses.view, house.xsp, src: https://github.com/edm00se/AnAppOfIceAndFire, license: Creative Commons 3.0
- UnpMainxsp, src: https://github.com/teamstudio/xcontrols-domino/blob/master/sampler-app/XPages/UnpMain.xsp, license: Apache v2.0
- xLogin.xsp, src: http://openntf.org/XSnippets.nsf/snippet.xsp?id=xpages-form-login-with-session-variable, license: Apache 2.0
This commit is contained in:
Eric McCormick
2015-06-04 22:09:49 -05:00
parent 0737a21e38
commit 5ac1e847a5
6 changed files with 480 additions and 0 deletions

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<xp:view
xmlns:xp="http://www.ibm.com/xsp/core">
<xp:this.beforePageLoad><![CDATA[#{javascript://import Java package
importPackage(co.3edesign.eric.restful);
var urlStr = "http://ajax.googleapis.com/ajax/services/feed/load?v=1.0&num=5&q=";
urlStr += "http://www.npr.org/rss/rss.php?id=1001";
var myStuff:JsonObject = CustRestConsumer.GetMyRestData(urlStr);
viewScope.myResp = fromJson(myStuff);}]]></xp:this.beforePageLoad>
<xp:dataTable
id="dataTable1"
rows="30"
var="rowData"
indexVar="rowCount">
<xp:this.value><![CDATA[#{javascript:var obj = viewScope.get("myResp");
return obj.responseData.feed.entries;}]]></xp:this.value>
<xp:column
id="column1">
<xp:this.facets>
<xp:panel
xp:key="header"
tagName="h1">
<xp:link
escape="true"
id="link1">
<xp:this.text><![CDATA[#{javascript:var obj = viewScope.get("myResp");
return obj.title;}]]></xp:this.text>
<xp:this.value><![CDATA[#{javascript:var obj = viewScope.get("myResp");
return obj.link;}]]></xp:this.value>
</xp:link>
</xp:panel>
</xp:this.facets>
</xp:column>
<xp:column
id="column2">
<xp:panel
tagName="h3">
<xp:link
escape="true"
id="link2"
text="#{javascript:rowData.title}"
value="#{javascript:rowData.link}">
</xp:link>
</xp:panel>
<xp:br></xp:br>
<xp:text
escape="false"
id="computedField2"
value="#{javascript:rowData.content}">
</xp:text>
<xp:br></xp:br>
</xp:column>
<xp:column
id="column3">
<xp:text
escape="true"
id="computedField3"
value="#{javascript:rowData.publishedDate}">
</xp:text>
</xp:column>
</xp:dataTable>
</xp:view>