1 Reply Latest reply on Nov 29, 2011 6:36 PM by H G

    a:mediaOutput and PAGE scope

    Yoel Kazareski Newbie

           I'm having trouble setting up an a:mediaOutput tag to play a sound with a PAGE scoped bean to back it up. The sound plays fine but the bean is created multiple times, which is incompatible with the page logic since values are not being persisted beyond the request.

      I've seen related topics regarding the CONVERSATION SCOPE but none using PAGE. Is it possible to use a:mediaOutput with a PAGE scoped bean?

      Here is the source for the files involved (only related logic to improve readability).


      <a:mediaOutput id="sound" rendered="true" session="true" element="object" mimeType="audio/x-wav"
                     createContent="#{bean.play}" value="#{bean.filename}" cacheable="false" 
                     style="width:0px;height:0px;" >
           <s:conversationId  value="#{conversation.id}"/> 


      public class Bean implements Serializable {
           private Log log;
           public void start() {
                 // <other stuff>
              public synchronized void play(OutputStream stream, Object object) throws IOException {



      tag is there because of this blog post but it doesn't seem to help.

      Any help? Thanks.