incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmatth...@apache.org
Subject svn commit: r1080080 - /incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/Request.java
Date Thu, 10 Mar 2011 00:59:10 GMT
Author: rmatthews
Date: Thu Mar 10 00:59:09 2011
New Revision: 1080080

URL: http://svn.apache.org/viewvc?rev=1080080&view=rev
Log:
Improved titles

Modified:
    incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/Request.java

Modified: incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/Request.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/Request.java?rev=1080080&r1=1080079&r2=1080080&view=diff
==============================================================================
--- incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/Request.java
(original)
+++ incubator/isis/trunk/viewer/scimpi/dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/processor/Request.java
Thu Mar 10 00:59:09 2011
@@ -108,6 +108,13 @@ public class Request implements PageWrit
         buffer.append(html);
     }
 
+    public void appendTruncated(String text, int truncateTo) {
+        if (truncateTo > 0 && text.length() > truncateTo) {
+            text = text.substring(0, truncateTo) + "...";
+        }
+        appendHtml(text);
+    } 
+
     private void process(SwfTag tag, ElementProcessor processor) {
         try {
             LOG.debug("processing " + processor.getName() + " " + tag);
@@ -289,6 +296,6 @@ public class Request implements PageWrit
     
     public void appendDebug(String line) { 
         context.appendDebugTrace(line); 
-    } 
+    }
 }
 



Mime
View raw message