Created
May 2, 2012 03:26
-
-
Save uris77/2573361 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" ?> | |
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?> | |
<zk xmlns="http://www.zkoss.org/2005/zul" | |
xmlns:h="http://www.w3.org/1999/xhtml" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd"> | |
<window | |
apply="com.example.CreateComposer" | |
viewModel="@id('vm') @init('com.example.PersonViewModel')" | |
validationMessages="@id('vmsgs')"> | |
<label style="font-size: 2em" value="Create Person" /> | |
<div width="100%" style="background: #AAAAFF"> | |
<label value="@load(vm.successFlash)"/> | |
</div> | |
<div id="errorDiv" width="100%" style="background: #DDAA99"> | |
<label /> | |
</div> | |
<grid width="30%"> | |
<columns> | |
<column align="right" width="20%"/> | |
<column /> | |
</columns> | |
<rows> | |
<row> | |
<label value="First Name"/> | |
<hbox> | |
<textbox id="firstNameTextbox" | |
value="@bind(vm.person.firstName) | |
@save(vm.person.firstName, before='save') | |
@validator(vm.firstNameValidator)" /> | |
<label value="@load(vmsgs[firstNameTextbox])" style="color:red;"/> | |
</hbox> | |
</row> | |
<row> | |
<label value="Last Name" /> | |
<hbox> | |
<textbox id="lastNameTextbox" | |
value="@bind(vm.person.lastName) constraint="no empty" /> | |
<label value="@load(vmsgs[lastNameTextbox])" sclass="red" /> | |
</hbox> | |
</row> | |
<row> | |
Website | |
<textbox value="@bind(vm.person.website)" /> | |
</row> | |
<row> | |
<textbox value="@bind(vm.person.email)" /> | |
</row> | |
</rows> | |
</grid> | |
<toolbar> | |
<button id="createButton" label="Create" onClick="@command('save'))" /> | |
</toolbar> | |
</window> | |
</zk> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment