incubator-graffito-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r168665 - /incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/DocumentPortlet.java
Date Fri, 06 May 2005 21:47:05 GMT
Author: taylor
Date: Fri May  6 14:47:04 2005
New Revision: 168665

URL: http://svn.apache.org/viewcvs?rev=168665&view=rev
Log:
make scrollable div optional via portlet init param
close off missing div tag

Modified:
    incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/DocumentPortlet.java

Modified: incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/DocumentPortlet.java
URL: http://svn.apache.org/viewcvs/incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/DocumentPortlet.java?rev=168665&r1=168664&r2=168665&view=diff
==============================================================================
--- incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/DocumentPortlet.java
(original)
+++ incubator/graffito/trunk/applications/graffito-portlets/src/java/org/apache/portals/graffito/portlets/DocumentPortlet.java
Fri May  6 14:47:04 2005
@@ -106,12 +106,16 @@
                     String anchors = "<hr/>"; //createAnchors(doc);
                     response.getPortletOutputStream().write(out.getBytes());
                     response.getPortletOutputStream().write(anchors.getBytes());
-                    response.getPortletOutputStream().write(DIV_START.getBytes());
+
+                    if (useScrollableDiv)
+                        response.getPortletOutputStream().write(DIV_START.getBytes());
                     if (isText)
                         response.getPortletOutputStream().write("<PRE>".getBytes());
                     drain(doc.getContent().getContentStream(), response.getPortletOutputStream());
                     if (isText)
                         response.getPortletOutputStream().write("</PRE>".getBytes());
+                    if (useScrollableDiv)
+                        response.getPortletOutputStream().write(DIV_END.getBytes());    
               
                                                             				
 					int hash = currentFile.indexOf('#');
 					if(hash != -1)
@@ -128,11 +132,13 @@
                     String currentDocument = "<b>" + title + "</b>"; 
                     String anchors = "<hr/>"; //createAnchors(doc);
                     response.getPortletOutputStream().write(currentDocument.getBytes());
-                    response.getPortletOutputStream().write(anchors.getBytes());        
       
-                    response.getPortletOutputStream().write(DIV_START.getBytes());
+                    response.getPortletOutputStream().write(anchors.getBytes());
+                    if (useScrollableDiv)
+                        response.getPortletOutputStream().write(DIV_START.getBytes());
                     String gif = "<IMG SRC='" + request.getContextPath() + "/FileServlet?uri="
+ doc.getUri() + "'/>";
                     response.getPortletOutputStream().write(gif.getBytes());
-                    response.getPortletOutputStream().write(DIV_END.getBytes());        
           
+                    if (useScrollableDiv)
+                        response.getPortletOutputStream().write(DIV_END.getBytes());    
               
                 }				
 				else 
 				{



Mime
View raw message