Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) ShapeListBox not properly rendering (Read 6267 times)
Adnerb
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Location: Philippines
Joined: Mar 2nd, 2012
ShapeListBox not properly rendering
Mar 2nd, 2012 at 7:24am
Print Post  
Hi people,

Anyone has a sample program using ShapeListBox in ASP.NET 4.0?

Thanks,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox not properly rendering
Reply #1 - Mar 2nd, 2012 at 8:02am
Print Post  
Hi,

There's the \vs2010 (dotnet 4)\Samples\CSharp\Flowcharter sample project showing the ShapeListBox. What's wrong with its rendering?

Stoyan
  
Back to top
 
IP Logged
 
Adnerb
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Location: Philippines
Joined: Mar 2nd, 2012
Re: ShapeListBox not properly rendering
Reply #2 - Mar 2nd, 2012 at 8:35am
Print Post  
Hi Stoyan,

Well, first the ShapeListBox seems not loading correctly configured shapes from the xml file when page loads. Second, when trying to reload the shapes using the javascript, it loads, but only displays rectangular shapes without the configured images.

Anyway, will check the sample you mentioned. If you can shed some lights on this one, I'll appreciate it.

Thanks,

Albren
  
Back to top
 
IP Logged
 
Adnerb
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Location: Philippines
Joined: Mar 2nd, 2012
Re: ShapeListBox not properly rendering
Reply #3 - Mar 2nd, 2012 at 9:10am
Print Post  
Hi, Where can I also find sample xml file being assigned to ShapeListBox.ShapeLibraryLocation?

Thanks,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox not properly rendering
Reply #4 - Mar 2nd, 2012 at 9:35am
Print Post  
Here's a small example that loads a shape library file:
https://mindfusion.eu/_samples/ndiag_ShapeListBox.zip

Quote:
Well, first the ShapeListBox seems not loading correctly configured shapes from the xml file when page loads. Second, when trying to reload the shapes using the javascript, it loads, but only displays rectangular shapes without the configured images.


If your custom shapes have some images associated with them, check your web server logs to see if the applets tries to GET them from the location you actually keep the files. If the images are specified through relative paths instead of full URLs, I think the applet will try to load them relatively to the jar location instead of the html page location, so be careful if the applet is not in the same folder as the aspx file.

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


I Love MindFusion!

Posts: 9
Location: Philippines
Joined: Mar 2nd, 2012
Re: ShapeListBox not properly rendering
Reply #5 - Mar 5th, 2012 at 5:59am
Print Post  
hi, in my library file, this is what I've got. <image x="0" y="0" width="100" height="100" src="/images/Campaign/Test.png" />

the folder images is a sub-folder from the main web-site folder.

Is this correct?

I have also below the snippet of how the ShapeListBox is declared in the aspx file.

<ndiag:ShapeListBox ID="CampaignElements" runat="server"
            Style="left: 480px; width: 160px;
            position: absolute; top: 0px; height: 320px;
            background-color: white"
            ShapeLibraryLocation="/CampaignShapeLibrary.xml">
        </ndiag:ShapeListBox>

Thanks,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox not properly rendering
Reply #6 - Mar 5th, 2012 at 8:47am
Print Post  
Hi,

I think setting ShapeLibraryLocation="/CampaignShapeLibrary.xml" will look for the xml file in the root folder of the server file system if you are using ImageMap mode. You'd have to use Server.MapPath and set the location from code-behind if the xml file is at the root folder of the site.

If you are using JavaApplet mode, you should add ClientSideMode="JavaApplet" to the aspx code shown above. I think the applet will look for the xml file at the root of the site then.

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


I Love MindFusion!

Posts: 9
Location: Philippines
Joined: Mar 2nd, 2012
Re: ShapeListBox not properly rendering
Reply #7 - Mar 5th, 2012 at 9:05am
Print Post  
Hi,

I now manage to bring up the rectangular shapes, but it's not showing the images. I have this src="\images\Campaign\Toolbar_EmailMessage.png" /> in my xml file. Is this correct?

Thanks,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox not properly rendering
Reply #8 - Mar 5th, 2012 at 9:24am
Print Post  
Are these images available in a yoursite.com/images folder? The applet will look for them there if you have a leading slash in the src value. If the images folder is relative to the applet, try removing the first slash: src="images/Campaign/Toolbar_EmailMessage.png".

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


I Love MindFusion!

Posts: 9
Location: Philippines
Joined: Mar 2nd, 2012
Re: ShapeListBox not properly rendering
Reply #9 - Mar 6th, 2012 at 1:19am
Print Post  
Hi Stoyan,

Thanks, now its working.
  
Back to top
 
IP Logged
 
Adnerb
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Location: Philippines
Joined: Mar 2nd, 2012
Re: ShapeListBox not properly rendering
Reply #10 - Mar 6th, 2012 at 8:42am
Print Post  
Hi,

Got another issue, well, the images are being rendered now properly, however, when I drag an item to the Diagram, I do not get the right Argument from the RadAjaxManager1_AjaxRequest eventhandler.

Any idea?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ShapeListBox not properly rendering
Reply #11 - Mar 6th, 2012 at 11:47am
Print Post  
Hi,

RadAjaxManager is a Terlik's component as far as I know, NetDiagram won't raise events of a RadAjaxManager1_AjaxRequest type.

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