You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by rik rik <sn...@hotmail.com> on 2007/11/23 12:50:44 UTC

how to update a label on a tree node selection

Hi to all!I'm starting to use wicket and I'm happy using it :-)But I'm not able to update a label on a tree node selection, my code is this Label labelNode=new Label("labelNode","label value"); LinkTree tree=new LinkTree("tree",dtm) {            @Override            public void onNodeLinkClicked(javax.swing.tree.TreeNode node, BaseTree tree, AjaxRequestTarget target){                String s1 = ((String)((DefaultMutableTreeNode)node).getUserObject());                labelNode.getModel().setObject("node:" + s1);                //addOrReplace(labelNode);                //Label label=new Label("labelNode","node:" + s1);                //addOrReplace(label);                //labelNode.modelChanged();                System.out.println("§§§§§§§§§§§§ AFTER CLICK model="+labelNode.getModelObjectAsString());            }                    }; The output string indicates that the model of the label has correctly changed, but nothing change in rendering... the value of the labeldoesn't change...The commented lines are all not working attemptsI've searched in the mailinglist for a similar problem, but I didn't find anything, when I wrong?Anyway, in the html the label is into a table, in the same or different row from the tree nothing changes...Thanks in advance! 
_________________________________________________________________
Scarica GRATIS la versione personalizzata MSN di Internet Explorer 7!
http://optimizedie7.msn.com/default.aspx?mkt=it-it

RE: how to update a label on a tree node selection

Posted by rik rik <sn...@hotmail.com>.
Hi Timo
You're right, the code format is horrible, but I had already had the answer from Florian into the first post (this post is a duplicate caused by hotmail...),
so I thought that this post was not considered anymore...
Sorry and thanks for the comment :-)
Regards

Rik



> Date: Sat, 24 Nov 2007 11:20:17 +0200
> From: Timo.Rantalaiho@ri.fi
> To: users@wicket.apache.org
> Subject: Re: how to update a label on a tree node selection
> 
> On Fri, 23 Nov 2007, rik rik wrote:
> > Hi to all!I'm starting to use wicket and I'm happy using it :-)But I'm not able to update a label on a tree node selection, my code is this Label labelNode=new Label("labelNode","label value"); LinkTree tree=new LinkTree("tree",dtm) {            @Override            public void onNodeLinkClicked(javax.swing.tree.TreeNode node, BaseTree tree, AjaxRequestTarget target){                String s1 = ((String)((DefaultMutableTreeNode)node).getUserObject());                labelNode.getModel().setObject("node:" + s1);                //addOrReplace(labelNode);                //Label label=new Label("labelNode","node:" + s1);                //addOrReplace(label);                //labelNode.modelChanged();                System.out.println("§§§§§§§§§§§§ AFTER CLICK model="+labelNode.getModelObjectAsString());            }                    }; The output string indicates that the model of the label has correctly changed, but nothing change in rendering... the value of the labeldoesn't change...The commented lines are all not working attemptsI've searched in the mailinglist for a similar problem, but I didn't find anything, when I wrong?Anyway, in the html the label is into a table, in the same or different row from the tree nothing changes...Thanks in advance! 
> 
> Now that's the longest line in a while :)
> 
> Please use some minutes to format your post before sending
> it to us hundreds reading this mailing list. Your chances of
> getting useful answers are also improved if each of us 
> doesn't need to open your text in an editor and format it 
> just to even be able to read it, not to mention think 
> about its subject matter.
> 
> Best wishes,
> 
> Timo
> 
> -- 
> Timo Rantalaiho           
> Reaktor Innovations Oy    <URL: http://www.ri.fi/ >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 

_________________________________________________________________
Scarica GRATIS 30 emoticon per Messenger!
http://www.emoticons-livemessenger.com/pages/msnit/index.htm

Re: how to update a label on a tree node selection

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Fri, 23 Nov 2007, rik rik wrote:
> Hi to all!I'm starting to use wicket and I'm happy using it :-)But I'm not able to update a label on a tree node selection, my code is this Label labelNode=new Label("labelNode","label value"); LinkTree tree=new LinkTree("tree",dtm) {            @Override            public void onNodeLinkClicked(javax.swing.tree.TreeNode node, BaseTree tree, AjaxRequestTarget target){                String s1 = ((String)((DefaultMutableTreeNode)node).getUserObject());                labelNode.getModel().setObject("node:" + s1);                //addOrReplace(labelNode);                //Label label=new Label("labelNode","node:" + s1);                //addOrReplace(label);                //labelNode.modelChanged();                System.out.println("§§§§§§§§§§§§ AFTER CLICK model="+labelNode.getModelObjectAsString());            }                    }; The output string indicates that the model of the label has correctly changed, but nothing change in rendering... the value of the labeldoesn't change...The commented lines are all not working attemptsI've searched in the mailinglist for a similar problem, but I didn't find anything, when I wrong?Anyway, in the html the label is into a table, in the same or different row from the tree nothing changes...Thanks in advance! 

Now that's the longest line in a while :)

Please use some minutes to format your post before sending
it to us hundreds reading this mailing list. Your chances of
getting useful answers are also improved if each of us 
doesn't need to open your text in an editor and format it 
just to even be able to read it, not to mention think 
about its subject matter.

Best wishes,

Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org