gleimar 2013-02-14 20:25:33 +00:00
parent a9a29d9d8d
commit 796edc5c94
4 changed files with 564 additions and 576 deletions

View File

@ -7,6 +7,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
import java.security.MessageDigest; import java.security.MessageDigest;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Collections;
import java.util.List; import java.util.List;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
@ -114,8 +115,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
this.ubicacionList = ubicacionList; this.ubicacionList = ubicacionList;
} }
public List<UsuarioEmpresa> getLsUsuarioEmpresa() { public List<UsuarioEmpresa> getLsUsuarioEmpresa() {
return lsUsuarioEmpresa; return lsUsuarioEmpresa;
} }
@ -220,7 +219,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
this.cmbPerfil = cmbPerfil; this.cmbPerfil = cmbPerfil;
} }
public Combobox getCmbEmpresa() { public Combobox getCmbEmpresa() {
return cmbEmpresa; return cmbEmpresa;
} }
@ -249,8 +247,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
return btnRemoverUbicacion; return btnRemoverUbicacion;
} }
public UsuarioEmpresaService getUsuarioEmpresaService() { public UsuarioEmpresaService getUsuarioEmpresaService() {
return usuarioEmpresaService; return usuarioEmpresaService;
} }
@ -362,11 +358,9 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
lsUsuarioEmpresa.addAll(usuarioEmpresaService.obtenerPorUsuario(usuario)); lsUsuarioEmpresa.addAll(usuarioEmpresaService.obtenerPorUsuario(usuario));
} }
empresaList.setItemRenderer(new RenderUsuarioEmpresa()); empresaList.setItemRenderer(new RenderUsuarioEmpresa());
empresaList.setData(lsUsuarioEmpresa); empresaList.setData(lsUsuarioEmpresa);
txtCveEmpleado.focus(); txtCveEmpleado.focus();
if (usuario.getUsuarioId() == null) { if (usuario.getUsuarioId() == null) {
@ -383,7 +377,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
txtNombMaterno.setDisabled(true); txtNombMaterno.setDisabled(true);
btnPesquisa.setVisible(false); btnPesquisa.setVisible(false);
} }
List<UsuarioPerfil> lsUsuarioPerfil = usuarioPerfilService.obtenerPorUsuario(usuario); List<UsuarioPerfil> lsUsuarioPerfil = usuarioPerfilService.obtenerPorUsuario(usuario);
if (!lsUsuarioPerfil.isEmpty()) { if (!lsUsuarioPerfil.isEmpty()) {
@ -405,7 +398,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
cmbPuntoVenta.setDisabled(Boolean.TRUE); cmbPuntoVenta.setDisabled(Boolean.TRUE);
} }
} }
public void onFocus$txtSenha(Event ev) { public void onFocus$txtSenha(Event ev) {
@ -483,7 +475,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
usuario.setEmpleado(emp.get(0)); usuario.setEmpleado(emp.get(0));
} else { } else {
txtNombUsuario.setDisabled(false); txtNombUsuario.setDisabled(false);
txtNombPaterno.setDisabled(false); txtNombPaterno.setDisabled(false);
@ -518,7 +509,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
} }
public void onClick$btnAdicionarEmpresa(Event ev) throws InterruptedException { public void onClick$btnAdicionarEmpresa(Event ev) throws InterruptedException {
if (cmbEmpresa.getSelectedItem() == null) { if (cmbEmpresa.getSelectedItem() == null) {
return; return;
@ -535,7 +525,6 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
} }
}); });
if (existeEmpresa) { if (existeEmpresa) {
Messagebox.show( Messagebox.show(
Labels.getLabel("MSG.Registro.Existe"), Labels.getLabel("MSG.Registro.Existe"),
@ -712,12 +701,18 @@ public class EditarUsuarioController extends MyGenericForwardComposer {
} }
} }
public void onSelect$cmbParada(){ public void onChange$cmbParada() {
Comboitem cbiParada = cmbParada.getSelectedItem(); Comboitem cbiParada = cmbParada.getSelectedItem();
if (cbiParada != null) { if (cbiParada != null) {
lsPuntoVenta = puntoVentaService.buscaPuntoVentaParada((Parada) cmbParada.getSelectedItem().getValue()); lsPuntoVenta = puntoVentaService.buscaPuntoVentaParada((Parada) cmbParada.getSelectedItem().getValue());
cmbPuntoVenta.setModel(new ListModelList(lsPuntoVenta)); cmbPuntoVenta.setModel(new ListModelList(lsPuntoVenta));
if (lsPuntoVenta.isEmpty()){
cmbPuntoVenta.setText((String)null);
}
}else{
cmbPuntoVenta.setModel(new ListModelList(Collections.emptyList()));
cmbPuntoVenta.setText((String)null);
} }
} }

View File

@ -24,7 +24,6 @@ public class RenderCategoriaDescuento implements ListitemRenderer {
private CategoriaCtrlService categoriaCtrlService; private CategoriaCtrlService categoriaCtrlService;
public void render(Listitem lstm, Object o) throws Exception { public void render(Listitem lstm, Object o) throws Exception {
CategoriaCtrl cc = (CategoriaCtrl) o; CategoriaCtrl cc = (CategoriaCtrl) o;
String descricao = "";
Listcell lc = new Listcell(cc.getCategoriactrlId().toString()); Listcell lc = new Listcell(cc.getCategoriactrlId().toString());
lc.setParent(lstm); lc.setParent(lstm);
@ -47,13 +46,12 @@ public class RenderCategoriaDescuento implements ListitemRenderer {
lc.setParent(lstm); lc.setParent(lstm);
if(!cc.getCategoriaDescuentoList().isEmpty()){ if(!cc.getCategoriaDescuentoList().isEmpty()){
sb = new StringBuilder();
for(CategoriaDescuento catDesc : cc.getCategoriaDescuentoList()){ for(CategoriaDescuento catDesc : cc.getCategoriaDescuentoList()){
sb.append(catDesc.getCategoria()).append(", ");
descricao = descricao + catDesc.getCategoria() != null ? catDesc.getCategoria().getDesccategoria() : "0"+ ", ";
} }
descricao = descricao.substring(0,descricao.length()-1);
lc = new Listcell(descricao); lc = new Listcell(sb.toString());
lc.setParent(lstm); lc.setParent(lstm);
} }

View File

@ -7,7 +7,7 @@
# <controler>. <id>. <propiedade> = XXX # <controler>. <id>. <propiedade> = XXX
#Versao do VentaBoleto: #Versao do VentaBoleto:
versao = ADM_20130214_1RC109 versao = ADM_20130214_1RC110
# MSG Defaut: # MSG Defaut:
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100 MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100

View File

@ -116,19 +116,14 @@
<rows> <rows>
<row> <row>
<label value="${c:l('editarUsuarioController.lhParada.label')}"/> <label value="${c:l('editarUsuarioController.lhParada.label')}"/>
<hbox> <combobox id="cmbParada" mold="rounded" buttonVisible="true" width="100%"
<combobox id="cmbParada"
mold="rounded" buttonVisible="true" width="100%"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/> use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"/>
</hbox>
</row> </row>
<row> <row>
<label value="${c:l('editarUsuarioController.lhPuntoVenta.label')}"/> <label value="${c:l('editarUsuarioController.lhPuntoVenta.label')}"/>
<hbox> <combobox id="cmbPuntoVenta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
<combobox id="cmbPuntoVenta"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
mold="rounded" buttonVisible="true" width="100%" /> mold="rounded" buttonVisible="true" width="100%" />
</hbox>
</row> </row>
</rows> </rows>
</grid> </grid>