0 Replies Latest reply on Feb 9, 2012 5:39 AM by gadeyne.bram

    AJAX request and rerender on ondragenter event

    gadeyne.bram

      Hi all,

       

      I'm using Richfaces 3.3.3 (and seam 2.2.2.Final).

       

      I have the following situation:

       

      A graphic image with dropsupport. While the user drags something to this image a modelPanel should appear. This modalpanel must first be rerendered using 2 parameters.

       

      This partialy works but there is no ajax request fired to set the parameters and thus the modalPanel does not get updated.

       

      I'ved used these approaches:

       

      1) a4j:support with event ondragenter: this does not work. Probably I can nog use a richfaces specific event.

      2) a4j:support with event onmouseover: this works but the modalPanel keeps on getting rerendered. It seems like the onmouseover event keeps on ketting fired.

      3) rich:dropSupport with the same actionparameters like the a4j:support in the example below and a reRender property. This does not fire reRender of the properties ondragenter.

       

      <div>

           <h:graphicImage style="#{labOrder.style}" value="../img/microscope.png" height="32px" width="32px" >

                <!-- I tried the onmouseover event but then the modalPanel is flashing. It seems like it keeps on getting rerendered. -->

                 <a4j:support ajaxSingle="true" reRender="abGramPanel"  eventsQueue="abGramQueue" event="ondragenter">

                      <a4j:actionparam name="micromodeltime" value="#{labOrder.inserttime}" assignTo="#{abGramController.labOrderInserttime}" />

                      <a4j:actionparam name="micromodelnumber" value="#{labOrder.labOrderNumber}" assignTo="#{abGramController.labOrdernumber}" />

                 </a4j:support>

                                         

           </h:graphicImage>

           <rich:dropSupport ondragenter="#{rich:component('abGramPanel')}.show()" acceptedTypes="#{infectionOverviewController.dragTypes}">

                <!-- I tried the actionparameters from a4j:support here and enabled the reRender property but there are no ajax requests fired ondragenter. -->

           </rich:dropSupport>

      </div>

       

      Would someone know how I could manage to do this?