Should I just go ahead and file a JIRA for this so that it doesn't get lost?
On Fri, May 2, 2008 at 12:40 PM, James Carman
<[EMAIL PROTECTED]> wrote:
> All,
>
> I couldn't find anything like this in the current codebase, but it is
> very helpful to me in our current project and I thought I'd propose it
> as an addition to the wicket-extensions project:
>
> public abstract class FragmentColumn<T> extends AbstractColumn<T>
> {
> protected FragmentColumn(IModel<String> displayModel)
> {
> super(displayModel);
> }
>
> protected FragmentColumn(IModel<String> displayModel, String sortProperty)
> {
> super(displayModel, sortProperty);
> }
>
> protected abstract Fragment<T> createFragment(String componentId,
> IModel<T> model);
>
> public void populateItem(Item<ICellPopulator<T>> item, String
> componentId, IModel<T> itemModel)
> {
> item.add(createFragment(componentId, itemModel));
> }
> }
>
> With this, you can just define a fragment within your page that will
> be the column's contents. Of course, in your createFragment()
> implementation, you'd construct the fragment with all that's needed
> (and you could choose from different fragments). What do you think?
> If you'd like, I can create a JIRA and submit a patch with this. I
> just wanted to run it by you folks first in case I'm way off base or
> something. :)
>
> James
>