Calendar Primefaces losing style with ajax update

0

The primefaces component calendar is losing its style after updating with ajax in the view. What do I do to resolve?

    
asked by anonymous 19.04.2018 / 11:10

1 answer

0

Solution to overcome the bug when updating using ajax in the calendar component in the view (.xhtml), in which case my "return date" calendar was being affected.

OBS: I'M USING MOBILE PRIMEFACES 5.3 !!!!

In the view, you had to enter two attributes below in the calendar component "return data".

  • style="border-width: 0px;"
  • styleClass="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"

In addition, I inserted into my bean a code snippet in an event from another field related to the calendar "return date".

In my method changeEventTimeDateTime (AjaxBehaviorEvent event) {}

    /*trecho do código para resolver o bug do update */
    org.primefaces.component.calendar.Calendar calendarDataRetorno = (org.primefaces.component.calendar.Calendar) FacesContext
            .getCurrentInstance().getViewRoot()
            .findComponent("formCadastro:dataRetorno");
    calendarDataRetorno.setStyle("border-width: 1;");
    
19.04.2018 / 11:33