If #{myBean.birthdate}
is of java.util.Calendar
or java.util.Date
type, can I possibly format this inside the EL itself using an exist
Use <f:convertDateTime>. You can nest this in any input and output component. Pattern rules are same as java.text.SimpleDateFormat.
<h:outputText value="#{someBean.dateField}" >
<f:convertDateTime pattern="dd.MM.yyyy HH:mm" />
</h:outputText>
With EL 2 (Expression Language 2) you can use this type of construct for your question:
#{formatBean.format(myBean.birthdate)}
Or you can add an alternate getter in your bean resulting in
#{myBean.birthdateString}
where getBirthdateString returns the proper text representation. Remember to annotate the get method as @Transient if it is an Entity.
If you use OmniFaces you can also use it's EL functions like of:formatDate() to format Date
objects. You would use it like this:
<h:outputText value="#{of:formatDate(someBean.dateField, 'dd.MM.yyyy HH:mm')}" />
This way you can not only use it for output but also to pass it on to other JSF components.