Here's an example page that you can plug into a quickstart to show the bug:
public class HomePage extends WebPage
{
private static final long serialVersionUID = 1L;
static
{
System.out.println("I'm being initialized within the context
of thread " + Thread.currentThread().getName() + ".");
}
public HomePage()
{
add(new Image("image", new MyImageResource()));
}
private class MyImageResource extends DynamicImageResource
{
private MyImageResource()
{
super("png");
}
@Override
protected byte[] getImageData()
{
final BufferedImage bufferedImage = new BufferedImage(100,
100, BufferedImage.TYPE_4BYTE_ABGR);
Graphics2D g2d = (Graphics2D) bufferedImage.getGraphics();
g2d.setPaint(Color.white);
g2d.fillRect(0, 0, 100, 100);
g2d.setPaint(Color.red);
g2d.drawOval(45, 45, 10, 10);
final ByteArrayOutputStream bout = new ByteArrayOutputStream();
try
{
ImageIO.write(bufferedImage, "png", bout);
bout.close();
}
catch (IOException e)
{
throw new WicketRuntimeException("Unable to render image.", e);
}
return bout.toByteArray();
}
}
}
On Tue, May 25, 2010 at 10:08 AM, Alex Objelean <[email protected]> wrote:
>
> Thanks!
> It is enough for me. I'll do the rest from here..
>
> Alex
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/vote-Revert-WICKET-2846-tp2226987p2230086.html
> Sent from the Wicket - Dev mailing list archive at Nabble.com.
>