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 Integer 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 IntegerConverter extends
13: javax.faces.convert.IntegerConverter {
14:
15: @Override
16: public Object getAsObject(FacesContext i_context,
17: UIComponent i_component, String i_value) {
18: if ("null".equals(i_value)) {
19: return null;
20: }
21:
22: return super.getAsObject(i_context, i_component, i_value);
23: }
24:
25: }
|