0

I want Only validate when click button btnSave

asked 2012-11-11 04:39:55 +0800

longdv1208 gravatar image longdv1208
98 4

<?page title="Sec Right Dialog" contentType="text/html;charset=UTF-8"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
<?link rel="stylesheet" type="text/css" href="css/style.css"?>
<zk>
	<window id="rightDialog" border="normal"
		title="${c:l('secRightDialogWindow.title')}" closable="true"
		width="470px" height="180px" apply="org.zkoss.bind.BindComposer"
		viewModel="@id('vm') @init('com.evnit.fmis.identitymanager.viewmodel.RightViewModelDialog')">
		<div sclass="z-toolbar" style="padding:0">
			<hbox pack="stretch" sclass="hboxRemoveWhiteStrips"
				width="100%">
				<!-- CRUD BUTTONS -->
				<toolbar align="start"
					style="float:left; border-style: none;">
					<button id="btnNew" sclass="oT_ButtonWithIcon"
						image="/images/icons/btn_new2_16x16.gif" />
					<button id="btnEdit" sclass="oT_ButtonWithIcon"
						image="/images/icons/btn_edit2_16x16.gif"
						disabled="@load(empty vm.secRight)" />
					<button id="btnDelete" sclass="oT_ButtonWithIcon"
						image="/images/icons/btn_delete2_16x16.gif"
						disabled="@load(empty vm.secRight)" />
					<button id="btnCancel" sclass="oT_ButtonWithIcon"
						image="/images/icons/btn_cancel2_16x16.gif" />
					<button id="btnSave" sclass="oT_ButtonWithIcon"
						image="/images/icons/btn_save2_16x16.gif"
						onClick="@command('save')" />
					<button id="btnClose" sclass="oT_ButtonWithIcon"
						image="/images/icons/btn_exitdoor2_16x16.gif" />
				</toolbar>
			</hbox>
		</div>
		<div>
			<grid sclass="myform"
				form="@id('editor') @load(vm.secRight)
                      @load(vm.secRight, after={'create'})
                      @save(vm.secRight, before={'save','edit','delete'})">
				<columns>
					<column align="right" width="130px" />
					<column width="100%" />
				</columns>
				<rows>
					<row>
						<hbox>
							<label
								value="${c:l('label_SecRightDialog_rigName.value')}" />
							<label value="*"
								style="color:red;font-size:10px" />
						</hbox>
						<textbox id="rigName" hflex="1"
							value="@bind(editor.rigName)" tabindex="1" constraint="no empty"
							disabled="@load(empty vm.secRight)" />
					</row>
					<row>
						<separator bar="true"></separator>
						<separator bar="true"></separator>
					</row>
					<row>
						<label
							value="${c:l('label_SecRightDialog_rigType.value')}" />
						<listbox id="rigType" mold="select" rows="1"
							hflex="1" tabindex="2" disabled="@load(empty vm.secRight)" />
					</row>
				</rows>
			</grid>
		</div>
	</window>
</zk>

delete flag offensive retag edit
Be the first one to reply this discussion!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-11-11 04:39:55 +0800

Seen: 51 times

Last updated: Nov 11 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More