Author: nbelaevski
Date: 2008-03-27 22:59:42 -0400 (Thu, 27 Mar 2008)
New Revision: 7342
Modified:
trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java
trunk/samples/tree-demo/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-2812
Modified: trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java 2008-03-28 02:57:35 UTC
(rev 7341)
+++ trunk/samples/tree-demo/src/main/java/org/richfaces/Bean.java 2008-03-28 02:59:42 UTC
(rev 7342)
@@ -33,6 +33,7 @@
import javax.faces.application.Application;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
import javax.faces.event.FacesEvent;
import org.ajax4jsf.context.AjaxContext;
@@ -491,4 +492,9 @@
public void incCounter1() {
counter1++;
}
+
+ public void action(ActionEvent event) {
+ System.out.println("Bean.action() " +
+ event.getComponent().getClientId(FacesContext.getCurrentInstance()));
+ }
}
\ No newline at end of file
Modified: trunk/samples/tree-demo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/tree-demo/src/main/webapp/pages/index.jsp 2008-03-28 02:57:35 UTC (rev
7341)
+++ trunk/samples/tree-demo/src/main/webapp/pages/index.jsp 2008-03-28 02:59:42 UTC (rev
7342)
@@ -67,6 +67,8 @@
<h:form>
+ <h:inputText required="true" value="value" />
+
<dnd:dragIndicator id="treeIndicator">
<f:facet name="single">
<f:verbatim>{marker} <br /> {treeParam} <br />
{nodeParam}</f:verbatim>
@@ -166,7 +168,8 @@
</h:inputText>
<dnd:dndParam name="nodeParam" value="Node Parameter" />
-
+ <h:outputText value=" " escape="false" />
+ <a4j:commandLink ajaxSingle="true" value="Immediate Link"
actionListener="#{bean.action}" onclick="Event.stop(event)"/>
</rich:treeNode>
<rich:treeNode type="text" nodeClass="customNode"
acceptedTypes="file2" onselected="return false;">
<h:outputText value="#{data}" />
@@ -193,6 +196,8 @@
<rich:treeNode>
<h:outputText value="#{data.data}" />
+ <h:outputText value=" " escape="false" />
+ <a4j:commandLink ajaxSingle="true" value="Immediate Link"
actionListener="#{bean.action}" onclick="Event.stop(event)"/>
</rich:treeNode>
</rich:tree>