You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Philipp Schreiber <de...@web.de> on 2011/11/23 19:52:56 UTC

add resources to javascript

Hi,

Im porting a pure html/javascript app to wicket. The problem is that inside
the javascript some resources are referenced with a fixed path. Is there a
easy way to set these resources paths??

Thanks
Philipp

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/add-resources-to-javascript-tp4101004p4101004.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: add resources to javascript

Posted by Martin Grigorov <mg...@apache.org>.
Use a TextTemplate to deliver a config JSON or something similar.

See https://github.com/wicketstuff/core/blob/master/jdk-1.5-parent/autocomplete-tagit-parent/autocomplete-tagit/src/main/java/org/wicketstuff/tagit/TagItAjaxBehavior.java#L109
for example

On Wed, Nov 23, 2011 at 8:52 PM, Philipp Schreiber
<de...@web.de> wrote:
> Hi,
>
> Im porting a pure html/javascript app to wicket. The problem is that inside
> the javascript some resources are referenced with a fixed path. Is there a
> easy way to set these resources paths??
>
> Thanks
> Philipp
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/add-resources-to-javascript-tp4101004p4101004.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: add resources to javascript

Posted by Philipp Schreiber <de...@web.de>.
So.. ok nevermind... just mounted the resources as PackageResourceReference
and used it in JS.... 

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/add-resources-to-javascript-tp4101004p4103562.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org