Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic node event (Read 3466 times)
superNova
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 5th, 2011
node event
Oct 8th, 2011 at 5:51am
Print Post  
how i can perform multiple node click event on multiple node. In button we can set button name and then can find out button through the name but in node  i do not have any option..
can you please guide..
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: node event
Reply #1 - Oct 8th, 2011 at 6:17am
Print Post  
You can assign string or integer identifiers to the nodes and inspect them when nodeClicked is raised. Use either the setId/getId or setTag/getTag methods to do that.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
superNova
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Aug 5th, 2011
Re: node event
Reply #2 - Oct 8th, 2011 at 7:37am
Print Post  
i have parentnode & child node and both has tagged with different id.
parentnode.settag (  int id )
childnode.settag (int id2 )

if (e.getnode.gettag != null)
{

}

now how when i m clicking on parentnode or childnode the same event occurs. How i will identify that parentnode is clicked or child node clicked

hope u will guide me
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: node event
Reply #3 - Oct 10th, 2011 at 4:55am
Print Post  
If you call node.setTag(int), the Java autoboxing feature automatically converts the int value type to Integer wrapper class, and you will have to convert it back in nodeClicked:

Code
Select All
parentnode.setTag(1) ;
...

Integer tag = (Integer)e.getNode().getTag();
if (tag.intValue() == 1)
{
	// it's the parent node
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint