65. XPages 사용자 정의 컨트롤(3) 고급 검색의 3
15382 단어 사용자 정의 컨트롤
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core"
xmlns:xc="http://www.ibm.com/xsp/custom"
xmlns:xp_1="http://www.ibm.com/xsp/coreex">
<xp:this.beforeRenderResponse><![CDATA[#{javascript:if (context.getUserAgent().isIE()) {
facesContext.getExternalContext().getResponse().setHeader("X-UA-Compatible", "IE=9");
}}]]></xp:this.beforeRenderResponse>
<xp:panel rendered="${javascript:compositeData.showSearch}">
Staff
<xc:InputUser id="inputUser1"></xc:InputUser>
From
<xp:inputText id="inpFrom" style="width:auto; top:0px;">
<xp:dateTimeHelper id="dateTimeHelper1"></xp:dateTimeHelper>
<xp:this.converter>
<xp:convertDateTime type="date"></xp:convertDateTime>
</xp:this.converter>
</xp:inputText>
To
<xp:inputText id="inpTo" style="width:auto; top:0px;">
<xp:dateTimeHelper id="dateTimeHelper2"></xp:dateTimeHelper>
<xp:this.converter>
<xp:convertDateTime type="date"></xp:convertDateTime>
</xp:this.converter>
</xp:inputText>
<xp:button value="Test" id="button2" rendered="false">
<xp:eventHandler event="onclick" submit="true"
refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:var inputUser1:com.ibm.xsp.component.UIIncludeComposite = getComponent("inputUser1");
requestScope.message=inputUser1.findComponent("Users").getValue();
}]]></xp:this.action>
</xp:eventHandler>
</xp:button>
<xp:button value="Search" id="btnSearch">
<xp:eventHandler event="onclick" action="#{app.search}"
submit="true" refreshMode="complete">
</xp:eventHandler>
</xp:button>
<xp:button value="Clear" id="button1">
<xp:eventHandler event="onclick" action="#{app.clearSearch}"
submit="true" refreshMode="complete">
</xp:eventHandler>
</xp:button>
<xp:br></xp:br>
<xc:Message>
<xc:this.rendered><![CDATA[${javascript:app.isLocal() || session.getEffectiveUserName()=="CN=Starrow Pan/OU=SCRO/O=CITIGROUP";}]]></xc:this.rendered>
</xc:Message>
</xp:panel>
<xp:panel rendered="${javascript:compositeData.showEdit}">
<xp:button value="Refresh" id="button5">
<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action><![CDATA[#{javascript:database.updateFTIndex(false);}]]></xp:this.action>
</xp:eventHandler></xp:button><xp:button value="New" id="button3" rendered="true">
<xp:eventHandler event="onclick" submit="false">
<xp:this.script><![CDATA[window.open("record.xsp", "_blank");]]></xp:this.script>
</xp:eventHandler></xp:button>
<xp:button value="Delete" id="button4"><xp:eventHandler event="onclick" submit="true" refreshMode="complete">
<xp:this.action>
<xp:deleteSelectedDocuments view="viewPanel1"
message="Are you sure to delete the selected records?">
</xp:deleteSelectedDocuments>
</xp:this.action></xp:eventHandler></xp:button>
</xp:panel>
<xp:viewPanel rows="20" id="viewPanel1" viewStyle="width:99%"
pageName="/record.xsp">
<xp:this.facets>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="headerPager" id="pager1">
</xp:pager>
<xp:pager partialRefresh="true" layout="Previous Group Next"
xp:key="footerPager" id="pager2">
</xp:pager>
</xp:this.facets>
<xp:this.data>
<xp:dominoView var="view1"
viewName="${javascript:compositeData.notesView;}"
search="#{javascript:compositeData.filter;}" sortOrder="descending"
sortColumn="$8">
</xp:dominoView>
</xp:this.data>
<xp:viewColumn id="viewColumn8" columnName="$8"
showCheckbox="${javascript:compositeData.showEdit}">
<xp:this.displayAs><![CDATA[${javascript:if (compositeData.showEdit) return "link";}]]></xp:this.displayAs>
<xp:this.facets>
<xp:viewColumnHeader xp:key="header"
id="viewColumnHeader8" value="Date">
</xp:viewColumnHeader>
</xp:this.facets>
<xp:this.converter>
<xp:convertDateTime type="date"></xp:convertDateTime>
</xp:this.converter>
</xp:viewColumn>
<xp:viewColumn columnName="StaffName" id="viewColumn4">
<xp:viewColumnHeader value="Staff Name"
id="viewColumnHeader4">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="AccessTime" id="viewColumn1">
<xp:this.converter>
<xp:convertDateTime type="time"></xp:convertDateTime>
</xp:this.converter>
<xp:viewColumnHeader value="Access Time"
id="viewColumnHeader1">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn id="viewColumn9" columnName="Type">
<xp:this.facets>
<xp:viewColumnHeader xp:key="header"
id="viewColumnHeader9" value="Type">
</xp:viewColumnHeader>
</xp:this.facets>
</xp:viewColumn>
<xp:viewColumn columnName="CardNo" id="viewColumn2"
rendered="false">
<xp:viewColumnHeader value="Card Number"
id="viewColumnHeader2">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="StaffNo" id="viewColumn3"
rendered="false">
<xp:viewColumnHeader value="Staff Number"
id="viewColumnHeader3">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="Department" id="viewColumn5">
<xp:viewColumnHeader value="Department"
id="viewColumnHeader5">
</xp:viewColumnHeader>
</xp:viewColumn>
<xp:viewColumn columnName="Office" id="viewColumn7">
<xp:viewColumnHeader value="Office"
id="viewColumnHeader7">
</xp:viewColumnHeader>
</xp:viewColumn>
</xp:viewPanel>
</xp:view>
RecordView.xsp-config:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/custom</namespace-uri>
<default-prefix>xc</default-prefix>
</faces-config-extension>
<composite-component>
<component-type>RecordView</component-type>
<composite-name>RecordView</composite-name>
<composite-file>/RecordView.xsp</composite-file>
<composite-extension>
<designer-extension>
<in-palette>true</in-palette>
</designer-extension>
</composite-extension>
<property>
<property-name>filter</property-name>
<property-class>string</property-class>
<property-extension>
<designer-extension>
<default-value>${javascript:""}</default-value>
<editor>com.ibm.std.String</editor>
</designer-extension>
<required>false</required>
</property-extension>
</property>
<property>
<property-name>notesView</property-name>
<property-class>string</property-class>
<display-name>NotesView</display-name>
<property-extension>
<designer-extension>
<editor>com.ibm.xsp.extlib.designer.tooling.editor.ViewNameEditor</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>showSearch</property-name>
<property-class>boolean</property-class>
<display-name>Show search function</display-name>
<property-extension>
<designer-extension>
<editor>com.ibm.std.Boolean</editor>
<default-value>true</default-value>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>showEdit</property-name>
<property-class>boolean</property-class>
<display-name/>
<description>Determine whether to display the features for editing records.</description>
</property>
<property>
<property-name>showLink</property-name>
<property-class>boolean</property-class>
<display-name>Show link</display-name>
<property-extension>
<designer-extension>
<editor>com.ibm.std.Boolean</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>showCheckbox</property-name>
<property-class>boolean</property-class>
<display-name>Show checkbox</display-name>
</property>
</composite-component>
</faces-config>
faces-config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
<managed-bean>
<managed-bean-name>app</managed-bean-name>
<managed-bean-class>starrow.xsp.App
</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
<!--AUTOGEN-START-BUILDER: Automatically generated by IBM Domino Designer. Do not modify.-->
<!--AUTOGEN-END-BUILDER: End of automatically generated section-->
</faces-config>
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
사용자 정의 컨트롤 개발 소기페이지에 추가할 때마다 외부에 DIV를 배치하는 컨트롤그래서 이 컨트롤을 확장하고 싶습니다. 처음에는 이렇게 썼어요. 결과가 틀렸는데 나중에 고쳐서 이렇게 써야 한다는 것을 발견하였다 등록 정보를 추가한 다음 Ren...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.