Re: Accessing the cells in a row of a DataTable

2010-10-27 Thread Mark Doyle
Of course, here is the entire Panel constructor: private DropDownChoiceString dropdown; public AjaxDropDownChoicePanel(String id, IModelString model, IModelListString choicesModel) { super(id); System.out.println(dropdown model = + model.getObject()); dropdown = new

Re: Accessing the cells in a row of a DataTable

2010-10-27 Thread Mark Doyle
Of course, here is the entire Panel constructor: private DropDownChoiceString dropdown; public AjaxDropDownChoicePanel(String id, IModelString model, IModelListString choicesModel) { super(id); System.out.println(dropdown model = + model.getObject()); dropdown = new

Re: Accessing the cells in a row of a DataTable

2010-10-27 Thread Mark Doyle
I think I may have circumnavigated this issue by discovering the wonders of AjaxEditableLabel and AjaxEditableChoiceLabel :D I'll post my results when I've tested it. Hopefully this will be helpful to somebody else in the future. On Wed, Oct 27, 2010 at 10:59 AM, Mark Doyle

Re: Accessing the cells in a row of a DataTable

2010-10-27 Thread James Carman
Did you end up using a Fragment or did you go with the more heavyweight solution and use a panel? On Wed, Oct 27, 2010 at 9:22 AM, Mark Doyle markjohndo...@googlemail.com wrote: I think I may have circumnavigated this issue by discovering the wonders of AjaxEditableLabel and

Re: Accessing the cells in a row of a DataTable

2010-10-26 Thread Mark Doyle
I suppose this is related so I'll keep the thread going. As part of the above use case I have created a custom PropertyColumn that uses a DropDownChoice. Everything seems to be working except for the initial display, this is always set to Choose One. The code that builds the dropdown is in the

Re: Accessing the cells in a row of a DataTable

2010-10-26 Thread Jeremy Thomerson
Show the code for the dropdownchoice creation (in your panel) On Tue, Oct 26, 2010 at 6:14 PM, Mark Doyle markjohndo...@googlemail.comwrote: I suppose this is related so I'll keep the thread going. As part of the above use case I have created a custom PropertyColumn that uses a

Re: Accessing the cells in a row of a DataTable

2010-10-23 Thread Mark Doyle
Ok, I've nearly got this finished. Does anybody know how to add a link in populateItem() that doesn't render as [cell]? I could create a customised Panel I suppose but it seems like overkill. Maybe a fragment...hmmm On Fri, Oct 22, 2010 at 11:56 AM, Mark Doyle

Re: Accessing the cells in a row of a DataTable

2010-10-23 Thread James Carman
Use a fragment. Search this list for my FragmentColumn. I think I've posted it before On Oct 23, 2010 4:04 PM, Mark Doyle markjohndo...@googlemail.com wrote: Ok, I've nearly got this finished. Does anybody know how to add a link in populateItem() that doesn't render as [cell]? I could create

Re: Accessing the cells in a row of a DataTable

2010-10-22 Thread Mark Doyle
Thanks Mike, this was definitely a great pointer in the right direction; I'm beginning to grasp the column system now. I do have some issues though as detailed below. Firstly, my business model is out of my control so I had to wrap that in a class that contains the editable state. I don't like

Re: Accessing the cells in a row of a DataTable

2010-10-22 Thread Mark Doyle
Oh and the table isn't the parent: // get the table to rerender target.addComponent(this.getParent()); I had to do a six step parental grab; I'm sure there is a better way! :D On Fri, Oct 22, 2010 at 11:54 AM, Mark Doyle markjohndo...@googlemail.comwrote: Thanks Mike, this was definitely a

Accessing the cells in a row of a DataTable

2010-10-21 Thread Mark Doyle
Hi all, I'm having a bit of trouble wrapping my head around the DataTable with regards to what I need to do. The perfect example of my goal is in Wicket Examples, namely, the Ajax Editable Tree Table: http://wicketstuff.org/wicket14/ajax/tree/table/editable.0

Re: Accessing the cells in a row of a DataTable

2010-10-21 Thread Michael O'Cleirigh
Hi Mark, The cell's of a datatable are created by the IColumn. So you need to create a wrapping object or additional IModel that contains the edit-ability of each row and then use that inside the populateItem(...) method of the column to figure out which case to show (i.e. the label or the