Primefaces Calendar not rendered
I'm trying to create a primefaces panel from backend. This is what I've written - 

    Calendar calendar = new Calendar();
    String expression = "#{calendarBean.date1}";
    boolean _showButtonPanel = true;
    calendar.setValue(expression);
    calendar.setShowButtonPanel(_showButtonPanel );
    Panel.getChildren().add(calendar);

But i'm able to retrieve only a textbox without the "calendar.setValue(expression);" but with the line it throws an exception - 

    com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback visit
    SEVERE: java.lang.IllegalArgumentException: Cannot format given Object as a Date
Primefaces Calendar not rendered
===

I'm trying to create a primefaces panel from backend. This is what I've written - 

    Calendar calendar = new Calendar();
    String expression = "#{calendarBean.date1}";
    boolean _showButtonPanel = true;
    calendar.setValue(expression);
    calendar.setShowButtonPanel(_showButtonPanel );
    Panel.getChildren().add(calendar);

But i'm able to retrieve only a textbox without the "calendar.setValue(expression);" but with the line it throws an exception - 

    com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback visit
    SEVERE: java.lang.IllegalArgumentException: Cannot format given Object as a Date