This content has been marked as final.
Show 2 replies
-
1. Re: <h:selectOneListBox> & <s:convertDateTime>
pdepaepe Jul 25, 2007 12:07 PM (in response to pdepaepe)I become quite crasy about this issue.
My Entity:
@Basic @Future @Temporal(TemporalType.TIMESTAMP)
public Date getStart()
{
return start;
}
public void setStart(Date start)
{
this.start = start;
}
The way i test my select list:
@Transient
public ArrayList<SelectItem> getAvailableStarts(){
ArrayList<SelectItem> si = new ArrayList<SelectItem>();
for(int i = 0; i < 3; i++){
Date d = new Date()
si.add(new SelectItem(d, df.format(d)));
}
return si;
}
Xhtml :<h:selectOneListbox value="#{sV.start}">
<s:convertDateTime pattern="MM/dd/yyyy"/>
<f:selectItems value="#{sV.availableStarts}" />
</h:selectOneListbox>
Return the three present dates. If i submit the @Future returns well that my date have to be in the future. If i remove the annotation, it returns that the option is not valid.
Any idea please? -
2. Re: <h:selectOneListBox> & <s:convertDateTime>
pdepaepe Jul 25, 2007 12:08 PM (in response to pdepaepe)Edit "code" not "quote". :/
I become quite crasy about this issue.
My Entity:@Basic @Future @Temporal(TemporalType.TIMESTAMP) public Date getStart() { return start; } public void setStart(Date start) { this.start = start; }
The way i test my select list:@Transient public ArrayList<SelectItem> getAvailableStarts(){ ArrayList<SelectItem> si = new ArrayList<SelectItem>(); for(int i = 0; i < 3; i++){ Date d = new Date() si.add(new SelectItem(d, df.format(d))); } return si; }
Xhtml :<h:selectOneListbox value="#{sV.start}"> <s:convertDateTime pattern="MM/dd/yyyy"/> <f:selectItems value="#{sV.availableStarts}" /> </h:selectOneListbox>
Return the three present dates. If i submit the @Future returns well that my date have to be in the future. If i remove the annotation, it returns that the option is not valid.
Any idea please?