Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Client-Server objects sending (Read 2723 times)
alternative84
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: Jun 7th, 2010
Client-Server objects sending
Jun 14th, 2010 at 11:01am
Print Post  
Hi,

I've created a function in Javascript (function onNodeClicked(sender, args)) that executes when I click a node on the diagram. Next, I access the ShapeNode object through args.getNode(). I want to be able to get that object in the Page_Load section, but I don't know how to communicate between the javascript section and the Page_Load section.

Best regards,
Juan J. Gómez
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Client-Server objects sending
Reply #1 - Jun 14th, 2010 at 11:52am
Print Post  
Hi,

Try calling form.submit() and accessing the node through diagram.ActiveItem inside the Load handler. You could also set some <hidden> element value to the node's id, in case the form can be also submitted by other means.

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


I love YaBB 1G - SP1!

Posts: 7
Joined: Jun 7th, 2010
Re: Client-Server objects sending
Reply #2 - Jun 14th, 2010 at 12:13pm
Print Post  
Thanks for the fast response Smiley

The property is in the DiagramView control? How do I access that property?

Another question: the only "ID" I've seen in the ShapeNode class is the ZIndex, but I need another type of "ID". Is there another one available?

Thanks again,
Juan J. Gómez
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Client-Server objects sending
Reply #3 - Jun 14th, 2010 at 12:32pm
Print Post  
Hi,

It's DiagramView.Diagram.ActiveItem.

You could identify items by ZIndex in this case, e.g. on the client save args.getNode().getZIndex() in the hidden field, and on the server side access the item by calling diagram.Items[Integer.Parse(hidden.Value)]. Otherwise you could assign some IDs to the Tag property of nodes and use the FindNode method to find a node by its tag.

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