What kind of data provider are you giving it? Couldn't you implement your
own ISortableDataProvider?
ISortableDataProvider<Post> dp = new SortableDataProvider<Post>() {
public Iterator<? extends Post> iterator(int first, int count) {
// TODO Auto-generated method stub
// use this property to determine if that's the column
selected. then sort by it
getSort().getProperty();
return null;
}
public IModel<Post> model(Post object) {
return new DBObjectDetachableModel<Post>(object);
}
public int size() {
// TODO Auto-generated method stub
return 0;
}
};
--
Jeremy Thomerson
http://www.wickettraining.com
On Thu, Jan 8, 2009 at 3:32 PM, nitinkc <[email protected]> wrote:
>
> As I had mentioned, the column values are not representative of the values
> of
> any property so that would not work....
>
>
> asfernandes wrote:
> >
> > nitinkc wrote:
> >> I have a requirement to sort a column of a Datatable which does not have
> >> any
> >> property values. Sorting property columns is easy using the
> >> getSortProperty() method. However in this case, I am populating the
> >> values
> >> in the column using the
> >>
> >> populateItem(org.apache.wicket.markup.repeater.Item cellItem,
> >> java.lang.String componentId,
> >> org.apache.wicket.model.IModel rowModel)
> >>
> >> method. The column values are generated using additional logic in this
> >> method and are not representative of any property value. Any ideas??
> >>
> > The second parameter of PropertyColumn constructor is the property used
> > for sorting.
> >
> >
> > Adriano
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Sorting-a-column-populated-through-pupulateItem-method...-tp21337870p21361414.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>