Here's one way:

 add an abstractbehavior to the page that overrides the renderHead method:

        add(new AbstractBehavior() {
            @Override
            public void renderHead(IHeaderResponse response)
            {
                response.renderJavascript(javascript, id);
            }
        });


--
Jeremy Thomerson
http://www.wickettraining.com



On Thu, Apr 2, 2009 at 5:22 PM, John Lasher <[email protected]>wrote:

> I have this following piece of snippet from my html page. I want to be able
> to set some dynamic content from my java class within the script tag.
> I have searched around quite a bit to find a simple way to do this with
> wicket, but can't find anything. Can someone here  please  help? I would
> like to keep all the html markup and the script stuff within my html page.
> Just want to substitute a single value within the script tag.
>
>
> <div>
>  <labe>Enter Value</label>
>  <input id="search_box" name="search_box"  />
>  <script type="text/javascript">
>       $('search_box').value = *<<dynamic content here>>*
>  </script>
> </div>
>

Reply via email to