radio.zul

来自「ZK是一个Ajax Java Web框架」· ZUL 代码 · 共 116 行

ZUL
116
字号
<?xml version="1.0" encoding="UTF-8"?>

<!--
radio.zul

{{IS_NOTE
        Purpose:

        Description:

        History:
                Thu Nov 13 16:07:16 TST 2008, Created by Flyworld
}}IS_NOTE

Copyright (C) 2008 Potix Corporation. All Rights Reserved.

{{IS_RIGHT
}}IS_RIGHT
-->
<window id="demo" apply="org.zkoss.zkdemo.userguide.DemoWindowComposer">
	<html><![CDATA[
		<h4>Radio and Checkboxes</h4>
	<p>Radiogroup and radio allow one and only one choice amongst mutually exclusive options.<br />
	Checkbox allows mutiple choices. 
	
	<br />
	</p>
	]]></html>
	<separator/>
	<tabbox width="100%" tabscroll="false">
		<tabs>
			<tab id="demoView" label="Demo"/>
			<tab id="srcView" label="View Source"/>
		</tabs>
		<tabpanels>
			<tabpanel>
				<window id="view">
				</window>
			</tabpanel>
			
			<tabpanel>
				<panel>
					<panelchildren>
						<textbox id="codeView" class="code" rows="20" width="95%">
			<attribute name="value"><![CDATA[
<vbox>
	ZK Online Survey
	<radiogroup onCheck="choice.value = self.selectedItem.label">
		<grid>
			<rows>
				<row spans="5">
				Which one area would you like ZK to improve upon?</row>
				<row>
					<radio label="IDE Support" />
					<radio label="Bug Fixing" />
					<radio label="Performance" />
					<radio label="Backward Compatibility" />
					<radio label="Offline Functionality" />
				</row>
				<row>
					<radio label="Forum" />
					<radio label="Smalltalk" />
					<radio label="How-to Wiki" />
					<radio label="Offical Web Site" />
					<radio label="On-line Training" />
				</row>
				<row>
					<radio label="ZK Demo" />
					<radio label="Style Guide" />
					<radio label="Developer Guide" />
					<radio label="Developer Reference" />
					<radio label="Component Developer's Guide" />
				</row>
			</rows>
		</grid>
	</radiogroup>
	<hbox>
		You have selected :
		<label id="choice" />
	</hbox>
	<separator bar="true" />
	Which layout component you like in ZK ?
	<hbox>
		<checkbox id="l1" label="Border" onCheck="doChecked()" />
		<checkbox id="l2" label="Box" onCheck="doChecked()" />
		<checkbox id="l3" label="Table" onCheck="doChecked()" />
		<checkbox id="l4" label="Portal" onCheck="doChecked()" />
		<checkbox id="l5" label="Column" onCheck="doChecked()" />
	</hbox>
	<hbox>
		You have selected :
		<label id="layout" />
	</hbox>
	<zscript>
			void doChecked() {
				layout.value = (l1.isChecked() ? l1.label+' ' : &quot;&quot;) 
					+ (l2.isChecked() ? l2.label+' ' : &quot;&quot;)
					+ (l3.isChecked() ? l3.label+' ' : &quot;&quot;) 
					+ (l4.isChecked() ? l4.label+' ' : &quot;&quot;)  
					+ (l5.isChecked() ? l5.label+' ' : &quot;&quot;);
			}
		</zscript>
</vbox>
			]]></attribute>
						</textbox>
					</panelchildren>
					<toolbar mold="panel">
						<button id="tryBtn" label="Try me!"/>
						<button id="reloadBtn" label="Reload" height="18px"/>
					</toolbar>
				</panel>
			</tabpanel>
		</tabpanels>
	</tabbox>
</window>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?