I do not know your page code, but Date conversions works fine here. A second idea is to create a converter with you want something special, like changing from y to yes or something like that.
Se component getConverter for more details.. MyComponent c = new MyComponent("htmlvalue", new PropertyModel(valueHolder, "value")) { @Override public IConverter getConverter(Class arg0) { return new MyConverter(); } }); On Feb 2, 2008 4:35 AM, laiqinyi <[EMAIL PROTECTED]> wrote: > Hi, > I have a entity POJO contain some property, the Type is Data, Character, > Interger,String > I wanne to display then in <span> Tag, > > > When the String Type is null, the wicket is display ok. > but the Date Type, Character Type is null, it cause some NullPoint Error in > the browser. > > so that, I write a Translate Class like this: > public class TransUtil { > public static String char2String(Character c) { > if(c==null){ > return "Yes"; > } > if (c.equals('1')) { > return "Yes"; > } else { > return "No"; > } > } > public static String int2String(Integer i){ > if(i==null){ > return "defaultMsgID_UnDefault"; > } > > return i.toString(); > } > > public static String date2String(Date date){ > if(date==null){ > return "defaultMsgID_UnDefault"; > } > > return date.toString(); > } > } > > I don't think is a pretty solution, and I wanne know others how to solve this > problem? > > > Mead > > -- Alan R. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]