You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ted Vinke <tv...@first8.nl> on 2010/07/14 15:51:50 UTC
Output just text, no component
Hi everybody!
I'm trying to accomplish something new with Wicket: output just some
text, instead of a component. I simply can't figure out how to
dynamically render from my backing Java class $XAML_FILENAME below
(which is the suggested snippet to embed JW Player).
<div name=/"mediaspace"/ id=/"mediaspace"/></div>
<script type=/"text/javascript"/>
*var* cnt = document.getElementById("mediaspace");
*var* src = '$XAML_FILENAME';
*var* cfg = {
file:'video.wmv',
height:'240',
width:'440'
};
*var* ply = *new* jeroenwijering.Player(cnt,src,cfg);
</script>
I've tried to put a SPAN where the $XAML_FILENAME is and add a Label
with setRenderBodyOnly(*true*) but that's for obvious reasons invalid
HTML :)
Any hints are greatly appreciated!
Kind regards, Ted
Re: Output just text, no component
Posted by Ted Vinke <tv...@first8.nl>.
Darn, that's it! Thanks a lot!
Regards, Ted
Op 14-7-2010 16:04, James Carman schreef:
> You can use a org.apache.wicket.util.template.JavaScriptTemplate.
>
> On Wed, Jul 14, 2010 at 9:51 AM, Ted Vinke<tv...@first8.nl> wrote:
>> Hi everybody!
>>
>> I'm trying to accomplish something new with Wicket: output just some text,
>> instead of a component. I simply can't figure out how to dynamically render
>> from my backing Java class $XAML_FILENAME below (which is the suggested
>> snippet to embed JW Player).
>>
>> <div name=/"mediaspace"/ id=/"mediaspace"/></div>
>>
>> <script type=/"text/javascript"/>
>>
>> *var* cnt = document.getElementById("mediaspace");
>>
>> *var* src = '$XAML_FILENAME';
>>
>> *var* cfg = {
>>
>> file:'video.wmv',
>>
>> height:'240',
>>
>> width:'440'
>>
>> };
>>
>> *var* ply = *new* jeroenwijering.Player(cnt,src,cfg);
>>
>> </script>
>>
>>
>> I've tried to put a SPAN where the $XAML_FILENAME is and add a Label with
>> setRenderBodyOnly(*true*) but that's for obvious reasons invalid HTML :)
>>
>> Any hints are greatly appreciated!
>>
>> Kind regards, Ted
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Output just text, no component
Posted by James Carman <ja...@carmanconsulting.com>.
You can use a org.apache.wicket.util.template.JavaScriptTemplate.
On Wed, Jul 14, 2010 at 9:51 AM, Ted Vinke <tv...@first8.nl> wrote:
> Hi everybody!
>
> I'm trying to accomplish something new with Wicket: output just some text,
> instead of a component. I simply can't figure out how to dynamically render
> from my backing Java class $XAML_FILENAME below (which is the suggested
> snippet to embed JW Player).
>
> <div name=/"mediaspace"/ id=/"mediaspace"/></div>
>
> <script type=/"text/javascript"/>
>
> *var* cnt = document.getElementById("mediaspace");
>
> *var* src = '$XAML_FILENAME';
>
> *var* cfg = {
>
> file:'video.wmv',
>
> height:'240',
>
> width:'440'
>
> };
>
> *var* ply = *new* jeroenwijering.Player(cnt,src,cfg);
>
> </script>
>
>
> I've tried to put a SPAN where the $XAML_FILENAME is and add a Label with
> setRenderBodyOnly(*true*) but that's for obvious reasons invalid HTML :)
>
> Any hints are greatly appreciated!
>
> Kind regards, Ted
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org