rafael.henrique 2017-08-31 23:50:18 +00:00
parent d6d9150026
commit 9f0266e91d
2 changed files with 20 additions and 3 deletions

View File

@ -26,10 +26,13 @@ import com.rjconsultores.ventaboletos.entidad.GrupoCategoria;
import com.rjconsultores.ventaboletos.service.CategoriaService;
import com.rjconsultores.ventaboletos.service.GrupoCategoriaService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
import oracle.net.aso.b;
/**
*
* @author Rafius
@ -62,8 +65,13 @@ public class EditarCategoriaController extends MyGenericForwardComposer {
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
lsGrupoCategoria = grupoCategoriaService.obtenerTodos();
GrupoCategoria branco = new GrupoCategoria();
branco.setDescGrupo("\t\t");
branco.setActivo(true);
lsGrupoCategoria.add(0, branco);
categoria = (Categoria) Executions.getCurrent().getArg().get("categoria");
categoriaList = (MyListbox) Executions.getCurrent().getArg().get("categoriaList");
categoriaList = (MyListbox) Executions.getCurrent( ).getArg().get("categoriaList");
if (categoria.getCategoriaId() == null) {
btnApagar.setVisible(Boolean.FALSE);
@ -101,7 +109,16 @@ public class EditarCategoriaController extends MyGenericForwardComposer {
Comboitem grupo = cmbGrupoCategoria.getSelectedItem();
if (grupo != null){
categoria.setGrupoCategoria((GrupoCategoria)grupo.getValue());
GrupoCategoria gruCat = (GrupoCategoria)grupo.getValue();
if(!gruCat.getDescGrupo().trim().isEmpty()){
categoria.setGrupoCategoria(gruCat);
}else{
categoria.setGrupoCategoria(null);
}
}else{
categoria.setGrupoCategoria(null);
}
/*if (categoria.getCategoriaId() != null) {

View File

@ -167,7 +167,7 @@ public class EditarConexionController extends MyGenericForwardComposer {
private Boolean verificarConexionContr(MyComboboxParada combo) throws InterruptedException {
if (origemCntrl != null
&& destinoCntrl != null
&& destinoCntrl != null && conexionCtrl == null
&& !conexionService.buscarConexiones(origemCntrl.getParadaId(), destinoCntrl.getParadaId()).isEmpty()) {
mostraMensagem(Labels.getLabel("editarConexionConfController.MSG.conexionCtrlExistente"));
combo.setSelectedIndex(-1);