1 Reply Latest reply on Sep 24, 2008 8:53 AM by Anton Belevich

    DnD problem when <rich:dropSupport /> is inside a tabPanel

    Baptiste GAILLARD Newbie

      Hi,

      I have to implement Drag & Drop from a rich:tree to a rich:simpleTogglePanel.

      I first tried to do something very simple which worked well.

      The Drag zone is configured from a treeNode:

      <r:treeNode
       id="defaultAeComponentConfigurationTreeNode"
       type="AE_CONFIGURATION_DEFAULT"
       icon="/img/configurations/config_component_locked_24.png"
       iconLeaf="/img/configurations/config_component_locked_24.png"
       dragIndicator="aeComponentConfigurationDragIndicator"
       dragType="aeComponentConfiguration"
       dragValue="#{item.label}"
      >
      
       <a:support
       event="ondblclick"
       reRender="centralPanel" />
      
       <a:support
       event="onselected"
       actionListener="#{componentTreeManager.setSelectedAeConfigurationNode}" />
      
       <r:dndParam
       name="uimaComponentConfigurationName"
       value="#{item.label}" />
      
       <r:dndParam
       name="uimaComponentId"
       value="#{item.parent.managedData.componentId}" />
      
       <r:dndParam
       name="uimaComponentVersion"
       value="#{item.parent.managedData.componentVersion}" />
      
       <h:outputText value="#{item.label}" />
      
      </r:treeNode>



      The Drop zone is configured with that:

      <a:form id="aeComponentConfigurationsForm">
      
       <r:simpleTogglePanel
       id="aeComponentConfigurationsTogglePanel"
       switchType="client"
       label="#{messages['workflowform.analysisEngine']}">
      
       <r:dropSupport
       id="aeComponentConfigurationsDropSupport"
       acceptedTypes="aeComponentConfiguration"
       reRender="aeComponentConfigurationsDataTable"
       action="#{workflowManager.addAeComponentConfiguration}"/>
      
       <r:scrollableDataTable id="aeComponentConfigurationsDataTable"
       ....
       </r:scrollableDataTable>
      
       </r:simpleTogglePanel>
      
      </a:form>


      Ok, with this piece of code I can Drag a node from my tree to the togglePanel. On drop my scrollableDatatable is reRendered with the new dropped element.

      But now I need to put the togglePanel inside a rich:tab, my code is the following.


      <r:tabPanel
       id="uimaWorkflowConfigurationTabPanel"
       width="100%"
       styleClass="tabPanel"
       switchType="client"
       selectedTab="workflowPreferencesTab"
       rendered="#{navigationManager.rightDiv == 'UIMA_WORKFLOW_CONFIGURATION_FORM'}">
      
       <r:tab
       id="uimaWorkflowConfigurationSchedulingTab"
       name="workflowCompositionTab"
       label="#{messages['workflowform.scheduling']}"
       styleClass="tab">
      
       <a:form id="aeComponentConfigurationsForm">
      
       <r:simpleTogglePanel
       id="aeComponentConfigurationsTogglePanel"
       switchType="client"
       label="#{messages['workflowform.analysisEngine']}">
      
       <r:dropSupport
       id="aeComponentConfigurationsDropSupport"
       acceptedTypes="aeComponentConfiguration"
       reRender="aeComponentConfigurationsDataTable"
       action="#{workflowManager.addAeComponentConfiguration}"/>
      
       <r:scrollableDataTable id="aeComponentConfigurationsDataTable"
       ....
       </r:scrollableDataTable>
      
       </r:simpleTogglePanel>
      
       </a:form>
      
       </r:tab>
      
      </r:tabPanel>
      


      But now the Dnd does not work, I do not understand why.
      The JSF action #{workflowManager.addAeComponentConfiguration} isn't called !

      Do you know why this does not work inside a rich:tabPanel ?

      Thanks,