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

📄 hibernate.zul

📁 ZK是一个Ajax Java Web框架
💻 ZUL
字号:
<?xml version="1.0" encoding="UTF-8"?><!--hibernate.zul{{IS_NOTE        Purpose:        Description:        History:                Thu Nov 13 16:07:16 TST 2008, Created by Flyworld}}IS_NOTECopyright (C) 2008 Potix Corporation. All Rights Reserved.{{IS_RIGHT}}IS_RIGHT--><window id="demo" apply="org.zkoss.zkdemo.userguide.DemoWindowComposer">	<html><![CDATA[		<h4>Hibernate</h4>		<p>Presentation components do not assume any persistent technology. 		This example simply demostrate the possiblility to combine presentation 		components and Hibernate persistent system.</p>	]]></html>	<hbox>	Note that we comment out the <toolbarbutton id="target" label="script" popup="details"/> on purpose because it will not run on our web site.	</hbox>	<separator />	<popup id="details" fulfill="target.onClick" width="600px">	<div style="border:1px solid #538BA2; background: #FFF; ">		<html><![CDATA[<pre style='color:#000000;background:#ffffff;'>void submit() {    Session session = HibernateUtil.currentSession();    Transaction tx = session.beginTransaction();        User aUser = <span style='color:#7f0055; font-weight:bold; '>new</span> User();        <span style='color:#3f7f59; '>//assign what end user entered into the persistence object.</span>    aUser.setName(name.value);    aUser.setEmail(email.value);        session.save(aUser);        tx.commit();}</pre>		]]></html>	</div>	</popup>
	<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[<zk>	<zscript>{		void submit() {		/*			Session session = HibernateUtil.currentSession();			Transaction tx = session.beginTransaction();						User aUser = new User();						//assign what end user entered into the persistence object.			aUser.setName(name.value);			aUser.setEmail(email.value);						session.save(aUser);						tx.commit();			HibernateUtil.closeSession();		*/		}	}</zscript>	<grid>	<rows>		<row>Name : <textbox id="name"/></row>		<row>Email: <textbox id="email"/></row>		<row><button label="submit" onClick="submit()"/></row>	</rows>	</grid></zk>
			]]></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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -