1 Reply Latest reply on May 27, 2010 8:36 PM by karlkras

    Message Pushing... again.

    karlkras

      Howdy once again.

      I have an idea of what I'd like to do, but wanted to get a sanity check on whether it's possible.

      I'm wanting to provide a message server to a javabean and have that javabean update a control on a web form with a message supplied from the message server... so for example, my interface:

       

       

      // simple example interface

      public interface IBasicListener {

           void infoMessage(String message);

      }

       

      // bean class...

      public class MyBean implements IBasicListener {

       

      ...

       

         void infoMessage(String message) {

            // take this message, put it in a data object

            // that's assiged to a web component, and force the component to re-reender

            // from the bean so it contains this message.

      }

       

      I would assume this is doable? It's the re-rendering from the bean that I'm unsure about.

       

      thanks for any help on this,

      Karl

        • 1. Re: Message Pushing... again.
          karlkras

          Okay, so I went back to trying to use the ajax push control and am having some success, though still a bit clunky.

           

          Something a bit more fundamental... my goal is to populate an output textarea "like" component with the strings that are coming back from my message server. This way, when the amount of strings grows larger then the size of the border of the textarea, scrollbars can be rendered and viewed accordingly.

          What can be used in JSF/richfaces for output text areas? All that seems to be available is inputTextArea and that's no good for me.

          Examples using the push process show a single outputText control getting updated. While I can simply append strings to the data getter

          associated with the  value element of the outputText and have it grow as the messages come in, it can potentially force the dialog to stretch indefinitely and I don't want this behavior. There certainly must be some stock component capable of this requirement?

           

          thanks.