Oh - didn't notice that it was inline. But that begs the question - why do this as JS at all? Why not just set the model of the input field?
-- Jeremy Thomerson http://www.wickettraining.com On Thu, Apr 2, 2009 at 5:36 PM, Igor Vaynberg <[email protected]>wrote: > you can let your component implement iheadercontributor rather then > bothering with a behavior...but this will go into head - not what he > wanted i guess. > > -igor > > On Thu, Apr 2, 2009 at 3:34 PM, Jeremy Thomerson > <[email protected]> wrote: > > 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> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
