Question: I have two `p:selectOneMenu`, one is Zone and other is District, if District is selected then it should automatically select the respective Zone, Both Zone and District are loaded from database table and District table contains Zone\_id. i.e. Zone is accessible from District using zone\_id.

Both Zone and District are loaded when the form is loaded.
How to implement this function in `Primefaces` ? I have done same stuff in Java but not in Primefaces.

Answer: 
```
select price  from table1 where FromDate >='2013-12-15' and  
ToDate <='2013-12-15'

```

This will produce your expected result without using `between` condition. but both will do the same operation
Try 

```
select price  from table1 where FromDate >='2013-12-15 00:00:00' and  ToDate <='2013-12-15 23:59:59'

```