JDeveloper 12.1.3
I want to render certain component based on the two date comparison, something like:
<af:outputText value="(Expired)" id="ot3" inlineStyle="color:Red; font-weight:bold;"
rendered="#{now > bindings.EndDate.inputValue}"/>
"now" is java.util.Date from the registered managed bean (fine with ADF/JSF layer) while the above EndDate is coming from VO(based on EO) and is by default java.sql.Timestamp so cannot quite compare the two.
What is the recommended way to do this?
I was able to create a bean:
public class NowTimestamp {
private Timestamp now;
public void setNow(Timestamp now) {
this.now = now;
}
public Timestamp getNow() {
java.util.Date date = new java.util.Date();
return new Timestamp(date.getTime());
}
}
and then use rendered="#{datebean.now > bindings.EndDate.inputValue}" but then read that it is not recommended to have sql.Timestamp in the UI.