Thanks Igor,
I found out that some chaching I did was responsible for that behavior.
The cell data of the datagrid now gets loaded each time I click on my
LinkTree. What's still not working is the refreshment of the datagrid
itself although it's put into a WMC.
What I do is override the onNodeLinkClicked method with
target.addComponent(mygrid);
Is there anything else i have to add to the click behavior? It still
updates only if I click the tab or refresh the entire page (f5).
My page layout has two div-containers, one for the tree and one for the
tab panel. Maybe putting a WMC around the entire 'content'-DIV is the
solution? Can't believe that.
Really apreciate any further hints!
Oliver
Igor Vaynberg wrote:
sounds like you are ginving your datagrid a static model, instead try
to give it a model that always checks the current treenode and pulls
the associated data.
-igor
On Tue, Sep 1, 2009 at 2:35 AM, Oliver-Sven Fritsch<[email protected]> wrote:
Hi everybody,
I have a LinkTree which will work as my navigation and a panel with tabs for
the content.
Right now the tree loads all the neccesary data and displays correctly. On
one of my tabs I have the inMethod datagrid which displays the values for
the selected treenode well.
My problem is that if I choose another node the datagrid does not refresh
except if I use the browsers refresh (f5). I tried to override the
onNodeLinkClicked method but don't seem to get it working. Could someone
please point me to the right direction? Can't get it working with refresh,
replaceWith etc...
here's my code for the LinkTree
tree = new LinkTree("myLinkTree", t) {
@Override
protected void onNodeLinkClicked(java.lang.Object node, BaseTree
tree, AjaxRequestTarget target) {
// this is for updating some global variables
((WicketApplication)
getApplication()).setViewId(Integer.valueOf(((MyTreeNode)
node).getPraram1()));
// this is my inMethod datagrid
target.addComponent( ((ExplorerApplication)
getApplication()).getGrid());
//--------- what comes here?
}
};
Thanks in advance!
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]