<?xml version="1.0" encoding="UTF-8"?>
<?page contentType="text/html;charset=UTF-8"?>
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarTarifaKm"?>
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>

<zk xmlns="http://www.zkoss.org/2005/zul">
    <window id="winEditarTarifaKm" title="${c:l('editarTarifaKmController.window.title')}"
            apply="${editarTarifaKmController}" contentStyle="overflow:auto"
            height="450px" width="500px" border="normal" >
        <toolbar>
            	<button id="btnSalvar" height="20"
                        image="/gui/img/save.png" width="35px"
                        tooltiptext="${c:l('editarTarifaKmController.btnSalvar.tooltiptext')}"/>
                <button id="btnFechar" height="20"
                        image="/gui/img/exit.png" width="35px"
                        onClick="winEditarTarifaKm.detach()"
                        tooltiptext="${c:l('editarTarifaKmController.btnFechar.tooltiptext')}"/>    
        </toolbar>
        
         <grid fixedLayout="true">
            <columns>
               	<column width="40%" />
                <column width="60%" />
            </columns>
            <rows>
                <row>
                    <label value="${c:l('editarTarifaKmController.orgao')}"/>
                    <label value="${c:l('editarTarifaKmController.orgaoNome')}"/>
                </row>
            </rows>
        </grid>
        
        <toolbar>
            <separator bar="true"/>
        </toolbar>
        
        <grid fixedLayout="true">
            <columns>
                <column width="40%" />
                <column width="60%" />
            </columns>
            <rows>
               
                <row>
                    <label value="${c:l('editarTarifaKmController.km')}"/>
                     <textbox id="txtKm"
                        constraint="no empty, no zero, no negative, /[0-9]+(\,[0-9][0-9]?)?/ "
                        use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="6" scale="2"/>
                </row>
                <row>
                    <label value="${c:l('editarTarifaKmController.valor')}"/>
                      <textbox id="txtValor"
                        constraint="no empty, no zero, no negative, /[0-9]+(\,[0-9][0-9]?)?/ "
                        use="com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal" precision="6" scale="2"/>
                </row>
                <row>
					<label
						value="${c:l('editarTarifaKmController.lbClase.value')}" />
					<combobox id="cmbClase" width="90%" mold="rounded"
						buttonVisible="true"
						use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
						model="@{winEditarTarifaKm$composer.lsClase}"
						constraint="no empty" />
				</row>
            </rows>
        </grid>
        
        <toolbar>
            <button id="btnAdicionarTarifaKm" height="20" image="/gui/img/add.png" width="35px"
                tooltiptext="${c:l('editarTarifaKmController.btnAddTarifaKm.tooltiptext')}"/>
            <button id="btnRemoverTarifaKm" height="20" image="/gui/img/remove.png" width="35px"
                tooltiptext="${c:l('editarTarifaKmController.btnRemoveTarifaKm.tooltiptext')}"/>
        </toolbar>
        
        <listbox id="tarifaKmMyListBox" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
            multiple="false">
            <listhead sizable="true">
                 <listheader width="50px" image="/gui/img/builder.gif"
                        label="${c:l('lb.id')}"
                        sort="auto(tarifakmId)"/>
                <listheader image="/gui/img/builder.gif"
                        label="${c:l('editarTarifaKmController.orgao')}"
                        sort="auto(orgaoconcedenteId.descOrgao)"/>
                <listheader image="/gui/img/builder.gif"
                        label="${c:l('editarTarifaKmController.kmHeadColuna')}"
                        sort="auto(kmate)"/>
                <listheader image="/gui/img/builder.gif"
                        label="${c:l('editarTarifaKmController.valor')}"
                        sort="auto(valortaxa)"/>
                <listheader image="/gui/img/builder.gif"
                        label="${c:l('editarTarifaKmController.lbClase.value')}"
                        sort="auto(claseServicio.descclase)"/>
            </listhead>
        </listbox>

    </window>
</zk>
