0 Replies Latest reply on Mar 27, 2012 2:18 PM by Pablo Baron

    Create rich:calendar programatically

    Pablo Baron Newbie



      im trying to create a rich:calendar via Backing bean, adding it to a rich panel, and it is added to the .jsf page, and seen on the browser and all, the only problem is that the button that shows the popup calendar wont work. can someone help me out plz??



      Heres is my code:



      UICalendar fecha = (UICalendar) application      .createComponent(facesInstance,      UICalendar.COMPONENT_TYPE,      "org.richfaces.CalendarRenderer"); fecha.setId("Pregunta" + pregunta.getIdPregunta()); fecha.setLocale("ES"); fecha.setPopup(true); String expression = "#{gestionComponentesBBean.valoresFecha['"                + fecha.getId() + "']}"; ValueExpression valExpression = expressionFactory        .createValueExpression(        facesInstance.getELContext(), expression,        Date.class); valoresFecha.put(fecha.getId(), new Date()); nombreComponentes.add(fecha.getId()); preguntasMap.put(fecha.getId(), pregunta); fecha.setValueExpression("value", valExpression);



      I would appreciate any help.. thx in advance