lift - How do I load a javascript file as text (String)? -
i know can load html (nodeseq) using templates("file" :: "address" :: nil). there similar way load javascript file /src/main/webapp/ inputstream or string?
ok, found solution, let stay in history...
one can obtain resource files inside /src/main/webapp/ using liftrules.loadresourceasstring("/index.html").openor("")
for example, load js file jccmd 1 can use jscmds.run(liftrules.loadresourceasstring("/js/my.js").openor(""))
Comments
Post a Comment