Why don't you just pass your BufferedDynamicImageResource to an org.apache.wicket.markup.html.image.Image? That should work just fine if what you're generating in plotPolyGate.getResult().getImage() is 'static'. If it's not static, you can use the Image with an IModel containing the appropriate Resource.
On Sun, Nov 22, 2009 at 2:55 PM, Simon Schafferer <[email protected]> wrote: > Hi, > > initial situation: > > I`m interfacing R with Java and provide some of the R functionalities within > a web interface. > Therefore all my images are BufferedImages from R. For drawing a polygon gate > on one of the images I need the src of the Image for the JavaScript function > that allows the user to draw a gate. > > I used this work around to get to the image source: > > Resource polyGateImageResource; > > BufferedDynamicImageResource dynamicresource = new > BufferedDynamicImageResource(); > dynamicresource.setImage(plotPolyGate.getResult().getImage()); > polyGateImageResource = dynamicresource; > > String modifier = "http://localhost:8080/" + > polyGateImage.getRequest().getURL().replace(":::","") + > "tabs:panel:polyGateImage::IResourceListener::"; > polyGateImage.add(new SimpleAttributeModifier("src", modifier)); > > The String modifier contains: > http://localhost:8080/?wicket:interface=polyGateMap:6:tabs:panel:polyGateImage::IResourceListener:: > > I don't think that this is a good approach to get the URL of a dynamic image, > so i wonder if anybody knows a better solution. > > Greetings > Simon > -- > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
