fixes bug#24029
qua: dev:Aristides git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@110897 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
0b46f2aa8f
commit
06f9026686
12
.classpath
12
.classpath
|
@ -8,13 +8,8 @@
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
<attribute name="test" value="true"/>
|
<attribute name="test" value="true"/>
|
||||||
</attributes>
|
<attribute name="optional" value="true"/>
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
@ -24,5 +19,10 @@
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
|
||||||
|
<attributes>
|
||||||
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
|
</attributes>
|
||||||
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<classpathentry kind="output" path="target/classes"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
|
2
.project
2
.project
|
@ -9,8 +9,8 @@
|
||||||
<project>modelWeb</project>
|
<project>modelWeb</project>
|
||||||
<project>GeneradorBoletosCNAB</project>
|
<project>GeneradorBoletosCNAB</project>
|
||||||
<project>WSTotvs</project>
|
<project>WSTotvs</project>
|
||||||
<project>Flyway</project>
|
|
||||||
<project>CustomAdmVenta</project>
|
<project>CustomAdmVenta</project>
|
||||||
|
<project>Flyway</project>
|
||||||
</projects>
|
</projects>
|
||||||
<buildSpec>
|
<buildSpec>
|
||||||
<buildCommand>
|
<buildCommand>
|
||||||
|
|
|
@ -47,6 +47,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConexionRuta;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConexionRuta;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConexionRutaRemoveSelecionada;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConexionRutaRemoveSelecionada;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEixoConexionRutaRemoveSelecionada;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderGeracaoConexionPorRuta;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderGeracaoConexionPorRuta;
|
||||||
|
|
||||||
@Controller("gerarConexionPorRutaController")
|
@Controller("gerarConexionPorRutaController")
|
||||||
|
@ -91,7 +92,7 @@ public class GerarConexionPorRutaController extends MyGenericForwardComposer {
|
||||||
private MyListbox localidadesComunsDestinoCList;
|
private MyListbox localidadesComunsDestinoCList;
|
||||||
private MyListbox listEspCanal;
|
private MyListbox listEspCanal;
|
||||||
private MyListbox listPuntoVenta;
|
private MyListbox listPuntoVenta;
|
||||||
private List<Parada> lsLocalidadesComuns;
|
private List<Parada> lsLocalidadesComunsAB;
|
||||||
private List<Parada> lsLocalidadesComunsLinhasBC;
|
private List<Parada> lsLocalidadesComunsLinhasBC;
|
||||||
private Combobox cmbTipoPtovta;
|
private Combobox cmbTipoPtovta;
|
||||||
private Combobox cmbPtovta;
|
private Combobox cmbPtovta;
|
||||||
|
@ -310,6 +311,43 @@ public class GerarConexionPorRutaController extends MyGenericForwardComposer {
|
||||||
public void onClick$btnPesquisaLocalidadesDestino(Event ev) throws InterruptedException {
|
public void onClick$btnPesquisaLocalidadesDestino(Event ev) throws InterruptedException {
|
||||||
executarPesquisaLocalidadesDestino();
|
executarPesquisaLocalidadesDestino();
|
||||||
}
|
}
|
||||||
|
public void renderizarLinhasAB() {
|
||||||
|
localidadesComunsList.setItemRenderer(new RenderEixoConexionRutaRemoveSelecionada(new EventListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
|
||||||
|
Parada conexionRutaVO = (Parada) arg0.getTarget().getAttribute("data");
|
||||||
|
for (Object objectParada : localidadesComunsList.getListData()) {
|
||||||
|
if (((Parada) objectParada).equals(conexionRutaVO)) {
|
||||||
|
localidadesComunsList.removeItem(conexionRutaVO);
|
||||||
|
lsLocalidadesComunsAB.remove(conexionRutaVO);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gerarLocalidadesComunsAB();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderizarLinhasBC() {
|
||||||
|
localidadesComunsDestinoCList.setItemRenderer(new RenderEixoConexionRutaRemoveSelecionada(new EventListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event arg0) throws Exception {
|
||||||
|
|
||||||
|
Parada conexionRutaVO = (Parada) arg0.getTarget().getAttribute("data");
|
||||||
|
for (Object objectParada : localidadesComunsDestinoCList.getListData()) {
|
||||||
|
if (((Parada) objectParada).equals(conexionRutaVO)) {
|
||||||
|
localidadesComunsDestinoCList.removeItem(conexionRutaVO);
|
||||||
|
lsLocalidadesComunsLinhasBC.remove(conexionRutaVO);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gerarLocalidadesComunsBC();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
private void executarPesquisaLocalidadesOrigen() throws InterruptedException {
|
private void executarPesquisaLocalidadesOrigen() throws InterruptedException {
|
||||||
|
|
||||||
|
@ -435,16 +473,17 @@ public class GerarConexionPorRutaController extends MyGenericForwardComposer {
|
||||||
localidadesLinhaASelecionadaList.getListData().removeAll(paradasDuplicadas);
|
localidadesLinhaASelecionadaList.getListData().removeAll(paradasDuplicadas);
|
||||||
localidadesLinhaBSelecionadaList.getListData().removeAll(paradasDuplicadas);
|
localidadesLinhaBSelecionadaList.getListData().removeAll(paradasDuplicadas);
|
||||||
|
|
||||||
if(lsLocalidadesComuns!=null) {
|
if(lsLocalidadesComunsAB!=null) {
|
||||||
for (Parada parada : paradasDuplicadas) {
|
for (Parada parada : paradasDuplicadas) {
|
||||||
if(!lsLocalidadesComuns.contains(parada)){
|
if(!lsLocalidadesComunsAB.contains(parada)){
|
||||||
lsLocalidadesComuns.add(parada);
|
lsLocalidadesComunsAB.add(parada);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
lsLocalidadesComuns = new ArrayList<Parada>(paradasDuplicadas);
|
lsLocalidadesComunsAB = new ArrayList<Parada>(paradasDuplicadas);
|
||||||
}
|
}
|
||||||
localidadesComunsList.setModel(new ListModelList(lsLocalidadesComuns));
|
localidadesComunsList.setData(lsLocalidadesComunsAB);
|
||||||
|
renderizarLinhasAB();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
@ -463,7 +502,8 @@ public class GerarConexionPorRutaController extends MyGenericForwardComposer {
|
||||||
}else {
|
}else {
|
||||||
lsLocalidadesComunsLinhasBC = new ArrayList<Parada>(paradasDuplicadas);
|
lsLocalidadesComunsLinhasBC = new ArrayList<Parada>(paradasDuplicadas);
|
||||||
}
|
}
|
||||||
localidadesComunsDestinoCList.setModel(new ListModelList(lsLocalidadesComunsLinhasBC));
|
localidadesComunsDestinoCList.setData(new ListModelList(lsLocalidadesComunsLinhasBC));
|
||||||
|
renderizarLinhasBC();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -474,7 +514,7 @@ public class GerarConexionPorRutaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnCombinarTrechos(Event ev) throws InterruptedException {
|
public void onClick$btnCombinarTrechos(Event ev) throws InterruptedException {
|
||||||
if (lsLocalidadesComuns == null || lsLocalidadesComuns.isEmpty()) {
|
if (lsLocalidadesComunsAB == null || lsLocalidadesComunsAB.isEmpty()) {
|
||||||
Messagebox.show(Labels.getLabel("editarConexionPorRutaController.MSG.selecionarConexion"),
|
Messagebox.show(Labels.getLabel("editarConexionPorRutaController.MSG.selecionarConexion"),
|
||||||
Labels.getLabel("editarConexionPorRutaController.window.title"),
|
Labels.getLabel("editarConexionPorRutaController.window.title"),
|
||||||
Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
@ -823,11 +863,11 @@ public class GerarConexionPorRutaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Parada> getLsLocalidadesComuns() {
|
public List<Parada> getLsLocalidadesComuns() {
|
||||||
return lsLocalidadesComuns;
|
return lsLocalidadesComunsAB;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setLsLocalidadesComuns(List<Parada> lsLocalidadesComuns) {
|
public void setLsLocalidadesComuns(List<Parada> lsLocalidadesComuns) {
|
||||||
this.lsLocalidadesComuns = lsLocalidadesComuns;
|
this.lsLocalidadesComunsAB = lsLocalidadesComuns;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Parada> getLsLocalidadesComunsLinhasBC() {
|
public List<Parada> getLsLocalidadesComunsLinhasBC() {
|
||||||
|
|
|
@ -0,0 +1,43 @@
|
||||||
|
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zul.Button;
|
||||||
|
import org.zkoss.zul.Listcell;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Valdevir
|
||||||
|
*/
|
||||||
|
public class RenderEixoConexionRutaRemoveSelecionada implements ListitemRenderer {
|
||||||
|
|
||||||
|
private EventListener listenerGenerico;
|
||||||
|
|
||||||
|
public RenderEixoConexionRutaRemoveSelecionada(EventListener listenerGenerico) {
|
||||||
|
super();
|
||||||
|
this.listenerGenerico = listenerGenerico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
|
Parada parada = (Parada) o;
|
||||||
|
|
||||||
|
Listcell lc = new Listcell(parada.getDescparada().toString());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell();
|
||||||
|
|
||||||
|
Button btnRemoverPermissao = new Button();
|
||||||
|
btnRemoverPermissao.setAttribute("data", o);
|
||||||
|
btnRemoverPermissao.addEventListener("onClick", listenerGenerico);
|
||||||
|
btnRemoverPermissao.setImage("/gui/img/remove.png");
|
||||||
|
lc.appendChild(btnRemoverPermissao);
|
||||||
|
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lstm.setAttribute("data", parada);
|
||||||
|
}
|
||||||
|
}
|
|
@ -174,11 +174,11 @@
|
||||||
<tabpanel>
|
<tabpanel>
|
||||||
<grid fixedLayout="true" height="400px">
|
<grid fixedLayout="true" height="400px">
|
||||||
<columns>
|
<columns>
|
||||||
<column width="25%" />
|
<column width="22%" />
|
||||||
<column width="14%" />
|
<column width="17%" />
|
||||||
<column width="25%" />
|
<column width="22%" />
|
||||||
<column width="12%" />
|
<column width="17%" />
|
||||||
<column width="25%" />
|
<column width="22%" />
|
||||||
</columns>
|
</columns>
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
|
@ -308,7 +308,9 @@
|
||||||
align="center" style="background: #ffa99c"
|
align="center" style="background: #ffa99c"
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif"
|
||||||
label="${c:l('editarConexionPorRutaController.labelLocalidadesComunsAB.value')}"
|
label="${c:l('editarConexionPorRutaController.labelLocalidadesComunsAB.value')}"
|
||||||
width="100%" />
|
width="80%" />
|
||||||
|
<listheader
|
||||||
|
align="center" label="" width="20%" />
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</center>
|
</center>
|
||||||
|
@ -352,7 +354,9 @@
|
||||||
align="center" style="background: #ffa99c"
|
align="center" style="background: #ffa99c"
|
||||||
image="/gui/img/create_doc.gif"
|
image="/gui/img/create_doc.gif"
|
||||||
label="${c:l('editarConexionPorRutaController.labelLocalidadesComunsBC.value')}"
|
label="${c:l('editarConexionPorRutaController.labelLocalidadesComunsBC.value')}"
|
||||||
width="100%" />
|
width="80%" />
|
||||||
|
<listheader
|
||||||
|
align="center" label="" width="20%" />
|
||||||
</listhead>
|
</listhead>
|
||||||
</listbox>
|
</listbox>
|
||||||
</center>
|
</center>
|
||||||
|
|
Loading…
Reference in New Issue