fixed bug #6877 - Solução para problema de campo que não sincroniza com model. bind não funciona com atributo constraint="no empty".

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@50457 d1611594-4594-4d17-8e1d-87c2c4800839
master
thiago 2015-11-23 19:55:24 +00:00
parent e426a6778f
commit 456f91ca0a
2 changed files with 16 additions and 7 deletions

View File

@ -99,7 +99,9 @@ public class EditarAidfController extends MyGenericForwardComposer {
@Override @Override
public void doAfterCompose(Component comp) throws Exception { public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
aidf = (Aidf) Executions.getCurrent().getArg().get("aidf"); aidf = (Aidf) Executions.getCurrent().getArg().get("aidf");
aidfList = (MyListbox) Executions.getCurrent().getArg().get("aidfList"); aidfList = (MyListbox) Executions.getCurrent().getArg().get("aidfList");
@ -109,9 +111,6 @@ public class EditarAidfController extends MyGenericForwardComposer {
lsEstado = estadoService.obtenerTodos(); lsEstado = estadoService.obtenerTodos();
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa(); lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
lsInscestadual = new ArrayList<InscricaoEstadual>(); lsInscestadual = new ArrayList<InscricaoEstadual>();
super.doAfterCompose(comp);
if (aidf.getAidfId() == null) { if (aidf.getAidfId() == null) {
btnApagar.setVisible(Boolean.FALSE); btnApagar.setVisible(Boolean.FALSE);
@ -162,6 +161,15 @@ public class EditarAidfController extends MyGenericForwardComposer {
cmbInscestadual.setModel(new BindingListModelList(lsInscestadual, true)); cmbInscestadual.setModel(new BindingListModelList(lsInscestadual, true));
} }
} }
public void onBlur$txtSerie(Event ev){
try{
txtSerie.getValue();
}catch(WrongValueException e){
aidf.setSerie("");
txtSerie.setValue("");
}
}
public Combobox getCmbInscestadual() { public Combobox getCmbInscestadual() {
return cmbInscestadual; return cmbInscestadual;

View File

@ -73,9 +73,10 @@
<row> <row>
<label <label
value="${c:l('busquedaAidfController.serie.label')}" /> value="${c:l('busquedaAidfController.serie.label')}" />
<textbox id="txtSerie" width="80px" maxlength="8" constraint="no empty" <textbox id="txtSerie" width="80px"
value="@{winEditarAidf$composer.aidf.serie}" maxlength="8" value="@{winEditarAidf$composer.aidf.serie}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" /> use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
constraint="no empty" />
</row> </row>
<row> <row>
<label <label