11 Replies Latest reply on Feb 1, 2008 7:54 AM by archana m

    ajaxSingle + reRender

    Kevin Taylor Newbie

      I am trying to update the drag and drop tables after a drop operation occurs. I added both table id's to the reRender string. Does the ajaxSingle function like immediate and stop the reRender?

        • 1. Re: ajaxSingle + reRender
          Sergey Smirnov Master

          Yes, ajaxSingle is like an immediate. However, I am not quite understand what immediate (and the ajaxSingle as well) might stop the reRender.

          • 2. Re: ajaxSingle + reRender
            Kevin Taylor Newbie

            After the drop operation occurs, I am not seeing either table change to reflect the save ever occured. Although I can see the new value in the database table. The page is not being updated. I need to update this part of the page without causing the validation to occur. Let me know if you need additional info.

            • 3. Re: ajaxSingle + reRender
              Sergey Smirnov Master

              update (the result of processing) does not equal to reRender

              AjaxSingle limit the processing to the only one component (and its children if any)

              • 4. Re: ajaxSingle + reRender
                Kevin Taylor Newbie

                in a nutshell, I would like to reRender the tables after the drop operation occurs. What would be the correct way to make this occur?

                • 5. Re: ajaxSingle + reRender
                  Sergey Smirnov Master

                  you want to update the table or reRender the table?

                  • 6. Re: ajaxSingle + reRender
                    Kevin Taylor Newbie

                    I want the database to refresh both the drag and drop tables to reflect the new changes. I am thinking this would occur with reRender but I could be incorrect. In terms of JSF, does this sound like an update or reRender case?

                    • 7. Re: ajaxSingle + reRender
                      Sergey Smirnov Master

                      post some code snippet of what you have now.

                      • 8. Re: ajaxSingle + reRender
                        Kevin Taylor Newbie

                         

                         <rich:dragIndicator id="indicator"/>
                        <h:panelGrid columns="1" styleClass="dragdrop">
                         <rich:panel style="width:196px">
                         <f:facet name="header">
                         <h:outputText value="Available Items" />
                         </f:facet>
                         <rich:dropSupport id="drpAvailableItems" acceptedTypes="selectedItem" dropValue="selectedItem" dropListener="#{ItemBean.processAvailableItemDrop}" reRender="dtgSelectedItem,dtgAvailableItem">
                         </rich:dropSupport>
                         <h:dataTable id="dtgAvailableItem" height="150" value="#{itemBean.availableItemList}" var="availableItem" width="192" ajaxSingle="true">
                         <h:column>
                         <a4j:outputPanel style="border:1px solid gray;padding:2px" layout="block">
                         <rich:dragSupport id="drgAvailableItem" dragIndicator="indicator" dragType="availableItem" dragValue="#{availableItem}">
                         <rich:dndParam name="ItemTypeID" value="#{availableItem.itemTypeID}"/>
                         <rich:dndParam name="ItemID" value="#{param.ItemID}"/>
                         </rich:dragSupport>
                         <h:outputLabel id="TypeName" value="#{availableItem.typeName}"></h:outputLabel>
                         </a4j:outputPanel>
                         </h:column>
                         </h:dataTable>
                         </rich:panel>
                        </h:panelGrid>
                        <h:panelGrid columns="1" styleClass="dragdrop">
                         <rich:panel style="width:196px">
                         <f:facet name="header">
                         <h:outputText value="Selected Item" />
                         </f:facet>
                         <rich:dropSupport id="drpSelectedItem" acceptedTypes="availableItem" dropListener="#{itemBean.processSelectedItemDrop}" reRender="dtgSelectedItem,dtgAvailableItem"></rich:dropSupport>
                         <h:dataTable id="dtgSelectedItem" height="150" value="#{itemBean.selectedItemList}" var="selectedItem" ajaxSingle="true">
                         <h:column>
                         <a4j:outputPanel style="border:1px solid gray;padding:2px" layout="block">
                         <rich:dragSupport id="drgSelectedItem" dragIndicator="indicator" dragType="selectedItem" dragValue="#{selectedItem}">
                         <rich:dndParam name="ItemTypeID" value="#{selectedItem.itemTypeID}"/>
                         <rich:dndParam name="ItemID" value="#{param.ItemID}"/>
                         </rich:dragSupport>
                         <h:outputLabel id="TypeName" value="#{selectedItem.typeName}"></h:outputLabel>
                         </a4j:outputPanel>
                         </h:column>
                         </h:dataTable>
                         </rich:panel>
                        </h:panelGrid>
                        
                        


                        • 9. Re: ajaxSingle + reRender
                          Kevin Taylor Newbie

                          here is the updated version:

                          <rich:dragIndicator id="indicator"/>
                          <h:panelGrid columns="1" styleClass="dragdrop">
                           <rich:panel style="width:196px">
                           <f:facet name="header">
                           <h:outputText value="Available Items" />
                           </f:facet>
                           <rich:dropSupport id="drpAvailableItems" acceptedTypes="selectedItem" dropValue="selectedItem" dropListener="#{ItemBean.processAvailableItemDrop}" reRender="dtgSelectedItem,dtgAvailableItem" ajaxSingle="true">
                           </rich:dropSupport>
                           <h:dataTable id="dtgAvailableItem" height="150" value="#{itemBean.availableItemList}" var="availableItem" width="192">
                           <h:column>
                           <a4j:outputPanel style="border:1px solid gray;padding:2px" layout="block">
                           <rich:dragSupport id="drgAvailableItem" dragIndicator="indicator" dragType="availableItem" dragValue="#{availableItem}">
                           <rich:dndParam name="ItemTypeID" value="#{availableItem.itemTypeID}"/>
                           <rich:dndParam name="ItemID" value="#{param.ItemID}"/>
                           </rich:dragSupport>
                           <h:outputLabel id="TypeName" value="#{availableItem.typeName}"></h:outputLabel>
                           </a4j:outputPanel>
                           </h:column>
                           </h:dataTable>
                           </rich:panel>
                          </h:panelGrid>
                          <h:panelGrid columns="1" styleClass="dragdrop">
                           <rich:panel style="width:196px">
                           <f:facet name="header">
                           <h:outputText value="Selected Item" />
                           </f:facet>
                           <rich:dropSupport id="drpSelectedItem" acceptedTypes="availableItem" dropListener="#{itemBean.processSelectedItemDrop}" reRender="dtgSelectedItem,dtgAvailableItem" ajaxSingle="true"></rich:dropSupport>
                           <h:dataTable id="dtgSelectedItem" height="150" value="#{itemBean.selectedItemList}" var="selectedItem" ajaxSingle="true">
                           <h:column>
                           <a4j:outputPanel style="border:1px solid gray;padding:2px" layout="block">
                           <rich:dragSupport id="drgSelectedItem" dragIndicator="indicator" dragType="selectedItem" dragValue="#{selectedItem}">
                           <rich:dndParam name="ItemTypeID" value="#{selectedItem.itemTypeID}"/>
                           <rich:dndParam name="ItemID" value="#{param.ItemID}"/>
                           </rich:dragSupport>
                           <h:outputLabel id="TypeName" value="#{selectedItem.typeName}"></h:outputLabel>
                           </a4j:outputPanel>
                           </h:column>
                           </h:dataTable>
                           </rich:panel>
                          </h:panelGrid>
                          


                          • 10. Re: ajaxSingle + reRender
                            Nick Belaevski Master

                            Could you please add a4:log to the page and attach resulting log after DnD to the post? http://pastebin.com/ can be used for that

                            • 11. Re: ajaxSingle + reRender
                              archana m Newbie

                              Hi kevcpu411
                              i am also facing this type problem in doing Drag and Drop
                              Actuallu the Dragged data is changing in the Array but it is not able to ReRender at UI that's what i am facing ...
                              Are u overcame your problem in Drag and Drop u can send the code of that application please

                              Thanks
                              Venkat