Problema con FacesContext
Hola tengo un metodo que se me actualiza el visual de la pagina y cuando lo llamo de nuevo por segunda vez me devuelve que el FacesContext.getCurrentInstance = null
aqui est el metodo
selectednodesforconfig.clear();
FacesContext fc = FacesContext.getCurrentInstance();
UIComponent comp = fc.getViewRoot().findComponent("form_dashboard");
selectednodes = treeeBean.damelistaoficinasokokok();
selectednodesforconfig.addAll(selectednodes);
canffice = selectednodes.size();
String nohayoffice = "seleccionVacia";
if (selectednodes.get(0) == nohayoffice) {
office0 = null; office1 = null; office2 = null; office3 = null; office4 = null;office5 = null;office6 = null;office7 = null;office8 = null;
}else{
if (comp != null) {
comp.getChildren().clear();
}
fc.getExternalContext().setSessionMaxInactiveInterval(999999999);
System.out.println(fc.getExternalContext().getSessionMaxInactiveInterval());
for (int i = 0; i < selectednodes.size(); i++) {
if(i == 0){office0 = selectednodes.get(0); office1 = null; office2 = null; office3 = null; office4 = null;office5 = null;office6 = null;office7 = null;office8 = null;}
if(i == 1){office1 = selectednodes.get(1); office2 = null; office3 = null; office4 = null;office5 = null;office6 = null;office7 = null;office8 = null;}
if(i == 2){office2 = selectednodes.get(2); office3 = null; office4 = null;office5 = null;office6 = null;office7 = null;office8 = null;}
if(i == 3){office3 = selectednodes.get(3); office4 = null; office5 = null;office6 = null;office7 = null;office8 = null;}
if(i == 4){office4 = selectednodes.get(4); office5 = null; office6 = null;office7 = null;office8 = null;}
if(i == 5){office5 = selectednodes.get(5); office6 = null; office7 = null;office8 = null;}
if(i == 6){office6 = selectednodes.get(6); office7 = null; office8 = null;}
if(i == 7){office7 = selectednodes.get(7); office8 = null;}
if(i == 8){office8 = selectednodes.get(8);}
}
if (canffice == 1) {
ArrayList<Integer> attentiontime = new ArrayList<>();
ArrayList<Integer> waittime = new ArrayList<>();
attentiontime.add(generalServices.dameTiempoAtención(office0));
atencion0 = attentiontime.get(0);
waittime.add(generalServices.dameTiempoEspera(office0));
espera0 = waittime.get(0);
Float porcent = generalServices.damePorcentClientDESERT(office0);
abandonan0 = Redondear2Decimales(porcent);
}
- Inicie sesión o regístrese para enviar comentarios
Comentarios recientes
hace 9 semanas 2 horas
hace 10 semanas 1 día
hace 16 semanas 6 días
hace 1 año 9 semanas
hace 2 años 21 semanas
hace 2 años 25 semanas
hace 2 años 32 semanas
hace 2 años 41 semanas
hace 2 años 43 semanas
hace 2 años 45 semanas