You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Sandor Feher <sf...@bluesystem.hu> on 2012/04/26 15:27:55 UTC
[RESOLVED] Re: FilterForm Date column formatting
Hi,
Works fine now :).
Melinda, Martin! Thank you for your help. I really appreciate that!
Just for the archive.
I add a panel overriding the getFilter method.
-----
IColumn crdCol=new TextFilteredPropertyColumn<HrpContent,
String>(new ResourceModel("contentlisttable.crd"), "crd", "crd") {
@Override
public Component getFilter(String componentId, FilterForm<?>
form) {
return new
DateTextFieldPanel(componentId,getFilterModel(form));
}
};
columns.add(crdCol);
-----
Here is my panel.
class DateTextFieldPanel extends Panel {
public DateTextFieldPanel(String id,IModel model) {
super(id,model);
DateConverter dc=new DateConverter(true) {
@Override
public String getDatePattern(Locale locale) {
return "yyyy.MM.dd";
}
@Override
protected DateTimeFormatter getFormat(Locale locale) {
DateTimeFormatter
fm=DateTimeFormat.forPattern("yyyy.MM.dd");
return fm;
}
};
DateTextField dtf =new DateTextField(id,model,dc);
add(dtf);
}
}
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/FilterForm-Date-column-formatting-tp4586557p4589807.html
Sent from the Users forum 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