JBoss Rich Faces SVN: r3956 - trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:22:39 -0500 (Tue, 13 Nov 2007)
New Revision: 3956
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
Log:
RF-1300
Modified: trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
===================================================================
--- trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2007-11-13 16:22:16 UTC (rev 3955)
+++ trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2007-11-13 16:22:39 UTC (rev 3956)
@@ -49,6 +49,56 @@
.dr-menu-item-disabled .dr-menu-node {
background-position : bottom;
}
+
+.dr-menu-list-border {
+ border : 1px solid;
+ float : left;
+ position : absolute;
+}
+.dr-menu-list-bg {
+ border-top-style : solid;
+ border-left-style : solid;
+ border-right-style : solid;
+
+ border-top-width : 1px;
+ border-left-width : 1px;
+ border-right-width : 1px;
+
+ background : repeat-y left;
+}
+.dr-menu-label {
+ left: 0px;
+ top: 0px;
+ padding : 2px 5px 2px 5px;
+ white-space : nowrap;
+ width : auto;
+ height : auto;
+}
+.dr-menu-label-unselect {
+ border : 0px solid transparent;
+ padding : 3px 6px;
+}
+.dr-menu-label-select {
+ border : 1px solid;
+ cursor : pointer;
+}
+
+.dr-menu-list-strut {
+ font-size : 0px;
+ border: 0px;
+ margin : 0px;
+ position: relative;
+}
+
+.underneath_iframe{
+ position: absolute;
+ z-index: 90;
+ visibility:hidden;
+ left:0px;
+ top:0px;
+ height:1px;
+ width:1px;
+}
]]>
</f:verbatim>
@@ -80,4 +130,33 @@
</u:style>
</u:selector>
+<u:selector name=".dr-label-text-decor">
+ <u:style name="font-weight" skin="headerWeightFont" />
+</u:selector>
+
+<u:selector name=".dr-menu-list-border">
+ <u:style name="border-color" skin="panelBorderColor" />
+ <u:style name="background-color" skin="additionalBackgroundColor" />
+</u:selector>
+
+<u:selector name=".dr-menu-list-bg">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.html.images.background.MenuListBackground"/>
+ </u:style>
+ <u:style name="border-top-color" skin="additionalBackgroundColor" />
+ <u:style name="border-left-color" skin="additionalBackgroundColor" />
+ <u:style name="border-right-color" skin="additionalBackgroundColor" />
+</u:selector>
+
+<u:selector name=".dr-menu-label">
+ <u:style name="font-family" skin="generalFamilyFont" />
+ <u:style name="font-size" skin="generalSizeFont" />
+</u:selector>
+
+<u:selector name=".dr-menu-label-select">
+ <u:style name="border-color" skin="panelBorderColor" />
+ <u:style name="background-color" skin="controlBackgroundColor" />
+ <u:style name="color" skin="generalTextColor" />
+</u:selector>
+
</f:template>
18 years, 5 months
JBoss Rich Faces SVN: r3955 - trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/background.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:22:16 -0500 (Tue, 13 Nov 2007)
New Revision: 3955
Added:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java
Log:
RF-1300
Added: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java (rev 0)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java 2007-11-13 16:22:16 UTC (rev 3955)
@@ -0,0 +1,32 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces.renderkit.html.images.background;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+public class MenuListBackground extends BaseGradient {
+
+ public MenuListBackground() {
+ super(22, 3, "additionalBackgroundColor", "tabBackgroundColor", true);
+ }
+
+}
18 years, 5 months
JBoss Rich Faces SVN: r3954 - in branches/3.1.x/ui/panelmenu/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-13 11:22:04 -0500 (Tue, 13 Nov 2007)
New Revision: 3954
Modified:
branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
Log:
RF-1336, RF-1307
Modified: branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-13 16:21:52 UTC (rev 3953)
+++ branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-13 16:22:04 UTC (rev 3954)
@@ -134,46 +134,81 @@
UIPanelMenu parentMenu = findMenu(item);
if (!parentMenu.isDisabled() && !item.isDisabled()) {
if (calculateLevel(item) == 0) {
- classBuffer.append(parentMenu.getTopItemClass()).append(" ");
+ String topItemClass = parentMenu.getTopItemClass();
+ if(topItemClass != null && !topItemClass.equals("")){
+ classBuffer.append(topItemClass).append(" ");
+ }
classBuffer.append("rich-pmenu-top-item ");
- } else
- classBuffer.append(parentMenu.getItemClass() + " ");
+ } else {
+ String parentItemClass = parentMenu.getItemClass();
+ if(parentItemClass != null && !parentItemClass.equals("")){
+ classBuffer.append(parentItemClass).append(" ");
+ }
+ }
String itemClass = item.getStyleClass();
- if(itemClass != null){
+ if(itemClass != null && !itemClass.equals("")){
classBuffer.append(itemClass);
}
- } else
- classBuffer.append(parentMenu.getDisabledItemClass() + " ").append(item.getDisabledClass());
+ } else {
+ String pmDisabledItemClass = parentMenu.getDisabledItemClass();
+ if (pmDisabledItemClass != null && !pmDisabledItemClass.equals("")) {
+ classBuffer.append(pmDisabledItemClass).append(" ");
+ }
+
+ String itemDisabledClass = item.getDisabledClass();
+ if (itemDisabledClass != null && !itemDisabledClass.equals("")) {
+ classBuffer.append(itemDisabledClass);
+ }
+ }
return classBuffer.toString();
}
public String getFullStyle(FacesContext context, UIComponent component) {
- StringBuffer styleBuffer = new StringBuffer("");
+ StringBuffer styleBuffer = new StringBuffer("");
UIPanelMenuItem item = (UIPanelMenuItem)component;
UIPanelMenu parentMenu = findMenu(item);
if (!item.isDisabled()) {
- if (calculateLevel(item) == 0)
- styleBuffer.append(parentMenu.getTopItemStyle() + "; ");
- else
- styleBuffer.append(parentMenu.getItemStyle() + "; ");
- styleBuffer.append(item.getStyle());
- } else
- styleBuffer.append(parentMenu.getDisabledItemStyle() + "; ")
- .append(item.getDisabledStyle());
+ if (calculateLevel(item) == 0){
+ String topItemStyle = parentMenu.getTopItemStyle();
+ if (topItemStyle != null && !topItemStyle.equals("")) {
+ styleBuffer.append(parentMenu.getTopItemStyle()).append(";").append(" ");;
+ }
+ } else {
+ String itemStyle = parentMenu.getItemStyle();
+ if (itemStyle != null && !itemStyle.equals("")) {
+ styleBuffer.append(itemStyle).append(";").append(" ");
+ }
+ }
+ String style = item.getStyle();
+ if (style != null && !style.equals("")) {
+ styleBuffer.append(item.getStyle());
+ }
+ } else {
+ String pmDisabledItemStyle = parentMenu.getDisabledItemStyle();
+ if (pmDisabledItemStyle != null && !pmDisabledItemStyle.equals("")) {
+ styleBuffer.append(pmDisabledItemStyle).append(";").append(" ");;
+ }
+
+ String itemDisabledStyle = item.getDisabledStyle();
+ if (itemDisabledStyle != null && !itemDisabledStyle.equals("")){
+ styleBuffer.append(itemDisabledStyle);
+ }
+ }
return styleBuffer.toString();
}
public String getLabelClass(FacesContext context, UIComponent component) {
- StringBuffer resClass = new StringBuffer();
+ StringBuffer resClass = new StringBuffer();
UIPanelMenuItem item = (UIPanelMenuItem)component;
UIPanelMenu parentMenu = findMenu(item);
- if(!item.isDisabled() && !parentMenu.isDisabled()){
- if(isTopLevel(component)){
+ if (!item.isDisabled() && !parentMenu.isDisabled()) {
+ if (isTopLevel(component)) {
resClass.append("rich-pmenu-item-label rich-pmenu-top-item-label");
-
- } else resClass.append("rich-pmenu-item-label");
+ } else {
+ resClass.append("rich-pmenu-item-label");
+ }
}
- if(isSelected(context, component)){
+ if (isSelected(context, component)) {
resClass.append(" ").append(UIPanelMenu.DEFAULT_SELECTED_CLASS).append(" ").append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
}
return resClass.toString();
Modified: branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-11-13 16:21:52 UTC (rev 3953)
+++ branches/3.1.x/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-11-13 16:22:04 UTC (rev 3954)
@@ -23,10 +23,22 @@
/org/richfaces/renderkit/html/scripts/panelMenu.js,
</h:scripts>
- <f:clientid var="clientId"/>
+ <f:clientid var="clientId"/>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ String style = component.getStyle();
+ style = (style != null && !style.equals("")) ? style.trim() : "";
+ if(!style.equals("") && !style.endsWith(";")){
+ style = style + ";";
+ }
+ variables.setVariable("style", style);
+ ]]>
+ </jsp:scriptlet>
+
<f:call name="utils.encodeBeginFormIfNessesary"/>
- <div style="width:#{component.width}; #{component.style};" class="#{component.styleClass}"
+ <div style="width:#{component.width}; #{style}" class="#{component.styleClass}"
id="#{clientId}"
onclick="#{component.onclick}"
ondblclick="#{component.ondblclick}"
18 years, 5 months
JBoss Rich Faces SVN: r3953 - trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:21:52 -0500 (Tue, 13 Nov 2007)
New Revision: 3953
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java
Log:
RF-1300
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java 2007-11-13 16:21:43 UTC (rev 3952)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java 2007-11-13 16:21:52 UTC (rev 3953)
@@ -34,6 +34,7 @@
import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
+import org.ajax4jsf.resource.InternetResource;
import org.richfaces.component.UIMenuGroup;
import org.richfaces.component.UIMenuItem;
import org.richfaces.component.UIMenuSeparator;
@@ -46,6 +47,16 @@
*/
public abstract class AbstractMenuRenderer extends HeaderResourcesRendererBase {
+ private final InternetResource[] scripts = {
+ new org.ajax4jsf.javascript.PrototypeScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
+ getResource("scripts/menu.js") };
+
+ @Override
+ protected InternetResource[] getScripts() {
+ return scripts;
+ }
+
public void encodeScript(FacesContext context, UIComponent component) throws IOException {
StringBuffer buffer = new StringBuffer();
18 years, 5 months
JBoss Rich Faces SVN: r3952 - in trunk/ui/panelmenu/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-11-13 11:21:43 -0500 (Tue, 13 Nov 2007)
New Revision: 3952
Modified:
trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
Log:
RF-1336, RF-1307
Modified: trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-13 16:21:22 UTC (rev 3951)
+++ trunk/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2007-11-13 16:21:43 UTC (rev 3952)
@@ -134,16 +134,32 @@
UIPanelMenu parentMenu = findMenu(item);
if (!parentMenu.isDisabled() && !item.isDisabled()) {
if (calculateLevel(item) == 0) {
- classBuffer.append(parentMenu.getTopItemClass()).append(" ");
+ String topItemClass = parentMenu.getTopItemClass();
+ if(topItemClass != null && !topItemClass.equals("")){
+ classBuffer.append(topItemClass).append(" ");
+ }
classBuffer.append("rich-pmenu-top-item ");
- } else
- classBuffer.append(parentMenu.getItemClass() + " ");
+ } else {
+ String parentItemClass = parentMenu.getItemClass();
+ if(parentItemClass != null && !parentItemClass.equals("")){
+ classBuffer.append(parentItemClass).append(" ");
+ }
+ }
String itemClass = item.getStyleClass();
- if(itemClass != null){
+ if(itemClass != null && !itemClass.equals("")){
classBuffer.append(itemClass);
}
- } else
- classBuffer.append(parentMenu.getDisabledItemClass() + " ").append(item.getDisabledClass());
+ } else {
+ String pmDisabledItemClass = parentMenu.getDisabledItemClass();
+ if (pmDisabledItemClass != null && !pmDisabledItemClass.equals("")) {
+ classBuffer.append(pmDisabledItemClass).append(" ");
+ }
+
+ String itemDisabledClass = item.getDisabledClass();
+ if (itemDisabledClass != null && !itemDisabledClass.equals("")) {
+ classBuffer.append(itemDisabledClass);
+ }
+ }
return classBuffer.toString();
}
@@ -152,14 +168,32 @@
UIPanelMenuItem item = (UIPanelMenuItem)component;
UIPanelMenu parentMenu = findMenu(item);
if (!item.isDisabled()) {
- if (calculateLevel(item) == 0)
- styleBuffer.append(parentMenu.getTopItemStyle() + "; ");
- else
- styleBuffer.append(parentMenu.getItemStyle() + "; ");
- styleBuffer.append(item.getStyle());
- } else
- styleBuffer.append(parentMenu.getDisabledItemStyle() + "; ")
- .append(item.getDisabledStyle());
+ if (calculateLevel(item) == 0){
+ String topItemStyle = parentMenu.getTopItemStyle();
+ if (topItemStyle != null && !topItemStyle.equals("")) {
+ styleBuffer.append(parentMenu.getTopItemStyle()).append(";").append(" ");;
+ }
+ } else {
+ String itemStyle = parentMenu.getItemStyle();
+ if (itemStyle != null && !itemStyle.equals("")) {
+ styleBuffer.append(itemStyle).append(";").append(" ");
+ }
+ }
+ String style = item.getStyle();
+ if (style != null && !style.equals("")) {
+ styleBuffer.append(item.getStyle());
+ }
+ } else {
+ String pmDisabledItemStyle = parentMenu.getDisabledItemStyle();
+ if (pmDisabledItemStyle != null && !pmDisabledItemStyle.equals("")) {
+ styleBuffer.append(pmDisabledItemStyle).append(";").append(" ");;
+ }
+
+ String itemDisabledStyle = item.getDisabledStyle();
+ if (itemDisabledStyle != null && !itemDisabledStyle.equals("")){
+ styleBuffer.append(itemDisabledStyle);
+ }
+ }
return styleBuffer.toString();
}
@@ -167,13 +201,14 @@
StringBuffer resClass = new StringBuffer();
UIPanelMenuItem item = (UIPanelMenuItem)component;
UIPanelMenu parentMenu = findMenu(item);
- if(!item.isDisabled() && !parentMenu.isDisabled()){
- if(isTopLevel(component)){
+ if (!item.isDisabled() && !parentMenu.isDisabled()) {
+ if (isTopLevel(component)) {
resClass.append("rich-pmenu-item-label rich-pmenu-top-item-label");
-
- } else resClass.append("rich-pmenu-item-label");
+ } else {
+ resClass.append("rich-pmenu-item-label");
+ }
}
- if(isSelected(context, component)){
+ if (isSelected(context, component)) {
resClass.append(" ").append(UIPanelMenu.DEFAULT_SELECTED_CLASS).append(" ").append(UIPanelMenu.USER_DEFINED_SELECTED_CLASS);
}
return resClass.toString();
Modified: trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx
===================================================================
--- trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-11-13 16:21:22 UTC (rev 3951)
+++ trunk/ui/panelmenu/src/main/templates/org/richfaces/htmlPanelMenu.jspx 2007-11-13 16:21:43 UTC (rev 3952)
@@ -23,10 +23,22 @@
/org/richfaces/renderkit/html/scripts/panelMenu.js,
</h:scripts>
- <f:clientid var="clientId"/>
+ <f:clientid var="clientId"/>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ String style = component.getStyle();
+ style = (style != null && !style.equals("")) ? style.trim() : "";
+ if(!style.equals("") && !style.endsWith(";")){
+ style = style + ";";
+ }
+ variables.setVariable("style", style);
+ ]]>
+ </jsp:scriptlet>
+
<f:call name="utils.encodeBeginFormIfNessesary"/>
- <div style="width:#{component.width}; #{component.style};" class="#{component.styleClass}"
+ <div style="width:#{component.width}; #{style}" class="#{component.styleClass}"
id="#{clientId}"
onclick="#{component.onclick}"
ondblclick="#{component.ondblclick}"
18 years, 5 months
JBoss Rich Faces SVN: r3951 - trunk/ui/dropdown-menu/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:21:22 -0500 (Tue, 13 Nov 2007)
New Revision: 3951
Modified:
trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
Log:
RF-1300
Modified: trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx
===================================================================
--- trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-11-13 16:19:24 UTC (rev 3950)
+++ trunk/ui/dropdown-menu/src/main/templates/org/richfaces/htmlDropDownMenu.jspx 2007-11-13 16:21:22 UTC (rev 3951)
@@ -10,13 +10,7 @@
component="org.richfaces.component.UIDropDownMenu"
>
<h:styles>css/dropdownmenu.xcss</h:styles>
-
- <h:scripts>
- new org.ajax4jsf.javascript.PrototypeScript(),
- new org.ajax4jsf.javascript.AjaxScript(),
- scripts/menu.js
- </h:scripts>
-
+
<f:clientid var="clientId"/>
<jsp:scriptlet>
<![CDATA[if (!((org.richfaces.component.UIDropDownMenu)component).getSubmitMode().equalsIgnoreCase("none")) org.richfaces.component.util.FormUtil.throwEnclFormReqExceptionIfNeed(context,component);]]>
18 years, 5 months
JBoss Rich Faces SVN: r3950 - trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/images/background.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:19:24 -0500 (Tue, 13 Nov 2007)
New Revision: 3950
Removed:
trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java
Log:
RF-1300
Deleted: trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java
===================================================================
--- trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java 2007-11-13 16:18:48 UTC (rev 3949)
+++ trunk/ui/dropdown-menu/src/main/java/org/richfaces/renderkit/html/images/background/MenuListBackground.java 2007-11-13 16:19:24 UTC (rev 3950)
@@ -1,32 +0,0 @@
-/**
- * License Agreement.
- *
- * JBoss RichFaces - Ajax4jsf Component Library
- *
- * Copyright (C) 2007 Exadel, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License version 2.1 as published by the Free Software Foundation.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-package org.richfaces.renderkit.html.images.background;
-
-import org.richfaces.renderkit.html.BaseGradient;
-
-public class MenuListBackground extends BaseGradient {
-
- public MenuListBackground() {
- super(22, 3, "additionalBackgroundColor", "tabBackgroundColor", true);
- }
-
-}
18 years, 5 months
JBoss Rich Faces SVN: r3949 - trunk/sandbox/ui/contextMenu/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:18:48 -0500 (Tue, 13 Nov 2007)
New Revision: 3949
Modified:
trunk/sandbox/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java
Log:
RF-1300
Modified: trunk/sandbox/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java
===================================================================
--- trunk/sandbox/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java 2007-11-13 16:15:19 UTC (rev 3948)
+++ trunk/sandbox/ui/contextMenu/src/main/java/org/richfaces/renderkit/html/ContextMenuRendererDelegate.java 2007-11-13 16:18:48 UTC (rev 3949)
@@ -25,6 +25,7 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.javascript.JSFunction;
+import org.ajax4jsf.resource.InternetResource;
import org.richfaces.component.UIContextMenu;
import org.richfaces.component.UIMenuGroup;
import org.richfaces.renderkit.ScriptOptions;
@@ -72,8 +73,8 @@
} else {
buffer.append(".");
- function = new JSFunction("asDropDown");
- function.addParameter(component.getClientId(context));
+ function = new JSFunction("asContextMenu");
+ function.addParameter(component.getParent().getClientId(context));
String evt = (String) component.getAttributes().get("event");
if(evt == null || evt.trim().length() == 0){
evt = "onmouseover";
18 years, 5 months
JBoss Rich Faces SVN: r3948 - trunk/sandbox/ui/contextMenu/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:15:19 -0500 (Tue, 13 Nov 2007)
New Revision: 3948
Modified:
trunk/sandbox/ui/contextMenu/src/main/config/component/contextMenu.xml
Log:
RF-1300
Modified: trunk/sandbox/ui/contextMenu/src/main/config/component/contextMenu.xml
===================================================================
--- trunk/sandbox/ui/contextMenu/src/main/config/component/contextMenu.xml 2007-11-13 16:14:22 UTC (rev 3947)
+++ trunk/sandbox/ui/contextMenu/src/main/config/component/contextMenu.xml 2007-11-13 16:15:19 UTC (rev 3948)
@@ -23,5 +23,14 @@
<test/>
</tag>
&ui_component_attributes;
+ <property>
+ <name>submitMode</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Set the submission mode for all menu items of the menu except
+ ones where this attribute redefined. (ajax,server(Default),none)
+ </description>
+ <defaultvalue>"server"</defaultvalue>
+ </property>
</component>
</components>
18 years, 5 months
JBoss Rich Faces SVN: r3947 - trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-11-13 11:14:22 -0500 (Tue, 13 Nov 2007)
New Revision: 3947
Modified:
trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
Log:
RF-1305
Modified: trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2007-11-13 15:47:46 UTC (rev 3946)
+++ trunk/sandbox/samples/contextMenuDemo/src/main/webapp/pages/index.jsp 2007-11-13 16:14:22 UTC (rev 3947)
@@ -2,6 +2,7 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/dataTable" prefix="dt"%>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/contextMenu" prefix="cm"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/menu-components" prefix="mc" %>
<html>
<head>
<title>
@@ -20,7 +21,21 @@
<body>
<f:view>
<h:form>
- <cm:contextMenu></cm:contextMenu>
+ <h:panelGroup id="outputText">
+ <h:outputText value="xXx" />
+ <cm:contextMenu >
+ <mc:menuItem id="menuItem11" value="Active11: ajax" submitMode="ajax" />
+ <mc:menuItem id="menuItem12" value="Active12" immediate="true"/>
+ <mc:menuItem id="menuItem14" value="Active14"/>
+
+ <mc:menuSeparator id="menuSeparator11"/>
+
+ <mc:menuItem id="menuItem16" value="Disable16" disabled="true"/>
+ <mc:menuItem id="menuItem17" value="">
+ <h:inputText value="xXx"/>
+ </mc:menuItem>
+ </cm:contextMenu>
+ </h:panelGroup>
<dt:dataTable id="table" value="#{bean.model}" var="row" style="width:300px"
first="0" rows="40" width="100%">
<dt:column headerClass="header" footerClass="footer">
18 years, 5 months