JBoss Rich Faces SVN: r21215 - modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-25 10:30:23 -0500 (Tue, 25 Jan 2011)
New Revision: 21215
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
Log:
https://issues.jboss.org/browse/RF-10044 Inplace input: attribute onchange ignored
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-01-25 15:30:09 UTC (rev 21214)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richInplaceInput/simple.xhtml 2011-01-25 15:30:23 UTC (rev 21215)
@@ -55,7 +55,7 @@
noneClass="#{richInplaceInputBean.attributes['noneClass'].value}"
onblur="#{richInplaceInputBean.attributes['onblur'].value}"
onclick="#{richInplaceInputBean.attributes['onclick'].value}"
- onchange="#{richInplaceInputBean.attributes['onclick'].value}"
+ onchange="#{richInplaceInputBean.attributes['onchange'].value}"
ondblclick="#{richInplaceInputBean.attributes['ondblclick'].value}"
onfocus="#{richInplaceInputBean.attributes['onfocus'].value}"
oninputclick="#{richInplaceInputBean.attributes['oninputclick'].value}"
13 years, 11 months
JBoss Rich Faces SVN: r21214 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-01-25 10:30:09 -0500 (Tue, 25 Jan 2011)
New Revision: 21214
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
Log:
http://jira.jboss.com/jira/browse/RF-9575
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2011-01-25 15:19:06 UTC (rev 21213)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2011-01-25 15:30:09 UTC (rev 21214)
@@ -128,6 +128,7 @@
tokens: "",
attachToBody:true,
filterFunction: undefined
+ //nothingLabel = "Nothing";
};
var ID = {
@@ -213,8 +214,6 @@
var callAjax = function(event, callback) {
- clearItems.call(this);
-
rf.getDomElement(this.id+ID.VALUE).value = this.value;
var _this = this;
@@ -224,16 +223,20 @@
if (_this.options.lazyClientMode && _this.value.length!=0) {
updateItemsFromCache.call(_this, _this.value);
}
- if ((_this.focused || _this.isMouseDown) && _this.items.length!=0 && callback) {
- callback.call(_this, _event);
+ if (_this.items.length!=0) {
+ if (callback) {
+ (_this.focused || _this.isMouseDown) && callback.call(_this, _event);
+ } else {
+ _this.isVisible && _this.options.selectFirst && selectItem.call(_this, _event, 0);
+ }
+ } else {
+ _this.hide(_event);
}
- if (!callback && _this.isVisible && _this.options.selectFirst) {
- selectItem.call(_this, _event, 0);
- }
};
var ajaxError = function (event) {
- //alert("error");
+ _this.hide(_event);
+ clearItems.call(_this);
};
this.isFirstAjax = false;
@@ -314,8 +317,10 @@
if (oldValue!=subValue) {
updateItemsFromCache.call(this, subValue);
}
- if (this.items.length!=0 && callback) {
- callback.call(this, event);
+ if (this.items.length!=0) {
+ callback && callback.call(this, event);
+ } else {
+ this.hide(event);
}
if (event.keyCode == rf.KEYS.RETURN || event.type == "click") {
this.__setInputValue(subValue);
@@ -333,6 +338,7 @@
} else {
if (this.options.ajaxMode) {
clearItems.call(this);
+ this.hide(event);
}
}
}
13 years, 11 months
JBoss Rich Faces SVN: r21213 - in trunk/ui: common/ui/src/main/java/org/richfaces/renderkit/html/iconimages and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-01-25 10:19:06 -0500 (Tue, 25 Jan 2011)
New Revision: 21213
Modified:
trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java
trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss
trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml
trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
Log:
https://issues.jboss.org/browse/RF-10158
Modified: trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java
===================================================================
--- trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/common/api/src/main/java/org/richfaces/renderkit/util/PanelIcons.java 2011-01-25 15:19:06 UTC (rev 21213)
@@ -1,38 +1,80 @@
package org.richfaces.renderkit.util;
public enum PanelIcons {
- none("rf-ico-none", "rf-ico-none"),
- chevron("rf-ico-chevron", "rf-ico-hdr-chevron"),
- chevronLeft("rf-ico-chevron-left", "rf-ico-hdr-chevron-left"),
- chevronUp("rf-ico-chevron-up", "rf-ico-hdr-chevron-up"),
- chevronDown("rf-ico-chevron-down", "rf-ico-hdr-chevron-down"),
- disc("rf-ico-disc", "rf-ico-hdr-disc"),
- grid("rf-ico-grid", "rf-ico-hdr-grid"),
- transparent("rf-ico-transparent", "rf-ico-hdr-transparent"),
- triangle("rf-ico-triangle", "rf-ico-hdr-triangle"),
- triangleLeft("rf-ico-triangle-left", "rf-ico-hdr-triangle-left"),
- triangleUp("rf-ico-triangle-up", "rf-ico-hdr-triangle-up"),
- triangleDown("rf-ico-triangle-down", "rf-ico-hdr-triangle-down");
+
+ none("rf-ico-none"),
+ chevron("rf-ico-chevron"),
+ chevronLeft("rf-ico-chevron-left"),
+ chevronUp("rf-ico-chevron-up"),
+ chevronDown("rf-ico-chevron-down"),
+ disc("rf-ico-disc"),
+ grid("rf-ico-grid"),
+ transparent("rf-ico-transparent"),
+ triangle("rf-ico-triangle"),
+ triangleLeft("rf-ico-triangle-left"),
+ triangleUp("rf-ico-triangle-up"),
+ triangleDown("rf-ico-triangle-down");
+ public enum State {
+ common {
+ @Override
+ public String getCssClass(PanelIcons icons) {
+ return icons.cssClass();
+ }
+ }, commonDisabled {
+ @Override
+ public String getCssClass(PanelIcons icons) {
+ return icons.disabledCssClass();
+ }
+ }, header {
+ @Override
+ public String getCssClass(PanelIcons icons) {
+ return icons.headerClass();
+ }
+ }, headerDisabled {
+ @Override
+ public String getCssClass(PanelIcons icons) {
+ return icons.disabledHeaderClass();
+ }
+ };
+
+ public abstract String getCssClass(PanelIcons icons);
+ }
+
public static final PanelIcons DEFAULT = none;
private final String cssClass;
private final String headerClass;
- private PanelIcons(String cssClass, String headerClass) {
- this.cssClass = cssClass;
- this.headerClass = headerClass;
+ private final String disabledCssClass;
+
+ private final String disabledHeaderClass;
+
+ private PanelIcons(String baseClass) {
+ this.cssClass = baseClass;
+
+ this.headerClass = baseClass + "-hdr";
+ this.disabledCssClass = baseClass + "-dis";
+ this.disabledHeaderClass = baseClass + "-hdr-dis";
}
- public String cssClass() {
+ private String cssClass() {
return cssClass;
}
- public String headerClass() {
+ private String headerClass() {
return headerClass;
}
+ private String disabledCssClass() {
+ return disabledCssClass;
+ }
+
+ private String disabledHeaderClass() {
+ return disabledHeaderClass;
+ }
+
public static PanelIcons getIcon(String attrIconCollapsedValue) {
if (attrIconCollapsedValue == null) {
return null;
Modified: trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java
===================================================================
--- trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/common/ui/src/main/java/org/richfaces/renderkit/html/iconimages/PanelIconBasic.java 2011-01-25 15:19:06 UTC (rev 21213)
@@ -47,7 +47,7 @@
private Color color;
@ResourceParameter(defaultValue = "false")
- private boolean headerIcon;
+ private boolean disabled;
protected PanelIconBasic() {
super(DIMENSION);
@@ -71,11 +71,11 @@
public void initialize() {
FacesContext context = FacesContext.getCurrentInstance();
Skin skin = SkinFactory.getInstance(context).getSkin(context);
- color = new Color(skin.getColorParameter(context, headerIcon ? Skin.HEADER_TEXT_COLOR : "tabDisabledTextColor"));
+ color = new Color(skin.getColorParameter(context, disabled ? "tabDisabledTextColor" : Skin.HEADER_TEXT_COLOR));
}
- public void setHeaderIcon(boolean topIcon) {
- this.headerIcon = topIcon;
+ public void setDisabled(boolean topIcon) {
+ this.disabled = topIcon;
}
public void writeState(FacesContext context, DataOutput dataOutput) throws IOException {
Modified: trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss
===================================================================
--- trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/icons.ecss 2011-01-25 15:19:06 UTC (rev 21213)
@@ -1,95 +1,96 @@
-.rf-ico-none,
-.rf-ico-chevron, .rf-ico-hdr-chevron,
-.rf-ico-chevron-down, .rf-ico-hdr-chevron-down,
-.rf-ico-chevron-left, .rf-ico-hdr-chevron-left,
-.rf-ico-chevron-up, .rf-ico-hdr-chevron-up,
-.rf-ico-disc, .rf-ico-hdr-disc,
-.rf-ico-grid, .rf-ico-hdr-grid,
-.rf-ico-transparent, .rf-ico-hdr-transparent,
-.rf-ico-triangle, .rf-ico-hdr-triangle,
-.rf-ico-triangle-down, .rf-ico-hdr-triangle-down,
-.rf-ico-triangle-left, .rf-ico-hdr-triangle-left,
-.rf-ico-triangle-up, .rf-ico-hdr-triangle-up {
+.rf-ico-none, .rf-ico-none-hdr, .rf-ico-none-dis, .rf-ico-none-hdr-dis,
+.rf-ico-chevron, .rf-ico-chevron-hdr, .rf-ico-chevron-dis, .rf-ico-chevron-hdr-dis,
+.rf-ico-chevron-down, .rf-ico-chevron-down-hdr, .rf-ico-chevron-down-dis, .rf-ico-chevron-down-hdr-dis,
+.rf-ico-chevron-left, .rf-ico-chevron-left-hdr, .rf-ico-chevron-left-dis, .rf-ico-chevron-left-hdr-dis,
+.rf-ico-chevron-up, .rf-ico-chevron-up-hdr, .rf-ico-chevron-up-dis, .rf-ico-chevron-up-hdr-dis,
+.rf-ico-disc, .rf-ico-disc-hdr, .rf-ico-disc-dis, .rf-ico-disc-hdr-dis,
+.rf-ico-grid, .rf-ico-grid-hdr, .rf-ico-grid-dis, .rf-ico-grid-hdr-dis,
+.rf-ico-transparent, .rf-ico-transparent-hdr, .rf-ico-transparent-dis, .rf-ico-transparent-hdr-dis,
+.rf-ico-triangle, .rf-ico-triangle-hdr, .rf-ico-triangle-dis, .rf-ico-triangle-hdr-dis,
+.rf-ico-triangle-down, .rf-ico-triangle-down-hdr, .rf-ico-triangle-down-dis, .rf-ico-triangle-down-hdr-dis,
+.rf-ico-triangle-left, .rf-ico-triangle-left-hdr, .rf-ico-triangle-left-dis, .rf-ico-triangle-left-hdr-dis,
+.rf-ico-triangle-up, .rf-ico-triangle-up-dis, .rf-ico-triangle-up-hdr, .rf-ico-triangle-up-hdr-dis {
width: 16px;
height: 16px;
}
-.rf-ico-chevron {
+.rf-ico-chevron-hdr {
background-image: "url(#{resource['org.richfaces.images:Chevron.png']})"
}
-.rf-ico-hdr-chevron {
- background-image: "url(#{resource['org.richfaces.images:HeaderChevron.png']})"
+.rf-ico-chevron, .rf-ico-chevron-dis, .rf-ico-chevron-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:ChevronDisabled.png']})"
}
-.rf-ico-chevron-down {
+.rf-ico-chevron-down-hdr {
background-image: "url(#{resource['org.richfaces.images:ChevronDown.png']})"
}
-.rf-ico-hdr-chevron-down {
- background-image: "url(#{resource['org.richfaces.images:HeaderChevronDown.png']})"
+.rf-ico-chevron-down, .rf-ico-chevron-down-dis, .rf-ico-chevron-down-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:ChevronDownDisabled.png']})"
}
-.rf-ico-chevron-left {
+.rf-ico-chevron-left-hdr {
background-image: "url(#{resource['org.richfaces.images:ChevronLeft.png']})"
}
-.rf-ico-hdr-chevron-left {
- background-image: "url(#{resource['org.richfaces.images:HeaderChevronLeft.png']})"
+.rf-ico-chevron-left, .rf-ico-chevron-left-dis, .rf-ico-chevron-left-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:ChevronLeftDisabled.png']})"
}
-.rf-ico-chevron-up {
+.rf-ico-chevron-up-hdr {
background-image: "url(#{resource['org.richfaces.images:ChevronUp.png']})"
}
-.rf-ico-hdr-chevron-up {
- background-image: "url(#{resource['org.richfaces.images:HeaderChevronUp.png']})"
+.rf-ico-chevron-up, .rf-ico-chevron-up-dis, .rf-ico-chevron-up-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:ChevronUpDisabled.png']})"
}
-.rf-ico-disc {
+.rf-ico-disc-hdr {
background-image: "url(#{resource['org.richfaces.images:Disc.png']})"
}
-.rf-ico-hdr-disc {
- background-image: "url(#{resource['org.richfaces.images:HeaderDisc.png']})"
+.rf-ico-disc, .rf-ico-disc-dis, .rf-ico-disc-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:DiscDisabled.png']})"
}
-.rf-ico-grid {
+.rf-ico-grid-hdr {
background-image: "url(#{resource['org.richfaces.images:Grid.png']})"
}
-.rf-ico-hdr-grid {
- background-image: "url(#{resource['org.richfaces.images:HeaderGrid.png']})"
+.rf-ico-grid, .rf-ico-grid-dis, .rf-ico-grid-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:GridDisabled.png']})"
}
-.rf-ico-triangle {
+.rf-ico-triangle-hdr {
background-image: "url(#{resource['org.richfaces.images:Triangle.png']})"
}
-.rf-ico-hdr-triangle {
- background-image: "url(#{resource['org.richfaces.images:HeaderTriangle.png']})"
+.rf-ico-triangle, .rf-ico-triangle-dis, .rf-ico-triangle-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:TriangleDisabled.png']})"
}
-.rf-ico-triangle-down {
+.rf-ico-triangle-down-hdr {
background-image: "url(#{resource['org.richfaces.images:TriangleDown.png']})"
}
-.rf-ico-hdr-triangle-down {
- background-image: "url(#{resource['org.richfaces.images:HeaderTriangleDown.png']})"
+.rf-ico-triangle-down, .rf-ico-triangle-down-dis, .rf-ico-triangle-down-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:TriangleDownDisabled.png']})"
}
-.rf-ico-triangle-left {
+.rf-ico-triangle-left-hdr {
background-image: "url(#{resource['org.richfaces.images:TriangleLeft.png']})"
}
-.rf-ico-hdr-triangle-left {
- background-image: "url(#{resource['org.richfaces.images:HeaderTriangleLeft.png']})"
+.rf-ico-triangle-left, .rf-ico-triangle-left-dis, .rf-ico-triangle-left-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:TriangleLeftDisabled.png']})"
}
-.rf-ico-triangle-up {
+.rf-ico-triangle-up-hdr {
background-image: "url(#{resource['org.richfaces.images:TriangleUp.png']})"
}
-.rf-ico-hdr-triangle-up {
- background-image: "url(#{resource['org.richfaces.images:HeaderTriangleUp.png']})"
-}
\ No newline at end of file
+.rf-ico-triangle-up, .rf-ico-triangle-up-dis, .rf-ico-triangle-up-hdr-dis {
+ background-image: "url(#{resource['org.richfaces.images:TriangleUpDisabled.png']})"
+}
+
Modified: trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
--- trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/common/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties 2011-01-25 15:19:06 UTC (rev 21213)
@@ -1,29 +1,29 @@
org.richfaces.images\:Chevron.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron
-org.richfaces.images\:HeaderChevron.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron{headerIcon=true}
+org.richfaces.images\:ChevronDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconChevron{disabled=true}
org.richfaces.images\:ChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown
-org.richfaces.images\:HeaderChevronDown.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown{headerIcon=true}
+org.richfaces.images\:ChevronDownDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronDown{disabled=true}
org.richfaces.images\:ChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft
-org.richfaces.images\:HeaderChevronLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft{headerIcon=true}
+org.richfaces.images\:ChevronLeftDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronLeft{disabled=true}
org.richfaces.images\:ChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp
-org.richfaces.images\:HeaderChevronUp.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp{headerIcon=true}
+org.richfaces.images\:ChevronUpDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconChevronUp{disabled=true}
org.richfaces.images\:Disc.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc
-org.richfaces.images\:HeaderDisc.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc{headerIcon=true}
+org.richfaces.images\:DiscDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconDisc{disabled=true}
org.richfaces.images\:Grid.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid
-org.richfaces.images\:HeaderGrid.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid{headerIcon=true}
+org.richfaces.images\:GridDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconGrid{disabled=true}
org.richfaces.images\:Triangle.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle
-org.richfaces.images\:HeaderTriangle.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle{headerIcon=true}
+org.richfaces.images\:TriangleDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangle{disabled=true}
org.richfaces.images\:TriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown
-org.richfaces.images\:HeaderTriangleDown.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown{headerIcon=true}
+org.richfaces.images\:TriangleDownDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleDown{disabled=true}
org.richfaces.images\:TriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft
-org.richfaces.images\:HeaderTriangleLeft.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft{headerIcon=true}
+org.richfaces.images\:TriangleLeftDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleLeft{disabled=true}
org.richfaces.images\:TriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp
-org.richfaces.images\:HeaderTriangleUp.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp{headerIcon=true}
\ No newline at end of file
+org.richfaces.images\:TriangleUpDisabled.png=org.richfaces.renderkit.html.iconimages.PanelIconTriangleUp{disabled=true}
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemHeaderRenderer.java 2011-01-25 15:19:06 UTC (rev 21213)
@@ -13,6 +13,8 @@
import org.richfaces.component.AbstractAccordionItem;
import org.richfaces.component.AbstractTogglePanelTitledItem;
import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.renderkit.util.PanelIcons;
+import org.richfaces.renderkit.util.PanelIcons.State;
class AccordionItemHeaderRenderer extends TableIconsRendererHelper<AbstractAccordionItem> {
@@ -24,7 +26,7 @@
String iconInactive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconInactive();
String iconActive = panel.isDisabled() ? panel.getLeftIconDisabled() : panel.getLeftIconActive();
- encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconInactive, iconActive, true);
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconInactive, iconActive, panel.isDisabled() ? State.commonDisabled : State.common);
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractAccordionItem panel) throws IOException {
@@ -32,16 +34,16 @@
String iconActive = panel.isDisabled() ? panel.getRightIconDisabled() : panel.getRightIconActive();
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconInactive, iconActive, true);
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconInactive, iconActive, panel.isDisabled() ? State.headerDisabled : State.header);
}
@Override
- protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue, boolean header) throws IOException {
+ protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue, PanelIcons.State state) throws IOException {
writer.startElement(TD_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
- encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-act", header);
- encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-inact", header);
+ encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-act", state);
+ encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-inact", state);
writer.endElement(TD_ELEM);
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-25 15:19:06 UTC (rev 21213)
@@ -41,6 +41,7 @@
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.component.AbstractCollapsiblePanel;
import org.richfaces.component.AbstractTogglePanel;
+import org.richfaces.renderkit.util.PanelIcons;
/**
* @author akolonitsky
@@ -68,13 +69,13 @@
protected void encodeHeaderLeftIcon(ResponseWriter writer, FacesContext context, AbstractCollapsiblePanel panel) throws IOException {
encodeTdIcon(writer, context, cssClassPrefix + "-ico",
- panel.getLeftIconCollapsed(), panel.getLeftIconExpanded(), true);
+ panel.getLeftIconCollapsed(), panel.getLeftIconExpanded(), PanelIcons.State.header);
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractCollapsiblePanel panel) throws IOException {
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico",
- panel.getRightIconCollapsed(), panel.getRightIconExpanded(), true);
+ panel.getRightIconCollapsed(), panel.getRightIconExpanded(), PanelIcons.State.header);
}
@Override
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupHeaderRenderer.java 2011-01-25 15:19:06 UTC (rev 21213)
@@ -6,6 +6,8 @@
import javax.faces.context.ResponseWriter;
import org.richfaces.component.AbstractPanelMenuGroup;
+import org.richfaces.renderkit.util.PanelIcons;
+import org.richfaces.renderkit.util.PanelIcons.State;
class PanelMenuGroupHeaderRenderer extends TableIconsRendererHelper<AbstractPanelMenuGroup> {
@@ -13,11 +15,19 @@
super("label", cssClassPrefix, "rf-pm-ico");
}
+ private PanelIcons.State getState(AbstractPanelMenuGroup group) {
+ if (group.isTopItem()) {
+ return group.isDisabled() ? State.headerDisabled : State.header;
+ } else {
+ return group.isDisabled() ? State.commonDisabled : State.common;
+ }
+ }
+
protected void encodeHeaderLeftIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuGroup group) throws IOException {
String iconCollapsed = group.isDisabled() ? group.getLeftIconDisabled() : group.getLeftIconCollapsed();
String iconExpanded = group.isDisabled() ? group.getLeftIconDisabled() : group.getLeftIconExpanded();
- encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconCollapsed, iconExpanded, group.isTopItem());
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", iconCollapsed, iconExpanded, getState(group));
}
protected void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuGroup group) throws IOException {
@@ -25,6 +35,6 @@
String iconExpanded = group.isDisabled() ? group.getRightIconDisabled() : group.getRightIconExpanded();
//TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconCollapsed, iconExpanded, group.isTopItem());
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", iconCollapsed, iconExpanded, getState(group));
}
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-01-25 15:19:06 UTC (rev 21213)
@@ -44,6 +44,7 @@
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.RenderKitUtils;
import org.richfaces.renderkit.util.PanelIcons;
+import org.richfaces.renderkit.util.PanelIcons.State;
/**
* @author akolonitsky
@@ -94,26 +95,30 @@
writer.endElement("table");
}
+ private PanelIcons.State getState(AbstractPanelMenuItem item) {
+ return item.isDisabled() ? State.commonDisabled : State.common;
+ }
+
private void encodeHeaderGroupRightIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuItem menuItem, String classPrefix) throws IOException {
String icon = menuItem.isDisabled() ? menuItem.getRightIconDisabled() : menuItem.getRightIcon();
String cssClasses = concatClasses(classPrefix + "-exp-ico", menuItem.getLeftIconClass());
- encodeTdIcon(writer, context, cssClasses, icon);
+ encodeTdIcon(writer, context, cssClasses, icon, getState(menuItem));
}
private void encodeHeaderGroupLeftIcon(ResponseWriter writer, FacesContext context, AbstractPanelMenuItem menuItem, String classPrefix) throws IOException {
String icon = menuItem.isDisabled() ? menuItem.getLeftIconDisabled() : menuItem.getLeftIcon();
String cssClasses = concatClasses(classPrefix + "-ico", menuItem.getLeftIconClass());
- encodeTdIcon(writer, context, cssClasses, icon);
+ encodeTdIcon(writer, context, cssClasses, icon, getState(menuItem));
}
//TODO nick - the same as in PanelMenuGroupRenderer
- public void encodeTdIcon(ResponseWriter writer, FacesContext context, String classPrefix, String attrIconValue) throws IOException {
+ public void encodeTdIcon(ResponseWriter writer, FacesContext context, String classPrefix, String attrIconValue, PanelIcons.State state) throws IOException {
writer.startElement(TD_ELEM, null);
try {
PanelIcons icon = PanelIcons.valueOf(attrIconValue);
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(classPrefix, icon.cssClass()), null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(classPrefix, state.getCssClass(icon)), null);
} catch (IllegalArgumentException e) {
writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix, null);
if(attrIconValue != null && attrIconValue.trim().length() != 0) {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-25 15:19:06 UTC (rev 21213)
@@ -83,32 +83,32 @@
protected abstract void encodeHeaderRightIcon(ResponseWriter writer, FacesContext context, T menuItem) throws IOException;
- protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue, boolean header) throws IOException {
+ protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, String attrIconCollapsedValue, String attrIconExpandedValue, PanelIcons.State state) throws IOException {
writer.startElement(TD_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
- encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-colps", header);
- encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-exp", header);
+ encodeIdIcon(writer, context, attrIconCollapsedValue, cssIconsClassPrefix + "-colps", state);
+ encodeIdIcon(writer, context, attrIconExpandedValue, cssIconsClassPrefix + "-exp", state);
writer.endElement(TD_ELEM);
}
- protected void encodeIdIcon(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass, boolean header) throws IOException {
+ protected void encodeIdIcon(ResponseWriter writer, FacesContext context, String attrIconValue, String styleClass, PanelIcons.State state) throws IOException {
if (attrIconValue == null || attrIconValue.trim().length() <= 0) {
- encodeDivIcon(writer, PanelIcons.none, styleClass, header);
+ encodeDivIcon(writer, PanelIcons.none, styleClass, state);
} else {
PanelIcons icon = PanelIcons.getIcon(attrIconValue);
if (icon != null) {
- encodeDivIcon(writer, icon, styleClass, header);
+ encodeDivIcon(writer, icon, styleClass, state);
} else {
encodeImage(writer, context, attrIconValue);
}
}
}
- public static void encodeDivIcon(ResponseWriter writer, PanelIcons icon, String styleClass, boolean header) throws IOException {
+ public static void encodeDivIcon(ResponseWriter writer, PanelIcons icon, String styleClass, PanelIcons.State state) throws IOException {
writer.startElement(DIV_ELEM, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, header ? icon.headerClass() : icon.cssClass()), null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, state.getCssClass(icon)), null);
writer.endElement(DIV_ELEM);
}
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/accordionItem.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -12,8 +12,8 @@
<div class="rf-ac-itm-lbl-inact">item</div>
</td>
<td class="rf-ac-itm-exp-ico">
- <div class="rf-ac-itm-ico-act rf-ico-none"></div>
- <div class="rf-ac-itm-ico-inact rf-ico-none"></div>
+ <div class="rf-ac-itm-ico-act rf-ico-none-hdr"></div>
+ <div class="rf-ac-itm-ico-inact rf-ico-none-hdr"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/collapsiblePanel.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -8,16 +8,16 @@
<tbody>
<tr>
<td class="rf-cp-ico">
- <div class="rf-cp-ico-colps rf-ico-none"></div>
- <div class="rf-cp-ico-exp rf-ico-none"></div>
+ <div class="rf-cp-ico-colps rf-ico-none-hdr"></div>
+ <div class="rf-cp-ico-exp rf-ico-none-hdr"></div>
</td>
<td class="rf-cp-lbl">
<div class="rf-cp-lbl-exp"></div>
<div class="rf-cp-lbl-colps"></div>
</td>
<td class="rf-cp-exp-ico">
- <div class="rf-cp-ico-colps rf-ico-none"></div>
- <div class="rf-cp-ico-exp rf-ico-none"></div>
+ <div class="rf-cp-ico-colps rf-ico-none-hdr"></div>
+ <div class="rf-cp-ico-exp rf-ico-none-hdr"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-groupDis.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-gr-ico">
- <div class="rf-pm-ico-colps rf-ico-chevron-down"></div>
- <div class="rf-pm-ico-exp rf-ico-chevron-down"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron-down-dis"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron-down-dis"></div>
</td>
<td class="rf-pm-gr-lbl"></td>
<td class="rf-pm-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-ico-chevron-up"></div>
- <div class="rf-pm-ico-exp rf-ico-chevron-up"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron-up-dis"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron-up-dis"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-itemDis.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -2,9 +2,9 @@
<table class="rf-pm-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-itm-ico rf-ico-chevron-down"></td>
+ <td class="rf-pm-itm-ico rf-ico-chevron-down-dis"></td>
<td class="rf-pm-itm-lbl">panelMenuItem</td>
- <td class="rf-pm-itm-exp-ico rf-ico-chevron-up"></td>
+ <td class="rf-pm-itm-exp-ico rf-ico-chevron-up-dis"></td>
</tr>
</tbody>
</table>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroup.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-ico-hdr-triangle"></div>
- <div class="rf-pm-ico-exp rf-ico-hdr-disc"></div>
+ <div class="rf-pm-ico-colps rf-ico-triangle-hdr"></div>
+ <div class="rf-pm-ico-exp rf-ico-disc-hdr"></div>
</td>
<td class="rf-pm-top-gr-lbl"></td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-ico-hdr-triangle"></div>
- <div class="rf-pm-ico-exp rf-ico-hdr-disc"></div>
+ <div class="rf-pm-ico-colps rf-ico-triangle-hdr"></div>
+ <div class="rf-pm-ico-exp rf-ico-disc-hdr"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topGroupDis.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-ico-hdr-chevron"></div>
- <div class="rf-pm-ico-exp rf-ico-hdr-chevron"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron-hdr-dis"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron-hdr-dis"></div>
</td>
<td class="rf-pm-top-gr-lbl"></td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-ico-hdr-chevron"></div>
- <div class="rf-pm-ico-exp rf-ico-hdr-chevron"></div>
+ <div class="rf-pm-ico-colps rf-ico-chevron-hdr-dis"></div>
+ <div class="rf-pm-ico-exp rf-ico-chevron-hdr-dis"></div>
</td>
</tr>
</tbody>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenu-icons-inheritance-topItemDis.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -2,9 +2,9 @@
<table class="rf-pm-top-itm-gr">
<tbody>
<tr>
- <td class="rf-pm-top-itm-ico rf-ico-chevron"></td>
+ <td class="rf-pm-top-itm-ico rf-ico-chevron-dis"></td>
<td class="rf-pm-top-itm-lbl">panelMenuItem</td>
- <td class="rf-pm-top-itm-exp-ico rf-ico-chevron"></td>
+ <td class="rf-pm-top-itm-exp-ico rf-ico-chevron-dis"></td>
</tr>
</tbody>
</table>
Modified: trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml
===================================================================
--- trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2011-01-25 15:03:05 UTC (rev 21212)
+++ trunk/ui/output/ui/src/test/resources/org/richfaces/renderkit/html/panelMenuGroup-topGroup.xmlunit.xml 2011-01-25 15:19:06 UTC (rev 21213)
@@ -5,13 +5,13 @@
<tbody>
<tr>
<td class="rf-pm-top-gr-ico">
- <div class="rf-pm-ico-colps rf-ico-none"></div>
- <div class="rf-pm-ico-exp rf-ico-none"></div>
+ <div class="rf-pm-ico-colps rf-ico-none-hdr"></div>
+ <div class="rf-pm-ico-exp rf-ico-none-hdr"></div>
</td>
<td class="rf-pm-top-gr-lbl">Group Label</td>
<td class="rf-pm-top-gr-exp-ico">
- <div class="rf-pm-ico-colps rf-ico-none"></div>
- <div class="rf-pm-ico-exp rf-ico-none"></div>
+ <div class="rf-pm-ico-colps rf-ico-none-hdr"></div>
+ <div class="rf-pm-ico-exp rf-ico-none-hdr"></div>
</td>
</tr>
</tbody>
13 years, 11 months
JBoss Rich Faces SVN: r21212 - trunk/examples/output-demo/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-25 10:03:05 -0500 (Tue, 25 Jan 2011)
New Revision: 21212
Modified:
trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
Log:
Fix
Modified: trunk/examples/output-demo/src/main/webapp/templates/template.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2011-01-25 15:00:17 UTC (rev 21211)
+++ trunk/examples/output-demo/src/main/webapp/templates/template.xhtml 2011-01-25 15:03:05 UTC (rev 21212)
@@ -11,6 +11,7 @@
<meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
<h:outputScript library="javax.faces" name="jsf.js" target="head" />
+ <h:outputScript name="jquery.js" target="head" />
<style type="text/css">
.collapsed { display: none; }
13 years, 11 months
JBoss Rich Faces SVN: r21211 - in trunk/ui/output/ui/src: test/java/org/richfaces/renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-25 10:00:17 -0500 (Tue, 25 Jan 2011)
New Revision: 21211
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuKeyNavigation.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menugroup.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js
trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/MenuItemRendererTest.java
Log:
https://issues.jboss.org/browse/RF-10235 DropDownMenu: popup is never getting hidden in IE and Google Chrome. Client code are cleaned up.
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js 2011-01-25 14:41:20 UTC (rev 21210)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu-base.js 2011-01-25 15:00:17 UTC (rev 21211)
@@ -49,7 +49,6 @@
this.selectedGroup = null;
-
rf.Event.bindById(this.id, "mouseenter", $.proxy(this.__overHandler,
this), this);
rf.Event.bindById(this.id, "mouseleave", $.proxy(this.__leaveHandler,
@@ -112,41 +111,40 @@
this.popupElement.focus();
},
- __hidePopup : function() {
- window.clearTimeout(this.showTimeoutId);
- this.showTimeoutId=null;
- if (this.__isShown()) {
- this.invokeEvent("hide", rf.getDomElement(this.id), null);
- this.__closeChildGroups();
- this.popup.hide();
- this.displayed = false;
- this.__deselectCurrentItem();
- this.currentSelectedItemIndex = -1;
- jqueryParentMenu = this.__getParentMenu();
- parentMenu = rf.$(this.__getParentMenu());
- if (this.id != parentMenu.id) {
- parentMenu.popupElement.focus();
- rf.ui.MenuManager.setActiveSubMenu(parentMenu);
- }
- }
- },
+ __hidePopup : function() {
+ window.clearTimeout(this.showTimeoutId);
+ this.showTimeoutId = null;
+ if (this.__isShown()) {
+ this.invokeEvent("hide", rf.getDomElement(this.id), null);
+ this.__closeChildGroups();
+ this.popup.hide();
+ this.displayed = false;
+ this.__deselectCurrentItem();
+ this.currentSelectedItemIndex = -1;
+ parentMenu = rf.$(this.__getParentMenu());
+ if (this.id != parentMenu.id) {
+ parentMenu.popupElement.focus();
+ rf.ui.MenuManager.setActiveSubMenu(parentMenu);
+ }
+ }
+ },
- __closeChildGroups : function() {
+ __closeChildGroups : function() {
var i = 0;
- var menuItem;
- for (i in this.items) {
- menuItem = this.items.eq(i);
- if (this.__isGroup(menuItem)) {
- rf.$(menuItem).hide();
- }
- }
+ var menuItem;
+ for (i in this.items) {
+ menuItem = this.items.eq(i);
+ if (this.__isGroup(menuItem)) {
+ rf.$(menuItem).hide();
+ }
+ }
},
__getParentMenuFromItem : function(item) {
- var menu;
- if (item)
- menu = item.parents('div.rf-ddm-itm')
- .has('div.rf-ddm-lst-bg').eq(1);
+ var menu;
+ if (item)
+ menu = item.parents('div.rf-ddm-itm')
+ .has('div.rf-ddm-lst-bg').eq(1);
if (menu && menu.length > 0)
return menu;
else {
@@ -159,8 +157,8 @@
},
__getParentMenu : function() {
- var menu = $(this.element).parents('div.rf-ddm-itm')
- .has('div.rf-ddm-lst-bg').eq(0);
+ var menu = $(this.element).parents('div.rf-ddm-itm')
+ .has('div.rf-ddm-lst-bg').eq(0);
if (menu && menu.length > 0)
return menu;
else {
@@ -170,8 +168,7 @@
},
__isGroup : function(item) {
- var group = item.find('div.' + this.options.listCss);
- return group.length > 0;
+ return item.find('div.' + this.options.listCss).length > 0;
},
__isDisabled : function(item) {
@@ -206,13 +203,11 @@
},
__showHandler : function(e) {
- if (!this.__isShown()){
+ if (!this.__isShown()) {
this.showTimeoutId = window.setTimeout($.proxy(function() {
- this.show();
- }, this), this.options.showDelay);
+ this.show();
+ }, this), this.options.showDelay);
}
-
-
},
__leaveHandler : function() {
@@ -224,12 +219,15 @@
__overHandler : function() {
window.clearTimeout(this.hideTimeoutId);
+ this.hideTimeoutId = null;
},
destroy : function() {
// clean up code here
this.detach(this.id);
+ rf.Event.unbind(this.popupElement, "keydown" + this.namespace)
+
// call parent's destroy method
$super.destroy.call(this);
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-01-25 14:41:20 UTC (rev 21210)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-01-25 15:00:17 UTC (rev 21211)
@@ -2,23 +2,9 @@
rf.ui = rf.ui || {};
var defaultOptions = {
- mode : 'server',
- attachToBody : false,
- showDelay : 50,
- hideDelay : 300,
- verticalOffset : 0,
- horisantalOffset : 0,
- showEvent : 'mouseover',
- positionOffset : [0, 0],
direction : "AA",
jointPoint : "AA",
- positionType : "DROPDOWN",
- itemCss : "rf-ddm-itm",
- selectItemCss : "rf-ddm-itm-sel",
- unselectItemCss : "rf-ddm-itm-unsel",
- disabledItemCss : "rf-ddm-itm-dis",
- listCss : "rf-ddm-lst",
- listContainerCss : "rf-ddm-lst-bg"
+ positionType : "DROPDOWN"
};
// constructor definition
@@ -30,10 +16,10 @@
this.namespace = this.namespace || "."
+ rf.Event.createNamespace(this.name, this.id);
this.groupList = new Array();
-
- rf.Event.bindById(this.id+"_label", this.options.showEvent, $.proxy(
+
+ rf.Event.bindById(this.id + "_label", this.options.showEvent, $.proxy(
this.__showHandler, this), this);
-
+
this.attachToDom(componentId);
if (!rf.ui.MenuManager)
rf.ui.MenuManager = {};
@@ -48,52 +34,53 @@
$.extend(rf.ui.Menu.prototype, rf.ui.MenuKeyNavigation);
$.extend(rf.ui.Menu.prototype, (function() {
- return {
- name : "Menu",
- initiateGroups : function(groupOptions) {
+ return {
+ name : "Menu",
+ initiateGroups : function(groupOptions) {
+ for (var i in groupOptions) {
+ var groupId = groupOptions[i].id;
+ var positionOffset = [groupOptions[i].horizontalOffset,
+ groupOptions[i].verticalOffset];
+ if (null != groupId) {
+ this.groupList[groupId] = new RichFaces.ui.MenuGroup(
+ groupId, {
+ rootMenuId : this.id,
+ onshow : groupOptions[i].onshow,
+ onhide : groupOptions[i].onhide,
+ positionOffset : positionOffset,
+ jointPoint : groupOptions[i].jointPoint,
+ direction : groupOptions[i].direction
+ });
+ }
+ }
+ },
- for (var i in groupOptions) {
- var groupId = groupOptions[i].id;
- var positionOffset = [
- groupOptions[i].horizontalOffset,
- groupOptions[i].verticalOffset];
- if (null != groupId) {
- this.groupList[groupId] = new RichFaces.ui.MenuGroup(groupId,
- {
- rootMenuId : this.id,
- onshow : groupOptions[i].onshow,
- onhide : groupOptions[i].onhide,
- positionOffset: positionOffset,
- jointPoint : groupOptions[i].jointPoint,
- direction : groupOptions[i].direction
- });
- }
- }
- },
+ show : function(e) {
+ if (this.menuManager.openedMenu != this.id) {
+ this.menuManager.shutdownMenu();
+ this.menuManager.addMenuId(this.id);
+ this.__showPopup(e);
+ }
+ },
- show : function(e) {
- if (this.menuManager.openedMenu != this.id) {
- this.menuManager.shutdownMenu();
- this.menuManager.addMenuId(this.id);
- this.__showPopup(e);
- }
- },
+ hide : function() {
+ this.__hidePopup();
+ this.menuManager.deletedMenuId();
+ },
- hide : function() {
- this.__hidePopup();
- this.menuManager.deletedMenuId();
- },
+ destroy : function() {
+ // clean up code here
+ this.detach(this.id);
- destroy : function() {
- // clean up code here
- this.detach(this.id);
+ rf.Event.unbindById(this.id + "_label", this.options.showEvent);
- // call parent's destroy method
- $super.destroy.call(this);
- }
- };
- })());
+ // call parent's destroy method
+ $super.destroy.call(this);
+ }
+ };
+ })());
+
rf.ui.MenuManager = {
openedMenu : null,
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuKeyNavigation.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuKeyNavigation.js 2011-01-25 14:41:20 UTC (rev 21210)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuKeyNavigation.js 2011-01-25 15:00:17 UTC (rev 21211)
@@ -1,174 +1,170 @@
-(function ($, rf) {
-
+(function($, rf) {
+
rf.ui = rf.ui || {};
//rf.ui.MenuKeyNavigation = rf.ui.MenuKeyNavigation || {};
-
-
- rf.ui.MenuKeyNavigation={
-
- __updateItemsList : function() {
- var items = $('.'+this.options.listContainerCss+':first',this.popup.popup).find('>.'+this.options.itemCss)
- .not('.'+this.options.disabledItemCss);
- return (this.items = items);
- },
-
- __selectPrev : function() {
- if (-1 == this.currentSelectedItemIndex){
- this.currentSelectedItemIndex=this.items.length-1;
- } else {
- this.__deselectCurrentItem();
- }
-
- if (this.currentSelectedItemIndex > 0){
- this.currentSelectedItemIndex--;
- }
- else {
- this.currentSelectedItemIndex=this.items.length-1;
- }
-
- this.__selectCurrentItem();
- },
-
- __selectNext : function() {
- if (-1 != this.currentSelectedItemIndex){
- this.__deselectCurrentItem();
- }
- if (this.currentSelectedItemIndex < this.items.length-1){
- this.currentSelectedItemIndex++;
- }
- else {
- this.currentSelectedItemIndex = 0;
- }
-
- this.__selectCurrentItem();
- },
-
- __deselectCurrentItem : function () {
- this.__deselectByIndex(this.currentSelectedItemIndex);
- },
-
- __selectCurrentItem : function () {
- this.__selectByIndex(this.currentSelectedItemIndex);
- },
-
- __selectFirstItem : function () {
+
+ rf.ui.MenuKeyNavigation = {
+
+ __updateItemsList : function() {
+ var items = $('.' + this.options.listContainerCss + ':first',
+ this.popup.popup).find('>.' + this.options.itemCss).not(
+ '.' + this.options.disabledItemCss);
+ return (this.items = items);
+ },
+
+ __selectPrev : function() {
+ if (-1 == this.currentSelectedItemIndex) {
+ this.currentSelectedItemIndex = this.items.length - 1;
+ } else {
+ this.__deselectCurrentItem();
+ }
+
+ if (this.currentSelectedItemIndex > 0) {
+ this.currentSelectedItemIndex--;
+ } else {
+ this.currentSelectedItemIndex = this.items.length - 1;
+ }
+
+ this.__selectCurrentItem();
+ },
+
+ __selectNext : function() {
+ if (-1 != this.currentSelectedItemIndex) {
+ this.__deselectCurrentItem();
+ }
+ if (this.currentSelectedItemIndex < this.items.length - 1) {
+ this.currentSelectedItemIndex++;
+ } else {
this.currentSelectedItemIndex = 0;
- this.__selectCurrentItem();
- },
-
- __selectByIndex : function(index) {
- if( -1 != index ){
- rf.$(this.items.eq(index)).select();
+ }
+
+ this.__selectCurrentItem();
+ },
+
+ __deselectCurrentItem : function() {
+ this.__deselectByIndex(this.currentSelectedItemIndex);
+ },
+
+ __selectCurrentItem : function() {
+ this.__selectByIndex(this.currentSelectedItemIndex);
+ },
+
+ __selectFirstItem : function() {
+ this.currentSelectedItemIndex = 0;
+ this.__selectCurrentItem();
+ },
+
+ __selectByIndex : function(index) {
+ if (-1 != index) {
+ rf.$(this.items.eq(index)).select();
+ }
+ },
+
+ __deselectByIndex : function(index) {
+ if (index > -1) {
+ rf.$(this.items.eq(index)).unselect();
+ }
+
+ },
+
+ __openGroup : function() {
+ var item = this.__getItemByIndex(this.currentSelectedItemIndex);
+ if (this.__isGroup(item)) {
+ rf.$(item).show();
+ rf.$(item).__selectFirstItem();
+ this.active = false;
+ }
+ },
+
+ __closeGroup : function() {
+ var item = this.__getItemByIndex(this.currentSelectedItemIndex);
+ if (this.__isGroup(item)) {
+ rf.$(item).__deselectCurrentItem();
+ rf.$(item).hide();
+ this.active = true;
+ }
+ },
+
+ __returnToParentMenu : function() {
+ var item = this.__getItemByIndex(this.currentSelectedItemIndex);
+ var menu;
+ menu = this.__getParentMenu() || this.__getParentMenuFromItem(item);
+ if (menu != null && this.id != rf.$(menu).id) {
+ this.hide();
+ rf.$(menu).popupElement.focus();
+ } else {
+ this.hide();
+ }
+ },
+
+ __activateMenuItem : function() {
+ var item = this.__getCurrentItem();
+ if (item) {
+ menuItemId = item.attr('id');
+ this.activateItem(menuItemId);
+ }
+ },
+
+ __getItemByIndex : function(index) {
+ if (index > -1) {
+ return this.items.eq(index);
+ } else {
+ return null;
+ }
+ },
+
+ __getCurrentItem : function() {
+ return this.__getItemByIndex(this.currentSelectedItemIndex);
+ },
+
+ __keydownHandler : function(e) {
+ var code;
+
+ if (e.keyCode) {
+ code = e.keyCode;
+ } else if (e.which) {
+ code = e.which;
+ }
+
+ activeMenu = rf.ui.MenuManager.getActiveSubMenu();
+
+ if (this.popup.isVisible()) {
+ switch (code) {
+ case rf.KEYS.DOWN:
+ e.preventDefault();
+ activeMenu.__selectNext();
+ //this.__setInputFocus();
+ break;
+
+ case rf.KEYS.UP:
+ e.preventDefault();
+ activeMenu.__selectPrev();
+ //this.__setInputFocus();
+ break;
+ case rf.KEYS.LEFT:
+ e.preventDefault();
+ activeMenu.__returnToParentMenu();
+ break;
+
+ case rf.KEYS.RIGHT:
+ e.preventDefault();
+ activeMenu.__openGroup();
+ break;
+
+ case rf.KEYS.ESC:
+ e.preventDefault();
+ activeMenu.__returnToParentMenu();
+ break;
+
+ case rf.KEYS.RETURN:
+ e.preventDefault();
+ activeMenu.__activateMenuItem();
+ //this.__setInputFocus();
+ //return false;
+ break;
}
- },
-
- __deselectByIndex : function (index) {
- if( index > -1 ){
- rf.$(this.items.eq(index)).unselect();
- }
-
- },
-
- __openGroup : function () {
- var item = this.__getItemByIndex(this.currentSelectedItemIndex);
- if (this.__isGroup(item)){
- rf.$(item).show();
- rf.$(item).__selectFirstItem();
- this.active = false;
- }
- },
-
- __closeGroup : function () {
- var item = this.__getItemByIndex(this.currentSelectedItemIndex);
- if (this.__isGroup(item)){
- rf.$(item).__deselectCurrentItem();
- rf.$(item).hide();
- this.active = true;
- }
- },
-
- __returnToParentMenu : function () {
- var item = this.__getItemByIndex(this.currentSelectedItemIndex);
- var menu;
- menu = this.__getParentMenu()||this.__getParentMenuFromItem(item);
- if (menu != null && this.id != rf.$(menu).id){
- this.hide();
- rf.$(menu).popupElement.focus();
- } else {
- this.hide();
- }
- },
-
- __activateMenuItem : function () {
- var item = this.__getCurrentItem();
- if (item){
- menuItemId=item.attr('id');
- this.activateItem(menuItemId);
- }
- },
-
- __getItemByIndex : function(index) {
- if (index > -1){
- return this.items.eq(index);
- } else{
- return null;
- }
- },
-
- __getCurrentItem : function() {
- return this.__getItemByIndex(this.currentSelectedItemIndex);
- },
-
- __keydownHandler : function (e){
- var code;
-
- if(e.keyCode) {
- code = e.keyCode;
- } else if(e.which) {
- code = e.which;
- }
-
- activeMenu=rf.ui.MenuManager.getActiveSubMenu();
-
-// console.info('__keydownHandler. this.id='+this.id+';' )
-// console.info('__keydownHandler.focId:'+document.activeElement+'; this.id:'+this.id+'; parent menu id:'+this.__getParentMenu().attr('id'));
- if(this.popup.isVisible()) {
- switch(code) {
- case rf.KEYS.DOWN:
- e.preventDefault();
- activeMenu.__selectNext();
- //this.__setInputFocus();
- break;
-
- case rf.KEYS.UP:
- e.preventDefault();
- activeMenu.__selectPrev();
- //this.__setInputFocus();
- break;
- case rf.KEYS.LEFT:
- e.preventDefault();
- activeMenu.__returnToParentMenu();
- break;
-
- case rf.KEYS.RIGHT:
- e.preventDefault();
- activeMenu.__openGroup();
- break;
-
- case rf.KEYS.ESC:
- e.preventDefault();
- activeMenu.__returnToParentMenu();
- break;
-
- case rf.KEYS.RETURN:
- e.preventDefault();
- activeMenu.__activateMenuItem();
- //this.__setInputFocus();
- //return false;
- break;
- }
- e.stopPropagation();
- }
+ e.stopPropagation();
}
}
+ }
})(jQuery, RichFaces);
\ No newline at end of file
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menugroup.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menugroup.js 2011-01-25 14:41:20 UTC (rev 21210)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menugroup.js 2011-01-25 15:00:17 UTC (rev 21211)
@@ -3,16 +3,9 @@
var defaultOptions = {
showEvent : 'mouseenter',
showDelay : 300,
- attachToBody : false,
- positionOffset : [0, 0],
-
- selectItemCss : "rf-ddm-itm-sel",
- itemCss : "rf-ddm-itm",
- disabledItemCss : "rf-ddm-itm-dis",
- listCss : "rf-ddm-lst",
- listContainerCss : "rf-ddm-lst-bg"
+ itemCss : "rf-ddm-itm"
}
- //constructor definition
+ // constructor definition
rf.ui.MenuGroup = function(componentId, options) {
this.id = componentId;
this.options = {};
@@ -21,10 +14,10 @@
this.namespace = this.namespace || "."
+ rf.Event.createNamespace(this.name, this.id);
this.attachToDom(componentId);
-
+
rf.Event.bindById(this.id, this.options.showEvent, $.proxy(
- this.__showHandler, this), this);
-
+ this.__showHandler, this), this);
+
this.rootMenu = rf.$(this.options.rootMenuId);
this.shown = false;
@@ -53,7 +46,6 @@
}
},
hide : function() {
- var id = this.id;
var menu = this.rootMenu;
if (menu.groupList[this.id] && this.shown) {
menu.invokeEvent("grouphide", rf
@@ -78,6 +70,7 @@
},
__leaveHandler : function() {
window.clearTimeout(this.showTimeoutId);
+ this.showTimeoutId = null;
this.hideTimeoutId = window.setTimeout($.proxy(
function() {
this.hide();
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js 2011-01-25 14:41:20 UTC (rev 21210)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menuitem.js 2011-01-25 15:00:17 UTC (rev 21211)
@@ -1,88 +1,90 @@
(function($, rf) {
- rf.ui = rf.ui || {};
-
- var defaultOptions = {
- mode : "server"
- }
+ rf.ui = rf.ui || {};
- // constructor definition
+ var defaultOptions = {
+ mode : "server"
+ }
- rf.ui.MenuItem = function(componentId, options) {
- this.options = {};
+ // constructor definition
+
+ rf.ui.MenuItem = function(componentId, options) {
+ this.options = {};
$.extend(this.options, defaultOptions, options || {});
- $super.constructor.call(this, componentId);
- this.attachToDom(componentId);
- this.element = $(rf.getDomElement(componentId));
- rf.Event.bindById(this.id, 'click', this.__clickHandler, this);
- rf.Event.bindById(this.id, 'mouseenter', this.select, this);
- rf.Event.bindById(this.id, 'mouseleave', this.unselect, this);
- this.selected = false;
- };
+ $super.constructor.call(this, componentId);
+ this.attachToDom(componentId);
+ this.element = $(rf.getDomElement(componentId));
+ rf.Event.bindById(this.id, 'click', this.__clickHandler, this);
+ rf.Event.bindById(this.id, 'mouseenter', this.select, this);
+ rf.Event.bindById(this.id, 'mouseleave', this.unselect, this);
+ this.selected = false;
+ };
- rf.BaseComponent.extend(rf.ui.MenuItem);
+ rf.BaseComponent.extend(rf.ui.MenuItem);
- // define super class link
- var $super = rf.ui.MenuItem.$super;
+ // define super class link
+ var $super = rf.ui.MenuItem.$super;
- $.extend(rf.ui.MenuItem.prototype, (function() {
+ $.extend(rf.ui.MenuItem.prototype, (function() {
- return {
- name : "MenuItem",
- select : function() {
- this.element.removeClass('rf-ddm-itm-unsel');
- this.element.addClass('rf-ddm-itm-sel');
- this.selected = true;
- },
- unselect : function() {
- this.element.removeClass('rf-ddm-itm-sel');
- this.element.addClass('rf-ddm-itm-unsel');
- this.selected = false;
- },
- activate : function() {
- this.invokeEvent('click', rf.getDomElement(this.id));
- },
+ return {
+ name : "MenuItem",
+ select : function() {
+ this.element.removeClass('rf-ddm-itm-unsel');
+ this.element.addClass('rf-ddm-itm-sel');
+ this.selected = true;
+ },
+ unselect : function() {
+ this.element.removeClass('rf-ddm-itm-sel');
+ this.element.addClass('rf-ddm-itm-unsel');
+ this.selected = false;
+ },
+ activate : function() {
+ this.invokeEvent('click', rf.getDomElement(this.id));
+ },
- isSelected : function() {
- return this.selected;
- },
+ isSelected : function() {
+ return this.selected;
+ },
- __clickHandler : function (e) {
- var parentMenu = this.__getParentMenu();
- if (parentMenu) {
- parentMenu.processItem(this.element);
- }
+ __clickHandler : function(e) {
+ var parentMenu = this.__getParentMenu();
+ if (parentMenu) {
+ parentMenu.processItem(this.element);
+ }
- this.__submitForm(rf.getDomElement(this.id), e, this.options.params);
- },
+ this.__submitForm(rf.getDomElement(this.id), e,
+ this.options.params);
+ },
- /**
- *
- * @param item DOM element
- */
- __submitForm : function(item, e, params) {
- var form = this.__getParentForm(item);
- var itemId = {};
- itemId[item.id] = item.id;
- $.extend(itemId, params || {});
- if (this.options.mode == "server") {
- rf.submitForm(form, itemId);
- }
- if (this.options.mode == "ajax" && this.options.submitFunction) {
- this.options.submitFunction.call(this, e);
- }
- },
+ /**
+ *
+ * @param item DOM element
+ */
+ __submitForm : function(item, e, params) {
+ var form = this.__getParentForm(item);
+ var itemId = {};
+ itemId[item.id] = item.id;
+ $.extend(itemId, params || {});
+ if (this.options.mode == "server") {
+ rf.submitForm(form, itemId);
+ }
+ if (this.options.mode == "ajax" && this.options.submitFunction) {
+ this.options.submitFunction.call(this, e);
+ }
+ },
- __getParentForm : function(item) {
- return $($(item).parents("form").get(0));
- },
+ __getParentForm : function(item) {
+ return $($(item).parents("form").get(0));
+ },
- __getParentMenu : function () {
- var menu = this.element.parents('div.rf-ddm-lbl');
- if (menu && menu.length > 0) return rf.$(menu);
- else return null;
+ __getParentMenu : function() {
+ var menu = this.element.parents('div.rf-ddm-lbl');
+ if (menu && menu.length > 0)
+ return rf.$(menu);
+ else
+ return null;
+ }
+ };
+ })());
- }
- };
- })());
-
})(jQuery, RichFaces);
\ No newline at end of file
Modified: trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/MenuItemRendererTest.java
===================================================================
--- trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/MenuItemRendererTest.java 2011-01-25 14:41:20 UTC (rev 21210)
+++ trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/MenuItemRendererTest.java 2011-01-25 15:00:17 UTC (rev 21211)
@@ -75,13 +75,11 @@
@Test
public void testAjaxClick() throws IOException, SAXException {
HtmlPage page = environment.getPage("/menuItem_ajaxMode.jsf");
- System.out.print(page.asXml());
HtmlDivision item = (HtmlDivision) page.getElementById("form:menuItem");
assertNotNull(item);
DropDownMenuBean.setCurrent("none");
item.click();
item = (HtmlDivision) page.getElementById("form:menuItem");
- System.out.print(item.asXml());
assertNotNull(item);
assertEquals("action", DropDownMenuBean.getCurrent());
}
13 years, 11 months
JBoss Rich Faces SVN: r21210 - in trunk/ui/input/ui/src/main: resources/META-INF/resources/org.richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-01-25 09:41:20 -0500 (Tue, 25 Jan 2011)
New Revision: 21210
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
Log:
RF-10233 calendar: unexpected validation after month scrolling in ajax mode
-empty componentData was added to ajax response due to correct rendering of calendar.
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-25 14:34:05 UTC (rev 21209)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-25 14:41:20 UTC (rev 21210)
@@ -565,10 +565,8 @@
throws IOException {
if (AbstractCalendar.DAYSDATA_META_COMPONENT_ID.equals(metaComponentId)) {
Object preload = ((AbstractCalendar) component).getPreload();
- if (preload != null) {
- Map<String, Object> dataMap = ExtendedPartialViewContext.getInstance(context).getResponseComponentDataMap();
- dataMap.put(component.getClientId(context), preload);
- }
+ Map<String, Object> dataMap = ExtendedPartialViewContext.getInstance(context).getResponseComponentDataMap();
+ dataMap.put(component.getClientId(context), preload);
} else {
throw new IllegalArgumentException(metaComponentId);
}
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2011-01-25 14:34:05 UTC (rev 21209)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2011-01-25 14:41:20 UTC (rev 21210)
@@ -1445,16 +1445,8 @@
callAjax: function(calendar, date) {
var _this = this;
var ajaxSuccess = function (event) {
- if (event.componentData && event.componentData[_this.id])
- {
- var dataDays=event.componentData[_this.id]
- _this.load(dataDays, true);
- } else {
- // https://issues.jboss.org/browse/RF-10233
- // if calendar DataModel is empty and month is scrolled, so
- // calendar should be rendered
- _this.render();
- }
+ var dataDays=event && event.componentData && event.componentData[_this.id];
+ _this.load(dataDays, true);
}
var ajaxError = function (event) {
// do nothing
13 years, 11 months
JBoss Rich Faces SVN: r21209 - in modules/tests/metamer/trunk/application/src/main: resources/org/richfaces/tests/metamer/bean and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-25 09:34:05 -0500 (Tue, 25 Jan 2011)
New Revision: 21209
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java
modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichPanelMenuBean.properties
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
Log:
rich:panelMenu - pre-automation fixes (RFPL-950)
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java 2011-01-25 14:33:07 UTC (rev 21208)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichPanelMenuBean.java 2011-01-25 14:34:05 UTC (rev 21209)
@@ -46,6 +46,8 @@
private static final long serialVersionUID = -1L;
private static Logger logger;
private Attributes attributes;
+
+ private Object activeItem;
/**
* Initializes the managed bean.
@@ -54,20 +56,11 @@
public void init() {
logger = LoggerFactory.getLogger(getClass());
logger.debug("initializing bean " + getClass().getName());
-
- // loading from Class to work around RF-10161
+
attributes = Attributes.getComponentAttributesFromFacesConfig(UIPanelMenu.class, getClass());
-
- attributes.setAttribute("groupLeftIconCollapsed", "disc");
- attributes.setAttribute("groupRightIconCollapsed", "chevronDown");
- attributes.setAttribute("groupLeftIconExpanded", "disc");
- attributes.setAttribute("groupRightIconExpanded", "chevronUp");
+
attributes.setAttribute("rendered", true);
attributes.setAttribute("style", "width: 200px;");
- attributes.setAttribute("topGroupLeftIconCollapsed", "disc");
- attributes.setAttribute("topGroupRightIconCollapsed", "chevronDown");
- attributes.setAttribute("topGroupLeftIconExpanded", "disc");
- attributes.setAttribute("topGroupRightIconExpanded", "chevronUp");
// will be tested in another way
attributes.remove("itemChangeListener");
@@ -89,7 +82,15 @@
* an event representing the activation of a user interface component
*/
public void itemChangeListener(ItemChangeEvent event) {
- attributes.get("activeItem").setValue(event.getNewItem());
+ activeItem = event.getNewItem();
RichBean.logToPage("* item changed: " + event.getOldItem() + " -> " + event.getNewItem());
}
+
+ public void setActiveItem(Object activeItem) {
+ this.activeItem = activeItem;
+ }
+
+ public Object getActiveItem() {
+ return activeItem;
+ }
}
Modified: modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichPanelMenuBean.properties
===================================================================
--- modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichPanelMenuBean.properties 2011-01-25 14:33:07 UTC (rev 21208)
+++ modules/tests/metamer/trunk/application/src/main/resources/org/richfaces/tests/metamer/bean/RichPanelMenuBean.properties 2011-01-25 14:34:05 UTC (rev 21209)
@@ -6,183 +6,183 @@
attr.itemMode.ajax=ajax
attr.itemMode.server=server
attr.itemMode.null=
-attr.groupCollapseIconLeft.grid=grid
-attr.groupCollapseIconLeft.disc=disc
-attr.groupCollapseIconLeft.chevronUp=chevronUp
-attr.groupCollapseIconLeft.chevronDown=chevronDown
-attr.groupCollapseIconLeft.triangle=triangle
-attr.groupCollapseIconLeft.triangleUp=triangleUp
-attr.groupCollapseIconLeft.triangleDown=triangleDown
-attr.groupCollapseIconLeft.customURL=/resources/images/loading.gif
-attr.groupCollapseIconLeft.null=
-attr.groupCollapseIconRight.grid=grid
-attr.groupCollapseIconRight.disc=disc
-attr.groupCollapseIconRight.chevronUp=chevronUp
-attr.groupCollapseIconRight.chevronDown=chevronDown
-attr.groupCollapseIconRight.triangle=triangle
-attr.groupCollapseIconRight.triangleUp=triangleUp
-attr.groupCollapseIconRight.triangleDown=triangleDown
-attr.groupCollapseIconRight.customURL=/resources/images/loading.gif
-attr.groupCollapseIconRight.null=
-attr.groupDisableIconLeft.grid=grid
-attr.groupDisableIconLeft.disc=disc
-attr.groupDisableIconLeft.chevronUp=chevronUp
-attr.groupDisableIconLeft.chevronDown=chevronDown
-attr.groupDisableIconLeft.triangle=triangle
-attr.groupDisableIconLeft.triangleUp=triangleUp
-attr.groupDisableIconLeft.triangleDown=triangleDown
-attr.groupDisableIconLeft.customURL=/resources/images/loading.gif
-attr.groupDisableIconLeft.null=
-attr.groupDisableIconRight.grid=grid
-attr.groupDisableIconRight.disc=disc
-attr.groupDisableIconRight.chevronUp=chevronUp
-attr.groupDisableIconRight.chevronDown=chevronDown
-attr.groupDisableIconRight.triangle=triangle
-attr.groupDisableIconRight.triangleUp=triangleUp
-attr.groupDisableIconRight.triangleDown=triangleDown
-attr.groupDisableIconRight.customURL=/resources/images/loading.gif
-attr.groupDisableIconRight.null=
-attr.groupExpandIconLeft.grid=grid
-attr.groupExpandIconLeft.disc=disc
-attr.groupExpandIconLeft.chevronUp=chevronUp
-attr.groupExpandIconLeft.chevronDown=chevronDown
-attr.groupExpandIconLeft.triangle=triangle
-attr.groupExpandIconLeft.triangleUp=triangleUp
-attr.groupExpandIconLeft.triangleDown=triangleDown
-attr.groupExpandIconLeft.customURL=/resources/images/loading.gif
-attr.groupExpandIconLeft.null=
-attr.groupExpandIconRight.grid=grid
-attr.groupExpandIconRight.disc=disc
-attr.groupExpandIconRight.chevronUp=chevronUp
-attr.groupExpandIconRight.chevronDown=chevronDown
-attr.groupExpandIconRight.triangle=triangle
-attr.groupExpandIconRight.triangleUp=triangleUp
-attr.groupExpandIconRight.triangleDown=triangleDown
-attr.groupExpandIconRight.customURL=/resources/images/loading.gif
-attr.groupExpandIconRight.null=
-attr.itemDisableIconLeft.grid=grid
-attr.itemDisableIconLeft.disc=disc
-attr.itemDisableIconLeft.chevronUp=chevronUp
-attr.itemDisableIconLeft.chevronDown=chevronDown
-attr.itemDisableIconLeft.triangle=triangle
-attr.itemDisableIconLeft.triangleUp=triangleUp
-attr.itemDisableIconLeft.triangleDown=triangleDown
-attr.itemDisableIconLeft.customURL=/resources/images/loading.gif
-attr.itemDisableIconLeft.null=
-attr.itemDisableIconRight.grid=grid
-attr.itemDisableIconRight.disc=disc
-attr.itemDisableIconRight.chevronUp=chevronUp
-attr.itemDisableIconRight.chevronDown=chevronDown
-attr.itemDisableIconRight.triangle=triangle
-attr.itemDisableIconRight.triangleUp=triangleUp
-attr.itemDisableIconRight.triangleDown=triangleDown
-attr.itemDisableIconRight.customURL=/resources/images/loading.gif
-attr.itemDisableIconRight.null=
-attr.itemIconLeft.grid=grid
-attr.itemIconLeft.disc=disc
-attr.itemIconLeft.chevronUp=chevronUp
-attr.itemIconLeft.chevronDown=chevronDown
-attr.itemIconLeft.triangle=triangle
-attr.itemIconLeft.triangleUp=triangleUp
-attr.itemIconLeft.triangleDown=triangleDown
-attr.itemIconLeft.customURL=/resources/images/loading.gif
-attr.itemIconLeft.null=
-attr.itemIconRight.grid=grid
-attr.itemIconRight.disc=disc
-attr.itemIconRight.chevronUp=chevronUp
-attr.itemIconRight.chevronDown=chevronDown
-attr.itemIconRight.triangle=triangle
-attr.itemIconRight.triangleUp=triangleUp
-attr.itemIconRight.triangleDown=triangleDown
-attr.itemIconRight.customURL=/resources/images/loading.gif
-attr.itemIconRight.null=
-attr.topGroupCollapseIconLeft.grid=grid
-attr.topGroupCollapseIconLeft.disc=disc
-attr.topGroupCollapseIconLeft.chevronUp=chevronUp
-attr.topGroupCollapseIconLeft.chevronDown=chevronDown
-attr.topGroupCollapseIconLeft.triangle=triangle
-attr.topGroupCollapseIconLeft.triangleUp=triangleUp
-attr.topGroupCollapseIconLeft.triangleDown=triangleDown
-attr.topGroupCollapseIconLeft.customURL=/resources/images/loading.gif
-attr.topGroupCollapseIconLeft.null=
-attr.topGroupCollapseIconRight.grid=grid
-attr.topGroupCollapseIconRight.disc=disc
-attr.topGroupCollapseIconRight.chevronUp=chevronUp
-attr.topGroupCollapseIconRight.chevronDown=chevronDown
-attr.topGroupCollapseIconRight.triangle=triangle
-attr.topGroupCollapseIconRight.triangleUp=triangleUp
-attr.topGroupCollapseIconRight.triangleDown=triangleDown
-attr.topGroupCollapseIconRight.customURL=/resources/images/loading.gif
-attr.topGroupCollapseIconRight.null=
-attr.topGroupDisableIconLeft.grid=grid
-attr.topGroupDisableIconLeft.disc=disc
-attr.topGroupDisableIconLeft.chevronUp=chevronUp
-attr.topGroupDisableIconLeft.chevronDown=chevronDown
-attr.topGroupDisableIconLeft.triangle=triangle
-attr.topGroupDisableIconLeft.triangleUp=triangleUp
-attr.topGroupDisableIconLeft.triangleDown=triangleDown
-attr.topGroupDisableIconLeft.customURL=/resources/images/loading.gif
-attr.topGroupDisableIconLeft.null=
-attr.topGroupDisableIconRight.grid=grid
-attr.topGroupDisableIconRight.disc=disc
-attr.topGroupDisableIconRight.chevronUp=chevronUp
-attr.topGroupDisableIconRight.chevronDown=chevronDown
-attr.topGroupDisableIconRight.triangle=triangle
-attr.topGroupDisableIconRight.triangleUp=triangleUp
-attr.topGroupDisableIconRight.triangleDown=triangleDown
-attr.topGroupDisableIconRight.customURL=/resources/images/loading.gif
-attr.topGroupDisableIconRight.null=
-attr.topGroupExpandIconLeft.grid=grid
-attr.topGroupExpandIconLeft.disc=disc
-attr.topGroupExpandIconLeft.chevronUp=chevronUp
-attr.topGroupExpandIconLeft.chevronDown=chevronDown
-attr.topGroupExpandIconLeft.triangle=triangle
-attr.topGroupExpandIconLeft.triangleUp=triangleUp
-attr.topGroupExpandIconLeft.triangleDown=triangleDown
-attr.topGroupExpandIconLeft.customURL=/resources/images/loading.gif
-attr.topGroupExpandIconLeft.null=
-attr.topGroupExpandIconRight.grid=grid
-attr.topGroupExpandIconRight.disc=disc
-attr.topGroupExpandIconRight.chevronUp=chevronUp
-attr.topGroupExpandIconRight.chevronDown=chevronDown
-attr.topGroupExpandIconRight.triangle=triangle
-attr.topGroupExpandIconRight.triangleUp=triangleUp
-attr.topGroupExpandIconRight.triangleDown=triangleDown
-attr.topGroupExpandIconRight.customURL=/resources/images/loading.gif
-attr.topGroupExpandIconRight.null=
-attr.topItemDisableIconLeft.grid=grid
-attr.topItemDisableIconLeft.disc=disc
-attr.topItemDisableIconLeft.chevronUp=chevronUp
-attr.topItemDisableIconLeft.chevronDown=chevronDown
-attr.topItemDisableIconLeft.triangle=triangle
-attr.topItemDisableIconLeft.triangleUp=triangleUp
-attr.topItemDisableIconLeft.triangleDown=triangleDown
-attr.topItemDisableIconLeft.customURL=/resources/images/loading.gif
-attr.topItemDisableIconLeft.null=
-attr.topItemDisableIconRight.grid=grid
-attr.topItemDisableIconRight.disc=disc
-attr.topItemDisableIconRight.chevronUp=chevronUp
-attr.topItemDisableIconRight.chevronDown=chevronDown
-attr.topItemDisableIconRight.triangle=triangle
-attr.topItemDisableIconRight.triangleUp=triangleUp
-attr.topItemDisableIconRight.triangleDown=triangleDown
-attr.topItemDisableIconRight.customURL=/resources/images/loading.gif
-attr.topItemDisableIconRight.null=
-attr.topItemIconLeft.grid=grid
-attr.topItemIconLeft.disc=disc
-attr.topItemIconLeft.chevronUp=chevronUp
-attr.topItemIconLeft.chevronDown=chevronDown
-attr.topItemIconLeft.triangle=triangle
-attr.topItemIconLeft.triangleUp=triangleUp
-attr.topItemIconLeft.triangleDown=triangleDown
-attr.topItemIconLeft.customURL=/resources/images/loading.gif
-attr.topItemIconLeft.null=
-attr.topItemIconRight.grid=grid
-attr.topItemIconRight.disc=disc
-attr.topItemIconRight.chevronUp=chevronUp
-attr.topItemIconRight.chevronDown=chevronDown
-attr.topItemIconRight.triangle=triangle
-attr.topItemIconRight.triangleUp=triangleUp
-attr.topItemIconRight.triangleDown=triangleDown
-attr.topItemIconRight.customURL=/resources/images/loading.gif
-attr.topItemIconRight.null=
\ No newline at end of file
+attr.groupLeftIconCollapsed.grid=grid
+attr.groupLeftIconCollapsed.disc=disc
+attr.groupLeftIconCollapsed.chevronUp=chevronUp
+attr.groupLeftIconCollapsed.chevronDown=chevronDown
+attr.groupLeftIconCollapsed.triangle=triangle
+attr.groupLeftIconCollapsed.triangleUp=triangleUp
+attr.groupLeftIconCollapsed.triangleDown=triangleDown
+attr.groupLeftIconCollapsed.customURL=/resources/images/loading.gif
+attr.groupLeftIconCollapsed.null=
+attr.groupRightIconCollapsed.grid=grid
+attr.groupRightIconCollapsed.disc=disc
+attr.groupRightIconCollapsed.chevronUp=chevronUp
+attr.groupRightIconCollapsed.chevronDown=chevronDown
+attr.groupRightIconCollapsed.triangle=triangle
+attr.groupRightIconCollapsed.triangleUp=triangleUp
+attr.groupRightIconCollapsed.triangleDown=triangleDown
+attr.groupRightIconCollapsed.customURL=/resources/images/loading.gif
+attr.groupRightIconCollapsed.null=
+attr.groupLeftIconDisabled.grid=grid
+attr.groupLeftIconDisabled.disc=disc
+attr.groupLeftIconDisabled.chevronUp=chevronUp
+attr.groupLeftIconDisabled.chevronDown=chevronDown
+attr.groupLeftIconDisabled.triangle=triangle
+attr.groupLeftIconDisabled.triangleUp=triangleUp
+attr.groupLeftIconDisabled.triangleDown=triangleDown
+attr.groupLeftIconDisabled.customURL=/resources/images/loading.gif
+attr.groupLeftIconDisabled.null=
+attr.groupRightIconDisabled.grid=grid
+attr.groupRightIconDisabled.disc=disc
+attr.groupRightIconDisabled.chevronUp=chevronUp
+attr.groupRightIconDisabled.chevronDown=chevronDown
+attr.groupRightIconDisabled.triangle=triangle
+attr.groupRightIconDisabled.triangleUp=triangleUp
+attr.groupRightIconDisabled.triangleDown=triangleDown
+attr.groupRightIconDisabled.customURL=/resources/images/loading.gif
+attr.groupRightIconDisabled.null=
+attr.groupLeftIconExpanded.grid=grid
+attr.groupLeftIconExpanded.disc=disc
+attr.groupLeftIconExpanded.chevronUp=chevronUp
+attr.groupLeftIconExpanded.chevronDown=chevronDown
+attr.groupLeftIconExpanded.triangle=triangle
+attr.groupLeftIconExpanded.triangleUp=triangleUp
+attr.groupLeftIconExpanded.triangleDown=triangleDown
+attr.groupLeftIconExpanded.customURL=/resources/images/loading.gif
+attr.groupLeftIconExpanded.null=
+attr.groupRightIconExpanded.grid=grid
+attr.groupRightIconExpanded.disc=disc
+attr.groupRightIconExpanded.chevronUp=chevronUp
+attr.groupRightIconExpanded.chevronDown=chevronDown
+attr.groupRightIconExpanded.triangle=triangle
+attr.groupRightIconExpanded.triangleUp=triangleUp
+attr.groupRightIconExpanded.triangleDown=triangleDown
+attr.groupRightIconExpanded.customURL=/resources/images/loading.gif
+attr.groupRightIconExpanded.null=
+attr.itemLeftIconDisabled.grid=grid
+attr.itemLeftIconDisabled.disc=disc
+attr.itemLeftIconDisabled.chevronUp=chevronUp
+attr.itemLeftIconDisabled.chevronDown=chevronDown
+attr.itemLeftIconDisabled.triangle=triangle
+attr.itemLeftIconDisabled.triangleUp=triangleUp
+attr.itemLeftIconDisabled.triangleDown=triangleDown
+attr.itemLeftIconDisabled.customURL=/resources/images/loading.gif
+attr.itemLeftIconDisabled.null=
+attr.itemRightIconDisabled.grid=grid
+attr.itemRightIconDisabled.disc=disc
+attr.itemRightIconDisabled.chevronUp=chevronUp
+attr.itemRightIconDisabled.chevronDown=chevronDown
+attr.itemRightIconDisabled.triangle=triangle
+attr.itemRightIconDisabled.triangleUp=triangleUp
+attr.itemRightIconDisabled.triangleDown=triangleDown
+attr.itemRightIconDisabled.customURL=/resources/images/loading.gif
+attr.itemRightIconDisabled.null=
+attr.itemLeftIcon.grid=grid
+attr.itemLeftIcon.disc=disc
+attr.itemLeftIcon.chevronUp=chevronUp
+attr.itemLeftIcon.chevronDown=chevronDown
+attr.itemLeftIcon.triangle=triangle
+attr.itemLeftIcon.triangleUp=triangleUp
+attr.itemLeftIcon.triangleDown=triangleDown
+attr.itemLeftIcon.customURL=/resources/images/loading.gif
+attr.itemLeftIcon.null=
+attr.itemRightIcon.grid=grid
+attr.itemRightIcon.disc=disc
+attr.itemRightIcon.chevronUp=chevronUp
+attr.itemRightIcon.chevronDown=chevronDown
+attr.itemRightIcon.triangle=triangle
+attr.itemRightIcon.triangleUp=triangleUp
+attr.itemRightIcon.triangleDown=triangleDown
+attr.itemRightIcon.customURL=/resources/images/loading.gif
+attr.itemRightIcon.null=
+attr.topGroupLeftIconCollapsed.grid=grid
+attr.topGroupLeftIconCollapsed.disc=disc
+attr.topGroupLeftIconCollapsed.chevronUp=chevronUp
+attr.topGroupLeftIconCollapsed.chevronDown=chevronDown
+attr.topGroupLeftIconCollapsed.triangle=triangle
+attr.topGroupLeftIconCollapsed.triangleUp=triangleUp
+attr.topGroupLeftIconCollapsed.triangleDown=triangleDown
+attr.topGroupLeftIconCollapsed.customURL=/resources/images/loading.gif
+attr.topGroupLeftIconCollapsed.null=
+attr.topGroupRightIconCollapsed.grid=grid
+attr.topGroupRightIconCollapsed.disc=disc
+attr.topGroupRightIconCollapsed.chevronUp=chevronUp
+attr.topGroupRightIconCollapsed.chevronDown=chevronDown
+attr.topGroupRightIconCollapsed.triangle=triangle
+attr.topGroupRightIconCollapsed.triangleUp=triangleUp
+attr.topGroupRightIconCollapsed.triangleDown=triangleDown
+attr.topGroupRightIconCollapsed.customURL=/resources/images/loading.gif
+attr.topGroupRightIconCollapsed.null=
+attr.topGroupLeftIconDisabled.grid=grid
+attr.topGroupLeftIconDisabled.disc=disc
+attr.topGroupLeftIconDisabled.chevronUp=chevronUp
+attr.topGroupLeftIconDisabled.chevronDown=chevronDown
+attr.topGroupLeftIconDisabled.triangle=triangle
+attr.topGroupLeftIconDisabled.triangleUp=triangleUp
+attr.topGroupLeftIconDisabled.triangleDown=triangleDown
+attr.topGroupLeftIconDisabled.customURL=/resources/images/loading.gif
+attr.topGroupLeftIconDisabled.null=
+attr.topGroupRightIconDisabled.grid=grid
+attr.topGroupRightIconDisabled.disc=disc
+attr.topGroupRightIconDisabled.chevronUp=chevronUp
+attr.topGroupRightIconDisabled.chevronDown=chevronDown
+attr.topGroupRightIconDisabled.triangle=triangle
+attr.topGroupRightIconDisabled.triangleUp=triangleUp
+attr.topGroupRightIconDisabled.triangleDown=triangleDown
+attr.topGroupRightIconDisabled.customURL=/resources/images/loading.gif
+attr.topGroupRightIconDisabled.null=
+attr.topGroupLeftIconExpanded.grid=grid
+attr.topGroupLeftIconExpanded.disc=disc
+attr.topGroupLeftIconExpanded.chevronUp=chevronUp
+attr.topGroupLeftIconExpanded.chevronDown=chevronDown
+attr.topGroupLeftIconExpanded.triangle=triangle
+attr.topGroupLeftIconExpanded.triangleUp=triangleUp
+attr.topGroupLeftIconExpanded.triangleDown=triangleDown
+attr.topGroupLeftIconExpanded.customURL=/resources/images/loading.gif
+attr.topGroupLeftIconExpanded.null=
+attr.topGroupRightIconExpanded.grid=grid
+attr.topGroupRightIconExpanded.disc=disc
+attr.topGroupRightIconExpanded.chevronUp=chevronUp
+attr.topGroupRightIconExpanded.chevronDown=chevronDown
+attr.topGroupRightIconExpanded.triangle=triangle
+attr.topGroupRightIconExpanded.triangleUp=triangleUp
+attr.topGroupRightIconExpanded.triangleDown=triangleDown
+attr.topGroupRightIconExpanded.customURL=/resources/images/loading.gif
+attr.topGroupRightIconExpanded.null=
+attr.topItemLeftIconDisabled.grid=grid
+attr.topItemLeftIconDisabled.disc=disc
+attr.topItemLeftIconDisabled.chevronUp=chevronUp
+attr.topItemLeftIconDisabled.chevronDown=chevronDown
+attr.topItemLeftIconDisabled.triangle=triangle
+attr.topItemLeftIconDisabled.triangleUp=triangleUp
+attr.topItemLeftIconDisabled.triangleDown=triangleDown
+attr.topItemLeftIconDisabled.customURL=/resources/images/loading.gif
+attr.topItemLeftIconDisabled.null=
+attr.topItemRightIconDisabled.grid=grid
+attr.topItemRightIconDisabled.disc=disc
+attr.topItemRightIconDisabled.chevronUp=chevronUp
+attr.topItemRightIconDisabled.chevronDown=chevronDown
+attr.topItemRightIconDisabled.triangle=triangle
+attr.topItemRightIconDisabled.triangleUp=triangleUp
+attr.topItemRightIconDisabled.triangleDown=triangleDown
+attr.topItemRightIconDisabled.customURL=/resources/images/loading.gif
+attr.topItemRightIconDisabled.null=
+attr.topItemLeftIcon.grid=grid
+attr.topItemLeftIcon.disc=disc
+attr.topItemLeftIcon.chevronUp=chevronUp
+attr.topItemLeftIcon.chevronDown=chevronDown
+attr.topItemLeftIcon.triangle=triangle
+attr.topItemLeftIcon.triangleUp=triangleUp
+attr.topItemLeftIcon.triangleDown=triangleDown
+attr.topItemLeftIcon.customURL=/resources/images/loading.gif
+attr.topItemLeftIcon.null=
+attr.topItemRightIcon.grid=grid
+attr.topItemRightIcon.disc=disc
+attr.topItemRightIcon.chevronUp=chevronUp
+attr.topItemRightIcon.chevronDown=chevronDown
+attr.topItemRightIcon.triangle=triangle
+attr.topItemRightIcon.triangleUp=triangleUp
+attr.topItemRightIcon.triangleDown=triangleDown
+attr.topItemRightIcon.customURL=/resources/images/loading.gif
+attr.topItemRightIcon.null=
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-01-25 14:33:07 UTC (rev 21208)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenu/simple.xhtml 2011-01-25 14:34:05 UTC (rev 21209)
@@ -44,8 +44,8 @@
action="#{richBean.dummyAction}"
actionListener="#{richBean.dummyActionListener}"
itemChangeListener="#{richPanelMenuBean.itemChangeListener}"
+ activeItem="#{richPanelMenuBean.activeItem}"
- activeItem="#{richPanelMenuBean.attributes['activeItem'].value}"
bubbleSelection="#{richPanelMenuBean.attributes['bubbleSelection'].value}"
bypassUpdates="#{richPanelMenuBean.attributes['bypassUpdates'].value}"
collapseEvent="#{richPanelMenuBean.attributes['collapseEvent'].value}"
@@ -107,6 +107,8 @@
<rich:panelMenuItem id="item13" name="item13" label="Item 1.3"/>
</rich:panelMenuGroup>
+ <rich:panelMenuItem id="item1" name="item1" label="Item 1"/>
+
<rich:panelMenuGroup id="group2" name="group2" label="Group 2">
<rich:panelMenuItem id="item21" name="item21" label="Item 2.1"/>
<rich:panelMenuItem id="item22" name="item22" label="Item 2.2"/>
@@ -126,6 +128,8 @@
<rich:panelMenuItem id="item263" name="item263" label="Item 2.6.3"/>
</rich:panelMenuGroup>
</rich:panelMenuGroup>
+
+ <rich:panelMenuItem id="item2" name="item2" label="Item 2" disabled="true" />
<rich:panelMenuGroup id="group3" name="group3" label="Group 3">
<rich:panelMenuItem id="item31" name="item31" label="Item 3.1"/>
@@ -138,6 +142,10 @@
<rich:panelMenuItem id="item42" name="item42" label="Item 4.2"/>
<rich:panelMenuItem id="item43" name="item43" label="Item 4.3"/>
</rich:panelMenuGroup>
+
+ <rich:panelMenuItem id="item3" name="item3" label="Item 3" />
+ <rich:panelMenuItem id="item4" name="item4" label="Item 4" disabled="true" />
+ <rich:panelMenuItem id="item5" name="item5" label="Item 5" />
</rich:panelMenu>
@@ -147,7 +155,7 @@
<legend>selected item</legend>
<a4j:outputPanel id="selectedPanel" ajaxRendered="true">
- <h:outputText id="current" value="#{richPanelMenuBean.attributes['activeItem'].value}" />
+ <h:outputText id="current" value="#{richPanelMenuBean.activeItem}" />
</a4j:outputPanel>
</fieldset>
13 years, 11 months
JBoss Rich Faces SVN: r21208 - modules/tests/metamer/trunk/application/src/main/webapp/resources/css.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-25 09:33:07 -0500 (Tue, 25 Jan 2011)
New Revision: 21208
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss
Log:
tweaked phases list to don't scroll
Modified: modules/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss 2011-01-25 14:32:39 UTC (rev 21207)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/css/common.ecss 2011-01-25 14:33:07 UTC (rev 21208)
@@ -23,7 +23,7 @@
.phases-list {
font-size: 0.7em;
height: 130px;
- overflow: auto;
+ overflow: visible;
}
a img {
13 years, 11 months
JBoss Rich Faces SVN: r21207 - in trunk: examples/input-demo/src/main/webapp/examples and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-01-25 09:32:39 -0500 (Tue, 25 Jan 2011)
New Revision: 21207
Modified:
trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarBean.java
trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-10085
Modified: trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarBean.java
===================================================================
--- trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarBean.java 2011-01-25 14:22:24 UTC (rev 21206)
+++ trunk/examples/input-demo/src/main/java/org/richfaces/demo/CalendarBean.java 2011-01-25 14:32:39 UTC (rev 21207)
@@ -2,6 +2,7 @@
import java.util.Date;
import java.util.Locale;
+import java.util.TimeZone;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@@ -26,6 +27,7 @@
private int horizontalOffset = 0;
private int verticalOffset = 0;
private Positioning[] positioningValues = Positioning.values();
+ private TimeZone timeZone = TimeZone.getTimeZone("EST");
public CalendarBean() {
@@ -143,4 +145,12 @@
public Positioning[] getPositioningValues() {
return positioningValues;
}
+
+ public void setTimeZone(TimeZone timeZone) {
+ this.timeZone = timeZone;
+ }
+
+ public TimeZone getTimeZone() {
+ return timeZone;
+ }
}
\ No newline at end of file
Modified: trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2011-01-25 14:22:24 UTC (rev 21206)
+++ trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2011-01-25 14:32:39 UTC (rev 21207)
@@ -65,7 +65,7 @@
ondatemouseover="return onEvent.call(this, event);"
firstWeekDay="4"
horizontalOffset="#{calendarBean.horizontalOffset}"
- verticalOffset="#{calendarBean.verticalOffset}" defaultTime="11:22:01"
+ verticalOffset="#{calendarBean.verticalOffset}" defaultTime="21:22:01" timeZone="#{calendarBean.timeZone}"
valueChangeListener="#{calendarBean.doValueChangeListener}"
currentDataChangeListener="#{calendarBean.doCurrentDataChangeListener}"
onbeforedateselect="myFunction(event)"
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-25 14:22:24 UTC (rev 21206)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-25 14:32:39 UTC (rev 21207)
@@ -402,7 +402,7 @@
Date date = CalendarHelper.getFormattedDefaultTime(abstractCalendar);
Map<String, Object> result = new HashMap<String, Object>();
if (date != null) {
- Calendar calendar = CalendarHelper.getCalendar(facesContext, abstractCalendar);
+ Calendar calendar = CalendarHelper.getCalendar(null, null);
calendar.setTime(date);
int hours = calendar.get(Calendar.HOUR_OF_DAY);
int minutes = calendar.get(Calendar.MINUTE);
13 years, 11 months
JBoss Rich Faces SVN: r21206 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-01-25 09:22:24 -0500 (Tue, 25 Jan 2011)
New Revision: 21206
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
Log:
RF-10249: domElementAttachment attribute is fixed for form
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2011-01-25 14:10:52 UTC (rev 21205)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2011-01-25 14:22:24 UTC (rev 21206)
@@ -243,9 +243,9 @@
if (newParent != this.parent) {
this.saveInputValues(element);
- this.shadeDiv.insertAfter(newParent.lastChild);
- this.shadowDiv.insertAfter(newParent.lastChild);
- this.cdiv.insertAfter(newParent.lastChild);
+ this.shadeDiv.insertAfter($(newParent).children().last());
+ this.shadowDiv.insertAfter($(newParent).children().last());
+ this.cdiv.insertAfter($(newParent).children().last());
this.domReattached = true;
} else {
this.parent.show();
@@ -352,10 +352,10 @@
if (options.top != "auto") {
_top = parseInt(options.top, 10);
} else {
- var cw = this.getSizeElement().clientHeight;
+ var ch = this.getSizeElement().clientHeight;
var _height = this.height();
- if (cw >= _height) {
- _top = (cw - _height) / 2;
+ if (ch >= _height) {
+ _top = (ch - _height) / 2;
} else {
_top = 0;
}
13 years, 11 months