01: package ru.emdev.EmForge.web.converter;
02:
03: import javax.faces.component.UIComponent;
04: import javax.faces.context.FacesContext;
05:
06: /** Our own implementation of Long converter
07: * Allows correctly proces null values in a4j:actionparam by converting null values into empty string and back
08: *
09: * @author akakunin
10: *
11: */
12: public class LongConverter extends javax.faces.convert.LongConverter {
13:
14: @Override
15: public Object getAsObject(FacesContext i_context,
16: UIComponent i_component, String i_value) {
17: if ("null".equals(i_value)) {
18: return null;
19: }
20:
21: return super.getAsObject(i_context, i_component, i_value);
22: }
23:
24: }
|