2 Replies Latest reply on Apr 9, 2008 10:13 AM by ilya_shaikovsky

    mediaOutput don't found createContent method

    mcsous

      Hello,

      I'm using JSF 1.2, Rich Faces 3.2.0, Facelets and Jboss Seam 2.0.0GA. I tried to use mediaOutput component, but I'm have some problem. I even tried to use example showed in demo, but I received the same problem.

      javax.el.ELException: /MediaTest.xhtml: Property 'paint' not found on type org.richfaces.demo.media.MediaBean_$$_javassist_6


      But the code is:
      package org.richfaces.demo.media;
      
      import java.awt.Graphics2D;
      
      import java.awt.image.BufferedImage;
      
      import java.io.IOException;
      
      import java.io.OutputStream;
      
      import javax.imageio.ImageIO;
      
      import org.jboss.seam.annotations.Name;
      
      @Name("mediaBean")
      public class MediaBean {
       public void paint(OutputStream out, Object data) throws IOException{
      
       if (data instanceof MediaData) {
      
      
      
       MediaData paintData = (MediaData) data;
      
       BufferedImage img = new BufferedImage(paintData.getWidth(),paintData.getHeight(),BufferedImage.TYPE_INT_RGB);
      
       Graphics2D graphics2D = img.createGraphics();
      
       graphics2D.setBackground(paintData.getBackground());
      
       graphics2D.setColor(paintData.getDrawColor());
      
       graphics2D.clearRect(0,0,paintData.getWidth(),paintData.getHeight());
      
       graphics2D.drawLine(5,5,paintData.getWidth()-5,paintData.getHeight()-5);
      
       graphics2D.drawChars(new String("RichFaces").toCharArray(),0,9,40,15);
      
       graphics2D.drawChars(new String("mediaOutput").toCharArray(),0,11,5,45);
       ImageIO.write(img,"jpeg",out);
       }
       }
      }


      Is there any issues about those tecnologies together?