Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(757)

Issue 53052: OSML support for server-side templates

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 9 months ago by levik
Modified:
16 years, 9 months ago
Reviewers:
awiner, shindig.remailer, louiscryan, etnu00
Base URL:
http://svn.apache.org/repos/asf/incubator/shindig/trunk/
Visibility:
Public.

Description

Includes a library file which defines the three specced OSML tags. os:PeopleSelector doesn't have a spec for passing in currently selected person/people. Used @selected for single values for now, will raise an issue on the threads. Also fixes handling of JavaScript and Style tags nested within TemplateDefs Disables the use of Java-based os:Name (need to remove code)

Patch Set 1 #

Total comments: 4

Patch Set 2 : Updated to adress Louis's feedback #

Patch Set 3 : Much refactoring. Only needed libraries emitted. OSML injected to client. #

Total comments: 6

Patch Set 4 : Minor fixes based on review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+487 lines, -503 lines) Patch
M java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java View 1 2 3 11 chunks +85 lines, -29 lines 0 comments Download
D java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/CompositeTagRegistry.java View 3 1 chunk +0 lines, -43 lines 0 comments Download
A java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/DefaultTemplateLibrary.java View 1 chunk +59 lines, -0 lines 0 comments Download
A java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/LibraryTagRegistry.java View 1 chunk +65 lines, -0 lines 0 comments Download
D java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/NameTagHandler.java View 3 1 chunk +0 lines, -67 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/TemplateLibrary.java View 1 2 3 1 chunk +9 lines, -187 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/TemplateLibraryFactory.java View 3 1 chunk +1 line, -1 line 0 comments Download
A java/gadgets/src/main/java/org/apache/shindig/gadgets/templates/XMLTemplateLibrary.java View 1 chunk +232 lines, -0 lines 0 comments Download
M java/gadgets/src/test/java/org/apache/shindig/gadgets/rewrite/TemplateRewriterTest.java View 3 3 chunks +4 lines, -2 lines 0 comments Download
D java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/CompositeTagRegistryTest.java View 3 1 chunk +0 lines, -76 lines 0 comments Download
A + java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/LibraryTagRegistryTest.java View 3 4 chunks +21 lines, -5 lines 0 comments Download
M java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/RenderTagHandlerTest.java View 3 1 chunk +4 lines, -2 lines 0 comments Download
D java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/TemplateLibraryTest.java View 1 2 3 1 chunk +0 lines, -89 lines 0 comments Download
A + java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/XMLTemplateLibraryTest.java View 3 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 7
louiscryan
looks fine to me once sanitization works. http://codereview.appspot.com/53052/diff/1/3 File java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java (right): http://codereview.appspot.com/53052/diff/1/3#newcode107 Line 107: String ...
16 years, 9 months ago (2009-04-29 20:16:32 UTC) #1
levik
http://codereview.appspot.com/53052/diff/1/3 File java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java (right): http://codereview.appspot.com/53052/diff/1/3#newcode212 Line 212: styleElement.setAttribute("type", "text/css"); On 2009/04/29 20:16:32, louiscryan wrote: > ...
16 years, 9 months ago (2009-04-29 22:46:58 UTC) #2
levik
http://codereview.appspot.com/53052/diff/1/3 File java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java (right): http://codereview.appspot.com/53052/diff/1/3#newcode107 Line 107: String content = IOUtils.toString(this.getClass().getClassLoader(). On 2009/04/29 20:16:32, louiscryan ...
16 years, 9 months ago (2009-04-29 22:47:52 UTC) #3
levik
Updated the patch and created a JIRA issue: https://issues.apache.org/jira/browse/SHINDIG-1042
16 years, 9 months ago (2009-04-30 16:18:08 UTC) #4
louiscryan
Much better. Couple of nits. http://codereview.appspot.com/53052/diff/2001/3007 File java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java (right): http://codereview.appspot.com/53052/diff/2001/3007#newcode243 Line 243: StringBuffer output = ...
16 years, 9 months ago (2009-05-08 20:29:53 UTC) #5
etnu00
http://codereview.appspot.com/53052/diff/2001/3007 File java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java (right): http://codereview.appspot.com/53052/diff/2001/3007#newcode261 Line 261: return '"' + output.toString().replace("</script>", "</scri\" + \"pt>") + ...
16 years, 9 months ago (2009-05-08 20:42:15 UTC) #6
levik
16 years, 9 months ago (2009-05-11 17:12:15 UTC) #7
http://codereview.appspot.com/53052/diff/2001/3007
File
java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/TemplateRewriter.java
(right):

http://codereview.appspot.com/53052/diff/2001/3007#newcode243
Line 243: StringBuffer output = new StringBuffer();
On 2009/05/08 20:29:53, louiscryan wrote:
> Can use JsonSerializer.appendString to do the escaping.

Done

http://codereview.appspot.com/53052/diff/2001/3007#newcode261
Line 261: return '"' + output.toString().replace("</script>", "</scri\" +
\"pt>") + '"';
On 2009/05/08 20:42:15, etnu00 wrote:
> You don't need any hacks like this for closing script tags. Just replacing
> </script> with <\/script> is sufficient (and the 'proper' way).

Good point. Though this doesn't matter any longer with the use of
JsonSerializer.

http://codereview.appspot.com/53052/diff/2001/3005
File
java/gadgets/src/test/java/org/apache/shindig/gadgets/templates/LibraryTagRegistryTest.java
(right):

http://codereview.appspot.com/53052/diff/2001/3005#newcode82
Line 82: reg.getHandlerFor(foo);
On 2009/05/08 20:29:53, louiscryan wrote:
> I would have expected a test to make sure that I got the right TagHanlder
> instance here.

Added
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b