rodrigo 2013-03-02 17:54:25 +00:00
parent d03b6e0704
commit b5e825a13b
4 changed files with 104 additions and 94 deletions

View File

@ -29,7 +29,6 @@ import com.rjconsultores.ventaboletos.entidad.Empresa;
import com.rjconsultores.ventaboletos.entidad.Estacion;
import com.rjconsultores.ventaboletos.entidad.EstacionSitef;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.EmpresaService;
import com.rjconsultores.ventaboletos.service.EstacionService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
@ -48,14 +47,13 @@ public class EditarEstacionController extends MyGenericForwardComposer {
private static final long serialVersionUID = 1L;
@Autowired
private EstacionService estacionService;
@Autowired
private EmpresaService empresaService;
private MyListbox estacionList;
private MyListbox estacionSitefList;
private Combobox cmbEmpresa;
private Button btnApagar;
private Textbox txtDescEstacion;
private Textbox txtDescMac;
private Textbox txtIpServidor;
private Longbox txtNumCaja;
private Estacion estacion;
private MyComboboxPuntoVenta cmbPuntoVenta;
@ -74,6 +72,10 @@ public class EditarEstacionController extends MyGenericForwardComposer {
this.estacion = estacion;
}
public List<Empresa> getLsEmpresa() {
return lsEmpresa;
}
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
@ -124,8 +126,6 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
estacion.setDescmac(estacionService.getDecimalMAC(descMac).toString());
try {
estacion.setEstacionSitefList(estacionSitefList.getListData());
estacionService.suscribirActualizar(estacion);
@ -169,7 +169,7 @@ public class EditarEstacionController extends MyGenericForwardComposer {
public void onClick$btnAddConfSitef(Event e) {
if ( (cmbEmpresa.getSelectedItem() == null) || (txtNumEmpresa.getValue() == null) || (txtNumFilial.getValue() == null) || (txtNumPdv.getValue() == null) ) {
if ((cmbEmpresa.getSelectedItem() == null) || (txtNumEmpresa.getValue() == null) || (txtNumFilial.getValue() == null) || (txtNumPdv.getValue() == null) || (txtIpServidor.getValue() == null)) {
Clients.alert(Labels.getLabel("editarEstacionController.MSG.sitef"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION);
return;
@ -204,10 +204,9 @@ public class EditarEstacionController extends MyGenericForwardComposer {
es.setNumfilial(txtNumFilial.getValue());
es.setNumpdv(txtNumPdv.getValue());
es.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
es.setIpServidor(txtIpServidor.getValue());
estacionSitefList.addItem(es);
}
public void onClick$btnRemConfSitef(Event e) {
@ -228,12 +227,5 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacionSitefList.addItemNovo(es);
}
}
public List<Empresa> getLsEmpresa() {
return lsEmpresa;
}
}

View File

@ -35,6 +35,8 @@ public class EstacionSitefRender implements ListitemRenderer {
lc = new Listcell(es.getNumpdv().toString());
lc.setParent(lstm);
lc = new Listcell(es.getIpServidor());
lc.setParent(lstm);
lstm.setValue(es);
}

View File

@ -2632,6 +2632,7 @@ editarEstacionController.empresa.label=Empresa
editarEstacionController.numEmpresa.label=Cód. Empresa
editarEstacionController.numFilial.label=Cód. Filial
editarEstacionController.numPdv.label=Num. PDV
editarEstacionController.txtIpServidor.value = IP Sitef
#Editar Estacion Sitef
editarEstacionController.tab.label.sitef = SiTef

View File

@ -25,8 +25,10 @@
</toolbar>
<tabbox>
<tabs width="200px">
<tab label="${c:l('editarEstacionController.window.title')}" />
<tab label="${c:l('editarEstacionController.tab.label.sitef')}" />
<tab
label="${c:l('editarEstacionController.window.title')}" />
<tab
label="${c:l('editarEstacionController.tab.label.sitef')}" />
</tabs>
<tabpanels>
<tabpanel>
@ -39,8 +41,8 @@
<row>
<label
value="${c:l('busquedaEstacionController.lhDescEstacion.label')}" />
<textbox id="txtDescEstacion" width="90%" rows="3"
constraint="no empty" maxlength="60"
<textbox id="txtDescEstacion"
width="90%" rows="3" constraint="no empty" maxlength="60"
value="@{winEditarEstacion$composer.estacion.descestacion}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
@ -62,28 +64,29 @@
<row>
<label
value="${c:l('busquedaEstacionController.nomeImpressora.label')}" />
<textbox id="txtNomImpressoara" width="90%"
maxlength="20"
<textbox id="txtNomImpressoara"
width="90%" maxlength="20"
value="@{winEditarEstacion$composer.estacion.nomeImpressora}" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.nomeArquivoLayout.label')}" />
<textbox id="txtNomeArquivoLayout" width="90%"
maxlength="20"
<textbox id="txtNomeArquivoLayout"
width="90%" maxlength="20"
value="@{winEditarEstacion$composer.estacion.nomeArquivoLayout}" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.nomeImpressoraRelatorio.label')}" />
<textbox id="txtNomImpressoaraRelatorio" width="90%"
maxlength="20"
<textbox id="txtNomImpressoaraRelatorio"
width="90%" maxlength="20"
value="@{winEditarEstacion$composer.estacion.nomeImpressoraRelatorio}" />
</row>
<row>
<label
value="${c:l('busquedaEstacionController.lhPuntoVenta.label')}" />
<combobox id="cmbPuntoVenta" constraint="no empty"
<combobox id="cmbPuntoVenta"
constraint="no empty"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
initialValue="@{winEditarEstacion$composer.estacion.puntoVenta}"
selectedItem="@{winEditarEstacion$composer.estacion.puntoVenta}"
@ -116,22 +119,36 @@
</columns>
<rows>
<row>
<label value="${c:l('editarEstacionController.empresa.label')}" />
<label
value="${c:l('editarEstacionController.empresa.label')}" />
<combobox id="cmbEmpresa" width="90%"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" model="@{winEditarEstacion$composer.lsEmpresa}"/>
mold="rounded" buttonVisible="true"
model="@{winEditarEstacion$composer.lsEmpresa}" />
</row>
<row>
<label value="${c:l('editarEstacionController.lbNumEmpresa.value')}" />
<intbox id="txtNumEmpresa" width="90%" maxlength="4" />
<label
value="${c:l('editarEstacionController.lbNumEmpresa.value')}" />
<intbox id="txtNumEmpresa" width="90%"
maxlength="4" />
</row>
<row>
<label value="${c:l('editarEstacionController.lbNumFilial.value')}" />
<intbox id="txtNumFilial" width="90%" maxlength="4" />
<label
value="${c:l('editarEstacionController.lbNumFilial.value')}" />
<intbox id="txtNumFilial" width="90%"
maxlength="4" />
</row>
<row>
<label value="${c:l('editarEstacionController.lbNumPdv.value')}" />
<intbox id="txtNumPdv" width="90%" maxlength="3" />
<label
value="${c:l('editarEstacionController.lbNumPdv.value')}" />
<intbox id="txtNumPdv" width="90%"
maxlength="3" />
</row>
<row>
<label
value="${c:l('editarEstacionController.txtIpServidor.value')}" />
<textbox id="txtIpServidor" width="90%"
maxlength="17" />
</row>
</rows>
</grid>
@ -146,22 +163,20 @@
tooltiptext="${c:l('editarEstacionController.btnBorrarSitef.tooltiptext')}" />
</hbox>
</toolbar>
<listbox id="estacionSitefList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" vflex="true" multiple="false"
height="100px">
<listbox id="estacionSitefList"
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
vflex="true" multiple="false" height="100px">
<listhead sizable="true">
<listheader image="/gui/img/create_doc.gif"
width="25%"
label="${c:l('editarEstacionController.empresa.label')}" />
<listheader image="/gui/img/create_doc.gif"
width="25%"
label="${c:l('editarEstacionController.numEmpresa.label')}" />
<listheader image="/gui/img/create_doc.gif"
width="25%"
label="${c:l('editarEstacionController.numFilial.label')}" />
<listheader image="/gui/img/create_doc.gif"
width="25%"
label="${c:l('editarEstacionController.numPdv.label')}" />
<listheader image="/gui/img/create_doc.gif"
label="${c:l('editarEstacionController.txtIpServidor.value')}" />
</listhead>
</listbox>
</tabpanel>