ZF-7890: Add ability to specify a rootnode type for customDijit's
Description
Currently, there doesn't appear to be a way to specify which type of root node will be used for instantiating a customDijit. I believe the default is a
<
div>, but for semantic reasons it might be better to specify a custom element type to ensure a page could degrade gracefully.
My example would be a custom multiselect from dojox. It doesn't require a element to be the root, but
isn't valid markup and could have unpredictable results (nor would it degrade). (Note: the issue doesn't exist if you are using a datastore with this widget, as all markup instantiation is done for you, but the overall implication would suggest having a root node setting would be best, hence this ticket)
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2009-10-22T11:30:55.000+0000
You can now pass 'rootNode' as one of the params to a customDijit; ability added in trunk and merged to 1.9 release branch.
Posted by Webdevilopers (tridem) on 2012-02-03T12:58:02.000+0000
The parameter 'rootNode' is only accepted when using customDijit without capture.
HTML Result:
Not accepting root node in customDijit capture.Not accepting root node in accordionPane capture.Accepting root node.Not accepting root node in accordionPane.The 'h2' node is never set on the other examples no matter where you put it. The result is the same when using dojo declarative or programmatic mode.
It would be really great if existin view helpers like 'accordionPane' would also accept the 'rootNode' parameter.
I guess the following customDijit lines should then be passed to Zend_Dojo_View_Helper_DijitContainer: