<?page title="${labels.FindResult}" contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<zk>
<window id="findResult" title="Výsledek hledání" border="normal" apply="org.zkoss.bind.BindComposer"
	viewModel="@id('vm') @init('info.bukova.isspst.ui.addressbook.AddressFindResult')"
	closable="true" width="700px">
	
	<listbox model="@load(vm.listResult)" height="300px" selectedItem="@bind(vm.selectedAddr)">
		<listhead>
			<listheader label="Firma" sort="auto(company)"/>
			<listheader label="IČ"/>
			<listheader label="Ulice"/>
			<listheader label="Číslo domu" width="80px"/>
			<listheader label="Město"/>
		</listhead>
		<template name="model">
			<listitem>
				<listcell label="@load(each.company)"/>
				<listcell label="@load(each.ic)"/>
				<listcell label="@load(each.street)"/>
				<listcell label="@load(each.houseNumber)"/>
				<listcell label="@load(each.city)"/>
			</listitem>
		</template>
	</listbox>
	<button label="Zvolit" onClick="@global-command('selectAddress', selected=vm.selectedAddr, window=findResult)" disabled="@bind(vm.selected)" sclass="nicebutton"/> <button label="Zavřít" onClick="findResult.detach()" sclass="nicebutton"/>
</window>
</zk>