1 Reply Latest reply on Aug 30, 2007 9:21 AM by fmarwede

    Rendering with <rich:dropSupport>

      Hello!

      I have a panel with an image in it and an associated <rich:dropSupport>.

      When something is dropped, the image should change (to an "in process" animated gif) and with the dropListener attribute I start a method that do some complex stuff with an asynchronous rmi-call and so on. So far it works!

      Here is the problem: The image should change again, when the underlying layer sends a message "rmi-call is processed". That doesn't work. I have to push F5 to get the new image, so it is something like a refresh problem.

      Any ideas?

        • 1. Re: Rendering with <rich:dropSupport>

          Here some code to illustrate that:

          My JSP:

          <rich:panel id="decoderPanel">
           <f:facet name="header">
           <h:outputText value="myTitle"/>
           </f:facet>
           <a4j:commandLink value=""
           actionListener="#{proConManController.deviceSelected}">
           <h:graphicImage value="myImage" binding="myBinding" />
           </a4j:commandLink>
           <rich:dropSupport acceptedTypes="#{someType}"
           dropListener="#{controller.drop}"
           dropValue="#{someName}"
           ondrop="some Expression"/>
          </rich:panel>
          


          Here the relevant part from the dropListener:


          public void drop(DropEvent event) {
           String dropValue = (String) event.getDropValue();
           Encoder encoder = getEncoderMap().get(dropValue);
           RmiQueue callSequence = new RmiQueue();
          
           AsyncRmiCall rmiCall = new AsyncRmiCall() {
           public void execute() {
           if (getBusinessDelegate().connect(encoder)) {
           encoder.setIsConnected(true);
           decoder.updateGUI();
           }
          
           protected RmiQueue getRmiQueue() {
           return callSequence;
           }
           };
           decoder.setImage(Configuration.IN_PROCESS);
           callSequence.enqueRmiCall(rmiCall);
          }
          


          It would be great to start rerendering again after calling the updateGUI method. Please help me!