Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I'm using AjaxTiles21View and dojo declarative style definition.
      After 2 days partial page re-render finally works, but I think I found a bug in Spring-dojo.js that prevents dojo re-parse.

      1)I have simple code
      <div id="content>
      <div id="tabs" dojoType="dijit.layout.TabContainer" doLayout="false">
      <div dojoType="dijit.layout.ContentPane">....</div>
      <div dojoType="dijit.layout.ContentPane">....</div>
      </div>

      <a id="link" href=".." />link</a>
      Spring.addDecoration(new Spring.AjaxEventDecoration({elementId: "link",event: "onclick", params: {fragments: "content"}}));
      </div>
      </div>

      2)Server correctly sends ajax response, and Spring.RemotingHandler processes it. NewNodes container is created and then old nodes are replaced by the new ones. The problem is that old nodes are not destroyed (by calling destroy function). Therefore widget references in
      dijit.registry are not removed.

      3)When I try to call dojo.parser.parse( widget_id ) with the same widget_id as on the last page, following exception is thrown.

      Error: Tried to register widget with id==widget_id but that id is already registered

      4)Workaround in Spring-dojo.js

      319: var target = dijit.byId(item.id) ? dijit.byId(item.id).domNode : dojo.byId(item.id);
      320: if (!target)

      { 321: console.error("An existing DOM elment with id '" + item.id + "' could not be found for replacement."); 322: }

      else {
      323: target.parentNode.replaceChild(item, target);
      324:++ if(dijit.byId(target.id) != null)

      { 325:++ dijit.byId(target.id).destroyRecursive(); 327:++ //if you want automatic parse, parseOnLoad:true 328:++ dojo.parser.parse(dojo.byId(item.id).parentNode); 326:++ }


      327: }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Jeremy Grelle
            Reporter:
            Lumír Honus
          • Votes:
            4 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:

              Development