You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by bo...@apache.org on 2007/08/23 21:37:43 UTC
svn commit: r569126 - in
/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag:
TreeListboxRenderer.java TreeOldRenderer.java
Author: bommel
Date: Thu Aug 23 12:37:43 2007
New Revision: 569126
URL: http://svn.apache.org/viewvc?rev=569126&view=rev
Log:
(TOBAGO-467) Support for partial rendering for the (old) tree
Modified:
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java
myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeOldRenderer.java
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java?rev=569126&r1=569125&r2=569126&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeListboxRenderer.java Thu Aug 23 12:37:43 2007
@@ -96,7 +96,7 @@
writer.writeAttribute(HtmlAttributes.VALUE, value.toString(), true);
writer.endElement(HtmlConstants.INPUT);
- String scriptText = createJavascript(facesContext, clientId, root);
+ String scriptText = createJavascript(facesContext, clientId, tree, root);
String[] scripts = {"script/tree.js"};
List<String> scriptFiles = ComponentUtil.findPage(facesContext, tree).getScriptFiles();
@@ -114,7 +114,7 @@
}
private String createJavascript(FacesContext facesContext, String clientId,
- UITreeOldNode root) throws IOException {
+ UITreeListbox tree, UITreeOldNode root) throws IOException {
StringBuilder sb = new StringBuilder();
sb.append("{\n");
@@ -126,6 +126,7 @@
sb.append("\";\n");
sb.append(" };;\n");
+ sb.append(getTreeNodeCommandVar(facesContext, tree));
sb.append(getNodesAsJavascript(facesContext, root));
sb.append(" var hidden = document.getElementById('");
Modified: myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeOldRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeOldRenderer.java?rev=569126&r1=569125&r2=569126&view=diff
==============================================================================
--- myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeOldRenderer.java (original)
+++ myfaces/tobago/trunk/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/TreeOldRenderer.java Thu Aug 23 12:37:43 2007
@@ -247,7 +247,7 @@
return strings;
}
- private String getTreeNodeCommandVar(FacesContext facesContext, UITreeOld tree) {
+ protected String getTreeNodeCommandVar(FacesContext facesContext, UIComponent tree) {
String clientId = tree.getClientId(facesContext);
String jsClientId = TreeOldRenderer.createJavascriptVariable(clientId);