You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Will Jaynes <wi...@jaynes.org> on 2009/02/18 00:33:46 UTC

inmethod datagrid with a DropDownChoice cell

I'm working with the inmethod datagrid. The grid is editable, and I have it
working just as the examples show, with a couple of cells that contain text.
As in the examples, clicking on a row changes some cells into TextField
components that can be edited.

Now I would like to create a cell that displays text, but when the row is
clicked the cell turns into a DropDownChoice component. I've tried to mimic
the EditablePropertyColumn and the TextFieldPanel with my own
EditableDropDownPropertyColumn and a DropDownPanel. These render fine and
let me select from the dropdown, but things go wrong when I press the submit
icon. I get an exception: "Attempt to set model object on null model of
component"

If/When I have time I will make a quickstart, but If anyone already has this
kind of thing working I would appreciate very much seeing the code.

Will

Re: inmethod datagrid with a DropDownChoice cell

Posted by suilix <ri...@verizon.net>.

Will Jaynes-4 wrote:
> 
> I have come up with a quickstart project that shows my problem with
> creating
> an EditableDropDownPropertyColumn for the inmethod datagrid.  I'm sure I'm
> not understanding something fundamental. The classes in the
> edu.umich.med.irs.column package are my attempts.
> 
> If anyone has time to look at this I'd certainly appreciate it. Thanks.
> 
> Will
> 

The attached updated example fixes the problem: 
http://www.nabble.com/file/p24964981/irs-quickstart2.zip irs-quickstart2.zip
.

-- 
View this message in context: http://www.nabble.com/inmethod-datagrid-with-a-DropDownChoice-cell-tp22068863p24964981.html
Sent from the Wicket - User 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


Re: inmethod datagrid with a DropDownChoice cell

Posted by jsinger66 <je...@tinwire.co.za>.
Hi 

Have either of you solved this issue?

You need to add the model to the new DropDownChoice

Solution:

public DropDownPanel(String id, final IModel model, IModel rowModel,
AbstractColumn column, final List data, final ChoiceRenderer renderer) {
		super(id, column, rowModel);

		DropDownChoice ddc = new DropDownChoice("dropdown",model, data, renderer)
{


Hope this helps.

Jeff Singer
-- 
View this message in context: http://www.nabble.com/inmethod-datagrid-with-a-DropDownChoice-cell-tp22068863p24278038.html
Sent from the Wicket - User 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


Re: inmethod datagrid with a DropDownChoice cell

Posted by zeljko <ze...@hotmail.com>.
Hello Will!

Have you solved this problem? I also need to have a data grid component with
dropdown column and can not find any examples. Thanks in advance!

//Zeljko
-- 
View this message in context: http://www.nabble.com/inmethod-datagrid-with-a-DropDownChoice-cell-tp22068863p24025546.html
Sent from the Wicket - User 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


Re: inmethod datagrid with a DropDownChoice cell

Posted by Will Jaynes <wj...@gmail.com>.
I have come up with a quickstart project that shows my problem with creating
an EditableDropDownPropertyColumn for the inmethod datagrid.  I'm sure I'm
not understanding something fundamental. The classes in the
edu.umich.med.irs.column package are my attempts.

If anyone has time to look at this I'd certainly appreciate it. Thanks.

Will

On Tue, Feb 17, 2009 at 6:33 PM, Will Jaynes <wi...@jaynes.org> wrote:

> I'm working with the inmethod datagrid. The grid is editable, and I have it
> working just as the examples show, with a couple of cells that contain text.
> As in the examples, clicking on a row changes some cells into TextField
> components that can be edited.
>
> Now I would like to create a cell that displays text, but when the row is
> clicked the cell turns into a DropDownChoice component. I've tried to mimic
> the EditablePropertyColumn and the TextFieldPanel with my own
> EditableDropDownPropertyColumn and a DropDownPanel. These render fine and
> let me select from the dropdown, but things go wrong when I press the submit
> icon. I get an exception: "Attempt to set model object on null model of
> component"
>
> If/When I have time I will make a quickstart, but If anyone already has
> this kind of thing working I would appreciate very much seeing the code.
>
> Will
>