Author: sergeyhalipov
Date: 2007-06-26 09:14:01 -0400 (Tue, 26 Jun 2007)
New Revision: 1321
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
Log:
Compact JS events code for toggle actions.
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
---
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-06-26
11:13:23 UTC (rev 1320)
+++
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-06-26
13:14:01 UTC (rev 1321)
@@ -96,7 +96,7 @@
StringBuffer buffer = new StringBuffer();
function.appendScript(buffer);
- buffer.append(";");
+ buffer.append("; return false;");
return buffer.toString();
} else if (UITree.SWITCH_SERVER.equals(tree.getSwitchType())) {
String paramName = id + NODE_EXPANDED_INPUT_SUFFIX;
@@ -115,7 +115,7 @@
result.append("', ");
result.append("form.id, ");
result.append("'', ");
- result.append("params);};");
+ result.append("params);}; return false;");
return result.toString();
}
Modified: trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
===================================================================
--- trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-06-26 11:13:23 UTC (rev
1320)
+++ trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-06-26 13:14:01 UTC (rev
1321)
@@ -31,7 +31,7 @@
<f:call name="initializeLines" />
<f:call name="initializeResources" />
- <tr id="#{clientId}:mainRow"
onclick="#{component.attributes['onclick']}; #{this:getToggleScript(context,
component, 'mainRow')} return false;" >
+ <tr id="#{clientId}:mainRow"
onclick="#{component.attributes['onclick']} #{this:getToggleScript(context,
component, 'mainRow')}" >
<f:call name="encodeAttributeParameters" />
<f:call name="utils.encodePassThruWithExclusions">
@@ -64,7 +64,7 @@
]]>
</jsp:scriptlet>
<a href="#" id="#{clientId}:handle"
- onclick="#{this:getToggleScript(context, component, 'handle')}
return false;">
+ onclick="#{this:getToggleScript(context, component,
'handle')}">
<jsp:scriptlet>
<![CDATA[
Show replies by date