|
|
|
@ -1729,15 +1729,20 @@ public class EditarPlano extends AbstractPageBean {
|
|
|
|
|
|
|
|
|
|
|
|
if(planoValidationOk(p))
|
|
|
|
if(planoValidationOk(p))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
Valor curValor = getSessionBean1().getCurrentValor();
|
|
|
|
|
|
|
|
curValor = fillValorFields(curValor);
|
|
|
|
|
|
|
|
getSessionBean1().getValoresHash().remove(curValor.getId());
|
|
|
|
|
|
|
|
getSessionBean1().getValoresHash().put(curValor.getId(), curValor);
|
|
|
|
|
|
|
|
if(!checkCamposObrigatorios())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
getSessionBean1().setMsg("Faltam preencher alguns riscos/valor. Por favor preencha todos os campos antes de prosseguir");
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
try //save current valor
|
|
|
|
try //save current valor
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Valor v = getSessionBean1().getCurrentValor();
|
|
|
|
// Valor v = getSessionBean1().getCurrentValor();
|
|
|
|
// v = fillValorFields(v);
|
|
|
|
// v = fillValorFields(v);
|
|
|
|
// pdp.updateValor(v);
|
|
|
|
// pdp.updateValor(v);
|
|
|
|
Valor curValor = getSessionBean1().getCurrentValor();
|
|
|
|
|
|
|
|
curValor = fillValorFields(curValor);
|
|
|
|
|
|
|
|
getSessionBean1().getValoresHash().remove(curValor.getId());
|
|
|
|
|
|
|
|
getSessionBean1().getValoresHash().put(curValor.getId(), curValor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HashMap<Integer, Valor> valores = getSessionBean1().getValoresHash();
|
|
|
|
HashMap<Integer, Valor> valores = getSessionBean1().getValoresHash();
|
|
|
|
Iterator<Integer> iter = valores.keySet().iterator();
|
|
|
|
Iterator<Integer> iter = valores.keySet().iterator();
|
|
|
|
@ -1960,11 +1965,11 @@ public class EditarPlano extends AbstractPageBean {
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(!checkCamposObrigatorios())
|
|
|
|
// if(!checkCamposObrigatorios())
|
|
|
|
{
|
|
|
|
// {
|
|
|
|
ok = false;
|
|
|
|
// ok = false;
|
|
|
|
getSessionBean1().setMsg("Faltam preencher alguns riscos/valor. Por favor preencha todos os campos antes de prosseguir");
|
|
|
|
// getSessionBean1().setMsg("Faltam preencher alguns riscos/valor. Por favor preencha todos os campos antes de prosseguir");
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
if(ok)
|
|
|
|
if(ok)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|