Im not that familiar with the defaultdatatable. But yes you should add row and column numbers to the path.

If doing it a bit more strictly you would probably get the datatable and iterate through it, or generate the numbers by getting the data behind. For debug purposes there aree both the debugcomponent hieracy and another method in wicket tester.


And yes the wicket team are aware of this(not so useability friendly things), and I think they will do something about it in 1.5



Daniele Dellafiore wrote:
On Thu, May 29, 2008 at 1:03 PM, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
Could'nt you do one of two things:

 1. Give the selector the fully path,  something like
    :"tabel:row:column:checkpoxpanel:check"
 2. Grab the check by using the full path like above and set the model
    on it..

umm, but in example above, what column and row number are grabbed?

there is a way to show the complete graph of a wicket page hierarchy?

Daniele Dellafiore wrote:
Hi.

I want to unit test a DefaultDataTable that have a column with some check
boxes
To achieve this, I have a panel defined as:

<wicket:panel>
<input type="checkbox" wicket:id="select" />
</wicket:panel>

and the table is simply:

<table wicket:id="table border="0">[Table]</table>

and I add this column:

               AbstractColumn checkBoxColumn = new AbstractColumn(new
Model("Select")) {
                       @Override
                       public void populateItem(Item cellItem, String
componentId, IModel
rowModel) {
                               cellItem.add(new CheckBoxPanel(componentId,
rowModel));
                       }
               };

it works and all but I do not know how to unit test the code.

The problem is to select a desired checkBox via WicketTester.
I have the same problem if I have a link in the table: how to simulate
the click on, say, link at row 5, column 1?

Thanks for advices.


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to