2 Replies Latest reply on Feb 6, 2008 6:14 PM by Henry Mok

    HtmlDropSupport setReRender

    Henry Mok Newbie

      I have a question about creating HtmlDropSupport dynamically. When I create the dropSupport on the jsp page, this is how it looks.

      <rich:dropSupport id="tabDrop0" acceptedTypes="TABS" dropValue="0" dropListener="#{CategoryGroupBean.processDrop}" reRender="TabList0,TabList1,TabList2"></rich:dropSupport>

      When I create it dynamically, I can set all these values and everything works correctly but it won't rerender. I've written the code this way.

      myDropZone.setReRender("TabList0,TabList1,TabList2");

      Is this right? Does anyone have any sample code to show me how this is done. Any help would be much appreciated.

      Henry

        • 1. Re: HtmlDropSupport setReRender
          Ilya Shaikovsky Master

          check please a4j:log

          • 2. Re: HtmlDropSupport setReRender
            Henry Mok Newbie

            I don't see any errors in the a4j:log. The only difference between the log of the dynamic implimentation and the hard coded one is that the hard coded one (which works) has more at the end. The log is pretty long so I'm just posting the difference. The dynamic one ends like this.

            debug[13:38:52,921]: Evaluate script replaced area in document: //
            new DnD.SimpleDraggable('form:TabList3:0:_idJsp2_17',{'parameters':{'dragSourceId':'form:TabList3:0:_idJsp2_18','form:TabList3:0:_idJsp2_18':'form:TabList3:0:_idJsp2_18'} ,'dndParams':'{\"label\":\"ARELEED\"}','dragIndicator':'indicator','dragType':'TABS'} )
            ////
            debug[13:38:52,921]: Evaluate script replaced area in document: //
            new DnD.SimpleDropZone('form:panel4',{'acceptedTypes':['TABS'] ,'dndParams':'{}'} ).drop = function(event,drag){var options = {'parameters':{'form:tabDrop4':'form:tabDrop4'} ,'actionUrl':'/catalogAdmin/category/inputCategoryGroup.jsf'} ;options.parameters['dropTargetId'] = 'form:tabDrop4';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','form',event,options);};
            ////
            debug[13:38:52,921]: Evaluate script replaced area in document: //
            new DnD.SimpleDraggable('form:TabList4:0:_idJsp2_22',{'parameters':{'dragSourceId':'form:TabList4:0:_idJsp2_23','form:TabList4:0:_idJsp2_23':'form:TabList4:0:_idJsp2_23'} ,'dndParams':'{\"label\":\"AREEXAM\"}','dragIndicator':'indicator','dragType':'TABS'} )
            ////

            The hard coded log has everything that the dynamic log contains but it has this afterwards.

            ////
            debug[13:50:19,562]: Evaluate script replaced area in document: //
            new DnD.SimpleDropZone('form:_idJsp33',{'acceptedTypes':['TABS'] ,'dndParams':'{}'} ).drop = function(event,drag){var options = {'parameters':{'form:tabDrop5':'form:tabDrop5'} ,'actionUrl':'/catalogAdmin/category/inputCategoryGroup.jsf'} ;options.parameters['dropTargetId'] = 'form:tabDrop5';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','form',event,options);};
            ////
            debug[13:50:19,562]: Evaluate script replaced area in document: //
            new DnD.SimpleDropZone('form:_idJsp39',{'acceptedTypes':['TABS'] ,'dndParams':'{}'} ).drop = function(event,drag){var options = {'parameters':{'form:tabDrop6':'form:tabDrop6'} ,'actionUrl':'/catalogAdmin/category/inputCategoryGroup.jsf'} ;options.parameters['dropTargetId'] = 'form:tabDrop6';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','form',event,options);};
            ////
            debug[13:50:19,578]: Evaluate script replaced area in document: //
            new DnD.SimpleDropZone('form:_idJsp45',{'acceptedTypes':['TABS'] ,'dndParams':'{}'} ).drop = function(event,drag){var options = {'parameters':{'form:tabDrop7':'form:tabDrop7'} ,'actionUrl':'/catalogAdmin/category/inputCategoryGroup.jsf'} ;options.parameters['dropTargetId'] = 'form:tabDrop7';Object.extend(options.parameters,drag.getParameters());var dzOptions = this.getDropzoneOptions(); if (dzOptions.ondrop) { if (!dzOptions.ondrop.call(this, event)) return; };A4J.AJAX.Submit('_viewRoot','form',event,options);};
            ////