You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2012/02/21 17:29:43 UTC
svn commit: r1291897 - in /myfaces/tobago/trunk:
tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/
tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/
tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderk...
Author: lofwyr
Date: Tue Feb 21 16:29:43 2012
New Revision: 1291897
URL: http://svn.apache.org/viewvc?rev=1291897&view=rev
Log:
TOBAGO-1094: Using CODI and JSP results in some problems with scripts and styles on the page
- call of "flush" is wrapped and will be called the correct closing bracket
Modified:
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/AjaxUtils.java
myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java
myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/AjaxUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/AjaxUtils.java?rev=1291897&r1=1291896&r2=1291897&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/AjaxUtils.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/ajax/AjaxUtils.java Tue Feb 21 16:29:43 2012
@@ -130,6 +130,7 @@ public class AjaxUtils {
}
private static void redirectInternal(Writer writer, String url) throws IOException {
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
writer.write("{\n \"tobagoAjaxResponse\": true,\n");
writer.write(" \"responseCode\": 302,\n");
writer.write(" \"location\": \"");
Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java?rev=1291897&r1=1291896&r2=1291897&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java Tue Feb 21 16:29:43 2012
@@ -197,6 +197,7 @@ public abstract class TobagoResponseWrit
public void startJavascript() throws IOException {
startElement(HtmlElements.SCRIPT, null);
writeAttribute(HtmlAttributes.TYPE, "text/javascript", false);
+ flush(); // is needed in some cases, e. g. TOBAGO-1094
// write("\n<!--\n");
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java?rev=1291897&r1=1291896&r2=1291897&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/PageRenderer.java Tue Feb 21 16:29:43 2012
@@ -245,6 +245,7 @@ public class PageRenderer extends PageRe
Set<String> styleBlocks = FacesContextUtils.getStyleBlocks(facesContext);
if (styleBlocks.size() > 0) {
writer.startElement(HtmlElements.STYLE, null);
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
for (String cssBlock : styleBlocks) {
writer.write(cssBlock);
}
@@ -731,6 +732,7 @@ public class PageRenderer extends PageRe
ResponseWriter writer) throws IOException {
writer.startElement(HtmlElements.DIV, null);
writer.writeAttribute(HtmlAttributes.STYLE, "color: red", null);
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
writer.write("[");
writer.write(id != null ? id : "null");
writer.write("]");
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java?rev=1291897&r1=1291896&r2=1291897&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/RichTextEditorRenderer.java Tue Feb 21 16:29:43 2012
@@ -127,7 +127,7 @@ public class RichTextEditorRenderer exte
writer.writeIdAttribute(clientId);
writer.writeStyleAttribute(style);
- writer.writeText("");
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
writer.write(RichTextEditorRenderer.contentToHtml(content));
writer.endElement(HtmlElements.DIV);
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java?rev=1291897&r1=1291896&r2=1291897&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SelectManyShuttleRenderer.java Tue Feb 21 16:29:43 2012
@@ -77,6 +77,7 @@ public class SelectManyShuttleRenderer e
writer.startElement(HtmlElements.DIV, null);
writer.writeStyleAttribute(labelStyle);
writer.writeClassAttribute(Classes.create(select, "unselectedLabel"));
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
writer.write(unselectedLabel);
writer.endElement(HtmlElements.DIV);
}
@@ -118,6 +119,7 @@ public class SelectManyShuttleRenderer e
labelStyle.setLeft(labelStyle.getLeft().add(selectWidth).add(buttonWidth));
writer.writeStyleAttribute(labelStyle);
writer.writeClassAttribute(Classes.create(select, "selectedLabel"));
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
writer.write(selectedLabel);
writer.endElement(HtmlElements.DIV);
}
Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java?rev=1291897&r1=1291896&r2=1291897&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/SheetRenderer.java Tue Feb 21 16:29:43 2012
@@ -436,7 +436,7 @@ public class SheetRenderer extends Layou
writer.writeClassAttribute(Classes.create(sheet, "pagingOuter", showRowRange));
writer.writeAttribute(HtmlAttributes.TITLE,
ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetPagingInfoRowPagingTip"), true);
- writer.writeText("");
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
writer.write(createSheetPagingInfo(sheet, facesContext, pagerCommandId, true));
writer.endElement(HtmlElements.SPAN);
}
@@ -473,7 +473,7 @@ public class SheetRenderer extends Layou
writer.writeClassAttribute(Classes.create(sheet, "pagingText"));
writer.writeAttribute(HtmlAttributes.TITLE,
ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheetPagingInfoPagePagingTip"), true);
- writer.writeText("");
+ writer.flush(); // is needed in some cases, e. g. TOBAGO-1094
writer.write(createSheetPagingInfo(sheet, facesContext, pagerCommandId, false));
writer.endElement(HtmlElements.SPAN);
boolean atEnd = sheet.isAtEnd();