You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by JesperA <je...@hotmail.com> on 2008/11/21 11:07:01 UTC
WicketTester and inmethod grid
Cheers
Im trying to test our wicket app with WicketTester and it works fine, but
now when I try to test the EditableTreeGrid from inmethod Ive run into some
problems.
I want o add values to my cells but I dont know what the id's are. So is
there a way to do this?
Here is a bit of our implementation:
private void addGrid(){
List<IGridColumn> columns = new ArrayList<IGridColumn>();
columns.add(new EditablePropertyColumn(new Model("Article number"),
"userObject.m_artNr"));
columns.add(new EditablePropertyColumn(new Model("Name"),
"userObject.m_articleName"));
m_rootNode = new DefaultMutableTreeNode(new InvoiceRowModelBean(0));
TreeModel model = new DefaultTreeModel(m_rootNode);
m_grid = new TreeGrid("grid", model, columns);
m_grid.setOutputMarkupId(true);
m_grid.getTree().getTreeState().expandNode(m_rootNode);
add(m_grid);
}
--
View this message in context: http://www.nabble.com/WicketTester-and-inmethod-grid-tp20618304p20618304.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: WicketTester and inmethod grid
Posted by JesperA <je...@hotmail.com>.
Solved it and I thought i should at least leave som comments about it.
To set data in the grid it has to be editable or the row has to be selected.
The I used WicketTester.debugComponentTrees() to see the current paths to my
editable components. When a value is set I execute an AjaxEvent onchange and
then deselect the row for the values to end up in my model.
As youve probably guessed I did not really understand what happened here,
but I did got it working.
/Jesper
--
View this message in context: http://www.nabble.com/WicketTester-and-inmethod-grid-tp20618304p20677087.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