dialogButtonBar - 對話框按鈕列

在對話框中包含按鈕。

種類

延伸程式庫

語法

<xe:dialogButtonBar attributes>content</xe:dialogButtonBar>
表 1. 重要內容
內容 說明
id 預設值為 dialogButtonBar1dialogButtonBar2 等等。
表 2. 所有內容
種類 內容
基本 bindingidloadedrenderedrendererType
樣式 disableThemestylestyleClassthemeId

用法

此控制項預期為:
  • 包含在對話框中。
  • 包含按鈕。
包含的按鈕會出現在對話框的底端。

如需相關資訊,請參閱限制模式的對話框

範例

這裡有兩個按鈕,一個在用戶端,另一個在伺服器端,用於啟動對話框。對話框包含一個用於顯示現行時間的計算欄位以及一個對話框按鈕列。按鈕列包含兩個標籤為「確定」及「取消」的按鈕,可直接關閉對話框。
<xp:button value="Display time client-side" id="button4">
		<xp:eventHandler event="onclick" submit="false">
				<xp:this.script><![CDATA[XSP.openDialog("#{id:dialog1}")]]></xp:this.script>
		</xp:eventHandler>
</xp:button>
<xp:button value="Display time server-side" id="button5">
		<xp:eventHandler event="onclick" submit="true" refreshMode="complete">
				<xp:this.action><![CDATA[#{javascript:getComponent("dialog1").show()}]]></xp:this.action>
		</xp:eventHandler>
</xp:button>
<xe:dialog id="dialog1" title="Current Time">
		<xe:dialogContent id="dialogContent1">
			<xp:text escape="true" id="computedField1">
						<xp:this.value><![CDATA[#{javascript:var dt:NotesDateTime = session.createDateTime("Today");
						doc.recycle();
						return dt.getLocalTime();}]]></xp:this.value>
		</xp:text>
		</xe:dialogContent>
		<xe:dialogButtonBar id="dialogButtonBar1">
				<xp:button value="OK" id="button6">
				<xp:eventHandler event="onclick" submit="false">
								<xp:this.script><![CDATA[XSP.closeDialog('#{id:dialog1}')]]></xp:this.script>
				</xp:eventHandler>
		</xp:button>
				<xp:button value="Cancel" id="button7">
				<xp:eventHandler event="onclick" submit="false">
								<xp:this.script><![CDATA[XSP.closeDialog('#{id:dialog1}')]]></xp:this.script>
				</xp:eventHandler>
		</xp:button>
		</xe:dialogButtonBar>
</xe:dialog>