JBoss Rich Faces SVN: r947 - in trunk/richfaces/panelmenu/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-30 10:15:53 -0400 (Wed, 30 May 2007)
New Revision: 947
Modified:
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
execute action for items bugfix
Modified: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-05-30 12:30:28 UTC (rev 946)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-05-30 14:15:53 UTC (rev 947)
@@ -211,9 +211,7 @@
this.collapse();
}
}
- if (this.action){
- this.trigger(e);
- }
+ this.trigger(e);
} else {
if (this.parentObj.expandSingle){
if (this.parentObj.lastExpanded!=null){
@@ -224,9 +222,7 @@
this.expand();
}
}
- if (this.action){
- this.trigger(e);
- }
+ this.trigger(e);
this.parentObj.lastExpanded = this;
} else {
if ("node" == this.type){
@@ -234,11 +230,11 @@
this.expand();
}
}
- if (this.action){
- this.trigger(e);
- }
+ this.trigger(e);
}
}
+ } else {
+ this.trigger(e);
}
} else {
if (this.expanded){
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-30 12:30:28 UTC (rev 946)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-30 14:15:53 UTC (rev 947)
@@ -21,8 +21,8 @@
if (component.isDisabled() || findMenu(component).isDisabled()) {
variables.setVariable("itemClass", itemClass);
} else {
- onClick = component.getAttributes().get("onclick") + ";" + getOnClick(context, component);
- variables.setVariable("onClick", onClick);
+ //onClick = component.getAttributes().get("onclick") + ";" + getOnClick(context, component);
+ //variables.setVariable("onClick", onClick);
}
]]>
@@ -30,9 +30,10 @@
<table cellpadding="0" cellspacing="0" border="0" width="100%"
class="rich-pmenu-item dr-pmenu-item #{this:getFullStyleClass( context, component )} #{itemClass}"
style="#{this:getFullStyle( context, component )}"
+
id="tablehide#{clientId}" >
<f:call name="utils.encodeAttributes">
- <f:parameter value="onmousedown,onmouseup,onmousemove" />
+ <f:parameter value="onclick,onmousedown,onmouseup,onmousemove" />
</f:call>
<tr>
<f:call name="utils.encodeId"/>
17 years, 7 months
JBoss Rich Faces SVN: r946 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-05-30 08:30:28 -0400 (Wed, 30 May 2007)
New Revision: 946
Modified:
trunk/docs/userguide/en/included/menuGroup.xml
Log:
edited wrong symbols
Modified: trunk/docs/userguide/en/included/menuGroup.xml
===================================================================
--- trunk/docs/userguide/en/included/menuGroup.xml 2007-05-30 10:06:13 UTC (rev 945)
+++ trunk/docs/userguide/en/included/menuGroup.xml 2007-05-30 12:30:28 UTC (rev 946)
@@ -86,9 +86,9 @@
</para>
<para>Possible values are:</para>
<itemizedlist>
- <listitem><para>left – submenu attached to left side of the menu;</para></listitem>
- <listitem><para>right – submenu attached to right side of the menu;</para></listitem>
- <listitem><para>auto – smart positioning activated.</para></listitem>
+ <listitem><para>left - submenu attached to left side of the menu;</para></listitem>
+ <listitem><para>right - submenu attached to right side of the menu;</para></listitem>
+ <listitem><para>auto - smart positioning activated.</para></listitem>
</itemizedlist>
<para>
By default, the "direction" attribute is set to "auto".
17 years, 7 months
JBoss Rich Faces SVN: r945 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-05-30 06:06:13 -0400 (Wed, 30 May 2007)
New Revision: 945
Modified:
trunk/docs/userguide/en/included/datascroller.desc.xml
Log:
added key features
Modified: trunk/docs/userguide/en/included/datascroller.desc.xml
===================================================================
--- trunk/docs/userguide/en/included/datascroller.desc.xml 2007-05-30 00:26:36 UTC (rev 944)
+++ trunk/docs/userguide/en/included/datascroller.desc.xml 2007-05-30 10:06:13 UTC (rev 945)
@@ -17,5 +17,26 @@
</imageobject>
</mediaobject>
</figure>
+</section>
+ <section>
+ <title>Key Features</title>
+
+ <itemizedlist>
+ <listitem>
+ <para>Provides table scrolling functionality</para>
+ </listitem>
+
+ <listitem>
+ <para>Built-in Ajax processing</para>
+ </listitem>
+
+ <listitem>
+ <para>Provides fast controls</para>
+ </listitem>
+
+ <listitem>
+ <para>Skin support</para>
+ </listitem>
+ </itemizedlist>
</section>
</section>
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r944 - tags.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-05-29 20:26:36 -0400 (Tue, 29 May 2007)
New Revision: 944
Added:
tags/3_0_1_rc6/
Log:
Copied: tags/3_0_1_rc6 (from rev 943, trunk)
17 years, 7 months
JBoss Rich Faces SVN: r943 - trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-29 19:16:04 -0400 (Tue, 29 May 2007)
New Revision: 943
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-243 fixed
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-05-29 23:04:02 UTC (rev 942)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererBase.java 2007-05-29 23:16:04 UTC (rev 943)
@@ -111,7 +111,7 @@
menuItem, context).toString());
} else if (mode.equalsIgnoreCase(MenuComponent.MODE_SERVER)) {
CommandScriptBuilder builder = new CommandScriptBuilder(menuItem);
- builder.setCheckActionAndListener(true);
+ //builder.setCheckActionAndListener(true);
Object target = menuItem.getAttributes().get("target");
if (null != target) {
builder.setTarget((String) target);
17 years, 7 months
JBoss Rich Faces SVN: r942 - in trunk/richfaces/menu-components/src: main/resources/org/richfaces/renderkit/html/css and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-29 19:04:02 -0400 (Tue, 29 May 2007)
New Revision: 942
Modified:
trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuGroupComponentTest.java
trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuItemComponentTest.java
Log:
http://jira.jboss.com/jira/browse/RF-242 fixed
Modified: trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java
===================================================================
--- trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-05-29 17:54:00 UTC (rev 941)
+++ trunk/richfaces/menu-components/src/main/java/org/richfaces/renderkit/html/images/MenuNodeImage.java 2007-05-29 23:04:02 UTC (rev 942)
@@ -19,7 +19,7 @@
public class MenuNodeImage extends Java2Dresource {
- private static final Dimension dimensions = new Dimension(7, 14);
+ private static final Dimension dimensions = new Dimension(16, 32);
protected Dimension getDimensions(ResourceContext resourceContext) {
return dimensions;
@@ -58,17 +58,22 @@
MenuNodeImageData mnd = (MenuNodeImageData) restoreData(context);
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
+ int x0 = 6;
+ int y0 = 8;
+
g2d.setColor(new Color(mnd.getGeneralColor().intValue()));
- g2d.drawLine(2,0,2,6);
- g2d.drawLine(3,1,3,5);
- g2d.drawLine(4,2,4,4);
- g2d.drawLine(5,3,5,3);
+ g2d.drawLine(x0, y0 - 3, x0, y0 +3);
+ g2d.drawLine(x0 + 1, y0 - 2, x0 + 1, y0 + 2);
+ g2d.drawLine(x0 + 2, y0 - 1, x0 + 2, y0 + 1);
+ g2d.drawLine(x0 + 3, y0, x0 + 3, y0);
+ int y1 = 24;
+
g2d.setColor(new Color(mnd.getDisabledColor().intValue()));
- g2d.drawLine(2,7,2,13);
- g2d.drawLine(3,8,3,12);
- g2d.drawLine(4,9,4,11);
- g2d.drawLine(5,10,5,10);
+ g2d.drawLine(x0, y1 - 3, x0, y1 +3);
+ g2d.drawLine(x0 + 1, y1 - 2, x0 + 1, y1 + 2);
+ g2d.drawLine(x0 + 2, y1 - 1, x0 + 2, y1 + 1);
+ g2d.drawLine(x0 + 3, y1, x0 + 3, y1);
}
Modified: trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss
===================================================================
--- trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2007-05-29 17:54:00 UTC (rev 941)
+++ trunk/richfaces/menu-components/src/main/resources/org/richfaces/renderkit/html/css/menucomponents.xcss 2007-05-29 23:04:02 UTC (rev 942)
@@ -40,18 +40,14 @@
.dr-menu-node {
position : absolute;
- width : 7px;
- height : 7px;
+ width : 16px;
+ height : 16px;
font-size : 1px;
- right : 0px;
+ top : 1px;
+ right : 1px;
}
-.dr-menu-node-icon {
- top : 7px;
- right : 6px;
-}
-
-.dr-menu-item-disabled .dr-menu-node-icon {
+.dr-menu-item-disabled .dr-menu-node {
background-position : bottom;
}
]]>
Modified: trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx
===================================================================
--- trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-05-29 17:54:00 UTC (rev 941)
+++ trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuGroup.jspx 2007-05-29 23:04:02 UTC (rev 942)
@@ -24,7 +24,7 @@
<div id="ref#{clientId}"
- class="dr-menu-item #{menuGroupClass} rich-menu-group #{component.attributes['styleClass']}"
+ class="dr-menu-item #{menuGroupClass} rich-menu-group #{component.attributes['styleClass']}"
style="#{component.attributes['style']}"
onmousemove="#{menuGroupMouseMove}">
@@ -33,15 +33,12 @@
<jsp:scriptlet>
<![CDATA[
boolean disabled = ((Boolean) component.getAttributes().get("disabled")).booleanValue();
- String iconFacet = disabled ? "iconDisabled" : "icon";
- ComponentsVariableResolver.getVariables(this, component).setVariable("iconFacet", iconFacet);
- if(component.getFacet(iconFacet)!=null && component.getFacet(iconFacet).isRendered()) {
- ]]>
+ String iconName = disabled ? "iconDisabled" : "icon";
+ UIComponent iconFacet = component.getFacet(iconName);
+ if (iconFacet !=null && iconFacet.isRendered()) {
+ renderChild(context, iconFacet);
+ } else if (component.getAttributes().get(iconName)!=null) {]]>
</jsp:scriptlet>
- <u:insertFacet name="#{iconFacet}" />
- <jsp:scriptlet>
- <![CDATA[} else if (component.getAttributes().get(iconFacet)!=null) {]]>
- </jsp:scriptlet>
<img width="16" height="16"
style="#{component.attributes['iconStyle']}"
src="#{actualIcon}"/>
@@ -61,11 +58,16 @@
<jsp:scriptlet>
<![CDATA[
String iconFolder = disabled ? "iconFolderDisabled" : "iconFolder";
- ComponentsVariableResolver.getVariables(this, component).setVariable("iconFolder", iconFolder);
- if(component.getFacet(iconFolder)!=null && component.getFacet(iconFolder).isRendered()) {
+ UIComponent iconFolderFacet = component.getFacet(iconFolder);
+ if (iconFolderFacet != null && iconFolderFacet.isRendered()) {
]]>
</jsp:scriptlet>
<div id="ref#{clientId}:folder" class="dr-menu-node #{menuGroupItemFolderClass}">
+ <jsp:scriptlet>
+ <![CDATA[
+ renderChild(context, iconFolderFacet);
+ ]]>
+ </jsp:scriptlet>
<u:insertFacet name="#{iconFolder}" />
</div>
<jsp:scriptlet>
Modified: trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuGroupComponentTest.java
===================================================================
--- trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuGroupComponentTest.java 2007-05-29 17:54:00 UTC (rev 941)
+++ trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuGroupComponentTest.java 2007-05-29 23:04:02 UTC (rev 942)
@@ -193,7 +193,7 @@
assertEquals("div", div.getNodeName());
classAttr = div.getAttributeValue("class");
assertTrue(classAttr
- .contains("dr-menu-item dr-menu-item-disabled rich-menu-group rich-menu-group-disabled"));
+ .contains("dr-menu-item dr-menu-item-disabled rich-menu-group-disabled rich-menu-group"));
}
Modified: trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuItemComponentTest.java
===================================================================
--- trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuItemComponentTest.java 2007-05-29 17:54:00 UTC (rev 941)
+++ trunk/richfaces/menu-components/src/test/java/org/richfaces/component/MenuItemComponentTest.java 2007-05-29 23:04:02 UTC (rev 942)
@@ -157,7 +157,7 @@
// System.out.println(page.asXml());
HtmlElement span = page.getHtmlElementById(menuItem
.getClientId(facesContext)
- + ":disabled");
+ + ":anchor");
assertNotNull(span);
assertEquals("span", span.getNodeName());
String classAttr = span.getAttributeValue("class");
17 years, 7 months
JBoss Rich Faces SVN: r941 - in trunk/richfaces/panelmenu/src/main: java/org/richfaces/component/panelmenu and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-29 13:54:00 -0400 (Tue, 29 May 2007)
New Revision: 941
Modified:
trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
Added disabled attribute to entire panelMenu component.
Modified: trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-29 17:54:00 UTC (rev 941)
@@ -271,6 +271,14 @@
<description></description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
+ <property>
+ <name>disabled</name>
+ <classname>boolean</classname>
+ <description>
+ If “true” sets state of the item to disabled state. “false” is default.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
</component>
<component>
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/component/panelmenu/UIPanelMenu.java 2007-05-29 17:54:00 UTC (rev 941)
@@ -86,5 +86,7 @@
public abstract void setOngroupcollapse(String ongroupcollapse);
public abstract String getOngroupexpand();
public abstract void setOngroupexpand(String ongroupexpand);
+ public abstract boolean isDisabled();
+ public abstract void setDisabled(boolean disabled);
}
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuGroupRenderer.java 2007-05-29 17:54:00 UTC (rev 941)
@@ -129,7 +129,7 @@
StringBuffer classBuffer = new StringBuffer("");
UIPanelMenuGroup group = (UIPanelMenuGroup)component;
UIPanelMenu parentMenu = findMenu(group);
- if (!group.isDisabled()) {
+ if (!parentMenu.isDisabled() && !group.isDisabled()) {
if (calculateLevel(group) == 0)
classBuffer.append(parentMenu.getTopGroupClass() + " ");
else
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-29 17:54:00 UTC (rev 941)
@@ -133,7 +133,7 @@
StringBuffer classBuffer = new StringBuffer("");
UIPanelMenuItem item = (UIPanelMenuItem)component;
UIPanelMenu parentMenu = findMenu(item);
- if (!item.isDisabled()) {
+ if (!parentMenu.isDisabled() && !item.isDisabled()) {
if (calculateLevel(item) == 0)
classBuffer.append(parentMenu.getTopItemClass() + " ");
else
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuRenderer.java 2007-05-29 17:54:00 UTC (rev 941)
@@ -78,7 +78,11 @@
for (Iterator iter = flatList.iterator(); iter.hasNext();) {
UIComponent child = (UIComponent) iter.next();
if ((child instanceof UIPanelMenuItem)||(child instanceof UIPanelMenuGroup)) {
- boolean childDisabled = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isDisabled() : ((UIPanelMenuItem)child).isDisabled();
+ boolean childDisabled;
+ if (!((UIPanelMenu)component).isDisabled())
+ childDisabled = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isDisabled() : ((UIPanelMenuItem)child).isDisabled();
+ else
+ childDisabled = true;
boolean childRendered = child instanceof UIPanelMenuGroup ? ((UIPanelMenuGroup)child).isRendered() : ((UIPanelMenuItem)child).isRendered();
boolean parentRendered = true;
if (! (child.getParent() instanceof UIPanelMenu))
Modified: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-29 17:54:00 UTC (rev 941)
@@ -69,7 +69,7 @@
</u:selector>
<f:verbatim>
- .rich-pmenu-disabled-element {
+ .dr-pmenu-disabled-element {
cursor: default;
color: #c0c0c0;
}
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-29 17:54:00 UTC (rev 941)
@@ -17,8 +17,8 @@
<jsp:scriptlet>
<![CDATA[
String itemClass = "";
- if (component.isDisabled()) {
- itemClass = " rich-pmenu-disabled-element";
+ if (component.isDisabled() || findMenu(component).isDisabled()) {
+ itemClass = " dr-pmenu-disabled-element rich-pmenu-disabled-element ";
}
variables.setVariable("itemClass", itemClass);
]]>
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-29 17:29:21 UTC (rev 940)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-29 17:54:00 UTC (rev 941)
@@ -16,9 +16,9 @@
<td>
<jsp:scriptlet>
<![CDATA[
- String itemClass = " rich-pmenu-disabled-element";
+ String itemClass = " dr-pmenu-disabled-element rich-pmenu-disabled-element ";
String onClick;
- if (component.isDisabled()) {
+ if (component.isDisabled() || findMenu(component).isDisabled()) {
variables.setVariable("itemClass", itemClass);
} else {
onClick = component.getAttributes().get("onclick") + ";" + getOnClick(context, component);
17 years, 7 months
JBoss Rich Faces SVN: r940 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 13:29:21 -0400 (Tue, 29 May 2007)
New Revision: 940
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-29 17:29:10 UTC (rev 939)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-29 17:29:21 UTC (rev 940)
@@ -41,7 +41,7 @@
public abstract class UIScrollableGrid extends UIRepeat implements AjaxComponent, Sortable{
- private Integer _row_count = new Integer(0) ;
+ private Integer _requestedRows = new Integer(0) ;
private Integer _dataIndex = new Integer(0);
@@ -154,12 +154,12 @@
this._dataIndex = dataIndex;
}
- public Integer getRow_count() {
- return _row_count;
+ public Integer getRequestedRows() {
+ return _requestedRows;
}
- public void setRow_count(Integer row_count) {
- this._row_count = row_count;
+ public void setRequestedRows(Integer row_count) {
+ this._requestedRows = row_count;
}
public Integer getStartRow() {
@@ -174,7 +174,7 @@
Object values[] = new Object[4];
values[0] = super.saveState(context);
- values[1] = _row_count;
+ values[1] = _requestedRows;
values[2] = _startRow;
values[3] = _dataIndex;
@@ -186,7 +186,7 @@
Object values[] = (Object[])state;
super.restoreState(context, values[0]);
- _row_count = (Integer)values[1];
+ _requestedRows = (Integer)values[1];
_startRow = (Integer)values[2];
_dataIndex = (Integer)values[3];
17 years, 7 months
JBoss Rich Faces SVN: r939 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 13:29:10 -0400 (Tue, 29 May 2007)
New Revision: 939
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-05-29 17:29:01 UTC (rev 938)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-05-29 17:29:10 UTC (rev 939)
@@ -36,6 +36,8 @@
private final String FOOTER_PART = "footer";
private final String HEADER_PART = "header";
+
+ private final String SPLASH_FACET = "splash";
private final String CELL_ID_PREFFIX ="bc_";
@@ -195,7 +197,6 @@
public void renderContent(FacesContext context, UIScrollableGridColumn column, ResponseWriter writer, GridRendererState state) throws IOException {
writer.startElement(HTML.SPAN_ELEM, column);
-// String columnWidth = (String)column.getAttributes().get("width");
String cell_id = state.getClientId() + ":" + CELL_ID_PREFFIX + state.getRowIndex()+ "_" + state.getCellIndex();
getUtils().writeAttribute(writer, "id",cell_id);
@@ -356,9 +357,9 @@
UIScrollableGrid grid = (UIScrollableGrid)component;
ExternalContext externalContext = context.getExternalContext();
String clientId = grid.getClientId(context);
+ boolean sorted = false;
+ Map parameters = externalContext.getRequestParameterMap();
- Map parameters = externalContext.getRequestParameterMap();
-
if(parameters.containsKey(clientId + ":sortColumn") &&
parameters.containsKey(clientId + ":sortStartRow") &&
parameters.containsKey(clientId + ":sortIndex") &&
@@ -366,7 +367,7 @@
int sortColumn = Integer.parseInt((String)parameters.get(clientId + ":sortColumn"));
int sortStartRow = Integer.parseInt((String)parameters.get(clientId + ":sortStartRow"));
- int sortIndex = Integer.parseInt((String)parameters.get(clientId + ":sortIndex"));
+ int sortDataIndex = Integer.parseInt((String)parameters.get(clientId + ":sortIndex"));
String sortOrder = (String)parameters.get(clientId + ":sortOrder");
boolean asc = true;
@@ -374,21 +375,25 @@
asc = false;
}
- SortEvent sortEvent = new SortEvent(grid,sortColumn, sortStartRow, sortIndex, asc );
- grid.queueEvent(sortEvent);
+ grid.setDataIndex(new Integer(sortDataIndex));
+ grid.setStartRow(new Integer(sortStartRow));
+ grid.setRequestedRows(new Integer(grid.getRows()));
+ sorted = true;
+
+ SortEvent sortEvent = new SortEvent(grid,sortColumn, sortStartRow, sortDataIndex, asc );
+ grid.queueEvent(sortEvent);
+
}
- if(parameters.containsKey(clientId + "_state_input")){
- String submitedState = (String)parameters.get(clientId + "_state_input");
- decodeScrolling(submitedState, grid);
- grid.queueEvent(new AjaxEvent(grid));
-
+ if(parameters.containsKey(clientId + "_state_input") && !sorted){
+ String submitedState = (String)parameters.get(clientId + "_state_input");
+ decodeScrolling(submitedState, grid);
+ grid.queueEvent(new AjaxEvent(grid));
}
-
}
-
}
+
private void decodeScrolling(String submitedState, UIScrollableGrid grid){
boolean isEmpty = true;
@@ -400,17 +405,17 @@
}
if(!isEmpty){
- grid.setRow_count(new Integer(Integer.parseInt(values[0])));
+ grid.setRequestedRows(new Integer(Integer.parseInt(values[0])));
grid.setDataIndex(new Integer(Integer.parseInt(values[1])));
grid.setStartRow(new Integer(Integer.parseInt(values[2])));
}else{
- grid.setRow_count(new Integer(grid.getRows()));
+ grid.setRequestedRows(new Integer(grid.getRows()));
grid.setDataIndex(new Integer(0));
grid.setStartRow(new Integer(grid.getFirst()));
}
System.out.println("");
- System.out.println("row count: " + grid.getRow_count());
+ System.out.println("row count: " + grid.getRequestedRows());
System.out.println("data index: " + grid.getDataIndex());
System.out.println("start row: " + grid.getStartRow());
}
@@ -423,8 +428,8 @@
grid.setFirst(grid.getDataIndex().intValue());
int old = grid.getRows();
state.setLoadedRowsCount(old);
- grid.setRows(grid.getRow_count().intValue());
-// grid.setRows(grid.getRow_count().intValue() + 1);
+ grid.setRows(grid.getRequestedRows().intValue());
+
int start_row = grid.getStartRow().intValue();
AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
@@ -471,12 +476,16 @@
public void encodeEnd(FacesContext context, UIComponent component) throws IOException {
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
- if(ajaxContext.isAjaxRequest()){
- }else{
- super.encodeEnd(context, component);
+ if(component instanceof UIScrollableGrid){
+ UIScrollableGrid grid = (UIScrollableGrid)component;
+
+ AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
+
+ if(!ajaxContext.isAjaxRequest()){
+ super.encodeEnd(context, component);
+
+ }
}
-
}
public void setUpColumnsWidth(FacesContext context, UIScrollableGrid grid) throws IOException{
17 years, 7 months
JBoss Rich Faces SVN: r938 - trunk/sandbox/scrollable-grid/src/main/javascript.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-29 13:29:01 -0400 (Tue, 29 May 2007)
New Revision: 938
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js 2007-05-29 17:28:38 UTC (rev 937)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUILib.js 2007-05-29 17:29:01 UTC (rev 938)
@@ -120,7 +120,7 @@
// flag logger is initialized
isCreated: false,
- width: 500,
+ width: 460,
height: 150,
create: function() {
this.logElement = $(document.createElement("div"));
17 years, 7 months