Thanks, but the ajax component is actually just a datepicker from jQuery so it's not Wicket related. I think I'll need to get my Javascript to load the message bundle directly so it doesn't need to go via Wicket.
cheers, Steve On 02/07/2010, at 6:46 PM, nino martinez wael wrote: > Im have you tried implementing the headercontributor Interface in your ajax > component instead of using the headercontributor directly? > > regards Nino > > 2010/7/2 Steve Swinsburg <steve.swinsb...@gmail.com> > >> Hi, >> >> I have a panel that I add via AJAX to my page. On this panel I have a >> StringHeaderContributor block that I want to add. It's not doing anything. >> Does this not work when added via AJAX? The same code works fine when on a >> normal page. >> >> String altText = "some value from an i18n properties file"; >> StringHeaderContributor initJavascript = new StringHeaderContributor( >> "<script type=\"text/javascript\">" + >> "$(document).ready( function(){" + >> "initDatePickerAltText(' " + altText + "');" + >> "});" + >> "</script>"); >> add(initJavascript); >> >> >> The reason I need to do this is because I need to send an internationalised >> string to a javascript function to set up it's alt text which I retrieve >> from the message bundle. I can't do this on the base page because the >> javascript component hasn't been added to the page at this stage. >> >> thanks, >> Steve >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org