myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mat...@apache.org
Subject svn commit: r398930 - in /myfaces/tomahawk/trunk/sandbox/examples/src/main: java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java webapp/fisheye.jsp
Date Tue, 02 May 2006 12:33:16 GMT
Author: matzew
Date: Tue May  2 05:32:14 2006
New Revision: 398930

URL: http://svn.apache.org/viewcvs?rev=398930&view=rev
Log:
simplified fisheye sample

Modified:
    myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java
    myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java?rev=398930&r1=398929&r2=398930&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java
Tue May  2 05:32:14 2006
@@ -17,8 +17,11 @@
 
 import java.io.Serializable;
 
+import javax.faces.event.AbortProcessingException;
 import javax.faces.event.ActionEvent;
 
+import org.apache.myfaces.custom.navmenu.UINavigationMenuItem;
+
 /**
  * Handler for the FishEye example
  * 
@@ -34,39 +37,15 @@
         this._actionName = "please click on a menu item";
     }
 
-    public void calendarClicked(ActionEvent event)
-    {
-        this._actionName = "Calendar item was clicked";
-    }
-
-    public void emailClicked(ActionEvent event)
-    {
-        this._actionName = "Email item was clicked";
-    }
-
     public String getActionName()
     {
         return _actionName;
     }
 
-    public void textEditorClicked(ActionEvent event)
-    {
-        this._actionName = "Text Editor item was clicked";
-    }
-
-    public void updateClicked(ActionEvent event)
-    {
-        this._actionName = "Software Update item was clicked";
-    }
-
-    public void usersClicked(ActionEvent event)
-    {
-        this._actionName = "Users item was clicked";
-    }
-
-    public void webBrowserClicked(ActionEvent event)
-    {
-        System.out.println("Web Browser clicked");
-        this._actionName = "Web browser item was clicked";
+    public void processAction(ActionEvent event) throws AbortProcessingException
+    {   
+        UINavigationMenuItem comp = (UINavigationMenuItem) event.getComponent(); 
+        this._actionName = comp.getItemLabel() + " item was clicked";
+        
     }
-}
+}
\ No newline at end of file

Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp?rev=398930&r1=398929&r2=398930&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp Tue May  2 05:32:14
2006
@@ -63,19 +63,20 @@
 
 			<t:navigationMenuItem icon="images/icon_browser.png"
 				itemLabel="Web Browser"
-				actionListener="#{fisheye.webBrowserClicked}" />
+				actionListener="#{fisheye.processAction}" />
 			<t:navigationMenuItem icon="images/icon_calendar.png"
-				itemLabel="Calendar" actionListener="#{fisheye.calendarClicked}" />
+				itemLabel="Calendar"
+				actionListener="#{fisheye.processAction}" />
 			<t:navigationMenuItem icon="images/icon_email.png" itemLabel="Email"
-				actionListener="#{fisheye.emailClicked}" />
+				actionListener="#{fisheye.processAction}" />
 			<t:navigationMenuItem icon="images/icon_texteditor.png"
 				itemLabel="Text Editor"
-				actionListener="#{fisheye.textEditorClicked}" />
+				actionListener="#{fisheye.processAction}" />
 			<t:navigationMenuItem icon="images/icon_update.png"
 				itemLabel="Software Update"
-				actionListener="#{fisheye.updateClicked}" />
+				actionListener="#{fisheye.processAction}" />
 			<t:navigationMenuItem icon="images/icon_users.png" itemLabel="Users"
-				actionListener="#{fisheye.usersClicked}" />
+				actionListener="#{fisheye.processAction}" />
 
 		</s:fishEyeNavigationMenu>
 	</t:div>



Mime
View raw message