Hi,
 I have a Tree (representing a product line) and an adjacent Panel
representing Product listing within a category/line.

On click of the Link the Panel updates. I have the following code, all works
except am not sure how to go about refreshing the Panel with updated
DataModel:

... In following code: See " //TODO: Not sure how to update Panel with
latest Product". So on click I am getting the correct object in "Prod"
(ProductReference). However I'm failing to translate that into updating the
Panel Model & Refreshing the Panel on UI more importantly.


        @Override
        protected final LinkTree createLinkTree(String id, TreeModel treeModel) 
{
                return new LinkTree(id, treeModel) {
                        //node = Name of Link
                        protected final void onNodeLinkClicked(Object node, 
BaseTree tree,
AjaxRequestTarget target) {
                                Object o = 
((DefaultMutableTreeNode)node).getUserObject();
                                if (o instanceof ProductReference) {
                                        ProductReference prod =
(ProductReference)((DefaultMutableTreeNode)node).getUserObject();
                                        log.info("[createLinkTree] " + prod);
                                        
                                        targetUpdatePanel.setVisible(true);
                                        //TODO: Not sure how to update Panel
with latest Product
                                }
                        }
 ...


(targetUpdatePanel.setVisible(true); is used because initially the Panel is
blank when nothing is selected & placeholder markup is used -- FYI)

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Ajax-Panel-Update-tp3057421p3057421.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to