[
http://www.stripesframework.org/jira/browse/STS-368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tim Fennell resolved STS-368.
-----------------------------
Resolution: Fixed
So I think this applies much more to the JavaScriptBuilder that underlies the
JavaScriptResolution. What I've done is added a couple of method that allow
the caller to
a) set the name of the root variable used in the javascript
b) get the name of the root variable (even if it was randomly generated)
I think this should be enough to be able to render the JS into a JSP or other
view and then write your own JS that uses it.
> Create a way for JavaScriptResolution to be used in cases where you'd like
> the resultant JS to be sourced-in rather than AJAXed-in
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: STS-368
> URL: http://www.stripesframework.org/jira/browse/STS-368
> Project: Stripes
> Issue Type: New Feature
> Affects Versions: Release 1.4.2
> Reporter: Barry Davies
> Assignee: Tim Fennell
> Priority: Minor
> Fix For: Release 1.5
>
> Attachments: StripesJsRes.patch
>
>
> From the Stripes Users Boards:
> Howdy, Stripers. Has anyone out there run into a case where you want to
> expose a little JS service that is meant to be sourced into pages rather than
> being AJAXed into them? The existing JavaScriptResolution won't work well if
> you want to include the js via something like <script
> src="/someApp/Some.action?info=ElwayRuled"></script>, because the
> streamed-back JS isn't given a variable name. I searched Stripes' JIRA and
> didn't find anything mentioning this type of use case, so apologies if plans
> are already in place. But if plans aren't already in place, would anyone out
> there be interested in having the JavaScriptResolution be enhanced to support
> this case out of the box? I know it's not exactly rocket science to find a
> workaround, but I can see wanting to do this fairly often in the future, and
> I'd like it to be a simple as the AJAX case. I'm thinking that it might be
> as simple as adding an overloaded constructor for JavaScriptResolution that
> takes a variable name, an
d, in that case, streaming "var [theVarName] = " in front of the rest of the
current JavaScriptResolution contents. What do you guys think?
> -BD aka RJ
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development