⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 b30-1813278.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?>
<zk	xmlns:h="http://www.w3.org/1999/xhtml" xmlns:zk="http://www.zkoss.org/2005/zk">
<html><![CDATA[
Test xhtml with annotation databinding (support DynamicPropertied)<br/>
1. You should see 3 hyperlink below.<br/>
2. Move mouse cursor over each link and check on the browser status bar whether the hyperlink 
is the same as what is shown on the page<br/>
3. Press change link1 button, the 1st link should be changed from http://www.zkoss.org to http://www.potix.com.<br/>
4. Move mouse curson over the 1st link and check on the browser status bar whether the hyperlink is changed to http://www.potix.com, too.
]]></html>
<zscript>
	public class Link {
		private String _href;
		
		public Link(String href) {
			setLink(href);
		}
		
		public String getLink() {
			return _href;
		}
		
		public void setLink(String href) {
			_href = href;
		}
	}
	
	Link link1 = new Link("http://www.zkoss.org");
	Link link2 = new Link("http://jp.zkoss.org");
	Link link3 = new Link("http://zh.zkoss.org");
</zscript>
<h:ul>
<h:li id="li1" ><h:a href="@{link1.link}"><label value="@{link1.link}"/></h:a></h:li>
<h:li><h:a href="@{link2.link}"><label value="@{link2.link}"/></h:a></h:li>
<h:li><h:a href="@{link3.link}"><label value="@{link3.link}"/></h:a></h:li>
</h:ul>
<button label="change link1">
	<attribute name="onClick">
		link1 = new Link("http://www.potix.com");
		binder.loadComponent(li1);
	</attribute>
</button>
</zk>

⌨️ 快捷键说明

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