JBoss Rich Faces SVN: r12603 - trunk/samples/toolBarDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-02-09 09:40:57 -0500 (Mon, 09 Feb 2009)
New Revision: 12603
Modified:
trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp
Log:
change sample for use button in menu item place
https://jira.jboss.org/jira/browse/RF-1825
Modified: trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp 2009-02-09 14:23:17 UTC (rev 12602)
+++ trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp 2009-02-09 14:40:57 UTC (rev 12603)
@@ -2,9 +2,6 @@
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/toolBar" prefix="rich"%>
-<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/dropdown-menu" prefix="ddm" %>
-<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/menu-components" prefix="mc" %>
-
<html>
<style>
.toolbar_sep{
@@ -23,20 +20,9 @@
<h:form>
<rich:toolBar itemSeparator="line">
<rich:toolBarGroup itemSeparator="square">
- <ddm:dropDownMenu value="Seed Multiplication -0- " submitMode="server" rendered="false">
- <mc:menuItem value="oncomplete" id="editItem" submitMode="none">
- <a4j:support oncomplete="Richfaces.showModalPanel('_panel');" event="onclick" />
- </mc:menuItem>
- <mc:menuItem value="oncomplete" id="editItem1" submitMode="none">
- <a4j:support oncomplete="Richfaces.showModalPanel('_panel');" event="onclick" />
- </mc:menuItem>
- </ddm:dropDownMenu>
- <ddm:dropDownMenu value="Field Evaluation -1- " rendered="false">
- <mc:menuItem value="View fieldplans" />
- </ddm:dropDownMenu>
- <ddm:dropDownMenu value="Field Evaluation -2- " rendered="true">
- <mc:menuItem value="View fieldplans" />
- </ddm:dropDownMenu>
+ <h:commandButton value="button -1-" />
+ <h:commandButton value="button -2-" rendered="false" />
+ <h:commandButton value="button -3-" rendered="false" />
</rich:toolBarGroup>
</rich:toolBar>
15 years, 11 months
JBoss Rich Faces SVN: r12602 - in trunk: ui/dataTable/src/main/java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2009-02-09 09:23:17 -0500 (Mon, 09 Feb 2009)
New Revision: 12602
Modified:
trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp
trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumnGroup.java
trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
trunk/ui/toolBar/src/main/java/org/richfaces/component/UIToolBarGroup.java
trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
Log:
ToolBar group: unnesessary separators appears
https://jira.jboss.org/jira/browse/RF-1825
Modified: trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp 2009-02-09 10:53:41 UTC (rev 12601)
+++ trunk/samples/toolBarDemo/src/main/webapp/pages/index.jsp 2009-02-09 14:23:17 UTC (rev 12602)
@@ -1,6 +1,10 @@
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/toolBar" prefix="rich"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/dropdown-menu" prefix="ddm" %>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/menu-components" prefix="mc" %>
+
<html>
<style>
.toolbar_sep{
@@ -11,39 +15,63 @@
<body>
<f:view>
- <h:form>
+ <h:form>
<h:selectOneRadio binding="#{skinBean.component}" />
<h:commandLink action="#{skinBean.change}" value="set skin" />
- </h:form>
-
- <h:form>
- <h:messages style="color:red"/>
- <h:outputText value="Simple richfaces toolBar and toolBarGroup test web application." style="font: 18px;font-weight: bold;" />
+ </h:form>
- <rich:toolBar id="toolBar_01" width="#{bean.width}" height="#{bean.height}" itemSeparator="line">
-
- <h:outputText value="Exadel style tool bar." />
-
- <rich:toolBarGroup id="toolBarGroup_01" location="left" itemSeparator="square">
- <h:outputText value="Set width" />
- <h:inputText value="#{bean.width}"/>
- <h:commandButton value="Change!"/>
- </rich:toolBarGroup>
-
- <rich:toolBarGroup id="toolBarGroup_02" location="left" itemSeparator="square">
- <h:outputText value="Set height" />
- <h:inputText value="#{bean.height}"/>
- <h:commandButton value="Change!"/>
- </rich:toolBarGroup>
+ <h:form>
+ <rich:toolBar itemSeparator="line">
+ <rich:toolBarGroup itemSeparator="square">
+ <ddm:dropDownMenu value="Seed Multiplication -0- " submitMode="server" rendered="false">
+ <mc:menuItem value="oncomplete" id="editItem" submitMode="none">
+ <a4j:support oncomplete="Richfaces.showModalPanel('_panel');" event="onclick" />
+ </mc:menuItem>
+ <mc:menuItem value="oncomplete" id="editItem1" submitMode="none">
+ <a4j:support oncomplete="Richfaces.showModalPanel('_panel');" event="onclick" />
+ </mc:menuItem>
+ </ddm:dropDownMenu>
+ <ddm:dropDownMenu value="Field Evaluation -1- " rendered="false">
+ <mc:menuItem value="View fieldplans" />
+ </ddm:dropDownMenu>
+ <ddm:dropDownMenu value="Field Evaluation -2- " rendered="true">
+ <mc:menuItem value="View fieldplans" />
+ </ddm:dropDownMenu>
+ </rich:toolBarGroup>
+ </rich:toolBar>
- <rich:toolBarGroup id="toolBarGroup_03" location="right" itemSeparator="grid">
- <h:graphicImage url="/images/exadel.gif" style="border-width: 0px;" />
- <h:outputLink value="http://exadel.com">
- <h:outputText value="exadel.com"/>
- </h:outputLink>
- </rich:toolBarGroup>
-
- </rich:toolBar>
+
+ <h:messages style="color:red" />
+ <h:outputText value="Simple richfaces toolBar and toolBarGroup test web application."
+ style="font: 18px;font-weight: bold;" />
+
+ <rich:toolBar id="toolBar_01" width="#{bean.width}" height="#{bean.height}" itemSeparator="line">
+
+ <h:outputText value="Exadel style tool bar." />
+
+ <rich:toolBarGroup id="toolBarGroup_01" location="left"
+ itemSeparator="square">
+ <h:outputText value="Set width" />
+ <h:inputText value="#{bean.width}" />
+ <h:commandButton value="Change!" />
+ </rich:toolBarGroup>
+
+ <rich:toolBarGroup id="toolBarGroup_02" location="left"
+ itemSeparator="square">
+ <h:outputText value="Set height" />
+ <h:inputText value="#{bean.height}" />
+ <h:commandButton value="Change!" />
+ </rich:toolBarGroup>
+
+ <rich:toolBarGroup id="toolBarGroup_03" location="right"
+ itemSeparator="grid">
+ <h:graphicImage url="/images/exadel.gif" style="border-width: 0px;" />
+ <h:outputLink value="http://exadel.com">
+ <h:outputText value="exadel.com" />
+ </h:outputLink>
+ </rich:toolBarGroup>
+
+ </rich:toolBar>
<br /><br /><br />
<rich:toolBar id="toolBar_02" width="#{bean.width}" height="#{bean.height}" itemSeparator="line"
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumnGroup.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumnGroup.java 2009-02-09 10:53:41 UTC (rev 12601)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/component/UIColumnGroup.java 2009-02-09 14:23:17 UTC (rev 12602)
@@ -26,8 +26,6 @@
import javax.faces.component.UIComponent;
import javax.faces.component.UIPanel;
-import org.apache.commons.collections.iterators.FilterIterator;
-
/**
* JSF component class
*
Modified: trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-02-09 10:53:41 UTC (rev 12601)
+++ trunk/ui/dataTable/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2009-02-09 14:23:17 UTC (rev 12602)
@@ -248,44 +248,40 @@
while (headers.hasNext()) {
UIComponent column = (UIComponent) headers.next();
if (isColumnRendered(column)) {
- if ((Integer) column.getAttributes().get("colspan") != null) {
- t_colCount = t_colCount
- + ((Integer) column.getAttributes().get("colspan"))
- .intValue();
+
+ Integer colspan = (Integer) column.getAttributes().get("colspan");
+ if (colspan != null) {
+ t_colCount += colspan.intValue();
} else {
t_colCount++;
}
+
if (t_colCount > colCount) {
break;
}
String classAttribute = facetName + "Class";
- String columnHeaderClass = (String) column.getAttributes().get(
- classAttribute);
+ String columnHeaderClass = (String) column.getAttributes().get(classAttribute);
+
writer.startElement(element, column);
- encodeStyleClass(writer, null, skinCellClass, headerClass,
- columnHeaderClass);
+ encodeStyleClass(writer, null, skinCellClass, headerClass, columnHeaderClass);
writer.writeAttribute("scope", "col", null);
getUtils().encodeAttribute(context, column, "colspan");
- boolean sortableColumn = column
- .getValueExpression("comparator") != null
+ boolean sortableColumn = column.getValueExpression("comparator") != null
|| column.getValueExpression("sortBy") != null;
- HeaderEncodeStrategy strategy = (column instanceof org.richfaces.component.UIColumn && "header"
- .equals(facetName)) ? richEncodeStrategy
- : simpleEncodeStrategy;
+ HeaderEncodeStrategy strategy = (column instanceof org.richfaces.component.UIColumn
+ && "header".equals(facetName)) ? richEncodeStrategy : simpleEncodeStrategy;
- strategy.encodeBegin(context, writer, column, facetName,
- sortableColumn);
+ strategy.encodeBegin(context, writer, column, facetName, sortableColumn);
UIComponent facet = column.getFacet(facetName);
if (facet != null && isColumnRendered(facet)) {
renderChild(context, facet);
}
- strategy.encodeEnd(context, writer, column, facetName,
- sortableColumn);
+ strategy.encodeEnd(context, writer, column, facetName, sortableColumn);
writer.endElement(element);
@@ -294,16 +290,15 @@
}
}
- public void encodeFooter(FacesContext context, UIDataTable table,
- int columns) throws IOException {
+ public void encodeFooter(FacesContext context, UIDataTable table, int columns)
+ throws IOException {
ResponseWriter writer = context.getResponseWriter();
UIComponent footer = table.getFooter();
boolean columnFacetPresent = isColumnFacetPresent(table,"footer");
- Iterator<UIComponent> tableColumns = table.columns();//columnFacets(table,"footer");
+ Iterator<UIComponent> tableColumns = table.columns();
if (footer != null || columnFacetPresent) {
writer.startElement("tfoot", table);
- String footerClass = (String) table.getAttributes().get(
- "footerClass");
+ String footerClass = (String) table.getAttributes().get("footerClass");
if (columnFacetPresent) {
writer.startElement("tr", table);
Modified: trunk/ui/toolBar/src/main/java/org/richfaces/component/UIToolBarGroup.java
===================================================================
--- trunk/ui/toolBar/src/main/java/org/richfaces/component/UIToolBarGroup.java 2009-02-09 10:53:41 UTC (rev 12601)
+++ trunk/ui/toolBar/src/main/java/org/richfaces/component/UIToolBarGroup.java 2009-02-09 14:23:17 UTC (rev 12602)
@@ -21,6 +21,9 @@
package org.richfaces.component;
+import java.util.ArrayList;
+import java.util.List;
+
import javax.faces.FacesException;
import javax.faces.component.UIComponent;
import javax.faces.component.UIComponentBase;
@@ -49,4 +52,17 @@
}
return (UIToolBar) component;
}
+
+ public List<UIComponent> getRenderedChildren() {
+ List<UIComponent> children = this.getChildren();
+ List<UIComponent> renderedChildren = new ArrayList<UIComponent>(children.size());
+
+ for (UIComponent child : children) {
+ if (child.isRendered()) {
+ renderedChildren.add(child);
+ }
+ }
+
+ return renderedChildren;
+ }
}
Modified: trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
===================================================================
--- trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java 2009-02-09 10:53:41 UTC (rev 12601)
+++ trunk/ui/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java 2009-02-09 14:23:17 UTC (rev 12602)
@@ -21,9 +21,7 @@
package org.richfaces.renderkit.html;
-
import java.io.IOException;
-import java.util.Iterator;
import java.util.List;
import javax.faces.component.UIComponent;
@@ -34,56 +32,68 @@
import org.richfaces.component.UIToolBarGroup;
public class ToolBarGroupRenderer extends ToolBarRendererBase {
-
- protected Class getComponentClass() {
- return UIToolBarGroup.class;
- }
+
+ protected Class<?> getComponentClass() {
+ return UIToolBarGroup.class;
+ }
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+
+ public void encodeChildren(FacesContext facesContext, UIComponent component)
+ throws IOException {
+
+ UIToolBarGroup toolBarGroup = (UIToolBarGroup) component;
+ List<UIComponent> renderedChildren = toolBarGroup.getRenderedChildren();
+ if (renderedChildren.size() <= 0) {
+ return;
+ }
- public boolean getRendersChildren() {
- return true;
- }
-
- public void encodeChildren(FacesContext facesContext, UIComponent component) throws IOException {
- UIToolBarGroup toolBarGroup = (UIToolBarGroup) component;
- ResponseWriter writer = facesContext.getResponseWriter();
- String styleClass = (String) toolBarGroup.getAttributes().get(HTML.STYLE_CLASS_ATTR);
- String contentClass = (String) getParentToolBar(component).getAttributes().get("contentClass");
- String style = (String) toolBarGroup.getAttributes().get(HTML.style_ATTRIBUTE);
- String contentStyle = (String) getParentToolBar(component).getAttributes().get("contentStyle");
-
- if (null == contentClass) {
- contentClass = "";
- }
- if (null == styleClass) {
- styleClass = "";
- }
- if (null == contentStyle) {
- contentStyle = "";
- }
- if (null == style) {
- style = "";
- }
-
- if (component.getChildCount() > 0) {
- List<UIComponent> children = component.getChildren();
- for (Iterator<UIComponent> iter = children.iterator(); iter.hasNext();) {
- UIComponent child = (UIComponent) iter.next();
- if(!child.isRendered()){
- iter.remove();
- }
- }
- for (Iterator<UIComponent> it = children.iterator(); it.hasNext();) {
- UIComponent child = (UIComponent) it.next();
- writer.startElement(HTML.td_ELEM, component);
- writer.writeAttribute(HTML.class_ATTRIBUTE, "dr-toolbar-int rich-toolbar-item " + contentClass + " " + styleClass, null);
- getUtils().writeAttribute(writer, HTML.style_ATTRIBUTE, contentStyle + ";" + style);
- encodeEventsAttributes(facesContext, toolBarGroup, writer);
- renderChild(facesContext, child);
- writer.endElement(HTML.td_ELEM);
- if (it.hasNext()) {
- insertSeparatorIfNeed(facesContext, toolBarGroup, writer);
- }
- }
- }
- }
+ ResponseWriter writer = facesContext.getResponseWriter();
+
+
+ renderChild(facesContext, toolBarGroup, writer, renderedChildren.get(0));
+ for (int i = 1; i < renderedChildren.size(); i++) {
+
+ insertSeparatorIfNeed(facesContext, toolBarGroup, writer);
+
+ renderChild(facesContext, toolBarGroup, writer, renderedChildren.get(i));
+ }
+ }
+
+ private void renderChild(FacesContext facesContext,
+ UIToolBarGroup toolBarGroup, ResponseWriter writer,
+ UIComponent child) throws IOException {
+
+ writer.startElement(HTML.td_ELEM, toolBarGroup);
+ writeClassValue(toolBarGroup, writer);
+ writeStyleValue(toolBarGroup, writer);
+ encodeEventsAttributes(facesContext, toolBarGroup, writer);
+
+ super.renderChild(facesContext, child);
+
+ writer.endElement(HTML.td_ELEM);
+ }
+
+ private void writeStyleValue(UIToolBarGroup toolBarGroup, ResponseWriter writer) throws IOException {
+ String style = getStringAttribute(toolBarGroup, HTML.style_ATTRIBUTE);
+ String contentStyle = getStringAttribute(getParentToolBar(toolBarGroup), "contentStyle");
+
+ String value = contentStyle + ";" + style;
+ getUtils().writeAttribute(writer, HTML.style_ATTRIBUTE, value);
+ }
+
+ private void writeClassValue(UIToolBarGroup toolBarGroup, ResponseWriter writer) throws IOException {
+ String styleClass = getStringAttribute(toolBarGroup, HTML.STYLE_CLASS_ATTR);
+ String contentClass = getStringAttribute(getParentToolBar(toolBarGroup), "contentClass");
+
+ String value = "dr-toolbar-int rich-toolbar-item " + contentClass + " " + styleClass;
+ writer.writeAttribute(HTML.class_ATTRIBUTE, value, null);
+ }
+
+ private String getStringAttribute(UIComponent toolBarGroup, String attribute) {
+ String value = (String) toolBarGroup.getAttributes().get(attribute);
+ return null == value ? "" : value;
+ }
}
15 years, 11 months
JBoss Rich Faces SVN: r12601 - trunk/ui/pickList/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-02-09 05:53:41 -0500 (Mon, 09 Feb 2009)
New Revision: 12601
Modified:
trunk/ui/pickList/src/main/config/component/picklist.xml
Log:
fix listClass, controlClass desc encoding
Modified: trunk/ui/pickList/src/main/config/component/picklist.xml
===================================================================
--- trunk/ui/pickList/src/main/config/component/picklist.xml 2009-02-09 10:27:49 UTC (rev 12600)
+++ trunk/ui/pickList/src/main/config/component/picklist.xml 2009-02-09 10:53:41 UTC (rev 12601)
@@ -170,14 +170,14 @@
<property>
<name>listClass</name>
<classname>java.lang.String</classname>
- <description>CSS�class�for�a�list</description>
+ <description>CSS class for a list</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>controlClass</name>
<classname>java.lang.String</classname>
- <description>CSS�class�for�a�list</description>
+ <description>CSS class for a list</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
15 years, 11 months
JBoss Rich Faces SVN: r12600 - trunk/ui/listShuttle/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2009-02-09 05:27:49 -0500 (Mon, 09 Feb 2009)
New Revision: 12600
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
Log:
fix encoding reqiuredMessage attribute
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-07 01:43:53 UTC (rev 12599)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-09 10:27:49 UTC (rev 12600)
@@ -510,7 +510,7 @@
<property>
<name>controlsVerticalAlign</name>
<classname>java.lang.String</classname>
- <description>Customizes�vertically�a�position�of�move/copy�and order controls�relatively�to�lists. Default value is "middle"</description>
+ <description>Customizes�vertically�a�position�of�move/copy�and order controls�relatively�to�lists. Default value is "middle"</description>
<defaultvalue><![CDATA["middle"]]></defaultvalue>
</property>
<property>
@@ -552,13 +552,13 @@
<property>
<name>copyAllControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class�for�copy all�control</description>
+ <description>CSS class�for�copy all�control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
<name>removeAllControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS�class�for�remove all control</description>
+ <description>CSS�class�for�remove all control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
15 years, 11 months
JBoss Rich Faces SVN: r12599 - in branches/jsf2.0: tests/ajax/src/main/java and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2009-02-06 20:43:53 -0500 (Fri, 06 Feb 2009)
New Revision: 12599
Added:
branches/jsf2.0/tests/ajax/src/main/java/org/
branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/
branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/
branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataBean.java
branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataItem.java
branches/jsf2.0/tests/ajax/src/test/java/org/richfaces/test/ajax/UIDataTest.java
branches/jsf2.0/tests/ajax/src/test/resources/test.xhtml
Modified:
branches/jsf2.0/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java
branches/jsf2.0/tests/ajax/src/main/webapp/WEB-INF/faces-config.xml
branches/jsf2.0/tests/ajax/src/test/resources/org/richfaces/test/ajax/logging.properties
Log:
Fix default UIViewRoot render kit and locale values in the base test class.
Wrote UIData performance test.
Modified: branches/jsf2.0/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java
===================================================================
--- branches/jsf2.0/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java 2009-02-06 17:44:26 UTC (rev 12598)
+++ branches/jsf2.0/framework/jsf-test/src/main/java/org/richfaces/test/AbstractFacesTest.java 2009-02-07 01:43:53 UTC (rev 12599)
@@ -7,6 +7,7 @@
import java.io.InputStream;
import java.net.URL;
import java.util.EventListener;
+import java.util.Locale;
import java.util.logging.LogManager;
import javax.faces.FactoryFinder;
@@ -19,6 +20,7 @@
import javax.faces.context.FacesContextFactory;
import javax.faces.lifecycle.Lifecycle;
import javax.faces.lifecycle.LifecycleFactory;
+import javax.faces.render.RenderKitFactory;
import javax.faces.webapp.FacesServlet;
import javax.servlet.Filter;
@@ -252,6 +254,8 @@
protected UIViewRoot setupView() {
UIViewRoot viewRoot = (UIViewRoot) application.createComponent(UIViewRoot.COMPONENT_TYPE);
viewRoot.setViewId("/test.xhtml");
+ viewRoot.setLocale(Locale.getDefault());
+ viewRoot.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
return viewRoot;
}
Added: branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataBean.java
===================================================================
--- branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataBean.java (rev 0)
+++ branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataBean.java 2009-02-07 01:43:53 UTC (rev 12599)
@@ -0,0 +1,42 @@
+/**
+ *
+ */
+package org.richfaces.test;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DataBean {
+
+ private final List<DataItem> data;
+
+ public DataBean() {
+ data = new ArrayList<DataItem>(10);
+ for(int i=0;i<10;i++){
+ DataItem item = new DataItem();
+ item.setPrice(i);
+ item.setName("Name"+i);
+ ArrayList<DataItem> items = new ArrayList<DataItem>(10);
+ for(int j=0;j<10;j++){
+ String name = "Item "+j+" of "+i;
+ DataItem childItem = new DataItem();
+ childItem.setName(name);
+ items.add(childItem);
+ }
+ item.setItems(items);
+ data.add(item);
+ }
+ }
+
+ /**
+ * @return the data
+ */
+ public List<DataItem> getData() {
+ return data;
+ }
+
+}
Property changes on: branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataItem.java
===================================================================
--- branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataItem.java (rev 0)
+++ branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataItem.java 2009-02-07 01:43:53 UTC (rev 12599)
@@ -0,0 +1,62 @@
+/**
+ *
+ */
+package org.richfaces.test;
+
+import java.util.List;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class DataItem {
+
+ private String name;
+
+ private int price;
+
+ private List<DataItem> items;
+
+ /**
+ * @return the items
+ */
+ public List<DataItem> getItems() {
+ return items;
+ }
+
+ /**
+ * @param items the items to set
+ */
+ public void setItems(List<DataItem> items) {
+ this.items = items;
+ }
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ /**
+ * @return the price
+ */
+ public int getPrice() {
+ return price;
+ }
+
+ /**
+ * @param price the price to set
+ */
+ public void setPrice(int price) {
+ this.price = price;
+ }
+
+}
Property changes on: branches/jsf2.0/tests/ajax/src/main/java/org/richfaces/test/DataItem.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jsf2.0/tests/ajax/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- branches/jsf2.0/tests/ajax/src/main/webapp/WEB-INF/faces-config.xml 2009-02-06 17:44:26 UTC (rev 12598)
+++ branches/jsf2.0/tests/ajax/src/main/webapp/WEB-INF/faces-config.xml 2009-02-07 01:43:53 UTC (rev 12599)
@@ -9,4 +9,9 @@
<managed-bean-class>declarativeajax.Bean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+<managed-bean>
+ <managed-bean-name>dataBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.test.DataBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+</managed-bean>
</faces-config>
Added: branches/jsf2.0/tests/ajax/src/test/java/org/richfaces/test/ajax/UIDataTest.java
===================================================================
--- branches/jsf2.0/tests/ajax/src/test/java/org/richfaces/test/ajax/UIDataTest.java (rev 0)
+++ branches/jsf2.0/tests/ajax/src/test/java/org/richfaces/test/ajax/UIDataTest.java 2009-02-07 01:43:53 UTC (rev 12599)
@@ -0,0 +1,116 @@
+/**
+ *
+ */
+package org.richfaces.test.ajax;
+
+import static org.junit.Assert.*;
+
+import java.util.List;
+import java.util.Locale;
+
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+import javax.faces.component.UIColumn;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIData;
+import javax.faces.component.UIForm;
+import javax.faces.component.UIInput;
+import javax.faces.component.UIOutput;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.html.HtmlDataTable;
+import javax.faces.event.PhaseId;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.ResponseStateManager;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.richfaces.test.AbstractFacesTest;
+import org.richfaces.test.DataBean;
+import org.richfaces.test.staging.HttpMethod;
+
+
+/**
+ * @author asmirnov
+ *
+ */
+public class UIDataTest extends AbstractFacesTest {
+
+ @Before
+ public void setUpData(){
+
+ }
+
+ @Override
+ protected void setupWebContent() {
+ facesServer.addResource("/WEB-INF/faces-config.xml", "WEB-INF/faces-config.xml");
+ facesServer.addResource("/test.xhtml", "test.xhtml");
+ }
+
+ @Override
+ protected UIViewRoot setupView() {
+ facesContext.setCurrentPhaseId(PhaseId.RESTORE_VIEW);
+ ELContext elContext = facesContext.getELContext();
+ ExpressionFactory expressionFactory = application.getExpressionFactory();
+ UIViewRoot root = super.setupView();
+ UIComponent output = application.createComponent(UIOutput.COMPONENT_TYPE);
+ output.setId(root.createUniqueId());
+ root.getChildren().add(output);
+ UIData data = (UIData) application.createComponent(UIData.COMPONENT_TYPE);
+ data.setId("data");
+ data.setVar("var");
+ data.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{dataBean.data}", List.class));
+ output.getChildren().add(data);
+ UIComponent column = application.createComponent(UIColumn.COMPONENT_TYPE);
+ data.getChildren().add(column);
+ UIData enclosedData = (UIData) application.createComponent(UIData.COMPONENT_TYPE);
+ enclosedData.setId("data1");
+ enclosedData.setVar("var1");
+ enclosedData.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{var.items}", List.class));
+ column.getChildren().add(enclosedData);
+ UIComponent enclosedColumn = application.createComponent(UIColumn.COMPONENT_TYPE);
+ enclosedData.getChildren().add(enclosedColumn);
+ UIForm form = (UIForm) application.createComponent(UIForm.COMPONENT_TYPE);
+ form.setId("form");
+ enclosedColumn.getChildren().add(form);
+ UIInput input = (UIInput) application.createComponent(UIInput.COMPONENT_TYPE);
+ input.setId("input");
+ input.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{var1.name}", String.class));
+ form.getChildren().add(input);
+ ///
+ input = (UIInput) application.createComponent(UIInput.COMPONENT_TYPE);
+ input.setId("priceinput");
+ input.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{var1.price}", Integer.class));
+ enclosedColumn.getChildren().add(input);
+ input = (UIInput) application.createComponent(UIInput.COMPONENT_TYPE);
+ input.setId("nameinput");
+ input.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{var.name}", String.class));
+ column.getChildren().add(input);
+ return root;
+ }
+
+ @Override
+ protected void setupConnection() {
+ this.connection.addRequestParameter(ResponseStateManager.VIEW_STATE_PARAM, "id1");
+ this.connection.addRequestParameter("data:3:nameinput", "foo");
+ this.connection.addRequestParameter("data:5:data1:4:priceinput", "333");
+ this.connection.addRequestParameter("data:6:data1:5:form", "data:6:data1:5:form");
+ this.connection.addRequestParameter("data:6:data1:5:form:input", "bar");
+ connection.setRequestMethod(HttpMethod.POST);
+ }
+
+ @Test
+ public void testDecode() throws Exception {
+ setupFacesRequest();
+ long startTime = System.currentTimeMillis();
+ lifecycle.execute(facesContext);
+ System.err.println("Execute time "+(System.currentTimeMillis()-startTime)+"ms");
+ lifecycle.render(facesContext);
+ DataBean dataBean = (DataBean) this.facesServer.getSession().getAttribute("dataBean");
+ assertNotNull(dataBean);
+ assertEquals("foo", dataBean.getData().get(3).getName());
+ assertEquals(333, dataBean.getData().get(5).getItems().get(4).getPrice());
+ assertEquals("bar", dataBean.getData().get(6).getItems().get(5).getName());
+ }
+
+}
Property changes on: branches/jsf2.0/tests/ajax/src/test/java/org/richfaces/test/ajax/UIDataTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: branches/jsf2.0/tests/ajax/src/test/resources/org/richfaces/test/ajax/logging.properties
===================================================================
--- branches/jsf2.0/tests/ajax/src/test/resources/org/richfaces/test/ajax/logging.properties 2009-02-06 17:44:26 UTC (rev 12598)
+++ branches/jsf2.0/tests/ajax/src/test/resources/org/richfaces/test/ajax/logging.properties 2009-02-07 01:43:53 UTC (rev 12599)
@@ -16,7 +16,7 @@
org.ajax4jsf.webapp.level=ALL
org.ajax4jsf.application.level=ALL
org.ajax4jsf.context.level=ALL
-javax.enterprise.resource.webcontainer.jsf.level=ALL
+javax.enterprise.resource.webcontainer.jsf.level=SEVERE
org.richfaces.level=ALL
-com.gargoylesoftware.htmlunit.level=ALL
+com.gargoylesoftware.htmlunit.level=SEVERE
\ No newline at end of file
Added: branches/jsf2.0/tests/ajax/src/test/resources/test.xhtml
===================================================================
--- branches/jsf2.0/tests/ajax/src/test/resources/test.xhtml (rev 0)
+++ branches/jsf2.0/tests/ajax/src/test/resources/test.xhtml 2009-02-07 01:43:53 UTC (rev 12599)
@@ -0,0 +1,5 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<f:view contentType="text/html" xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"/>
Property changes on: branches/jsf2.0/tests/ajax/src/test/resources/test.xhtml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
15 years, 11 months
JBoss Rich Faces SVN: r12598 - trunk/test-applications/seleniumTest/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2009-02-06 12:44:26 -0500 (Fri, 06 Feb 2009)
New Revision: 12598
Modified:
trunk/test-applications/seleniumTest/richfaces/pom.xml
Log:
update xerces version
Modified: trunk/test-applications/seleniumTest/richfaces/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/pom.xml 2009-02-06 17:07:10 UTC (rev 12597)
+++ trunk/test-applications/seleniumTest/richfaces/pom.xml 2009-02-06 17:44:26 UTC (rev 12598)
@@ -15,9 +15,9 @@
<version>3.3.1-SNAPSHOT</version>
<build>
<finalName>richfaces</finalName>
- </build>
- <properties>
- <seamVersion>2.1.1.GA</seamVersion>
+ </build>
+ <properties>
+ <seamVersion>2.1.1.GA</seamVersion>
</properties>
<profiles>
<profile>
@@ -132,40 +132,45 @@
</plugins>
</build>
</profile>
- </profiles>
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <version>${seamVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ui</artifactId>
- <version>${seamVersion}</version>
- </dependency>
- <dependency>
- <groupId>javassist</groupId>
- <artifactId>javassist</artifactId>
- <version>3.6.0.GA</version>
- </dependency>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- </dependency>
+ </profiles>
+ <dependencies>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam</artifactId>
+ <version>${seamVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-ui</artifactId>
+ <version>${seamVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.6.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
</dependencies>
<repositories>
- <repository>
- <releases/>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>never</updatePolicy>
- </snapshots>
- <id>repository.jboss.org</id>
- <url>http://repository.jboss.org/maven2</url>
- </repository>
<repository>
+ <releases/>
+ <snapshots>
+ <enabled>false</enabled>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ <id>repository.jboss.org</id>
+ <url>http://repository.jboss.org/maven2</url>
+ </repository>
+ <repository>
<releases>
<enabled>false</enabled>
</releases>
@@ -174,6 +179,6 @@
</snapshots>
<id>snapshots.jboss.org</id>
<url>http://snapshots.jboss.org/maven2</url>
- </repository>
- </repositories>
+ </repository>
+ </repositories>
</project>
\ No newline at end of file
15 years, 11 months
JBoss Rich Faces SVN: r12597 - trunk/framework/impl/src/main/javascript/jquery.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2009-02-06 12:07:10 -0500 (Fri, 06 Feb 2009)
New Revision: 12597
Modified:
trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.1.js
Log:
https://jira.jboss.org/jira/browse/RF-5603
Modified: trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.1.js
===================================================================
--- trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.1.js 2009-02-06 15:27:57 UTC (rev 12596)
+++ trunk/framework/impl/src/main/javascript/jquery/jquery-1.3.1.js 2009-02-06 17:07:10 UTC (rev 12597)
@@ -4059,11 +4059,21 @@
doc = elem.ownerDocument, computedStyle, docElem = doc.documentElement,
body = doc.body, defaultView = doc.defaultView,
prevComputedStyle = defaultView.getComputedStyle(elem, null),
- top = elem.offsetTop, left = elem.offsetLeft;
+ top = elem.offsetTop, left = elem.offsetLeft,
+ isAbsolute = prevComputedStyle.position === "absolute"; //RF: added by rf-team
- while ( (elem = elem.parentNode) && elem !== body && elem !== docElem ) {
+ while ( (elem = elem.parentNode) && elem !== body && elem !== docElem && prevComputedStyle.position !== "fixed" ) {
computedStyle = defaultView.getComputedStyle(elem, null);
- top -= elem.scrollTop, left -= elem.scrollLeft;
+
+ //RF: added by rf-team
+ if ( (!isAbsolute && prevComputedStyle.position === "static") /* add scroll for statically positioned elements */ ||
+ prevComputedStyle.position === "relative" /* not sure we need this - have to test */ ||
+ elem === offsetParent /* add scroll offset of offsetParent element */ ) {
+ top -= elem.scrollTop, left -= elem.scrollLeft;
+ isAbsolute = prevComputedStyle.position === "absolute";
+ }
+ //RF: end
+
if ( elem === offsetParent ) {
top += elem.offsetTop, left += elem.offsetLeft;
if ( jQuery.offset.doesNotAddBorder && !(jQuery.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(elem.tagName)) )
@@ -4080,11 +4090,12 @@
if ( prevComputedStyle.position === "relative" || prevComputedStyle.position === "static" )
top += body.offsetTop,
left += body.offsetLeft;
-
+
if ( prevComputedStyle.position === "fixed" )
top += Math.max(docElem.scrollTop, body.scrollTop),
left += Math.max(docElem.scrollLeft, body.scrollLeft);
+
return { top: top, left: left };
};
15 years, 11 months
JBoss Rich Faces SVN: r12596 - trunk/ui/listShuttle/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2009-02-06 10:27:57 -0500 (Fri, 06 Feb 2009)
New Revision: 12596
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
Log:
Build fixed
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-06 15:26:43 UTC (rev 12595)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-06 15:27:57 UTC (rev 12596)
@@ -74,6 +74,7 @@
</property>
<property hidden="true">
<name>requiredMessage</name>
+ <classname>java.lang.String</classname>
</property>
<property elonly="true">
15 years, 11 months
JBoss Rich Faces SVN: r12595 - in trunk/test-applications/seleniumTest/richfaces/src: test/java/org/richfaces/testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2009-02-06 10:26:43 -0500 (Fri, 06 Feb 2009)
New Revision: 12595
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenuGroup/panelMenuGroupAutoTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuGroupTest.java
Log:
https://jira.jboss.org/jira/browse/RF-5895
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/panelMenuGroup/panelMenuGroupAutoTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuGroupTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuGroupTest.java 2009-02-06 15:23:32 UTC (rev 12594)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/PanelMenuGroupTest.java 2009-02-06 15:26:43 UTC (rev 12595)
@@ -151,6 +151,22 @@
AssertPresentAndVisible(sRequiredId, "Server group would have been expanded");
}
+ @Test
+ public void testComponentIsOutputToClientAndTopLevelAndNotHaveDifferentStyling(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ writeStatus("Check component is output to client; top-level and not groups have different styling");
+
+ String componentId = tester.getClientId("componentId");
+ AssertPresentAndVisible(componentId, "Component is not output to a client");
+ String subComponentId = tester.getClientId("subComponentId");
+
+ String styleGroup = selenium.getAttribute("//*[@id='icon" + componentId + "']/@style");
+ String styleSubGroup = selenium.getAttribute("//*[@id='icon" + subComponentId + "']/@style");
+
+ //Assert.assertFalse(styleGroup == null ? styleSubGroup == null : styleGroup.equals(styleSubGroup), "Expected [" + styleGroup + "] <> [" + styleSubGroup + "]");
+ }
+
@Override
public void sendAjax() {
clickAjaxCommandAndWait("icon" + getAutoTester(this).getClientId(AutoTester.COMPONENT_ID));
15 years, 11 months
JBoss Rich Faces SVN: r12594 - trunk/ui/listShuttle/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2009-02-06 10:23:32 -0500 (Fri, 06 Feb 2009)
New Revision: 12594
Modified:
trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
Log:
https://jira.jboss.org/jira/browse/RF-6056
Improper symbols in attributes description are corrected
Modified: trunk/ui/listShuttle/src/main/config/component/listShuttle.xml
===================================================================
--- trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-06 15:15:46 UTC (rev 12593)
+++ trunk/ui/listShuttle/src/main/config/component/listShuttle.xml 2009-02-06 15:23:32 UTC (rev 12594)
@@ -551,7 +551,7 @@
<property>
<name>copyAllControlClass</name>
<classname>java.lang.String</classname>
- <description>CSS class�for�copy all�control</description>
+ <description>CSS class�for�copy all�control</description>
<defaultvalue><![CDATA[""]]></defaultvalue>
</property>
<property>
15 years, 11 months