Tim, many thanks for taking a look.  

I added a new overloaded constructor to JavaScriptBuilder that adds a new 
parameter to the front of the current params for the JS varName to which the 
JSBldr will assign the resultant JS obj graph.  I only changed 
JavaScriptResolution to add a new overloaded constructor to that so that this 
new constructor can delegate to the new constructor for JSBldr.  The entirety 
of the portion of the patch file that deals with JavaScriptResolution is:

+++ stripes/src/net/sourceforge/stripes/ajax/JavaScriptResolution.java    
(working copy)
@@ -43,6 +43,19 @@
     }
 
     /**
+     * Constructs a new JavaScriptResolution that will convert the supplied 
object to JavaScript 
+     * and assign that value to the given variable name.
+     *
+     * @param varName The variable name to which the JS graph will be assigned.
+     * @param rootObject an Object of any type supported by [EMAIL PROTECTED] 
JavaScriptBuilder}. In most cases
+     *        this will either be a JavaBean, Map, Collection or Array, but 
may also be any one of
+     *        the basic Java types including String, Date, Number etc.
+     */
+    public JavaScriptResolution(String varName, Object rootObject, Class<?>... 
userTypesExcluded) {
+        this.builder = new JavaScriptBuilder(varName, rootObject, 
userTypesExcluded);
+    }
+
+    /**
      * Converts the object passed in to JavaScript and streams it back to the 
client.
      */
     public void execute(HttpServletRequest request, HttpServletResponse 
response) throws Exception {


So not alot of chgs to that file.  And, really, the remaining portion of the 
patch file (the stuff pertaining to JavaScriptBuilder) is only 50% bigger than 
the above snippet.  

-BD aka RJ


----- Original Message ----
From: Tim Fennell <[EMAIL PROTECTED]>
To: Stripes Development List <[email protected]>
Sent: Thursday, May 17, 2007 8:34:05 AM
Subject: Re: [Stripes-dev] Issue STS-368 (JavaScriptResolution for sourced-in 
JS)

I've been following, but I haven't had a chance to look at the patch yet.  In 
essence I think the idea of being able to capture the output of a JSBuilder and 
assign it to some variable in JavaScript is a good idea.  OTOH, I'm not sure 
why this would require a patch to the JSResolution (just the builder).  Perhaps 
I should take a look at the patch ;)

-t

On May 17, 2007, at 9:08 AM, Barry Davies wrote:

Are any committers interested in examining the patch I created for the 
JavaScriptBuilder and JavaScriptResolution classes?  It's not a heckuvalot of 
code changes--very small patch file.  The JIRA issue I created for this is 
here.  That patch file I created is attached for the curious, but it's also 
attached to the JIRA issue.  If the patch it deemed not worthy, that's fine, 
but I'd like to know whether I should keep posting about it or not.  

-BD aka RJ

----- Original Message ----
From: Barry Davies <[EMAIL PROTECTED]>
To: Stripes Development Mailing List <[email protected]>
Sent: Wednesday, May 16, 2007 3:36:15 PM
Subject: [Stripes-dev] Issue STS-368 (JavaScriptResolution for sourced-in JS)

Kai - 

Any further thoughts on the patch I submitted for JIRA issue STS-368?  Did you 
end up getting the approach you were mentioning to work?  For anyone 
interested, Kai and I have basically been conversing on the subject thru 
comments on the JIRA issue.  

-BD aka RJ



      Yahoo! oneSearch: Finally,  mobile search that gives answers, not web 
links. -------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development






      You snooze, you lose. Get messages ASAP with AutoCheck
 in the all-new Yahoo! Mail Beta. <StripesJsRes.patch>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development
 


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development







 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to