You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by to...@apache.org on 2006/10/16 17:12:52 UTC
svn commit: r464513 - in /myfaces/tomahawk/trunk/sandbox/examples/src/main:
java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java
webapp/fisheye.jsp
Author: tomsp
Date: Mon Oct 16 08:12:41 2006
New Revision: 464513
URL: http://svn.apache.org/viewvc?view=rev&rev=464513
Log:
added ActionListener to FishEyeItem
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/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/java/org/apache/myfaces/examples/fisheye/FishEyeHandler.java?view=diff&rev=464513&r1=464512&r2=464513
==============================================================================
--- 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 Mon Oct 16 08:12:41 2006
@@ -67,13 +67,24 @@
public List getItems() {
List list = new ArrayList();
- list.add(new FishEyeItem("browser","images/icon_browser.png"));
- list.add(new FishEyeItem("cal", "images/icon_calendar.png"));
- list.add(new FishEyeItem("email", "images/icon_email.png"));
- list.add(new FishEyeItem("texteditor", "images/icon_texteditor.png"));
- list.add(new FishEyeItem("swupdate", "images/icon_update.png"));
- list.add(new FishEyeItem("users", "images/icon_users.png"));
+ list.add(new FooFishEyeItem("browser","images/icon_browser.png"));
+ list.add(new FooFishEyeItem("cal", "images/icon_calendar.png"));
+ list.add(new FooFishEyeItem("email", "images/icon_email.png"));
+ list.add(new FooFishEyeItem("texteditor", "images/icon_texteditor.png"));
+ list.add(new FooFishEyeItem("swupdate", "images/icon_update.png"));
+ list.add(new FooFishEyeItem("users", "images/icon_users.png"));
return list;
+ }
+
+ public class FooFishEyeItem extends FishEyeItem {
+ public FooFishEyeItem(String caption, String iconSrc) {
+ super(caption, iconSrc);
+ }
+
+ public void action(ActionEvent event) {
+ _actionName = getCaption() + " item was clicked";
+ }
+
}
public Map getLabels() {
Modified: myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp?view=diff&rev=464513&r1=464512&r2=464513
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp (original)
+++ myfaces/tomahawk/trunk/sandbox/examples/src/main/webapp/fisheye.jsp Mon Oct 16 08:12:41 2006
@@ -62,8 +62,8 @@
<s:fishEyeNavigationMenu itemWidth="50" itemHeight="50" itemMaxWidth="80"
itemMaxHeight="80" orientation="horizontal" effectUnits="2" var="item" value="#{fisheye.items}"
itemPadding="10" attachEdge="top" labelEdge="bottom" visibleWindow="3" >
- <s:fishEyeCommandLink caption="#{fisheye.labels[item.caption]}" iconSrc="#{item.iconSrc}" target="#{item.target}"
- actionListener="#{fisheye.processAction}"/>
+ <s:fishEyeCommandLink caption="#{labels.labels[item.caption]}" iconSrc="#{item.iconSrc}" target="#{item.target}"
+ actionListener="#{item.action}"/>
</s:fishEyeNavigationMenu>
</t:div>
<t:div styleClass="page">