Dojo contentPane reload new content from urls

701 views Asked by At

I am creating an application where I programmatically create a tabContainer with several contentPanes as children, these contentPanes load their content via their href attribute, how can I make sure that any and all links contained within these external pages reload in their parent contentPane?

1

There are 1 answers

0
mtyson On BEST ANSWER

I think the only way you could really do this is:

  1. When the tab loads, query its dom for links: dojo.query('a', tabNode)
  2. Process all the links, take their href target
  3. Set the href to "#"
  4. Use the original href target value in an onclick handler that sets the parent content-pane to that value

Of course, you could do this from the server if you control all the links that are generated there.

Let me know if you need help on any of the code for this.

When you have the link element in hand, you can get its containing widget with:

dijit.getEnclosingWidget( /* DOMNode */ node)