You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Jurek Piasek <ju...@gmail.com> on 2008/11/21 03:11:13 UTC
Formatting dates in Inmethod DataGrid
How does one format a date in the inmethod datagrid?
Thanks,
Jurek.
Re: Formatting dates in Inmethod DataGrid
Posted by Jurek Piasek <ju...@gmail.com>.
Many thanks!
On Thu, Dec 18, 2008 at 7:54 PM, TahitianGabriel <gl...@piti.pf> wrote:
>
> public class DatePropertyColumn extends PropertyColumn {
>
> /**
> * @see
> com.inmethod.grid.column.PropertyColumn#getConverter(java.lang.Class)
> */
> @Override
> protected IConverter getConverter(final Class<?> varType) {
> return new IConverter() {
> /** serialVersionUID. */
> private static final long serialVersionUID = 1L;
>
> public Object convertToObject(final String varValue, final
> Locale varLocale) {
> return null;
> }
>
> public String convertToString(final Object varValue, final
> Locale varLocale) {
> Date date = (Date) varValue;
> return new SimpleDateFormat().format(date);
> }
>
> };
> }
> }
>
> Jurek Piasek wrote:
> >
> > How does one format a date in the inmethod datagrid?
> >
> > Thanks,
> > Jurek.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Formatting-dates-in-Inmethod-DataGrid-tp20614026p21084007.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Formatting dates in Inmethod DataGrid
Posted by TahitianGabriel <gl...@piti.pf>.
public class DatePropertyColumn extends PropertyColumn {
/**
* @see
com.inmethod.grid.column.PropertyColumn#getConverter(java.lang.Class)
*/
@Override
protected IConverter getConverter(final Class<?> varType) {
return new IConverter() {
/** serialVersionUID. */
private static final long serialVersionUID = 1L;
public Object convertToObject(final String varValue, final
Locale varLocale) {
return null;
}
public String convertToString(final Object varValue, final
Locale varLocale) {
Date date = (Date) varValue;
return new SimpleDateFormat().format(date);
}
};
}
}
Jurek Piasek wrote:
>
> How does one format a date in the inmethod datagrid?
>
> Thanks,
> Jurek.
>
>
--
View this message in context: http://www.nabble.com/Formatting-dates-in-Inmethod-DataGrid-tp20614026p21084007.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org