myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From we...@apache.org
Subject svn commit: r436967 - /myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
Date Fri, 25 Aug 2006 21:40:24 GMT
Author: werpu
Date: Fri Aug 25 14:40:24 2006
New Revision: 436967

URL: http://svn.apache.org/viewvc?rev=436967&view=rev
Log:
removed a small mess, the stack which shifts the fisheye items on the fly
into the reverse order was misused by me due to time constraints
i wanted to fix this asap, it is done now, the stack is used in a 
proper manner

Modified:
    myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java

Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java?rev=436967&r1=436966&r2=436967&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
(original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/fisheye/HtmlFishEyeNavigationMenuRenderer.java
Fri Aug 25 14:40:24 2006
@@ -133,9 +133,7 @@
             paramMap.put(CONSERVATIVE_TRIGGER_ATTR, fisheye
                 .getConservativeTrigger());
 
-            String menu = DojoUtils.renderWidgetInitializationCode(context,
-                                                                   component, DOJO_COMPONENT_TYPE,
paramMap);
-            getChildsMenuStack(context, component).push(menu);
+            DojoUtils.renderWidgetInitializationCode(context, component, DOJO_COMPONENT_TYPE,
paramMap);
 
         }
 
@@ -185,10 +183,8 @@
         if (component.isRendered()) {
             ResponseWriter writer = context.getResponseWriter();
             Stack menuStack = getChildsMenuStack(context, component);
-            String jsMenuVar = (String) menuStack.remove(0);// TODO change this
-            // to a separate
-            // location this is evil
-
+            String jsMenuVar = DojoUtils.calculateWidgetVarName(component.getClientId(context));
+            
             writer.startElement(HTML.SCRIPT_ELEM, component);
             writer.writeAttribute(HTML.TYPE_ATTR,
                                   HTML.SCRIPT_TYPE_TEXT_JAVASCRIPT, null);
@@ -278,8 +274,7 @@
         Map paramMap = new HashMap();
         paramMap.put(CAPTION_ATTR, item.getItemLabel());
         paramMap.put(ICON_SRC_ATTR, item.getIcon());
-        paramMap.put(ON_CLICK_ATTR, new StringBuffer("function () {").append(
-            onClick).append("}"));
+        paramMap.put(ON_CLICK_ATTR, new StringBuffer("function () {").append(onClick).append("}"));
         // push the onclick as lambda and use a stringbuffer so that we do not
         // get enclosing quotes
         String menuItemId = DojoUtils.renderWidgetInitializationCode(writer,



Mime
View raw message