You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mk...@apache.org on 2006/08/16 15:18:53 UTC
svn commit: r431892 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java
Author: mkienenb
Date: Wed Aug 16 06:18:50 2006
New Revision: 431892
URL: http://svn.apache.org/viewvc?rev=431892&view=rev
Log:
TOMAHAWK-603 -- Clean up of dead code, imports, and unused variables in MyFaces Tomahawk Sandbox.
These ones needed clarification on whether they might be used for future work.
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java?rev=431892&r1=431891&r2=431892&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/suggestajax/tablesuggestajax/TableSuggestAjaxRenderer.java Wed Aug 16 06:18:50 2006
@@ -273,51 +273,6 @@
}
}
- private void encodeTable(TableSuggestAjax tableSuggestAjax, FacesContext context)
- throws IOException
-
- {
- //now, writing the response
- StringBuffer buf = new StringBuffer();
-
- Collection suggesteds = getSuggestedItems(context, tableSuggestAjax);
-
- if (getChildren(tableSuggestAjax)!=null
- && !getChildren(tableSuggestAjax).isEmpty())
- {
- if (tableSuggestAjax.getMaxSuggestedItems() != null)
- {
- List oneSuggestedTable = new ArrayList();
- List wholeList = new ArrayList();
- wholeList.addAll(suggesteds);
-
- int j = 0;
-
- while (j <= wholeList.size()-1)
- {
- for (int i = 0; i < tableSuggestAjax.getMaxSuggestedItems().intValue(); i++)
- {
- Object entry = wholeList.get(j);
- oneSuggestedTable.add(entry);
- j++;
-
- if(j == wholeList.size())
- break;
- }
-
- writeOneSuggestList(buf, oneSuggestedTable, context, tableSuggestAjax);
- oneSuggestedTable.clear();
- }
- }
- else
- {
- writeSuggestList(buf, suggesteds, context, tableSuggestAjax);
- }
- }
-
- context.getResponseWriter().write(buf.toString());
- }
-
private void writeOneSuggestList(StringBuffer buf,Collection suggesteds,
FacesContext context, TableSuggestAjax tableSuggestAjax)
{
@@ -341,29 +296,6 @@
buf.append(renderNextPageField(tableSuggestAjax, context));
}
-
- private void encodeAjaxTableTemplate(FacesContext context,
- TableSuggestAjax tableSuggestAjax) throws IOException
- {
- StringBuffer buf = new StringBuffer();
- buf.append("<table");
- if (tableSuggestAjax.getTableStyleClass() != null)
- {
- buf.append(" class=\"" + tableSuggestAjax.getTableStyleClass() + "\" ");
- }
-
- buf.append(" id=\"" + tableSuggestAjax.getClientId(context) + "_table" + "\" ");
- buf.append(">");
-
- buf.append(renderTableHeader(tableSuggestAjax.getChildren()));
- buf.append("<tbody></tbody>");
- buf.append("</table>");
-
- context.getResponseWriter().write(buf.toString());
-
- }
-
-
//renders the response data in an XML format
private void renderResponse(TableSuggestAjax tableSuggestAjax,