Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIDNNTree Client IssuesDNNTree Client Issues
Previous
 
Next
New Post
3/6/2006 5:10 AM
 

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 11:50 AM
 

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 8:31 PM
 

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 9:20 AM
 

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
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsClientAPIClientAPIDNNTree Client IssuesDNNTree Client Issues


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out