Re: Datatable Filtercolumn is not reacting

2013-03-15 Thread Sven Meier

What does your FilterForm's model object look like?

Sven

On 03/15/2013 09:04 PM, Delange wrote:

I use a datatable with FilterColumn. I specially made a IntegerColumn. It
works fine, but if the user enters a blank or nothing the table is not
refreshed. I can see that the old value is used.
If a enter a zero or another integer value it works like i expected.
How can I repair this problem

My source is
@SuppressWarnings({ "unchecked", "rawtypes", "serial" })
public TextFilteredPropertyColumn getInteger(String header,String
sort,final String field,final int inputsize,final boolean formatOutput,final
String format) {
return new TextFilteredPropertyColumn(
new Model(header), sort, field) {

@Override public void populateItem(final 
Item>
item, final String componentId,final IModel rowModel)
{
Label label = new Label(componentId, 
createLabelModel(rowModel)){
public  IConverter 
getConverter(Class type){
IConverter converter = new
MyIntegerConverter(formatOutput,format);
return converter;
}   
};
item.add(label);
}
  
			@Override

public String getCssClass() {
return "numeric "+field;
};  
@Override
 public Component getFilter(final String varComponentId, final
FilterForm varForm) {

 TextFilter filter = (TextFilter)
super.getFilter(varComponentId, varForm);
 filter.getFilter().add(new AttributeModifier("size", new
Model(""+inputsize)));
 filter.getFilter().add(new AttributeModifier("style", new
Model("text-align:right;")));
 filter.getFilter().add(new AttributeModifier("class", new
Model("numeric")));
 
 return filter;

 }
    };  
}       



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Datatable-Filtercolumn-is-not-reacting-tp4657285.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Datatable Filtercolumn is not reacting

2013-03-15 Thread Delange
I use a datatable with FilterColumn. I specially made a IntegerColumn. It
works fine, but if the user enters a blank or nothing the table is not
refreshed. I can see that the old value is used.
If a enter a zero or another integer value it works like i expected.
How can I repair this problem

My source is
@SuppressWarnings({ "unchecked", "rawtypes", "serial" })
public TextFilteredPropertyColumn getInteger(String header,String
sort,final String field,final int inputsize,final boolean formatOutput,final
String format) {
return new TextFilteredPropertyColumn(
new Model(header), sort, field) {

@Override public void populateItem(final 
Item>
item, final String componentId,final IModel rowModel)
{
Label label = new Label(componentId, 
createLabelModel(rowModel)){
public  IConverter 
getConverter(Class type){
IConverter converter = new
MyIntegerConverter(formatOutput,format);
return converter;
}   
};
item.add(label); 
}
 
@Override
public String getCssClass() {  
return "numeric "+field; 
};  
@Override 
public Component getFilter(final String varComponentId, final
FilterForm varForm) { 
 
TextFilter filter = (TextFilter)
super.getFilter(varComponentId, varForm); 
filter.getFilter().add(new AttributeModifier("size", new
Model(""+inputsize)));
filter.getFilter().add(new AttributeModifier("style", new
Model("text-align:right;")));
filter.getFilter().add(new AttributeModifier("class", new
Model("numeric")));

return filter; 
} 
};    
    }   



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Datatable-Filtercolumn-is-not-reacting-tp4657285.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org