JBoss Rich Faces SVN: r210 - trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-29 10:29:39 -0400 (Thu, 29 Mar 2007)
New Revision: 210
Modified:
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/Bean.java
Log:
Improvement for demo application.
Modified: trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/Bean.java
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/…
[View More]richfaces/samples/dropdownmenu/Bean.java 2007-03-29 14:27:40 UTC (rev 209)
+++ trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/Bean.java 2007-03-29 14:29:39 UTC (rev 210)
@@ -21,6 +21,9 @@
package org.richfaces.samples.dropdownmenu;
+import javax.faces.event.ActionEvent;
+import org.richfaces.component.UIMenuItem;
+
/**
* @author $Autor$
*/
@@ -35,4 +38,13 @@
public void setWidth(String width) {
this.width = width;
}
+
+ public void actionListener(ActionEvent event) {
+ System.out.println("ActionEvent on " + event.getComponent().getId() + " & Phase is "+ event.getPhaseId());
+ }
+
+ public String action() {
+ System.out.println("Action!!!");
+ return "null";
+ }
}
\ No newline at end of file
[View Less]
18 years
JBoss Rich Faces SVN: r209 - trunk/richfaces/menu-components/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-29 10:27:40 -0400 (Thu, 29 Mar 2007)
New Revision: 209
Modified:
trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-03-29 14:27:02 UTC (rev …
[View More]208)
+++ trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-03-29 14:27:40 UTC (rev 209)
@@ -14,6 +14,7 @@
<h:scripts>
new org.ajax4jsf.framework.resource.PrototypeScript(),
new org.ajax4jsf.framework.ajax.AjaxScript(),
+ new org.ajax4jsf.framework.util.command.CommandScript(),
</h:scripts>
<f:call name="initializeResources" />
@@ -23,13 +24,13 @@
class="#{class}"
onmouseout="#{onmouseout}"
onmouseover="#{onmouseover}"
- style="cursor: pointer; #{component.attributes['style']}"
- onclick="#{component.attributes['onclick']} #{onclick}"
+ style="#{component.attributes['style']}"
+ onclick="#{onclick}"
>
<!-- f:call name="encodeAttributeParameters" / -->
<span id="#{clientId}:icon"
- class="#{iconClass}">
+ class="#{iconClass}">
<jsp:scriptlet><![CDATA[
UIComponent iconFacet = getIconFacet((org.richfaces.component.UIMenuItem) component);
if (null != iconFacet) {
[View Less]
18 years
JBoss Rich Faces SVN: r208 - trunk/richfaces/menu-components/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-29 10:27:02 -0400 (Thu, 29 Mar 2007)
New Revision: 208
Modified:
trunk/richfaces/menu-components/src/main/config/component/menucomponents.xml
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/config/component/menucomponents.xml
===================================================================
--- trunk/richfaces/menu-components/src/main/config/component/menucomponents.xml 2007-03-29 14:26:24 UTC (rev 207)
+++ trunk/…
[View More]richfaces/menu-components/src/main/config/component/menucomponents.xml 2007-03-29 14:27:02 UTC (rev 208)
@@ -173,8 +173,7 @@
<property>
<name>mode</name>
<classname>java.lang.String</classname>
- <description>Set the submission mode (ajax, server(Default), none)</description>
- <defaultvalue>"server"</defaultvalue>
+ <description>Set the submission mode. If not defined, inherited from parent dropDownMenu component.</description>
</property>
<!-- Command attributes -->
[View Less]
18 years
JBoss Rich Faces SVN: r207 - trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-29 10:26:24 -0400 (Thu, 29 Mar 2007)
New Revision: 207
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/…
[View More]MenuItemRendererBase.java 2007-03-29 14:25:44 UTC (rev 206)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-03-29 14:26:24 UTC (rev 207)
@@ -22,10 +22,13 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
+import java.util.Map;
import javax.faces.component.UIComponent;
-import javax.faces.component.UIForm;
+import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.PhaseId;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.ajax4jsf.framework.renderer.ComponentVariables;
@@ -34,12 +37,13 @@
import org.richfaces.component.UIMenuItem;
import org.richfaces.component.util.ViewUtil;
import org.richfaces.renderkit.CompositeRenderer;
+import org.ajax4jsf.framework.util.command.CommandScriptBuilder;
public class MenuItemRendererBase extends CompositeRenderer {
- private static RendererUtils rendererUtils = new RendererUtils();
+// private static RendererUtils rendererUtils = new RendererUtils();
protected Class getComponentClass() {
return UIMenuItem.class;
@@ -49,6 +53,37 @@
return true;
}
+ public void doDecode(FacesContext context, UIComponent component) {
+
+ super.doDecode(context, component);
+
+ ExternalContext exCtx = context.getExternalContext();
+ Map rqMap = exCtx.getRequestParameterMap();
+ Object clnId = rqMap.get(component.getClientId(context));
+ if(clnId == null) {
+ clnId = rqMap.get(component.getClientId(context) + ":hidden");
+ }
+ UIMenuItem menuItem = (UIMenuItem)component;
+ if(clnId!=null) {
+
+ // enqueue event here for this component or for component with Id
+ // taken from forId attribute
+
+ String mode = menuItem.getMode();
+ if (!UIMenuItem.MODE_NONE.equalsIgnoreCase(mode)) {
+
+ ActionEvent actionEvent = new ActionEvent(menuItem);
+ if (menuItem.isImmediate()) {
+ actionEvent.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else {
+ actionEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ }
+ menuItem.queueEvent(actionEvent);
+ }
+ }
+ }
+
+
public void initializeResources(FacesContext context, UIMenuItem menuItem)
throws IOException {
ComponentVariables variables = ComponentsVariableResolver.getVariables(this, menuItem);
@@ -77,21 +112,22 @@
StringBuffer scriptValue = new StringBuffer();
scriptValue.append("this.className='dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled ")
.append(getStringAttributeOrEmptyString(menuItem, "styleClass") + "'; ");
- if (null == getIconFacet(menuItem)) {
+ //if (null == getIconFacet(menuItem)) {
scriptValue.append("document.getElementById('" + menuItem.getClientId(context) + ":icon').className='dr-menu-icon rich-menu-item-icon ")
.append(getStringAttributeOrEmptyString(menuItem, "iconClass") + "'; ");
- }
+ //}
scriptValue.append("document.getElementById('" + menuItem.getClientId(context) + ":anchor').className='dr-menu-label rich-menu-item-label'; ")
.append(getStringAttributeOrEmptyString(menuItem, "onmouseout"));
variables.setVariable("onmouseout", scriptValue);
scriptValue = new StringBuffer();
scriptValue.append("this.className='dr-menu-item dr-menu-item-hover rich-menu-item rich-menu-item-hover ")
- .append(getStringAttributeOrEmptyString(menuItem, "styleClass") + "'; ");
- if (null == getIconFacet(menuItem)) {
+ .append(getStringAttributeOrEmptyString(menuItem, "styleClass") + " ")
+ .append(getStringAttributeOrEmptyString(menuItem, "selectClass") + "'; ");
+ //if (null == getIconFacet(menuItem)) {
scriptValue.append("document.getElementById('" + menuItem.getClientId(context) + ":icon').className='dr-menu-icon dr-menu-icon-selected rich-menu-item-icon rich-menu-item-icon-selected ")
.append(getStringAttributeOrEmptyString(menuItem, "iconClass") + "'; ");
- }
+ //}
scriptValue.append("document.getElementById('" + menuItem.getClientId(context) + ":anchor').className='dr-menu-label dr-menu-label-selected rich-menu-item-label rich-menu-item-label-selected'; ")
.append(getStringAttributeOrEmptyString(menuItem, "onmouseout"));
variables.setVariable("onmouseover", scriptValue);
@@ -109,21 +145,25 @@
variables.setVariable("labelClass", resource);
resource = null;
- String mode = menuItem.getMode();
- StringBuffer onClick = new StringBuffer();
+ String mode = resolveSubmitMode(menuItem);
if (mode.equalsIgnoreCase(UIMenuItem.MODE_AJAX)) {
- onClick.append(AjaxRendererUtils.buildOnClick(menuItem, context));
- //resource = "alert('Ajax submit mode');";
+ resource = AjaxRendererUtils.buildOnClick(menuItem, context).toString();
} else if (mode.equalsIgnoreCase(UIMenuItem.MODE_SERVER)) {
- UIForm form= rendererUtils.getNestingForm(context, menuItem);
- //resource = "document.getElementById('" + form.getId() + "').submit();";
- onClick.append("document.getElementById('" + form.getId() + "').submit();");
+ CommandScriptBuilder builder = new CommandScriptBuilder(menuItem);
+ builder.setCheckActionAndListener(true);
+ Object target = menuItem.getAttributes().get("target");
+ if (null != target) {
+ builder.setTarget((String) target);
+ }
+ builder.setUseOriginalOnclick(true);
+ builder.addCodeBefore("Event.stop(event || window.event);");
+ //builder.addCodeAfter("Exadel.Menu.Layers.shutdown();return false;");
+ String id = menuItem.getClientId(context);// + ":submit";
+ builder.addParameter(id + ":hidden", id);
+ resource = builder.toString();
}
- //if (resource != null) {
- // variables.setVariable("onclick", resource);
- //}
- if (onClick.length() > 0) {
- variables.setVariable("onclick", onClick.toString());
+ if (resource != null) {
+ variables.setVariable("onclick", resource);
}
}
}
@@ -147,5 +187,21 @@
}
return iconFacet;
}
-
+
+ private String resolveSubmitMode(UIMenuItem menuItem) {
+ String submitMode = menuItem.getMode();
+ if (null != submitMode) {
+ return submitMode;
+ }
+ UIComponent parent = menuItem.getParent();
+ while (null != parent) {
+ submitMode = (String) parent.getAttributes().get("mode");
+ if (null != submitMode) {
+ return submitMode;
+ }
+ parent = parent.getParent();
+ }
+ return UIMenuItem.MODE_SERVER;
+ }
+
}
[View Less]
18 years
JBoss Rich Faces SVN: r206 - trunk/richfaces/menu-components/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: F.antonov
Date: 2007-03-29 10:25:44 -0400 (Thu, 29 Mar 2007)
New Revision: 206
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-03-29 14:13:09 …
[View More]UTC (rev 205)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/component/UIMenuItem.java 2007-03-29 14:25:44 UTC (rev 206)
@@ -21,14 +21,14 @@
package org.richfaces.component;
-import javax.faces.component.UIOutput;
+import org.ajax4jsf.framework.ajax.AjaxActionComponent;
+
-
/**
* JSF component class
*
*/
-public abstract class UIMenuItem extends UIOutput {
+public abstract class UIMenuItem extends AjaxActionComponent {
public static final String MODE_AJAX = "ajax";
public static final String MODE_SERVER = "server";
@@ -37,6 +37,9 @@
public abstract String getMode();
public abstract void setMode(String mode);
+ public abstract Object getValue();
+ public abstract void setValue(Object value);
+
public abstract String getIcon();
public abstract void setIcon(String icon);
@@ -44,5 +47,6 @@
public abstract void setIconDisabled(String iconDisabled);
public abstract boolean isDisabled();
- public abstract void setDisabled(boolean disabled);
+ public abstract void setDisabled(boolean disabled);
+
}
[View Less]
18 years
JBoss Rich Faces SVN: r205 - trunk/richfaces/simpleTogglePanel/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-29 10:13:09 -0400 (Thu, 29 Mar 2007)
New Revision: 205
Modified:
trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
Log:
Template updated for http://jira.jboss.com/jira/browse/RF-43
Modified: trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx
===================================================================
--- trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-03-29 12:33:02 …
[View More]UTC (rev 204)
+++ trunk/richfaces/simpleTogglePanel/src/main/templates/simpleTogglePanel.jspx 2007-03-29 14:13:09 UTC (rev 205)
@@ -60,7 +60,7 @@
style="position : relative;"
onclick="#{this:getOnClick(context,component)}">
- #{component.attributes['label']}  
+ #{component.attributes['label']} &nbsp;
<div id="#{clientId}_switch"
style="position : absolute; top: 0px; right: 5px;">
<jsp:scriptlet><![CDATA[
[View Less]
18 years
JBoss Rich Faces SVN: r204 - in trunk/richfaces/panelmenu/design: panelmenu and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-29 08:33:02 -0400 (Thu, 29 Mar 2007)
New Revision: 204
Added:
trunk/richfaces/panelmenu/design/panelmenu/
trunk/richfaces/panelmenu/design/panelmenu/icon.gif
trunk/richfaces/panelmenu/design/panelmenu/panel_menu.html
trunk/richfaces/panelmenu/design/panelmenu/pmenu_bg.gif
trunk/richfaces/panelmenu/design/panelmenu/spacer.gif
Log:
Markup design commited
Added: trunk/richfaces/panelmenu/design/panelmenu/icon.gif
====================================…
[View More]===============================
(Binary files differ)
Property changes on: trunk/richfaces/panelmenu/design/panelmenu/icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/richfaces/panelmenu/design/panelmenu/panel_menu.html
===================================================================
--- trunk/richfaces/panelmenu/design/panelmenu/panel_menu.html (rev 0)
+++ trunk/richfaces/panelmenu/design/panelmenu/panel_menu.html 2007-03-29 12:33:02 UTC (rev 204)
@@ -0,0 +1,212 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<title>coll_panel</title>
+<style>
+.pmenu_size{
+ width : 300px;
+}
+
+.pmenu_text{
+ width: 100%;
+ padding-left : 5px;
+}
+
+.pmenu_item table{
+ border-top : 1px solid #c0c0c0;
+ font-size : 11px;
+ font-family : verdana;
+ padding : 2px 1px 1px 1px;
+ margin-top : 1px;
+ cursor : pointer;
+}
+
+.pmenu_label{
+ border : 1px solid #c0c0c0;
+ font-size : 11px;
+ font-family : verdana;
+ padding : 1px;
+ margin-bottom : 3px
+}
+
+.pmenu_label table.label{
+ background-color : #224986;
+ font-size : 11px;
+ font-family : verdana;
+ color : #ffffff;
+ font-weight : bold;
+ background-image : url(pmenu_bg.gif);
+ background-position : top left;
+ background-repeat : repeat-x;
+ padding : 2px 1px 2px 2px;
+ cursor : pointer;
+}
+
+.group{
+ font-weight : bold;
+}
+
+.disabled{
+ color : #c0c0c0;;
+}
+
+.select{
+ background : #C7D7EC;
+}
+
+
+</style>
+
+</head>
+
+<body>
+
+
+<div class="pmenu_size">
+<div class="pmenu_label">
+ <table cellspacing=0 cellpadding=0 border=0 class="label">
+ <tr>
+ <td><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+ <div class="pmenu_item">
+ <table cellspacing=0 cellpadding=0 border=0 class="group">
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+ <div class="pmenu_item">
+ <table cellspacing=0 cellpadding=0 border=0 class="">
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+
+
+ </div>
+ <div class="pmenu_item">
+ <table cellspacing=0 cellpadding=0 border=0 class="select">
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+
+
+ </div>
+
+ </div>
+ <div class="pmenu_item">
+ <table cellspacing=0 cellpadding=0 border=0 class="disabled group">
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+ <div class="pmenu_item" style="display : none">
+ <table cellspacing=0 cellpadding=0 border=0>
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+
+
+ </div>
+
+ </div>
+</div>
+
+<div class="pmenu_label">
+ <table cellspacing=0 cellpadding=0 border=0 class="label">
+ <tr>
+ <td><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+ <div class="pmenu_item" style="display : none">
+ <table cellspacing=0 cellpadding=0 border=0>
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+
+
+ </div>
+</div>
+
+<div class="pmenu_label">
+ <table cellspacing=0 cellpadding=0 border=0 class="label">
+ <tr>
+ <td><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+ <div class="pmenu_item" style="display : none">
+ <table cellspacing=0 cellpadding=0 border=0>
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+
+
+ </div>
+</div>
+
+<div class="pmenu_label">
+ <table cellspacing=0 cellpadding=0 border=0 class="label">
+ <tr>
+ <td><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+ <div class="pmenu_item" style="display : none ">
+ <table cellspacing=0 cellpadding=0 border=0>
+ <tr>
+ <td><img src="spacer.gif" width="16" height="16"><img src="icon.gif" width="16" height="16"></td>
+ <td class="pmenu_text">Display item name</td>
+ <td><img src="spacer.gif" width="16" height="16"></td>
+ </tr>
+ </table>
+
+
+
+ </div>
+</div>
+</div>
+
+
+
+
+
+
+</body>
+</html>
Added: trunk/richfaces/panelmenu/design/panelmenu/pmenu_bg.gif
===================================================================
(Binary files differ)
Property changes on: trunk/richfaces/panelmenu/design/panelmenu/pmenu_bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/richfaces/panelmenu/design/panelmenu/spacer.gif
===================================================================
(Binary files differ)
Property changes on: trunk/richfaces/panelmenu/design/panelmenu/spacer.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
[View Less]
18 years
JBoss Rich Faces SVN: r203 - trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-03-29 06:11:17 -0400 (Thu, 29 Mar 2007)
New Revision: 203
Modified:
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
Log:
dropdownmenu development
Modified: trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp 2007-03-29 08:56:36 UTC (rev 202)
+++ trunk/richfaces-…
[View More]samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp 2007-03-29 10:11:17 UTC (rev 203)
@@ -22,6 +22,11 @@
<mc:menuItem id="menuItem12" value="Active12"/>
<mc:menuItem id="menuItem13" value="Active13" icon="/images/ico1.gif"/>
<mc:menuItem id="menuItem14" value="Active14"/>
+ <mc:menuGroup id="menuGroup1" value="Group1">
+ <mc:menuItem id="menuGroup1Item1" value="Active"/>
+ <mc:menuItem id="menuGroup1Item2" value="Active" icon="/images/ico1.gif"/>
+ <mc:menuItem id="menuGroup1Item3" value="Active"/>
+ </mc:menuGroup>
<mc:menuItem id="menuItem15" value="Active15" icon="/images/ico2.gif"/>
<mc:menuSeparator id="menuSeparator11"/>
@@ -39,13 +44,19 @@
<mc:menuItem id="menuItem21" value="Active21: none" mode="none"/>
<mc:menuItem id="menuItem22" value="Active22"/>
- <mc:menuItem id="menuItem23" value="Active23">
+ <mc:menuItem id="menuItem23" value="Active23" icon="/images/node.gif">
<f:facet name="icon">
<h:graphicImage value="/images/ico1.gif"/>
</f:facet>
</mc:menuItem>
<mc:menuItem id="menuItem24" value="Active24"/>
+ <mc:menuGroup id="menuGroup2" value="Group2">
+ <mc:menuItem id="menuGroup2Item1" value="Active"/>
+ <mc:menuItem id="menuGroup2Item2" value="Active" icon="/images/ico1.gif"/>
+ <mc:menuItem id="menuGroup2Item3" value="Active"/>
+ </mc:menuGroup>
+
<mc:menuItem id="menuItem25" value="Active25">
<f:facet name="icon">
<h:graphicImage value="/images/ico2.gif"/>
[View Less]
18 years
JBoss Rich Faces SVN: r202 - trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-03-29 04:56:36 -0400 (Thu, 29 Mar 2007)
New Revision: 202
Modified:
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
Development
Modified: trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-03-29 08:50:…
[View More]49 UTC (rev 201)
+++ trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-03-29 08:56:36 UTC (rev 202)
@@ -446,12 +446,13 @@
}
this.event = e;
- this.element = Event.findElement(e, 'div').firstChild();
+ //this.element = Event.findElement(e, 'div').firstChild();
+ this.element = Event.findElement(e, 'div').childNodes[2].firstChild;
this.layer = $(layer);
this.show = function() {
if (!Exadel.Menu.Layers.isVisible(this.layer)){
- this.reposition();
+ //this.reposition();
Exadel.Menu.Layers.LMPopUp(this.layer, false);
}
}.bind(this);
@@ -573,12 +574,13 @@
Exadel.Menu.Layer.prototype = {
- initialize: function(id,delay){
+ initialize: function(id,showDelay,hideDelay){
Exadel.Menu.Layers.listl.push(id);
this.id = id;
this.layer = $(id);
this.level = 0;
- this.delay = delay;
+ this.showDelay = showDelay;
+ this.hideDelay=hideDelay;
Exadel.Menu.fitLayerToContent(this.layer);
this.items = new Array();
Exadel.Menu.Layers.layers[id] = this;
@@ -668,7 +670,7 @@
showMe: function(e){
this.closeSiblings(e);
//LOG.a4j_debug('show me ' + this.id +' ' +this.level);
- Exadel.Menu.Layers.showMenuLayer(this.id, e, this.delay);
+ Exadel.Menu.Layers.showMenuLayer(this.id, e, this.showDelay);
Exadel.Menu.Layers.levels[this.level] = this;
@@ -752,7 +754,7 @@
if (!e) {
e = window.event;
}
- Exadel.Menu.Layers.showDropDownLayer(this.id, topLevel, e,this.delay);
+ Exadel.Menu.Layers.showDropDownLayer(this.id, topLevel, e,this.showDelay);
}.bindAsEventListener(this);
if(!onEvt){
[View Less]
18 years
JBoss Rich Faces SVN: r201 - trunk/richfaces/menu-components/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-29 04:50:49 -0400 (Thu, 29 Mar 2007)
New Revision: 201
Modified:
trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
Log:
menuGroup template development
Modified: trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
===================================================================
--- trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-03-29 08:31:44 UTC (rev …
[View More]200)
+++ trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-03-29 08:50:49 UTC (rev 201)
@@ -27,10 +27,10 @@
if (! disabled) {
]]></jsp:scriptlet>
<div id="ref#{clientId}"
- class="dr-menu-item dr-menu-item-unselect rich-menu-group #{component.attributes['styleClass']}"
+ class="dr-menu-item dr-menu-item-enabled rich-menu-group #{component.attributes['styleClass']}"
style="#{component.attributes['style']}"
- onmouseout="this.className='dr-menu-item dr-menu-item-unselect rich-menu-group'; #{component.attributes['onmouseout']}"
- onmouseover="this.className='dr-menu-item dr-menu-item-select rich-menu-group rich-menu-group-selected'; #{component.attributes['onmouseover']}"
+ onmouseout="this.className='dr-menu-item dr-menu-item-enabled rich-menu-group'; #{component.attributes['onmouseout']}"
+ onmouseover="this.className='dr-menu-item dr-menu-item-hover rich-menu-group rich-menu-group-hover'; #{component.attributes['onmouseover']}"
onmousemove="#{component.attributes['onmousemove']}">
<jsp:scriptlet>
@@ -53,7 +53,7 @@
src="#{spacer}"/>
<jsp:scriptlet><![CDATA[}]]></jsp:scriptlet>
- <a href="#"><span class="rich-menu-item-label">#{component.attributes['value']}</span></a>
+ <a id="ref#{clientId}:anchor" class="dr-menu-label rich-menu-item-label" href="#">#{component.attributes['value']}</a>
<div id="#{clientId}" class="dr-menu-node rich-menu-item-folder">
<div id="ref#{clientId}_menu"
@@ -64,14 +64,14 @@
</div>
</div>
<iframe class="underneath_iframe"
- id="#{clientId}_menu_iframe"
+ id="ref#{clientId}_menu_iframe"
style="position:absolute;">
</iframe>
<iframe class="underneath_iframe"
- id="#{clientId}_menu_iframe1"
+ id="ref#{clientId}_menu_iframe1"
style="position:absolute;">
</iframe>
- <script type="text/javascript" id="#{clientId}_script">
+ <script type="text/javascript" id="ref#{clientId}_script">
<f:call name="getScript"/>
</script>
</div>
[View Less]
18 years