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®ards,
> Gerald A
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]