Hello,
I have the following problem with dateChooser. I have element
<ig:dateChooser value="#{iterationController.iteration.plannedEffectivityStart}" converter="shortDateConverter"></ig:dateChooser>
where I use "converter" attribute. I have defined and implemented converter. First definition in faces-config.xml:
<converter>
<converter-id>shortDateConverter</converter-id>
<converter-class>com.anect.rmt.web.converters.ShortDateConverter</converter-class>
</converter>
ShortDateConverter implements Converter interface:
public Object getAsObject(FacesContext context, UIComponent comp, String date) {
...
public String getAsString(FacesContext context, UIComponent comp, Object date) {
}
When I want render the page, I see exception:
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at javax.faces.component.UIComponentBase$AttributesMap.put(UIComponentBase.java:1496)
at com.infragistics.faces.input.taglib.html.DateChooserTag.setProperties(DateChooserTag.java:303)
I use JSF 2008.2 version. Thanks.
ANECT
Hi,
Could you please provide me with some more details, i.g. how the converters are implemented etc.
Regards!
Converter implementation:
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
public class ShortDateConverter implements Converter {
if (StringUtils.isEmpty(date)) {
Locale l = FacesContext.getCurrentInstance().getViewRoot().getLocale();
return (Object) df.parse(date);
I think, it is clear, I don't see there any possible problem. Only easy converter, that converts data for dateChooser and back. Do you want see whole stack trace? Thanks.