JBoss Rich Faces SVN: r8897 - in trunk/ui/functions/src/main: java/org/richfaces/function and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 18:45:33 -0400 (Tue, 03 Jun 2008)
New Revision: 8897
Modified:
trunk/ui/functions/src/main/config/component/functions.xml
trunk/ui/functions/src/main/java/org/richfaces/function/RichFunction.java
Log:
http://jira.jboss.com/jira/browse/RF-3627
Modified: trunk/ui/functions/src/main/config/component/functions.xml
===================================================================
--- trunk/ui/functions/src/main/config/component/functions.xml 2008-06-03 22:44:44 UTC (rev 8896)
+++ trunk/ui/functions/src/main/config/component/functions.xml 2008-06-03 22:45:33 UTC (rev 8897)
@@ -18,4 +18,9 @@
<name>element</name>
<method>org.richfaces.function.RichFunction.element(String)</method>
</function>
+
+ <function>
+ <name>findComponent</name>
+ <method>org.richfaces.function.RichFunction.findComponent(String)</method>
+ </function>
</components>
Modified: trunk/ui/functions/src/main/java/org/richfaces/function/RichFunction.java
===================================================================
--- trunk/ui/functions/src/main/java/org/richfaces/function/RichFunction.java 2008-06-03 22:44:44 UTC (rev 8896)
+++ trunk/ui/functions/src/main/java/org/richfaces/function/RichFunction.java 2008-06-03 22:45:33 UTC (rev 8897)
@@ -35,41 +35,49 @@
public class RichFunction {
- public static String clientId(String id) {
- if (id != null) {
- FacesContext context = FacesContext.getCurrentInstance();
- if (context != null) {
- UIViewRoot root = context.getViewRoot();
+ private static UIComponent findComponent(FacesContext context, String id) {
+ if (id != null) {
+ if (context != null) {
+ UIViewRoot root = context.getViewRoot();
- if (root != null) {
- UIComponent component = RendererUtils.getInstance().findComponentFor(root, id);
+ if (root != null) {
+ UIComponent component = RendererUtils.getInstance().findComponentFor(root, id);
- if (component != null) {
- return component.getClientId(context);
- }
- }
- }
+ if (component != null) {
+ return component;
+ }
+ }
+ }
+ }
+
+ return null;
}
- return null;
+ public static String clientId(String id) {
+ FacesContext context = FacesContext.getCurrentInstance();
+ UIComponent component = findComponent(context, id);
+ return component != null ? component.getClientId(context) : null;
}
public static String component(String id) {
- String element = element(id);
- if (element != null) {
- return element + ".component";
- }
-
- return null;
+ String element = element(id);
+ if (element != null) {
+ return element + ".component";
+ }
+
+ return null;
}
-
+
public static String element(String id) {
- String clientId = clientId(id);
- if (clientId != null) {
- return "document.getElementById('" + clientId + "')";
- }
-
- return null;
+ String clientId = clientId(id);
+ if (clientId != null) {
+ return "document.getElementById('" + clientId + "')";
+ }
+
+ return null;
}
+ public static UIComponent findComponent(String id) {
+ return findComponent(FacesContext.getCurrentInstance(), id);
+ }
}
16 years, 7 months
JBoss Rich Faces SVN: r8896 - trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 18:44:44 -0400 (Tue, 03 Jun 2008)
New Revision: 8896
Modified:
trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/FunctionBean.java
Log:
CDK checks in FunctionBean:
- For method name
- For method static modifier
Modified: trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/FunctionBean.java
===================================================================
--- trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/FunctionBean.java 2008-06-03 21:44:19 UTC (rev 8895)
+++ trunk/cdk/generator/src/main/java/org/ajax4jsf/builder/config/FunctionBean.java 2008-06-03 22:44:44 UTC (rev 8896)
@@ -22,6 +22,7 @@
package org.ajax4jsf.builder.config;
import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -134,7 +135,15 @@
Method[] methods = clazz.getMethods();
for (Method method : methods) {
- Class<?>[] parameterTypes = method.getParameterTypes();
+ if (!methodName.equals(method.getName())) {
+ continue;
+ }
+
+ if ((method.getModifiers() & Modifier.STATIC) == 0) {
+ continue;
+ }
+
+ Class<?>[] parameterTypes = method.getParameterTypes();
if (parameters.length == parameterTypes.length) {
StringBuilder signatureBuilder = new StringBuilder();
16 years, 7 months
JBoss Rich Faces SVN: r8895 - trunk/ui/tree/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 17:44:19 -0400 (Tue, 03 Jun 2008)
New Revision: 8895
Modified:
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
Log:
http://jira.jboss.com/jira/browse/RF-3595
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-06-03 21:43:18 UTC (rev 8894)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2008-06-03 21:44:19 UTC (rev 8895)
@@ -29,9 +29,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import javax.faces.FacesException;
import javax.faces.application.Application;
-import javax.faces.component.ContextCallback;
import javax.faces.component.NamingContainer;
import javax.faces.component.UIComponent;
import javax.faces.component.UIOutput;
@@ -959,94 +957,54 @@
return null;
}
- public boolean invokeOnComponent(FacesContext context, String clientId, ContextCallback callback) throws FacesException {
- if (null == context || null == clientId || null == callback) {
- throw new NullPointerException();
- }
+ private static final Pattern SEPARATOR = Pattern.compile("(?<!" + ListRowKey.SEPARATOR_ESCAPE_CHAR + ")\\"
+ + NamingContainer.SEPARATOR_CHAR + "\\" + SEPARATOR_CHAR);
- boolean found = false;
- if (clientId.equals(this.getClientId(context))) {
- try {
- callback.invokeContextCallback(context, this);
- return true;
- } catch (Exception e) {
- throw new FacesException(e);
+ @Override
+ protected String extractKeySegment(FacesContext context, String tailId) {
+ Matcher matcher = SEPARATOR.matcher(tailId);
+ if (matcher.find()) {
+ return tailId.substring(0, matcher.start());
+ } else {
+ return null;
}
- } else {
- Iterator<UIComponent> itr = this.getFacetsAndChildren();
+ }
+
+ @Override
+ protected Iterator<UIComponent> invocableChildren() {
+ return dataChildren();
+ }
+
+ private static final Converter KEY_CONVERTER = new Converter() {
- while (itr.hasNext() && !found) {
- found = itr.next().invokeOnComponent(context, clientId,
- callback);
- }
- }
+ public Object getAsObject(FacesContext context, UIComponent component, String value) {
+ if (component == null || context == null) {
+ throw new NullPointerException();
+ }
- if (found) {
- return true;
- } else {
- String baseId = getBaseClientId(context) + NamingContainer.SEPARATOR_CHAR;
- if (clientId.startsWith(baseId)) {
- String rowKeyString = clientId.substring(baseId.length());
- String keyString = (String) getRowKeyConverter().getAsObject(context, this, rowKeyString);
- AbstractTreeDataModel dataModel = (AbstractTreeDataModel) getExtendedDataModel();
- Object rowKey = dataModel.convertToKey(context, keyString, this, null);
-
- if (rowKey != null) {
- assert rowKey.toString().equals(rowKeyString);
-
- Object oldKey = getRowKey();
- try {
- setRowKey(context, rowKey);
-
- return getNodeFacet().invokeOnComponent(context, clientId, callback);
- } finally {
- try {
- setRowKey(context, oldKey);
- } catch (Exception e) {
- context.getExternalContext().log(e.getMessage(), e);
- }
+ if (value == null || value.length() == 0) {
+ return null;
}
- }
- }
- }
- return false;
- }
+ UITree tree = (UITree) component;
+ AbstractTreeDataModel dataModel = (AbstractTreeDataModel) tree.getExtendedDataModel();
+ Object rowKey = dataModel.convertToKey(context, value, tree, null);
- private static final Pattern SEPARATOR = Pattern.compile("(?<!" + ListRowKey.SEPARATOR_ESCAPE_CHAR + ")\\"
- + NamingContainer.SEPARATOR_CHAR + "\\" + SEPARATOR_CHAR);
-
- private static final Converter KEY_CONVERTER = new Converter() {
-
- public Object getAsObject(FacesContext context, UIComponent component, String value) {
- if (component == null || context == null) {
- throw new NullPointerException();
- }
-
- if (value == null || value.length() == 0) {
- return null;
- }
-
- Matcher matcher = SEPARATOR.matcher(value);
- if (matcher.find()) {
- return value.substring(0, matcher.start());
- } else {
- throw new IllegalArgumentException("Row key is illegally formed: " + value);
- }
+ return rowKey;
}
public String getAsString(FacesContext context, UIComponent component, Object value) {
- if (component == null || context == null) {
- throw new NullPointerException();
- }
+ if (component == null || context == null) {
+ throw new NullPointerException();
+ }
- if (value == null) {
- return null;
- }
-
- return value.toString() + NamingContainer.SEPARATOR_CHAR;
+ if (value == null) {
+ return null;
+ }
+
+ return value.toString() + NamingContainer.SEPARATOR_CHAR;
}
- };
+ };
@Override
public Converter getRowKeyConverter() {
16 years, 7 months
JBoss Rich Faces SVN: r8894 - trunk/framework/impl/src/main/java/org/ajax4jsf/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 17:43:18 -0400 (Tue, 03 Jun 2008)
New Revision: 8894
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
Log:
http://jira.jboss.com/jira/browse/RF-3595
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-06-03 19:43:10 UTC (rev 8893)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-06-03 21:43:18 UTC (rev 8894)
@@ -1048,6 +1048,30 @@
}
}
+ /**
+ * Extracts segment of component client identifier containing row key
+ *
+ * @param context current faces context
+ * @param tailId substring of component client identifier with base client identifier removed
+ * @return segment containing row key or <code>null</code>
+ */
+ protected String extractKeySegment(FacesContext context, String tailId) {
+ int indexOfSecondColon = tailId.indexOf(
+ NamingContainer.SEPARATOR_CHAR);
+
+ return (indexOfSecondColon > 0 ? tailId.substring(0, indexOfSecondColon) : null);
+ }
+
+ /**
+ * Returns iterator of components to search through
+ * in {@link #invokeOnComponent(FacesContext, String, ContextCallback)}.
+ *
+ * @return
+ */
+ protected Iterator<UIComponent> invocableChildren() {
+ return getFacetsAndChildren();
+ }
+
@Override
public boolean invokeOnComponent(FacesContext context, String clientId,
ContextCallback callback) throws FacesException {
@@ -1083,12 +1107,9 @@
if (clientId.startsWith(baseId)) {
Object newRowKey = null;
// Call for a child component - try to detect row key
- int indexOfSecondColon = clientId.indexOf(
- NamingContainer.SEPARATOR_CHAR, baseId.length());
- String rowKeyString = null;
- if (indexOfSecondColon > 0) {
- rowKeyString = clientId.substring(baseId.length(),
- indexOfSecondColon);
+ String rowKeyString = extractKeySegment(context,
+ clientId.substring(baseId.length()));
+ if (rowKeyString != null) {
Converter keyConverter = getRowKeyConverter();
if (null != keyConverter) {
try {
@@ -1103,7 +1124,7 @@
captureOrigValue(context);
setRowKey(newRowKey);
}
- Iterator<UIComponent> itr = this.getFacetsAndChildren();
+ Iterator<UIComponent> itr = invocableChildren();
while (itr.hasNext() && !found) {
found = itr.next().invokeOnComponent(context, clientId,
callback);
16 years, 7 months
JBoss Rich Faces SVN: r8893 - trunk/framework/impl/src/main/java/org/ajax4jsf/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 15:43:10 -0400 (Tue, 03 Jun 2008)
New Revision: 8893
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
Log:
Added additional catch to prevent exception stealing
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-06-03 17:19:57 UTC (rev 8892)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/component/UIDataAdaptor.java 2008-06-03 19:43:10 UTC (rev 8893)
@@ -60,7 +60,6 @@
import org.ajax4jsf.renderkit.AjaxChildrenRenderer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.richfaces.component.Column;
/**
* Base class for iterable components, like dataTable, Tomahawk dataList,
@@ -1071,8 +1070,12 @@
throw new FacesException(e);
} finally {
if (null != oldRowKey) {
- setRowKey(context,oldRowKey);
- restoreOrigValue(context);
+ try {
+ setRowKey(context,oldRowKey);
+ restoreOrigValue(context);
+ } catch (Exception e) {
+ context.getExternalContext().log(e.getMessage(), e);
+ }
}
}
} else {
16 years, 7 months
JBoss Rich Faces SVN: r8892 - trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-06-03 13:19:57 -0400 (Tue, 03 Jun 2008)
New Revision: 8892
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
Log:
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2008-06-03 16:52:33 UTC (rev 8891)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2008-06-03 17:19:57 UTC (rev 8892)
@@ -15,7 +15,7 @@
public InputNumberSpinnerTest() {
super("http", "localhost", serverPort);
}
-
+
/**
* This method are invoking before selenium tests started
*/
@@ -42,7 +42,7 @@
}
private void _testInputNumberSpinnerComponent(Templates template) {
- renderPage(getTestUrl(), template);
+ renderPage(template);
writeStatus("check whether the spinner is invariant with respect to pair of sequential opposite operations");
@@ -86,12 +86,11 @@
}
private String getSpinnerValue() {
- String id = getParentId() + "_form:" + "spinnerEdit";
- return runScript("$('" + id + "').down('input').value");
+ return selenium.getValue("name=" + getParentId() + "_form:spinner");
}
- public String getTestUrl() {
- return "/faces/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml";
- }
+ public String getTestUrl() {
+ return "/faces/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml";
+ }
}
16 years, 7 months
JBoss Rich Faces SVN: r8891 - trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 12:52:33 -0400 (Tue, 03 Jun 2008)
New Revision: 8891
Modified:
trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended.xcss
trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended_classes.xcss
Log:
Classes for disabled textarea changed
Modified: trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended.xcss
===================================================================
--- trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended.xcss 2008-06-03 14:35:47 UTC (rev 8890)
+++ trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended.xcss 2008-06-03 16:52:33 UTC (rev 8891)
@@ -114,11 +114,11 @@
</u:selector>
<u:selector name="*|textarea[disabled]">
- <u:style name="color" skin="tableBorderColor" />
+ <u:style name="color" skin="panelBorderColor" />
</u:selector>
<u:selector name="textarea[type="textarea"][disabled], input[type="text"][disabled], input[type="password"][disabled]">
- <u:style name="color" skin="tableBorderColor" />
+ <u:style name="color" skin="panelBorderColor" />
</u:selector>
</f:template>
\ No newline at end of file
Modified: trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended_classes.xcss
===================================================================
--- trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended_classes.xcss 2008-06-03 14:35:47 UTC (rev 8890)
+++ trunk/ui/core/src/main/resources/org/richfaces/renderkit/html/css/extended_classes.xcss 2008-06-03 16:52:33 UTC (rev 8891)
@@ -147,12 +147,12 @@
</u:selector>
<u:selector name=".rich-container *|textarea[disabled]">
- <u:style name="color" skin="tableBorderColor" />
+ <u:style name="color" skin="panelBorderColor" />
</u:selector>
<u:selector name=".rich-textarea-disabled, .rich-container textarea[type="textarea"][disabled], .rich-textarea-textarea-disabled,
.rich-container input[type="text"][disabled], .rich-input-text-disabled,
.rich-container input[type="password"][disabled], .rich-input-password-disabled">
- <u:style name="color" skin="tableBorderColor" />
+ <u:style name="color" skin="panelBorderColor" />
</u:selector>
</f:template>
\ No newline at end of file
16 years, 7 months
JBoss Rich Faces SVN: r8890 - in branches/3.1.x/ui/panelmenu/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 10:35:47 -0400 (Tue, 03 Jun 2008)
New Revision: 8890
Modified:
branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
http://jira.jboss.com/jira/browse/RF-1948
http://jira.jboss.com/jira/browse/RF-3621
Modified: branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2008-06-03 14:33:00 UTC (rev 8889)
+++ branches/3.1.x/ui/panelmenu/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2008-06-03 14:35:47 UTC (rev 8890)
@@ -119,12 +119,12 @@
flatten(component.getChildren(), flatList, levels, 0);
- panelMenu.append("new PanelMenu('")
+ panelMenu.append("var ids = new PanelMenu('")
.append(component.getClientId(context).toString())
.append("',")
.append(new Boolean(expandSingle).toString())
.append(",").append("'").append(selectedChild).append("'")
- .append(");\n");
+ .append(").getIds();\n");
for (Iterator iter = flatList.iterator(); iter.hasNext();) {
UIComponent child = (UIComponent) iter.next();
@@ -203,7 +203,7 @@
}
buffer
- .append("new PanelMenuItem(params,{myId:'")
+ .append("new PanelMenuItem(ids, params,{myId:'")
.append((String) child.getClientId(context))
.append("',parentId:'")
.append((String) child.getParent().getClientId(context))
Modified: branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-06-03 14:33:00 UTC (rev 8889)
+++ branches/3.1.x/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-06-03 14:35:47 UTC (rev 8890)
@@ -12,6 +12,8 @@
PanelMenu.prototype = {
initialize: function(myId, so, selectedChild){
+ this.myId = myId;
+
this.childObj = new Array();
this.expandSingle = so;
this.lastExpanded = null;
@@ -21,13 +23,53 @@
this.is = 'panelMenu';
this.selectedNameInput = $(myId + 'selectedItemName');
PanelMenuStorage[myId] = this;
+ },
+
+ _getIds: function(elt, ids) {
+ var child = Richfaces.firstDescendant(elt);
+ while (child) {
+ if (child.id) {
+ ids[child.id] = child;
+
+ if (child.tagName) {
+ var tagName = child.tagName.toLowerCase();
+
+ if (tagName == 'div') {
+ this._getIds(child, ids);
+ } else if (child.rows) {
+ var rows = child.rows;
+ for (var i = 0; i < rows.length; i++ ) {
+ var cells = rows[i].cells;
+ for (var j = 0; j < cells.length; j++ ) {
+ var cell = cells[j];
+ if (/^icon/.test(cell.id)) {
+ ids[cell.id] = cell;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ child = Richfaces.next(child);
+ }
+ },
+
+ getIds: function() {
+ var root = $(this.myId);
+ var ids = {};
+ ids[root.id] = root;
+
+ this._getIds(root, ids);
+
+ return ids;
}
};
PanelMenuItem = Class.create();
PanelMenuItem.prototype = {
- initialize: function(params,ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
+ initialize: function(idsMap, params,ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, onItemHover, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
if (!ids.parentId){return};
this.type = options.type;
this.onopen = options.onopen;
@@ -49,11 +91,19 @@
this.hoveredStyles = hoveredStyles;
this.hoveredClasses = hoveredClasses;
- this.tdhider = $(ids.myId);
- this.tablehider = $("tablehide"+ids.myId);
+ this.tdhider = Element.extend(idsMap[ids.myId]);
+ if (!this.tdhider) {
+ this.tdhider = $(ids.myId);
+ }
+ this.tablehider = Richfaces.firstDescendant(this.tdhider);
this.haveDynamicIcon = haveDynamicIcon;
- if (this.haveDynamicIcon==true)
- this.iconswitcher = $("icon"+ids.myId);
+ if (this.haveDynamicIcon==true) {
+ var iconSwitcherId = "icon" + ids.myId;
+ this.iconswitcher = Element.extend(idsMap[iconSwitcherId]);
+ if (!this.iconswitcher) {
+ this.iconswitcher = $(iconSwitcherId);
+ }
+ }
this.childObj = new Array();
this.parentObj = PanelMenuStorage[ids.parentId];
this.parentObj.childObj.push(this);
@@ -74,13 +124,18 @@
this.selected = false;
}
this.clientId = ids.myId;
- this.obj = $(ids.myId);
- this.leftIcon = $('leftIcon' + ids.myId);
- this.rightIcon = $('rightIcon' + ids.myId);
- this.labelArea = $('icon' + ids.myId);
- this.content = document.getElementsByClassName("dr-pmenu-group-self-label", this.obj)[0];
+
+ this.mainRow = this.tablehider.rows[0];
+ Element.extend(this.mainRow);
+
+ var mainCells = this.mainRow.cells;
+
+ this.leftIcon = Richfaces.lastDescendant(mainCells[0]);
+ this.labelArea = mainCells[1];
+ this.rightIcon = Richfaces.firstDescendant(mainCells[2]);
+ this.content = document.getElementsByClassName("dr-pmenu-group-self-label", this.tdhider)[0];
this.iconAlign = iconAlign;
- this.mainRow = $("row_" + ids.myId);
+
/*
if (level == 0){
this.tdhider.style.display = "";
@@ -158,7 +213,7 @@
},
hide: function(){
- this.obj.style.display = 'none';
+ this.tdhider.style.display = 'none';
// if(this.inputState){
// this.inputState.value="closed";
// }
@@ -196,11 +251,11 @@
// this.inputState.value="opened";
this.tdhider.style.display="";
this.tablehider.style.display="";
- this.obj.style.display = "";
+ this.tdhider.style.display = "";
},
preTrigger: function(e){
- //this.inputAction.setAttribute('value', this.obj.id);
+ //this.inputAction.setAttribute('value', this.tdhider.id);
this.inputAction.setAttribute('value', this.clientId);
},
@@ -389,7 +444,7 @@
else
Event.observe(this.tablehider, "click", this.itemClicked.bindAsEventListener(this), false);
- Event.observe(this.obj, "mouseover", this.hoverItem.bindAsEventListener(this), false);
+ Event.observe(this.tdhider, "mouseover", this.hoverItem.bindAsEventListener(this), false);
Event.observe(this.tablehider, "mouseover", this.addHoverStyles.bindAsEventListener(this), false);
Event.observe(this.tablehider, "mouseout", this.removeHoverStyles.bindAsEventListener(this), false);
16 years, 7 months
JBoss Rich Faces SVN: r8889 - branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-06-03 10:33:00 -0400 (Tue, 03 Jun 2008)
New Revision: 8889
Modified:
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
Log:
http://jira.jboss.com/jira/browse/RF-1948
http://jira.jboss.com/jira/browse/RF-3621
Modified: branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-06-03 14:17:11 UTC (rev 8888)
+++ branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-06-03 14:33:00 UTC (rev 8889)
@@ -348,3 +348,48 @@
var windowOffset = Richfaces.Position.getWindowScrollOffset();
return {left:windowOffset.left, top:windowOffset.top, right: windowDim.width+windowOffset.left, bottom: windowDim.height+windowOffset.top};
};
+
+Richfaces.firstDescendant = function(node) {
+ var n = node.firstChild;
+ while (n && n.nodeType != 1) {
+ n = n.nextSibling;
+ }
+
+ return n;
+};
+
+Richfaces.lastDescendant = function(node) {
+ var n = node.lastChild;
+ while (n && n.nodeType != 1) {
+ n = n.previousSibling;
+ }
+
+ return n;
+};
+
+Richfaces.next = function(node) {
+ var n = node;
+ do {
+ n = n.nextSibling;
+ } while (n && n.nodeType != 1);
+
+ return n;
+};
+
+Richfaces.previous = function(node) {
+ var n = node;
+ do {
+ n = n.previousSibling;
+ } while (n && n.nodeType != 1);
+
+ return n;
+};
+
+Richfaces.removeNode = function(node) {
+ if (node) {
+ var parentNode = node.parentNode;
+ if (parentNode) {
+ parentNode.removeChild(node);
+ }
+ }
+}
16 years, 7 months
JBoss Rich Faces SVN: r8888 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-06-03 10:17:11 -0400 (Tue, 03 Jun 2008)
New Revision: 8888
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
Log:
http://jira.jboss.com/jira/browse/RF-3623 - version 3.2.0 was changed to 3.2.1
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2008-06-03 13:47:19 UTC (rev 8887)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCGettingStarted.xml 2008-06-03 14:17:11 UTC (rev 8888)
@@ -14,7 +14,7 @@
<title>Getting Started with RichFaces</title>
<section id="DownloadingRichFaces">
<?dbhtml filename="DownloadingRichFaces.html" ?>
- <title>Downloading RichFaces 3.2.0</title>
+ <title>Downloading RichFaces 3.2.1</title>
<para>The latest release of <property>RichFaces</property> is available for download at:<simplelist>
<member>
<ulink url="http://labs.jboss.com/jbossrichfaces/downloads"
@@ -27,14 +27,14 @@
<title>Installation</title>
<itemizedlist>
<listitem><para> Unzip <emphasis>
- <property>"richfaces-ui-3.2.0-bin.zip"</property>
+ <property>"richfaces-ui-3.2.1.GA-bin.zip"</property>
</emphasis> file to the chosen folder. </para></listitem>
<listitem><para> Copy <emphasis>
- <property>"richfaces-api-3.2.0.jar"</property>
+ <property>"richfaces-api-3.2.1.jar"</property>
</emphasis>, <emphasis>
- <property>"richfaces-impl-3.2.0.jar"</property>
+ <property>"richfaces-impl-3.2.1.jar"</property>
</emphasis>,<emphasis>
- <property>"richfaces-ui-3.2.0.jar"</property>
+ <property>"richfaces-ui-3.2.1.jar"</property>
</emphasis>files into the <emphasis>
<property>"WEB-INF/lib"</property>
</emphasis> folder of your application. </para></listitem>
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2008-06-03 13:47:19 UTC (rev 8887)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCSettings.xml 2008-06-03 14:17:11 UTC (rev 8888)
@@ -241,7 +241,7 @@
<section id="PortletSupport">
<title>Portlet Support</title>
<para><property>JBoss Portlets</property> have support since version Ajax4jsf 1.1.1. This support is
- improved in Richfaces 3.2.0. Provide your feedback on compatible with RichFaces if you face
+ improved in Richfaces 3.2.1. Provide your feedback on compatible with RichFaces if you face
some problems.</para>
</section>
<section id="SybaseEAServer">
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2008-06-03 13:47:19 UTC (rev 8887)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2008-06-03 14:17:11 UTC (rev 8888)
@@ -51,7 +51,7 @@
<para><property>RichFaces</property> was developed with an open architecture to be compatible with
the widest possible variety of environments.</para>
- <para>This is what you need to start working with <property>RichFaces 3.2.0</property>:</para>
+ <para>This is what you need to start working with <property>RichFaces 3.2.1</property>:</para>
<itemizedlist>
<listitem><para>Java</para></listitem>
16 years, 7 months