The Extension Library donated by IBM is very cool. It exposes a lot of the DOJO controls and includes a decent application layout control to jump start development.
However, the search results page is not done. Below is how we implemented this technique.
Note:
With advent of Content Security Policy (CSP), inline styles are blocked unless the site has "unsafe-inline". Before using this search form code, remove the styles by exporting to an existing or new style sheet.
In the Properties pane of the parent object, in the style tab, there will be Export and Clear buttons. Click the Export button, choose the style sheet to add the attributes and a desired class name for the element, click OK.
<?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"
xmlns:xc="http://www.ibm.com/xsp/custom">
<xc:OneUILayout navigationPath="/OneUI/SearchPage">
<xp:this.facets>
<xp:panel xp:key="LeftColumn" id="panel4">
<xc:LeftMain></xc:LeftMain>
</xp:panel>
</xp:this.facets>
<xp:panel>
<xp:label value="Selected Option:" id="label2" rendered="false"></xp:label>
<xp:inputText id="inputText2" value="#{param.option}" rendered="false"></xp:inputText>
<xp:br></xp:br>
<xp:label value="Search String: " id="label1"></xp:label>
 <xp:inputText id="inputText1" value="#{param.search}"></xp:inputText>
<xp:br></xp:br>
<xp:br></xp:br>
<xp:label value="Results:" id="label5"
style="font-weight:bold">
</xp:label>
<xp:viewPanel rows="10" id="viewPanel1"
pageName="/pgViewNLDoc.xsp">
<xp:this.facets>
<xp:panel xp:key="headerPager" id="panel2">
<xe:pagerExpand id="pagerExpand1"
for="viewPanel1">
</xe:pagerExpand>
<xp:pager partialRefresh="true"
layout="Previous Group Next" id="pager1">
</xp:pager>
</xp:panel>
<xp:panel xp:key="footerPager" id="panel3">
<xe:pagerSizes id="pagerSizes1" for="viewPanel1">
</xe:pagerSizes>
</xp:panel>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1" viewName="navInstType"
expandLevel="1">
<xp:this.search><![CDATA[#{javascript:var srchtyp = param.option;
var srchstr = param.search;
var srchskip = '';
if(srchtyp = 'c1') {
// instrument cat field search
"FIELD NL_InstType CONTAINS " + srchstr
} else if(srchtyp = 'c2') {
// name field search
"FIELD NL_Name CONTAINS " + srchstr
} else if(srchtyp = 'c0') {
// wildcard search, just search phrase entered
srchstr;
} else {
// invalid
srchskip;
}}]]></xp:this.search>
</xp:dominoView>
</xp:this.data>
<xp:viewColumn columnName="NL_InstType" id="viewColumn1"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Instrument Type"
id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_InstSubType" id="viewColumn2"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Inst. Sub Type"
id="viewColumnHeader2">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_BankType" id="viewColumn3"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Bank Type"
id="viewColumnHeader3">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_Bank" id="viewColumn4"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Bank Name"
id="viewColumnHeader4">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_BankSubType" id="viewColumn5"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Bank Sub Type"
id="viewColumnHeader5">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_Number" id="viewColumn6"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Number"
id="viewColumnHeader6">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_Name" id="viewColumn7"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Name"
id="viewColumnHeader7">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_KeyMake" id="viewColumn8"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Make"
id="viewColumnHeader8">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="NL_KeyModel" id="viewColumn9"
displayAs="link" indentResponses="true">
<xp:viewColumnHeader value="Model"
id="viewColumnHeader9">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:panel>
</xc:OneUILayout>
</xp:view>
previous page
|