Board index JavaServer Faces General calendar problem

calendar problem

Components, Ajax Framework, Utilities and More.

Post 13 Mar 2011, 08:29

Posts: 22

i'm tring to display the calendar but no thing come up
<h:form prependId="false" >
<h:panelGrid columns="4">

<div>
<p:calendar id="cner9sma4" showOn="button" style="display:inline-block;width:190px;background-color: yellow;" />
<p:calendar id="rr9tys4" mode="inline" />
<p:calendar id="rr9tys4uj"/>

</div>
</h:panelGrid >
</h:form>

i'm working jsf2 +primefaces-2.2.RC2
Certified Sun Java programmer 6
Certified IBM DB2 Associate
Certified IBM Associate Developer
Certified IBM Application Developer.
Certified IBM System Administrator:

Post 13 Mar 2011, 08:55

Posts: 61
<h:panelGrid columns="4">

<div>
<p:calendar id="cner9sma4" showOn="button" style="display:inline-block;width:190px;background-color: yellow;" />
<p:calendar id="rr9tys4" mode="inline" />
<p:calendar id="rr9tys4uj"/>

</div>
</h:panelGrid >


You have only one item in your 4 column grid. Dont know if that is what your intension is.

Also how many calendars are you trying to display, 1 or 3?

Also you dont have a value for the calendar. The documentation says value must be a date so i suppose the component will not try and help you if you dont supply one. declare one in your jsf bean and bind it and lets see if that works first
Primefaces version: 3.0-SNAPSHOT

JSF implementation: Mojarra 2.0.4

Server: Glassfish 3.1-beta

Post 13 Mar 2011, 09:42

Posts: 22

I taked snapshot form my code


<p:calendar id="cner9sma4" showOn="button" style="display:inline-block;width:190px;background-color: yellow;" disabled="#{customer.disabled}" value="#{customer.mainCust.contactIDDocIssueDate}" />


private java.util.Date contactIDDocIssueDate;

public java.util.Date getContactIDDocIssueDate() {
return contactIDDocIssueDate;
}

public void setContactIDDocIssueDate(java.util.Date contactIDDocIssueDate) {
this.contactIDDocIssueDate = contactIDDocIssueDate;
}
Certified Sun Java programmer 6
Certified IBM DB2 Associate
Certified IBM Associate Developer
Certified IBM Application Developer.
Certified IBM System Administrator:

Post 13 Mar 2011, 09:44

Posts: 22

i want to display any of them
Certified Sun Java programmer 6
Certified IBM DB2 Associate
Certified IBM Associate Developer
Certified IBM Application Developer.
Certified IBM System Administrator:

Post 13 Mar 2011, 10:38

Posts: 61
private java.util.Date contactIDDocIssueDate;

is it possible that this is null

use and lets see if that works
    @PostConstruct
    public void init()
    {
        contactIDDocIssueDate= new Date();
    }
Primefaces version: 3.0-SNAPSHOT

JSF implementation: Mojarra 2.0.4

Server: Glassfish 3.1-beta

Post 13 Mar 2011, 11:01

Posts: 22

thanks i found the problem
the problem was in skin.css
Certified Sun Java programmer 6
Certified IBM DB2 Associate
Certified IBM Associate Developer
Certified IBM Application Developer.
Certified IBM System Administrator:


Return to General