Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  DNNTree Client Issues
Previous Previous
 
Next Next
New Post 3/6/2006 2:10 AM
User is offline Johnny Washington
7 posts
www.1enormousidea.com
10th Ranked


DNNTree Client Issues 

Greetings,
I recently decided to update an old treeview with the dnntree and ran into some issues. 
 I can do a postback and the tree populates without any issues. demo

I woul like to make the a similar call from the client to populate the tree. I am using ajax to return the needed xml. The xml is being return and is correct, However I still have a few issues that I can't seem to resolve.
see the demo

  • the images do not display until the root node has been clicked
  • there is an update method defined but it does not seem to work...any ideas

    Thanks
 
New Post 3/6/2006 8:50 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: DNNTree Client Issues 

I think you are making this harder on yourself than necessary.  The tree already supports populate on demand inherintly, you do not need to code anything client-side to get this to work.  In fact it will automatically detect when the browser doesn't support the client callback and utilize postbacks instead.  You will code both the same way.  To see how this works I suggest looking at http://webcontrols.dotnetnuke.com/DNNTree.aspx

You can get the full source code for this sample from the WebControl download page.

If you feel you want to go the custom-script route I suggest that you start by looking at the unit tests I have defined for the tree on the ClientAPI documentation page.

On a side note it looks like your existing page script does not account for the fact that when your controls are placed in a naming container (user control) their client-side IDs are prefixed.

 


 
New Post 3/6/2006 5:31 PM
User is offline Johnny Washington
7 posts
www.1enormousidea.com
10th Ranked


Re: DNNTree Client Issues 

Thanks for the reply,

Also, I read through the documentation, and I don't see a means for passing paramaters via the callback.  I did recognize that the node has params. But what about passing other params that determine how the node is to be populated?  For example, sending information from a textbox via the callback.

 
New Post 3/7/2006 6:20 AM
User is offline Jon Henning
1622 posts
www.codeendeavors.com
5th Ranked










Re: DNNTree Client Issues 

If you are planning on using the built in populate on demand of the tree, you are not in control of what gets passed in the callback.  If you decide to perform your own callback you are allowed to pass anything you want in the single argument for the callback (you need to serialize it yourself).  I am copying in a section of the callback documentation that relates to this.

Closing Thoughts

During the development of the client callbacks I found myself asking the question, “Should the developer have to be responsible for packing/serializing multiple arguments on the client, then have to unpack them on the server to process?”  For a short time I was writing a xmlrpc namespace to handle this type of serialization, but found myself backing away for two reasons.

1.       I wanted to implement an existing technology and keep it as close to the ASP.NET 2.0 implementation as possible.

2.      A protocol such as XMLRPC or SOAP are responsible for Remote Procedure Calls/Accessing Objects, which doesn’t quite fit into what the ASP.NET callback is about.  We are not creating and invoking any object on the server.  Rather we are invoking a particular method on the server with a defined contract, thus reflection is not necessary.

Those two reasons are not going to prohibit me from implementing a more elegant solution to tackle the serialization problem, but I feel that anything added needs to supplement this “simple” implementation.  Hence the CallBackType=Simple in the ClientAPICallBackResponse object.

 


 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  ClientAPI Compo...  DNNTree Client Issues
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


SSL Enabled and Amazingly FAST...
SSL enable your DNN web site with SSLRedirect, compress your DNN web site HTTP data flow by up to 75%-90% with HttpCompressionAgent, and monitor your DNN web site's performance with WebKeepAlive...
www.sanibellogic.com
Ultra Media Gallery & Video Gallery
The most popular photo gallery and video gallery module. with Flash interface.
www.bizmodules.net
WDK Solutions
Quality modules for the DotNetNuke community. Check out our 'wild' modules!
wdkns.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP