Wuuhuu - I got it to work!

       field.add(new AjaxFormComponentUpdatingBehavior("onchange")
        {
            protected void onUpdate(AjaxRequestTarget target)
            {

((DefaultTreeModel)treeTable.getModelObject()).nodeChanged(treeNode);
                treeTable.updateTree(target);
                // target.focusComponent(field);
            }
        });

And then I needed to cache the TextFields i my PropertyEditableColumn (which
will create a Panel with a TextField i the newCell(...) method) coz the ajax
request actually created new cells and new cells get new markupId's ;-)



On Tue, Mar 18, 2008 at 9:12 PM, Lars Borup Jensen wrote:

> Hi Matej,
>
> If I leave out the the treeTable.updateTree(target); line, my row is not
> refreshed.
> I have a TreeTable with 7 columns. When I enter text in the first column,
> the 7th column of the same row needs to be refreshed (calculates sum). Since
> this refreshes the column in which the user just entered data, the cursor is
> removed, therefore I tried to put the cursor back in by using the
> focusComponent (hackish I know - but since I update the row in which the
> cursor is placed, I see no way around it)
> Theres a big chance I goin' the wrong way about doing this.
> PS: I update the 7th column "onBlur"
>
>

Reply via email to