Now making commercials for Apple, are you? :)

Martijn

On 6/21/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> Yep. Or alternatively, use attribute modifiers:
>
> WebMarkupContainer c = new WebMarkupContainer("myimage");
> c.add(new SimpleAttributeModifier("src",
> "http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg";));
> add(c);
>
> or
>
> public class ExternalImage extends WebMarkupContainer {
>
>   public ExternalImage(String id, IModel model) {
>     add(new AttributeModifier("src", true, model));
>   }
> }
>
> etc.
>
> Eelco
>
>
> On 6/21/06, Stefan Arentz <[EMAIL PROTECTED]> wrote:
> > Do you mean something like this:
> >
> > <html>
> >    <body>
> >      <img wicket:id="externalImage"/>
> >    </body>
> >  </html>
> >
> > public class TestPage extends WebPage
> > {
> >     public TestPage()
> >     {
> >         add(new ExternalImage("externalImage", "
> > http://images.apple.com/macbook/images/macbookglossydisplay20060516.jpg";));
> >     }
> > }
> >
> > If so, then I just hacked this together. Warning: might contain lame code
> > from a Wicket newbie.
> >
> > public class ExternalImage extends WebMarkupContainer
> > {
> >     private final IModel src;
> >
> >     public ExternalImage(String id, String src)
> >     {
> >         super(id);
> >         this.src = new Model(src);
> >     }
> >
> >     public ExternalImage(String id, IModel model)
> >     {
> >         super(id);
> >         this.src = model;
> >     }
> >
> >     protected void onComponentTag(ComponentTag tag)
> >     {
> >         if (src != null) {
> >             Object srcValue = src.getObject(this);
> >             if (srcValue != null) {
> >                 tag.put("src", srcValue.toString());
> >             }
> >         }
> >     }
> >
> >     protected void onComponentTagBody(MarkupStream markupStream,
> > ComponentTag openTag)
> >     {
> >         this.checkComponentTag(openTag, "img");
> >         super.onComponentTagBody(markupStream, openTag);
> >     }
> > }
> >
> > Enjoy :-)
> >
> >  S.
> >
> >
> > On 6/21/06, Alex Objelean <[EMAIL PROTECTED]> wrote:
> > >
> > > I am trying to insert in my page an Image located at some URL...
> > > I have looked at the examples, but there are only the following
> > situations:
> > > - Image as package resource
> > > - Dynamically created image. Re-render whenever resource is asked for.
> > > - Simple model
> > > - Dynamically created buffered image
> > >
> > > but no example which would suite my need. Can you help me?
> > > --
> > > View this message in context:
> > http://www.nabble.com/Beginner-Image-question-t1823773.html#a4973872
> > > Sent from the Wicket - User forum at Nabble.com.
> > >
> > >
> > >
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> >
> >
> > _______________________________________________
> > Wicket-user mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
> >
>
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-- 
Download Wicket 1.2 now! Write Ajax applications without touching JavaScript!
-- http://wicketframework.org

All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to