Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic GET DIAGRAMVIEW ID (Read 3750 times)
kumarsrmt
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 23
Joined: Sep 29th, 2009
GET DIAGRAMVIEW ID
Oct 8th, 2009 at 3:37pm
Print Post  
hi stoyo is it posiible to get a diagram unique diagramview id
i.e
this is my url which has a flowchart page
http://www.erp.com/scm/Diagrams/index.asp

this is for one system named system1
if i have more systems..i need to pass digramviewid

so how can i get diagramview id..can you send me some code


2. right now i am able to create shape by using mouse on diagram view...how can i remove this feature for my task.
Thanks in advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GET DIAGRAMVIEW ID
Reply #1 - Oct 8th, 2009 at 4:42pm
Print Post  
Hi,

1. The link gives me a page not found message. Use the ClientID property if you need to get the client-side id that you can use from JavaScript functions.

2. Set DiagramView.Behavior to DrawLinks.

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


I love YaBB 1G - SP1!

Posts: 23
Joined: Sep 29th, 2009
Re: GET DIAGRAMVIEW ID
Reply #2 - Oct 9th, 2009 at 2:57am
Print Post  
Hi Stoyo,
Code
Select All
function onNodeCreated(sender, args){


  args.getNode().setTag(getUniqueId());
  var node = args.getNode();

 node.setText("Enter Text!");

 <%=diagramView.AppletElement%>.getDiagramView().beginEdit(node);



}

function getUniqueId(){

    var dateObject = new Date();
    var uniqueId = dateObject.getFullYear() + "" + dateObject.getMonth() + "" +
 dateObject.getDate() + "" +
 dateObject.getTime();
 //alert(uniqueId);
    //return uniqueId;
    document.getElementById("tbnid").value=uniqueId;

}

 



here in onnodecrete event i did like this
node.setText("Enter Text!")

1.is it possible can i display data on node from datbase by using sql. i dont want to put enter text ..i want to get data from databse by using sql exapmle select location from status table where uniqueid="".........if you have can you provide some code

2.my page is refreshing automatically every 5min..each time of refreshing i am losing all my nodes on the diagramview..how can avoid this problem..kindly provide some sample code


3.each time page refresh node should get text from database by using sql...(point 1)..how can i  achive  this..



can you please provide some code for this


Thank you so much




« Last Edit: Oct 9th, 2009 at 12:56pm by kumarsrmt »  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GET DIAGRAMVIEW ID
Reply #3 - Oct 12th, 2009 at 6:08am
Print Post  
Hi,

1. You can create a service method that does an SQL query by the specified ID and returns text for the node. The OrgBrowser sample project shows how you could call a service in response to some diagram events.

2. You could implement the page refresh as a postback, e.g. call form.submit(). Otherwise you will have to restore the diagram content by other means, such as saving the applet.saveToString result somewhere and calling loadFromString() after the page refresh.

3. If you implement the refresh function as a postback, you can do that on the server in the Page_Load handler - loop over the nodes, query by the Tag id and set their Text.

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


I love YaBB 1G - SP1!

Posts: 20
Joined: Oct 9th, 2009
Re: GET DIAGRAMVIEW ID
Reply #4 - Oct 12th, 2009 at 6:10pm
Print Post  
Hi Stoyo,

i have a problem

iave 3 nodes  callled  A,B,C each has unique id

A is linked B by Link1 ,Bis linked to C by Link2

here in onlinkdouble click event i amcalling a webpage
EDIT.asp?id=previousnodeuniqueid

how can iachive this

i.e
when i click on link1 it will take me to edit.asp?id=Auniueid..how links can recognize their loacation

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: GET DIAGRAMVIEW ID
Reply #5 - Oct 12th, 2009 at 6:39pm
Print Post  
Hi,

Try setting previousnodeuniqueid = args.getLink().getOrigin().getTag();

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint