Calendar won't set value

UI Components for JSF
Post Reply
3.1415926535
Posts: 7
Joined: 10 Feb 2011, 14:57

10 Feb 2011, 16:12

Hi,
if i use the Calendar on primefaces 2.2 it won't submit the value.

xhtml

Code: Select all

...
<p:calendar id="von" required="true" readonly="true"
	pattern="dd.MM.yyyy" value="#{energierechnerBean.fromDate}"
	locale="de">
...
bean

Code: Select all

...
public Date getFromDate()
{
	return fromDate;
}

public void setFromDate(Date from)
{
	this.fromDate = from;
	LOG.info("setFrom() " + this.fromDate);
}
...
Logger isn't called after submit. Setter for other "none" Calendar field work.

Worked on primefaces 2.2-RC2 but not on primefaces 2.2, tested on JBoss AS6.
primefaces 3.0
Mojarra-2.1.4

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

10 Feb 2011, 17:38

Can you compare with;

http://www.primefaces.org/showcase/ui/calendarBasic.jsf

Showcase is working for you right? It has 2.2 final.

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

10 Feb 2011, 17:45

Hi,

I think it is because you set readonly="true" in the calendar which disables user input.

please remove it and try again.

Yigit

3.1415926535
Posts: 7
Joined: 10 Feb 2011, 14:57

11 Feb 2011, 11:29

it works without readonly="true", but the user should only use calendar widged to select date, and why does it work on primefaces 2.2-RC2 with readonly="true" ?
primefaces 3.0
Mojarra-2.1.4

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests