You should forget about Bedrijf and Video. You can see from the code that
the video being displayed depends on the Bedrijf (dutch for company) passed
in. You are free to remove that and pass in your own domain objects (or just
a String if you need / like).

2009/8/20 Gerald Fernando <[email protected]>

> Hi martijin i have write what u gave me but it shows that
>
> Bedrijf cannot be resolved to a type
> Video cannot be resolved to a type
>
> create a class fo rBedrijf and Video
> As i new to wicket i dont know how to write it
> please tell me how to do it.
>
> Thanks&Regards,
> Gerald A
>
>
> On Wed, Aug 19, 2009 at 5:01 PM, Martijn Lindhout
> <[email protected]>wrote:
>
> > Here's how I did it:
> >
> > Java
> > public class VideoPlayer extends Panel {
> >
> >        public VideoPlayer(String id, final Bedrijf bedrijf, final Video
> > video) {
> >                super(id);
> >                add(new WebComponent("player"){
> >                        @Override
> >                        protected void onComponentTagBody(MarkupStream
> > markupStream,
> > ComponentTag openTag) {
> >                                String videoFile = "/static/" +
> > bedrijf.getProfiel().getId() +
> > "/videos/" + video.getNaam();
> >                                StringBuilder script = new StringBuilder(
> >                                        "var s1 = new
> > SWFObject('/static/jobiq/player.swf','ply','328','200','9','#FFFFFF');"
> > +
> >
> >  "s1.addParam('allowfullscreen','true');" +
> >
> >  "s1.addParam('allowscriptaccess','always');" +
> >                                        "s1.addParam('flashvars','file=" +
> > videoFile +
> > "&image=/static/player/preview.jpg');" +
> >                                        "s1.write('container');"
> >                                );
> >
> >                                replaceComponentTagBody(markupStream,
> > openTag, script);
> >                        }
> >                });
> >        }
> >
> > }
> >
> >
> > And the HTML
> >        <wicket:panel>
> >
> >        <div id="container"><a
> > href="http://www.macromedia.com/go/getflashplayer";>Get the Flash
> > Player</a> to see this player.</div>
> >                <script type="text/javascript"
> > src="/static/player/swfobject.js"></script>
> >        <script wicket:id="player" type="text/javascript"></script>
> >        </wicket:panel>
> >
> > 2009/8/19 Gerald Fernando <[email protected]>:
> >  > Hello Friends,
> > >
> > > Shall we have(embed) a swf in wicket component(Panel or in wicket
> page).
> > > I have swf that shows chart for dynamic data.
> > > i want to show my .swf file into wicket page or wicket panel
> > > if possible please give me modal code.
> > > I need urgent reply
> > >
> > >
> > >
> > >
> > > --
> > > Thanks&regards,
> > > Gerald A
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
> --
> Thanks&regards,
> Gerald A
>



-- 
Martijn Lindhout
* 06 - 18 47 25 29
* [email protected]
* http://www.jointeffort.nl

Reply via email to