JBoss Rich Faces SVN: r20883 - in branches/RF-9323: core/impl/src/main/resources/META-INF/resources and 21 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2011-01-04 12:16:29 -0500 (Tue, 04 Jan 2011)
New Revision: 20883
Added:
branches/RF-9323/examples/dnd-demo/src/main/webapp/index.jsp
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.mousewheel.js
branches/RF-9323/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java
Modified:
branches/RF-9323/
branches/RF-9323/core/impl/src/main/resources/META-INF/resources/skinning.ecss
branches/RF-9323/examples/dnd-demo/src/main/java/org/demo/DataBean.java
branches/RF-9323/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml
branches/RF-9323/examples/iteration-demo/src/main/webapp/extendedtable.xhtml
branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/fileupload/FileUploadBean.java
branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/TreeBean.java
branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/CD.java
branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Company.java
branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Country.java
branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/NamedNode.java
branches/RF-9323/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/imgUpload.xhtml
branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/samples/imgUpload-sample.xhtml
branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml
branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml
branches/RF-9323/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
branches/RF-9323/ui/input/ui/src/main/templates/inputnumberslider.template.xml
branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss
branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss
branches/RF-9323/ui/output/ui/src/main/templates/dropdownmenu.template.xml
Log:
Merged revisions 20845-20851,20854-20859,20872 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r20845 | amarkhel | 2010-12-30 04:56:42 -0800 (Thu, 30 Dec 2010) | 1 line
RF-10049 Review richfaces components with inputs for css styles unification
.......
r20846 | amarkhel | 2010-12-30 06:06:09 -0800 (Thu, 30 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-9740 Popup panel: not resizeable in Internet Explorer
.......
r20847 | amarkhel | 2010-12-30 06:23:16 -0800 (Thu, 30 Dec 2010) | 1 line
RF-10070 Toolbar: item separator rendered wrong in IE7
.......
r20848 | abelevich | 2010-12-30 07:44:17 -0800 (Thu, 30 Dec 2010) | 1 line
RF-10056: 'acceptedTypes' attribute checking on null is added
.......
r20849 | konstantin.mishin | 2010-12-30 10:21:18 -0800 (Thu, 30 Dec 2010) | 1 line
RF-9424
.......
r20850 | amarkhel | 2010-12-30 12:33:33 -0800 (Thu, 30 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10109 Drop down menu: directions
.......
r20851 | amarkhel | 2010-12-30 12:35:22 -0800 (Thu, 30 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10108 Drop down menu: client api
.......
r20854 | Alex.Kolonitsky | 2010-12-30 23:39:15 -0800 (Thu, 30 Dec 2010) | 1 line
RF-9435 collapsible panel implement controls and different collapse modes
.......
r20855 | ilya_shaikovsky | 2010-12-31 00:29:12 -0800 (Fri, 31 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-9974
.......
r20856 | ilya_shaikovsky | 2010-12-31 02:16:36 -0800 (Fri, 31 Dec 2010) | 2 lines
https://issues.jboss.org/browse/RF-9833
+ fileUpload sources added
.......
r20857 | Alex.Kolonitsky | 2010-12-31 04:04:09 -0800 (Fri, 31 Dec 2010) | 1 line
RF-9435
.......
r20858 | konstantin.mishin | 2010-12-31 07:17:08 -0800 (Fri, 31 Dec 2010) | 1 line
RF-8912
.......
r20859 | konstantin.mishin | 2010-12-31 07:41:35 -0800 (Fri, 31 Dec 2010) | 1 line
RF-9638
.......
r20872 | konstantin.mishin | 2011-01-03 06:41:10 -0800 (Mon, 03 Jan 2011) | 1 line
RF-10104
.......
Property changes on: branches/RF-9323
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-20842
+ /trunk:1-20882
Modified: branches/RF-9323/core/impl/src/main/resources/META-INF/resources/skinning.ecss
===================================================================
--- branches/RF-9323/core/impl/src/main/resources/META-INF/resources/skinning.ecss 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/core/impl/src/main/resources/META-INF/resources/skinning.ecss 2011-01-04 17:16:29 UTC (rev 20883)
@@ -57,7 +57,7 @@
textarea, input[type="text"], input[type="password"], select {
border-width: 1px;
- border-style: inset;
+ border-style: solid;
border-color: '#{richSkin.panelBorderColor}';
font-size: '#{richSkin.generalSizeFont}';
@@ -72,4 +72,5 @@
textarea[disabled], input[type="text"][disabled], input[type="password"][disabled], select[disabled] {
color: '#{richSkin.panelBorderColor}';
+ cursor:default;
}
\ No newline at end of file
Modified: branches/RF-9323/examples/dnd-demo/src/main/java/org/demo/DataBean.java
===================================================================
--- branches/RF-9323/examples/dnd-demo/src/main/java/org/demo/DataBean.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/dnd-demo/src/main/java/org/demo/DataBean.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -13,13 +13,10 @@
public class DataBean {
private List<String> dropValues = new ArrayList<String>();
-
private String dragValue1 = "dragValue 1";
-
- private String dragValue2 = "dragValue 3";
-
+ private String dragValue2 = "dragValue 2";
private String dragValue3 = "dragValue 3";
-
+ private String acceptedTypes = "drg1, drg2";
public List<String> getDropValues(){
return dropValues;
@@ -52,12 +49,29 @@
public void setDropValues(List<String> dropValues){
this.dropValues = dropValues;
}
-
+
+ public String getAcceptedTypes() {
+ return acceptedTypes;
+ }
+
+ public void setAcceptedTypes(String acceptedTypes) {
+ this.acceptedTypes = acceptedTypes;
+ }
+
public void processEvent(DropEvent event) {
String value = (String)event.getDragValue();
dropValues.add(value);
System.out.println("DataBean.processEvent()");
}
-
-
+
+ public void makeAcceptedTypesNullable(){
+ this.setAcceptedTypes(null);
+ this.setDropValues(new ArrayList<String>());
+ }
+
+ public void resetAcceptedTypes(){
+ this.setAcceptedTypes("drg1, drg2");
+ this.setDropValues(new ArrayList<String>());
+ }
+
}
Modified: branches/RF-9323/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml
===================================================================
--- branches/RF-9323/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -1,85 +1,102 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:dnd="http://richfaces.org/dnd"
- xmlns:a4j="http://richfaces.org/a4j">
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:dnd="http://richfaces.org/dnd"
+ xmlns:a4j="http://richfaces.org/a4j">
<h:head>
- <title>Drag-n-Drop sample</title>
- <style type="text/css">
-.droppable {
- border: 1px solid blue;
- margin: 4px;
- height: 200px;
- width: 200px;
- background-color: yellow;
- overflow: auto;
-}
+ <title>Drag-n-Drop sample</title>
+ <style type="text/css">
+ .droppable {
+ border: 1px solid blue;
+ margin: 4px;
+ height: 200px;
+ width: 200px;
+ background-color: yellow;
+ overflow: auto;
+ }
-.draggable {
- border: 1px solid #000000;
- background-color: grey;
- opacity: 0.3;
- margin: 2px;
- height: 50px;
- width: 100px;
-}
+ .draggable {
+ border: 1px solid #000000;
+ background-color: gray;
+ opacity: 0.3;
+ margin: 2px;
+ height: 50px;
+ width: 100px;
+ }
-.rf-ind {
- height: 20px;
- width: 20px;
- border: 1px dotted red;
- background-color: blue
-}
+ .rf-ind {
+ height: 20px;
+ width: 20px;
+ border: 1px dotted red;
+ background-color: blue
+ }
-.rf-ind-acpt {
- height: 20px;
- width: 20px;
- border: 1px dotted red;
- background-color: green;
-}
+ .rf-ind-acpt {
+ height: 20px;
+ width: 20px;
+ border: 1px dotted red;
+ background-color: green;
+ }
-.rf-ind-rejt {
- height: 20px;
- width: 20px;
- border: 1px dotted green;
- background-color: red;
-}
-</style>
+ .rf-ind-rejt {
+ height: 20px;
+ width: 20px;
+ border: 1px dotted green;
+ background-color: red;
+ }
+ </style>
</h:head>
<h:body>
- <h:form>
+ <h:form>
+ <dnd:dragIndicator id="ind"/>
+ <table>
+ <tr>
+ <td>
+ <a4j:outputPanel id="drg1" layout="block" styleClass="draggable">
+ <h:outputText value="#{dataBean.dragValue1}"/>
+ <dnd:dragSource type="drg1" dragValue="#{dataBean.dragValue1}"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <a4j:outputPanel id="drg2" layout="block" styleClass="draggable">
+ <h:outputText value="#{dataBean.dragValue2}"/>
+ <dnd:dragSource type="drg2" dragIndicator="ind" dragValue="#{dataBean.dragValue2}"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <a4j:outputPanel id="drg3" layout="block" styleClass="draggable">
+ <h:outputText value="#{dataBean.dragValue3}"/>
+ <dnd:dragSource type="drg3" dragIndicator="ind" dragValue="#{dataBean.dragValue3}"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <ul>
+ <li>
+ <a4j:commandLink value="Set acceptedTypes to [drg1, drg2]"
+ action="#{dataBean.resetAcceptedTypes}"
+ render="drp"/>
+ </li>
+ <li>
+ <a4j:commandLink value="Make acceptedTypes nullable. Every type will be accepted."
+ action="#{dataBean.makeAcceptedTypesNullable}"
+ render="drp"/>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </table>
- <dnd:dragIndicator id="ind"/>
-
- <table>
- <tr>
- <td><a4j:outputPanel id="drg1" layout="block" styleClass="draggable">
- <h:outputText value="#{dataBean.dragValue1}"/>
- <dnd:dragSource type="drg1" dragValue="#{dataBean.dragValue1}"/>
- </a4j:outputPanel></td>
- <td><a4j:outputPanel id="drg2" layout="block" styleClass="draggable">
- <h:outputText value="#{dataBean.dragValue2}"/>
- <dnd:dragSource type="drg2" dragIndicator="ind" dragValue="#{dataBean.dragValue2}"/>
- </a4j:outputPanel></td>
- <td><a4j:outputPanel id="drg3" layout="block" styleClass="draggable">
- <h:outputText value="#{dataBean.dragValue3}"/>
- <dnd:dragSource type="drg3" dragIndicator="ind" dragValue="#{dataBean.dragValue3}"/>
- </a4j:outputPanel></td>
- </tr>
- </table>
-
- <a4j:outputPanel id="drp" layout="block" styleClass="droppable">
- <dnd:dropTarget acceptedTypes="drg1, drg2" dropListener="#{dataBean.processEvent}" render="grid"></dnd:dropTarget>
- <h:dataTable id="grid" var="dropValue" value="#{dataBean.dropValues}">
- <h:column>
- <h:outputText value="#{dropValue}"/>
- </h:column>
- </h:dataTable>
- </a4j:outputPanel>
-
- </h:form>
+ <a4j:outputPanel id="drp" layout="block" styleClass="droppable">
+ <dnd:dropTarget acceptedTypes="#{dataBean.acceptedTypes}" dropListener="#{dataBean.processEvent}"
+ render="grid"/>
+ <h:dataTable id="grid" var="dropValue" value="#{dataBean.dropValues}">
+ <h:column>
+ <h:outputText value="#{dropValue}"/>
+ </h:column>
+ </h:dataTable>
+ </a4j:outputPanel>
+ </h:form>
</h:body>
</html>
\ No newline at end of file
Copied: branches/RF-9323/examples/dnd-demo/src/main/webapp/index.jsp (from rev 20872, trunk/examples/dnd-demo/src/main/webapp/index.jsp)
===================================================================
--- branches/RF-9323/examples/dnd-demo/src/main/webapp/index.jsp (rev 0)
+++ branches/RF-9323/examples/dnd-demo/src/main/webapp/index.jsp 2011-01-04 17:16:29 UTC (rev 20883)
@@ -0,0 +1 @@
+<jsp:forward page="examples/dnd.jsf" />
\ No newline at end of file
Modified: branches/RF-9323/examples/iteration-demo/src/main/webapp/extendedtable.xhtml
===================================================================
--- branches/RF-9323/examples/iteration-demo/src/main/webapp/extendedtable.xhtml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/iteration-demo/src/main/webapp/extendedtable.xhtml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -61,10 +61,10 @@
}
//-->
</script>
- <input id="js_api_id_input" type="text" value="form1:extendedDataTable" />
- <input id="js_api_function_string_input" type="text" value="sort('column_title')" size="60"/>
+ <input id="js_api_id_input" name="js_api" type="text" value="form1:extendedDataTable" />
+ <input id="js_api_function_string_input" name="js_api" type="text" value="sort('column_title')" size="60"/>
<input type="button" value="Run" onclick="invokeJSAPI()" />
- <input id="js_api_result" type="text" readonly="readonly" size="60"/>
+ <input id="js_api_result" name="js_api" type="text" readonly="readonly" size="60"/>
<br />
<h:outputText value="Selection mode" />
<h:selectOneMenu value="#{dataBean.selectionMode}">
@@ -103,9 +103,6 @@
</f:facet>
</c:if>
</it:column>
- <it:column>
- <textarea cols="5" rows="5"/>
- </it:column>
<it:column id="column_name" filterExpression="#{fn:containsIgnoreCase(record.name, fv)}" sortBy="#{record.name}">
<f:facet name="header">
<h:outputText id="columnHeader1" value="Column Header Facet"/>
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/fileupload/FileUploadBean.java
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/fileupload/FileUploadBean.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/fileupload/FileUploadBean.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -1,15 +1,16 @@
package org.richfaces.demo.fileupload;
-import org.richfaces.event.FileUploadEvent;
-import org.richfaces.model.UploadedFile;
-
-import javax.faces.bean.ManagedBean;
-import javax.faces.bean.SessionScoped;
import java.io.IOException;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.ArrayList;
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.SessionScoped;
+
+import org.richfaces.event.FileUploadEvent;
+import org.richfaces.model.UploadedFile;
+
/**
* @author Ilya Shaikovsky
*
@@ -18,30 +19,16 @@
@SessionScoped
public class FileUploadBean implements Serializable {
- private ArrayList<UploadedImage> files = new ArrayList<UploadedImage>();
+ private ArrayList<UploadedFile> files = new ArrayList<UploadedFile>();
private int uploadsAvailable = 5;
- private boolean autoUpload = false;
- private boolean useFlash = false;
- public int getSize() {
- if (getFiles().size() > 0) {
- return getFiles().size();
- } else {
- return 0;
- }
- }
-
public void paint(OutputStream stream, Object object) throws IOException {
stream.write(getFiles().get((Integer) object).getData());
+ stream.close();
}
public void listener(FileUploadEvent event) throws Exception {
- UploadedFile item = event.getUploadedFile();
- UploadedImage file = new UploadedImage();
- file.setLength(item.getData().length);
- file.setName(item.getName());
- file.setData(item.getData());
- files.add(file);
+ files.add(event.getUploadedFile());
uploadsAvailable--;
}
@@ -51,18 +38,26 @@
return null;
}
- public long getTimeStamp() {
- return System.currentTimeMillis();
+ public int getSize() {
+ if (getFiles().size() > 0) {
+ return getFiles().size();
+ } else {
+ return 0;
+ }
}
- public ArrayList<UploadedImage> getFiles() {
+ public ArrayList<UploadedFile> getFiles() {
return files;
}
- public void setFiles(ArrayList<UploadedImage> files) {
+ public void setFiles(ArrayList<UploadedFile> files) {
this.files = files;
}
+ public long getTimeStamp() {
+ return System.currentTimeMillis();
+ }
+
public int getUploadsAvailable() {
return uploadsAvailable;
}
@@ -71,20 +66,4 @@
this.uploadsAvailable = uploadsAvailable;
}
- public boolean isAutoUpload() {
- return autoUpload;
- }
-
- public void setAutoUpload(boolean autoUpload) {
- this.autoUpload = autoUpload;
- }
-
- public boolean isUseFlash() {
- return useFlash;
- }
-
- public void setUseFlash(boolean useFlash) {
- this.useFlash = useFlash;
- }
-
}
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/TreeBean.java
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/TreeBean.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/TreeBean.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -33,6 +33,7 @@
import javax.faces.bean.ManagedProperty;
import javax.swing.tree.TreeNode;
+import org.richfaces.component.UITree;
import org.richfaces.demo.tree.model.CD;
import org.richfaces.demo.tree.model.Company;
import org.richfaces.demo.tree.model.Country;
@@ -50,7 +51,8 @@
private List<TreeNode> rootNodes = new ArrayList<TreeNode>();
private Map<String, Country> countriesCache = new HashMap<String, Country>();
private Map<String, Company> companiesCache = new HashMap<String, Company>();
- private Object currentSelection;
+ private TreeNode currentSelection = null;
+
@PostConstruct
public void init() {
for (CDXmlDescriptor current : cdXmlDescriptors) {
@@ -62,12 +64,17 @@
company.getCds().add(cd);
}
}
-
- public void selectionChanged(TreeSelectionChangeEvent selectionChangeEvent){
- //considering only single selection
+
+ public void selectionChanged(TreeSelectionChangeEvent selectionChangeEvent) {
+ // considering only single selection
List<Object> selection = new ArrayList<Object>(selectionChangeEvent.getNewSelection());
- currentSelection = selection.get(0);
-
+ Object currentSelectionKey = selection.get(0);
+ UITree tree = (UITree) selectionChangeEvent.getSource();
+
+ Object storedKey = tree.getRowKey();
+ tree.setRowKey(currentSelectionKey);
+ currentSelection = (TreeNode) tree.getRowData();
+ tree.setRowKey(storedKey);
}
private Country getCountryByName(CDXmlDescriptor descriptor) {
@@ -111,4 +118,12 @@
this.rootNodes = rootNodes;
}
+ public TreeNode getCurrentSelection() {
+ return currentSelection;
+ }
+
+ public void setCurrentSelection(TreeNode currentSelection) {
+ this.currentSelection = currentSelection;
+ }
+
}
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/CD.java
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/CD.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/CD.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -7,24 +7,31 @@
public class CD extends NamedNode implements TreeNode {
private Company company;
private String artist;
- private String title;
private float price;
private int year;
public CD() {
this.setType("cd");
}
-
- public CD(String title, String artist, Company company, float price, int year) {
+
+ public CD(String name, String artist, Company company, float price, int year) {
super();
this.setType("cd");
this.company = company;
this.artist = artist;
- this.title = title;
+ this.name = name;
this.price = price;
this.year = year;
}
+ public Company getCompany() {
+ return company;
+ }
+
+ public void setCompany(Company company) {
+ this.company = company;
+ }
+
public TreeNode getChildAt(int childIndex) {
return null;
}
@@ -70,14 +77,6 @@
this.artist = artist;
}
- public String getTitle() {
- return title;
- }
-
- public void setTitle(String title) {
- this.title = title;
- }
-
public float getPrice() {
return price;
}
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Company.java
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Company.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Company.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -9,10 +9,9 @@
import com.google.common.collect.Iterators;
public class Company extends NamedNode implements TreeNode {
- private String name;
private List<CD> cds = new ArrayList<CD>();
private Country country;
-
+
public Company() {
this.setType("company");
}
@@ -49,14 +48,6 @@
return Iterators.asEnumeration(cds.iterator());
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
public Country getCountry() {
return country;
}
@@ -68,5 +59,5 @@
public List<CD> getCds() {
return cds;
}
-
+
}
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Country.java
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Country.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/Country.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -10,7 +10,6 @@
public class Country extends NamedNode implements TreeNode {
- private String name;
private List<Company> companies = new ArrayList<Company>();
public Country() {
@@ -45,14 +44,6 @@
return Iterators.asEnumeration(companies.iterator());
}
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
public List<Company> getCompanies() {
return companies;
}
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/NamedNode.java
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/NamedNode.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/java/org/richfaces/demo/tree/model/NamedNode.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -2,9 +2,18 @@
import java.io.Serializable;
-public class NamedNode implements Serializable{
- private String type;
+public class NamedNode implements Serializable {
+ protected String type;
+ protected String name;
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
public String getType() {
return type;
}
@@ -12,4 +21,9 @@
public void setType(String type) {
this.type = type;
}
+
+ @Override
+ public String toString() {
+ return this.name;
+ }
}
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/resources/org/richfaces/demo/data/common/navigation.xml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -172,10 +172,21 @@
</demo>
</demos>
</group>
- <!-- group> <name>Validation</name> <demos> <demo> <id>clientValidation</id>
- <name>Ajax/Client Validation</name> <samples> <sample> <id>ajaxValidation</id>
- <name>Simple Ajax Validation</name> </sample> </samples> </demo> </demos>
- </group -->
+ <!-- group>
+ <name>Validation</name>
+ <demos>
+ <demo new="true">
+ <id>clientValidation</id>
+ <name>Ajax/Client Validation</name>
+ <samples>
+ <sample>
+ <id>simple</id>
+ <name>Simple Ajax Validation</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group-->
<group>
<name>Data Iteration</name>
<demos>
@@ -281,11 +292,11 @@
<group>
<name>Trees</name>
<demos>
- <demo>
+ <demo new="true">
<id>tree</id>
<name>rich:tree</name>
<samples>
- <sample>
+ <sample new="true">
<id>tree</id>
<name>Simple tree from XML</name>
</sample>
@@ -300,7 +311,7 @@
<name>Simple treeModelRecursiveAdaptor usage</name>
</sample>
</samples>
- </demo>
+ </demo>
</demos>
</group>
<group>
@@ -545,25 +556,25 @@
<name>Upload images</name>
</sample>
</samples>
- </demo>
+ </demo>
</demos>
</group>
- <group>
- <name>Drag and Drop</name>
- <demos>
- <demo new="true">
- <id>dragDrop</id>
- <name>Drag and Drop</name>
- <samples>
- <sample>
- <id>dragDrop</id>
- <name>Drag and Drop usage example</name>
- </sample>
- </samples>
- </demo>
- </demos>
- </group>
<group>
+ <name>Drag and Drop</name>
+ <demos>
+ <demo new="true">
+ <id>dragDrop</id>
+ <name>Drag and Drop</name>
+ <samples>
+ <sample>
+ <id>dragDrop</id>
+ <name>Drag and Drop usage example</name>
+ </sample>
+ </samples>
+ </demo>
+ </demos>
+ </group>
+ <group>
<name>Misc Components/Features</name>
<demos>
<demo>
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/imgUpload.xhtml
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/imgUpload.xhtml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/imgUpload.xhtml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -24,6 +24,12 @@
<ui:param name="openLabel" value="View Source" />
<ui:param name="hideLabel" value="Hide Source" />
</ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/fileupload/FileUploadBean.java"/>
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View FileUploadBean.java" />
+ <ui:param name="hideLabel" value="Hide FileUploadBean.java" />
+ </ui:include>
<p><b>FileUpload requires two context-parameter's to be set in
web.xml:</b></p>
<ul>
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/samples/imgUpload-sample.xhtml
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/samples/imgUpload-sample.xhtml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/fileUpload/samples/imgUpload-sample.xhtml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -36,7 +36,7 @@
var="file" rowKeyVar="row">
<rich:panel bodyClass="rich-laguna-panel-no-header">
<h:panelGrid columns="2">
- <a4j:mediaOutput element="img" mimeType="#{file.mime}"
+ <a4j:mediaOutput element="img" mimeType="image/jpeg"
createContent="#{fileUploadBean.paint}" value="#{row}"
style="width:100px; height:100px;" cacheable="false">
<f:param value="#{fileUploadBean.timeStamp}" name="time" />
@@ -45,7 +45,7 @@
<h:outputText value="File Name:" />
<h:outputText value="#{file.name}" />
<h:outputText value="File Length(bytes):" />
- <h:outputText value="#{file.length}" />
+ <h:outputText value="#{file.size}" />
</h:panelGrid>
</h:panelGrid>
</rich:panel>
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/samples/tree-sample.xhtml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -5,18 +5,55 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
-
- <rich:tree id="tree" nodeType="#{node.type}" var="node"
- value="#{treeBean.rootNodes}" toggleType="client"
- >
- <rich:treeNode type="country">
+ <style>
+ .top{
+ vertical-align: top;
+ width: 50%;
+ }
+ .bold{
+ font-weight: bold;
+ }
+ </style>
+ <h:panelGrid columns="2" columnClasses="top,top" width="60%">
+ <h:form>
+ <rich:tree id="tree" nodeType="#{node.type}" var="node"
+ value="#{treeBean.rootNodes}" toggleType="client"
+ selectionType="ajax"
+ selectionChangeListener="#{treeBean.selectionChanged}">
+ <rich:treeNode type="country">
#{node.name}
</rich:treeNode>
- <rich:treeNode type="company" icon="/images/tree/disc.gif">
+ <rich:treeNode type="company" icon="/images/tree/disc.gif">
#{node.name}
</rich:treeNode>
- <rich:treeNode type="cd" icon="/images/tree/song.gif">
- #{node.artist} - #{node.title} - #{node.year}
+ <rich:treeNode type="cd" icon="/images/tree/song.gif">
+ #{node.artist} - #{node.name} - #{node.year}
</rich:treeNode>
- </rich:tree>
+ </rich:tree>
+ </h:form>
+ <a4j:outputPanel ajaxRendered="true" layout="block">
+ <rich:panel header="Current Selection"
+ rendered="#{not empty treeBean.currentSelection}">
+ <h:outputText value="Name:" />
+ <h:outputText value="#{treeBean.currentSelection.name}" />
+ <h:panelGroup rendered="#{treeBean.currentSelection.leaf}">
+ <fieldset><legend>Details</legend> <h:panelGrid columnClasses="bold"
+ columns="2">
+ <h:outputText value="Country:" />
+ <h:outputText value="#{treeBean.currentSelection.company.country}" />
+ <h:outputText value="Company:" />
+ <h:outputText value="#{treeBean.currentSelection.company}" />
+ <h:outputText value="Artist:" />
+ <h:outputText value="#{treeBean.currentSelection.artist}" />
+ <h:outputText value="Price:" />
+ <h:outputText value="#{treeBean.currentSelection.price}">
+ <f:convertNumber type="currency" currencyCode="USD"/>
+ </h:outputText>
+ <h:outputText value="Year:" />
+ <h:outputText value="#{treeBean.currentSelection.year}" />
+ </h:panelGrid></fieldset>
+ </h:panelGroup>
+ </rich:panel>
+ </a4j:outputPanel>
+ </h:panelGrid>
</ui:composition>
\ No newline at end of file
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/webapp/richfaces/tree/tree.xhtml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -5,15 +5,17 @@
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition>
- <p><b>rich:tree</b> is a component that renders a tree control on the page. The
- most important tree features are:</p>
- <ul>
+ <p><b>rich:tree</b> is a component that renders a tree control on
+ the page. The most important tree features are:</p>
+ <ul>
<li>Native support for Ajax operations</li>
<li>Support for "ajax", "client" and "server" switch types</li>
<li>Selection capabilities</li>
<li>Flexible look</li>
</ul>
-
+ <p>This demo also provides simple selection handling sample. When
+ you will select some node its name will be shown. And when you will
+ select a leaf - full CD details will be populated.</p>
<ui:include src="#{demoNavigator.sampleIncludeURI}" />
<ui:include src="/templates/includes/source-view.xhtml">
<ui:param name="src" value="#{demoNavigator.sampleIncludeURI}" />
@@ -21,6 +23,37 @@
<ui:param name="openLabel" value="View Source" />
<ui:param name="hideLabel" value="Hide Source" />
</ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/tree/TreeBean.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View TreeBean.java" />
+ <ui:param name="hideLabel" value="Hide TreeBean.java" />
+ </ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/tree/model/Country.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View Country.java" />
+ <ui:param name="hideLabel" value="Hide Country.java" />
+ </ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/tree/model/Company.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View Company.java" />
+ <ui:param name="hideLabel" value="Hide Company.java" />
+ </ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/tree/model/CD.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View CD.java" />
+ <ui:param name="hideLabel" value="Hide CD.java" />
+ </ui:include>
+ <ui:include src="/templates/includes/source-view.xhtml">
+ <ui:param name="src" value="/WEB-INF/src/org/richfaces/demo/tree/model/NamedNode.java" />
+ <ui:param name="sourceType" value="java" />
+ <ui:param name="openLabel" value="View NamedNode.java" />
+ <ui:param name="hideLabel" value="Hide NamedNode.java" />
+ </ui:include>
+
</ui:composition>
</html>
\ No newline at end of file
Modified: branches/RF-9323/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js
===================================================================
--- branches/RF-9323/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js 2011-01-04 17:16:29 UTC (rev 20883)
@@ -60,6 +60,10 @@
},
accept: function(draggable) {
+ // since acceptedTypes is optional it could be null.
+ // In this case all types are accepted
+ if(!this.options.acceptedTypes) return true;
+
var accept;
var acceptType = draggable.data("type");
if(acceptType) {
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2011-01-04 17:16:29 UTC (rev 20883)
@@ -6,7 +6,6 @@
input.rf-au-inp {
border-width: 0px;
- background: none;
width: 100%;
}
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2011-01-04 17:16:29 UTC (rev 20883)
@@ -66,11 +66,6 @@
}
input.rf-insl-inp {
- background: url("#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']}") top repeat-x;
- background-color: '#{richSkin.controlBackgroundColor}';
- border-width: 1px;
- border-style: inset;
- border-color: '#{richSkin.panelBorderColor}';
margin: 0px 10px 0px 10px;
vertical-align: bottom;
}
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.js 2011-01-04 17:16:29 UTC (rev 20883)
@@ -68,6 +68,7 @@
var proxy = jQuery.proxy(this.__inputHandler, this);
this.input.change(proxy);
this.input.submit(proxy);
+ this.element.mousewheel(jQuery.proxy(this.__mousewheelHandler, this));
this.track.keydown(jQuery.proxy(this.__keydownHandler, this));
this.decreaseButton.mousedown(jQuery.proxy(this.__decreaseHandler, this));
this.increaseButton.mousedown(jQuery.proxy(this.__increaseHandler, this));
@@ -119,6 +120,16 @@
}
},
+ __mousewheelHandler: function (event, delta, deltaX, deltaY) {
+ delta = deltaX || deltaY;
+ if (delta > 0) {
+ this.increase(event);
+ } else if (delta < 0) {
+ this.decrease(event);
+ }
+ return false;
+ },
+
__keydownHandler: function (event) {
if (event.keyCode == 37) { //LEFT
this.__setValue(Number(this.input.val()) - this.step, event);
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSpinner.js 2011-01-04 17:16:29 UTC (rev 20883)
@@ -53,6 +53,7 @@
this.input.change(proxy);
this.input.submit(proxy);
this.input.submit(proxy);
+ this.input.mousewheel(jQuery.proxy(this.__mousewheelHandler, this));
this.input.keydown(jQuery.proxy(this.__keydownHandler, this));
this.decreaseButton.mousedown(jQuery.proxy(this.__decreaseHandler, this));
this.increaseButton.mousedown(jQuery.proxy(this.__increaseHandler, this));
@@ -123,6 +124,16 @@
}
},
+ __mousewheelHandler: function (event, delta, deltaX, deltaY) {
+ delta = deltaX || deltaY;
+ if (delta > 0) {
+ this.increase(event);
+ } else if (delta < 0) {
+ this.decrease(event);
+ }
+ return false;
+ },
+
__keydownHandler: function (event) {
if (event.keyCode == 40) { //DOWN
this.decrease(event);
Copied: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.mousewheel.js (from rev 20872, trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.mousewheel.js)
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.mousewheel.js (rev 0)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.mousewheel.js 2011-01-04 17:16:29 UTC (rev 20883)
@@ -0,0 +1,78 @@
+/*! Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net)
+ * Licensed under the MIT License (LICENSE.txt).
+ *
+ * Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
+ * Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
+ * Thanks to: Seamus Leahy for adding deltaX and deltaY
+ *
+ * Version: 3.0.4
+ *
+ * Requires: 1.2.2+
+ */
+
+(function($) {
+
+var types = ['DOMMouseScroll', 'mousewheel'];
+
+$.event.special.mousewheel = {
+ setup: function() {
+ if ( this.addEventListener ) {
+ for ( var i=types.length; i; ) {
+ this.addEventListener( types[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = handler;
+ }
+ },
+
+ teardown: function() {
+ if ( this.removeEventListener ) {
+ for ( var i=types.length; i; ) {
+ this.removeEventListener( types[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = null;
+ }
+ }
+};
+
+$.fn.extend({
+ mousewheel: function(fn) {
+ return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
+ },
+
+ unmousewheel: function(fn) {
+ return this.unbind("mousewheel", fn);
+ }
+});
+
+
+function handler(event) {
+ var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
+ event = $.event.fix(orgEvent);
+ event.type = "mousewheel";
+
+ // Old school scrollwheel delta
+ if ( event.wheelDelta ) { delta = event.wheelDelta/120; }
+ if ( event.detail ) { delta = -event.detail/3; }
+
+ // New school multidimensional scroll (touchpads) deltas
+ deltaY = delta;
+
+ // Gecko
+ if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
+ deltaY = 0;
+ deltaX = -1*delta;
+ }
+
+ // Webkit
+ if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
+ if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
+
+ // Add event and delta to the front of the arguments
+ args.unshift(event, delta, deltaX, deltaY);
+
+ return $.event.handle.apply(this, args);
+}
+
+})(jQuery);
\ No newline at end of file
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2011-01-04 17:16:29 UTC (rev 20883)
@@ -6,7 +6,6 @@
input.rf-sel-inp {
border-width: 0px;
- background: none;
width: 100%;
color: '#{richSkin.generalTextColor}';
font-size: '#{richSkin.generalSizeFont}';
Modified: branches/RF-9323/ui/input/ui/src/main/templates/inputnumberslider.template.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/input/ui/src/main/templates/inputnumberslider.template.xml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -34,6 +34,7 @@
<cdk:resource-dependency library="org.richfaces" name="inputNumberSlider.ecss" />
<cdk:resource-dependency library="org.richfaces" name="base-component.reslib" />
<cdk:resource-dependency name="jquery.position.js" />
+ <cdk:resource-dependency library="org.richfaces" name="jquery.mousewheel.js" />
<cdk:resource-dependency library="org.richfaces" name="inputNumberSlider.js" />
</cc:interface>
<cc:implementation>
Modified: branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -34,6 +34,7 @@
<cdk:resource-dependency library="org.richfaces" name="inputNumberSpinner.ecss" />
<cdk:resource-dependency library="org.richfaces" name="base-component.reslib" />
<cdk:resource-dependency name="jquery.position.js" />
+ <cdk:resource-dependency library="org.richfaces" name="jquery.mousewheel.js" />
<cdk:resource-dependency library="org.richfaces" name="inputNumberSpinner.js" />
</cc:interface>
<cc:implementation>
Modified: branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.ecss 2011-01-04 17:16:29 UTC (rev 20883)
@@ -110,20 +110,27 @@
}
.rf-edt-c, .rf-edt-hdr-c, .rf-edt-ftr-c {
- height: 20px;
- overflow: hidden;
+ overflow-x: hidden;
border-bottom: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
border-right: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
}
+.rf-edt-c {
+ height: 20px;
+ overflow: hidden;
+}
+
.rf-edt-ftr-c-emp {
border-right: '#{richSkin.tableBorderWidth} solid #{richSkin.tableBorderColor}';
height: 1px;
}
+.rf-edt-c-cnt {
+ white-space: nowrap;
+}
+
.rf-edt-c-cnt, .rf-edt-hdr-c-cnt, .rf-edt-ftr-c-cnt, .rf-edt-tbl-hdr, .rf-edt-tbl-ftr {
padding: 3px 7px;
- white-space: nowrap;
font-family: '#{richSkin.generalFamilyFont}';
font-size: '#{richSkin.generalSizeFont}';
}
Modified: branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2011-01-04 17:16:29 UTC (rev 20883)
@@ -160,6 +160,8 @@
this.widthInput = document.getElementById(id + ":wi");
this.selectionInput = document.getElementById(id + ":si");
this.header = jQuery(this.element).children(".rf-edt-hdr");
+ this.headerCells = this.header.find(".rf-edt-hdr-c");
+ this.footerCells = jQuery(this.element).children(".rf-edt-ftr").find(".rf-edt-ftr-c");
this.resizerHolders = this.header.find(".rf-edt-rsz-cntr");
this.frozenHeaderPartElement = document.getElementById(id + ":frozenHeader");
@@ -176,9 +178,8 @@
getColumnPosition: function(id) {
var position;
- var headers = this.header.find(".rf-edt-hdr-c");
- for (var i = 0; i < headers.length; i++) {
- if (id == headers[i].className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1]) {
+ for (var i = 0; i < this.headerCells.length; i++) {
+ if (id == this.headerCells[i].className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1]) {
position = i;
}
}
@@ -188,9 +189,8 @@
setColumnPosition: function(id, position) {
var colunmsOrder = "";
var before;
- var headers = this.header.find(".rf-edt-hdr-c");
- for (var i = 0; i < headers.length; i++) {
- var current = headers[i].className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
+ for (var i = 0; i < this.headerCells.length; i++) {
+ var current = this.headerCells[i].className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
if (i == position) {
if (before) {
colunmsOrder += current + "," + id + ",";
@@ -256,10 +256,26 @@
bindHeaderHandlers: function() {
this.header.find(".rf-edt-rsz").bind("mousedown", jQuery.proxy(this.beginResize, this));
- this.header.find(".rf-edt-hdr-c").bind("mousedown", jQuery.proxy(this.beginReorder, this));
+ this.headerCells.bind("mousedown", jQuery.proxy(this.beginReorder, this));
},
updateLayout: function() {
+ this.headerCells.height("auto");
+ var headerCellHeight = 0;
+ this.headerCells.each(function() {
+ if (this.clientHeight > headerCellHeight) {
+ headerCellHeight = this.clientHeight;
+ }
+ });
+ this.headerCells.height(headerCellHeight + "px");
+ this.footerCells.height("auto");
+ var footerCellHeight = 0;
+ this.footerCells.each(function() {
+ if (this.clientHeight > footerCellHeight) {
+ footerCellHeight = this.clientHeight;
+ }
+ });
+ this.footerCells.height(footerCellHeight + "px");
this.normalPartStyle.width = "auto";
var offsetWidth = this.frozenHeaderPartElement ? this.frozenHeaderPartElement.offsetWidth : 0;
var width = Math.max(0, this.element.clientWidth - offsetWidth);
@@ -288,7 +304,7 @@
}
el = el.nextSibling;
}
- if (this.bodyElement.offsetHeight > height) {
+ if (this.bodyElement.offsetHeight > height || !this.contentElement) {
this.bodyElement.style.height = height + "px";
}
},
@@ -406,7 +422,7 @@
if (!jQuery(event.currentTarget).is("a, img, :input")) {
this.idOfReorderingColumn = event.currentTarget.className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
jQuery(document).bind("mousemove", jQuery.proxy(this.reorder, this));
- this.header.find(".rf-edt-hdr-c").bind("mouseover", jQuery.proxy(this.overReorder, this));
+ this.headerCells.bind("mouseover", jQuery.proxy(this.overReorder, this));
jQuery(document).one("mouseup", jQuery.proxy(this.cancelReorder, this));
return false;
}
@@ -434,7 +450,7 @@
var id = event.currentTarget.className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
var colunmsOrder = "";
var _this = this;
- this.header.find(".rf-edt-hdr-c").each(function() {
+ this.headerCells.each(function() {
var i = this.className.match(new RegExp(WIDTH_CLASS_NAME_BASE + "([^\\W]*)"))[1];
if (i == id) {
colunmsOrder += _this.idOfReorderingColumn + "," + id + ",";
@@ -447,7 +463,7 @@
cancelReorder: function(event) {
jQuery(document).unbind("mousemove", this.reorder);
- this.header.find(".rf-edt-hdr-c").unbind("mouseover", this.overReorder);
+ this.headerCells.unbind("mouseover", this.overReorder);
this.reorderElement.style.display = "none";
},
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractDropDownMenu.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -37,12 +37,13 @@
@Attribute(defaultValue = "250")
public abstract int getPopupWith();
-// @Attribute(defaultValue = "auto")
-// public abstract String getJointPoint();
-//
-// @Attribute(defaultValue = "auto")
-// public abstract String getDirection();
+ //TODO is it correct or cdk issue
+ @Attribute(defaultValue = "org.richfaces.component.Positioning.DEFAULT")
+ public abstract Positioning getJointPoint();
+ @Attribute(defaultValue = "org.richfaces.component.Positioning.DEFAULT")
+ public abstract Positioning getDirection();
+
@Attribute(events = @EventName("groupshow"))
public abstract String getOngroupshow();
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -22,28 +22,22 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.component.AbstractCollapsiblePanel.States.collapsed;
-import static org.richfaces.component.AbstractCollapsiblePanel.States.expanded;
-import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.STYLE_ATTRIBUTE;
+import org.ajax4jsf.javascript.JSObject;
+import org.richfaces.component.AbstractCollapsiblePanel;
+import org.richfaces.component.AbstractTogglePanel;
+import org.richfaces.component.html.HtmlCollapsiblePanel;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
-import org.ajax4jsf.javascript.JSObject;
-import org.richfaces.component.AbstractCollapsiblePanel;
-import org.richfaces.component.AbstractTogglePanel;
-import org.richfaces.component.AbstractTogglePanelTitledItem;
+import static org.richfaces.renderkit.HtmlConstants.*;
/**
* @author akolonitsky
@@ -65,6 +59,28 @@
public static final String SWITCH = "switch";
public static final String BEFORE_SWITCH = "beforeswitch";
+ private final TableIconsRendererHelper headerRenderer = new TableIconsRendererHelper("header", "rf-cp", "rf-cp-ico-") {
+
+ protected void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ HtmlCollapsiblePanel panel = (HtmlCollapsiblePanel) component;
+
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", panel.isExpanded(),
+ panel.getLeftCollapsedIcon(), panel.getLeftExpandedIcon());
+ }
+
+ protected void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ HtmlCollapsiblePanel panel = (HtmlCollapsiblePanel) component;
+
+ //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", panel.isExpanded(),
+ panel.getRightCollapsedIcon(), panel.getRightExpandedIcon());
+ }
+ };
+
+ public TableIconsRendererHelper getHeaderRenderer() {
+ return headerRenderer;
+ }
+
@Override
protected void doDecode(FacesContext context, UIComponent component) {
AbstractTogglePanel panel = (AbstractTogglePanel) component;
@@ -126,31 +142,11 @@
writer.writeAttribute(ID_ATTRIBUTE, component.getClientId(context) + ":header", null);
writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses("rf-cp-hdr", attributeAsString(component, "headerClass")), null);
- AbstractCollapsiblePanel panel = (AbstractCollapsiblePanel) component;
- encodeHeader(context, component, writer, expanded, panel.isExpanded());
- encodeHeader(context, component, writer, collapsed, !panel.isExpanded());
+ headerRenderer.encodeHeader(writer, context, component);
writer.endElement(DIV_ELEM);
}
- private void encodeHeader(FacesContext context, UIComponent component, ResponseWriter responseWriter, AbstractCollapsiblePanel.States state, boolean isVisible) throws IOException {
- responseWriter.startElement(DIV_ELEM, component);
- responseWriter.writeAttribute(CLASS_ATTRIBUTE, "rf-cp-hdr-" + state.abbreviation(), null);
- responseWriter.writeAttribute(STYLE_ATTRIBUTE, concatStyles(styleElement("display", isVisible ? "" : "none"), attributeAsString(component, "headerClass")), null);
-
- UIComponent header = AbstractTogglePanelTitledItem.getHeaderFacet(component, state);
- if (header != null && header.isRendered()) {
- header.encodeAll(context);
- } else {
- String headerText = (String) component.getAttributes().get("header");
- if (headerText != null && headerText.length() > 0) {
- responseWriter.writeText(headerText, null);
- }
- }
-
- responseWriter.endElement(DIV_ELEM);
- }
-
@Override
protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component)
throws IOException {
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -23,39 +23,22 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.renderkit.HtmlConstants.ALT_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.IMG_ELEMENT;
-import static org.richfaces.renderkit.HtmlConstants.INPUT_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.INPUT_TYPE_HIDDEN;
-import static org.richfaces.renderkit.HtmlConstants.NAME_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.SRC_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.STYLE_ATTRIBUTE;
-import static org.richfaces.renderkit.HtmlConstants.TABLE_ELEMENT;
-import static org.richfaces.renderkit.HtmlConstants.TBODY_ELEMENT;
-import static org.richfaces.renderkit.HtmlConstants.TD_ELEM;
-import static org.richfaces.renderkit.HtmlConstants.TR_ELEMENT;
-import static org.richfaces.renderkit.HtmlConstants.TYPE_ATTR;
-import static org.richfaces.renderkit.HtmlConstants.VALUE_ATTRIBUTE;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
+import org.ajax4jsf.javascript.JSObject;
+import org.richfaces.component.AbstractPanelMenuGroup;
+import org.richfaces.component.AbstractPanelMenuItem;
+import org.richfaces.component.html.HtmlPanelMenuGroup;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
+import static org.richfaces.renderkit.HtmlConstants.*;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
-import org.ajax4jsf.javascript.JSObject;
-import org.richfaces.component.AbstractPanelMenuGroup;
-import org.richfaces.component.AbstractPanelMenuItem;
-import org.richfaces.component.html.HtmlPanelMenuGroup;
-import org.richfaces.renderkit.RenderKitUtils;
-
/**
* @author akolonitsky
* @since 2010-10-25
@@ -73,6 +56,36 @@
//TODO nick - shouldn't this be rf-pm-gr-top?
private static final String TOP_CSS_CLASS_PREFIX = "rf-pm-top-gr";
+ private static class HeaderRenderer extends TableIconsRendererHelper {
+
+ public HeaderRenderer(String cssClassPrefix) {
+ super("label", cssClassPrefix, "rf-pm-ico-");
+ }
+
+ protected void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ HtmlPanelMenuGroup group = (HtmlPanelMenuGroup) component;
+
+ String iconCollapsed = group.isDisabled() ? group.getIconLeftDisabled() : group.getIconLeftCollapsed();
+ String iconExpanded = group.isDisabled() ? group.getIconLeftDisabled() : group.getIconLeftExpanded();
+
+ encodeTdIcon(writer, context, cssClassPrefix + "-ico", group.isExpanded(), iconCollapsed, iconExpanded);
+ }
+
+ protected void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ HtmlPanelMenuGroup group = (HtmlPanelMenuGroup) component;
+
+ String iconCollapsed = group.isDisabled() ? group.getIconRightDisabled() : group.getIconRightCollapsed();
+ String iconExpanded = group.isDisabled() ? group.getIconRightDisabled() : group.getIconRightExpanded();
+
+ //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
+ encodeTdIcon(writer, context, cssClassPrefix + "-exp-ico", group.isExpanded(), iconCollapsed, iconExpanded);
+ }
+
+ }
+
+ private final TableIconsRendererHelper headerRenderer = new HeaderRenderer(CSS_CLASS_PREFIX);
+ private final TableIconsRendererHelper topHeaderRenderer = new HeaderRenderer(TOP_CSS_CLASS_PREFIX);
+
@Override
protected void doDecode(FacesContext context, UIComponent component) {
AbstractPanelMenuGroup menuGroup = (AbstractPanelMenuGroup) component;
@@ -120,105 +133,12 @@
writer.startElement(DIV_ELEM, null);
writer.writeAttribute(ID_ATTRIBUTE, menuGroup.getClientId(context) + ":hdr", null);
writer.writeAttribute(CLASS_ATTRIBUTE, getCssClass(menuGroup, "-hdr"), null);
- encodeHeaderGroup(writer, context, menuGroup, getCssClass(menuGroup, ""));
- writer.endElement(DIV_ELEM);
- }
- private void encodeHeaderGroup(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuItem, String classPrefix) throws IOException {
- writer.startElement(TABLE_ELEMENT, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix + "-gr", null);
- writer.startElement(TBODY_ELEMENT, null);
- writer.startElement(TR_ELEMENT, null);
+ (menuGroup.isTopItem() ? topHeaderRenderer : headerRenderer).encodeHeader(writer, context, menuGroup);
- encodeHeaderGroupIconLeft(writer, context, menuItem, classPrefix);
-
- writer.startElement(TD_ELEM, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix + "-lbl", null);
-
- UIComponent headerFacet = menuItem.getFacet("label");
- if (headerFacet != null && headerFacet.isRendered()) {
- headerFacet.encodeAll(context);
- } else {
- Object label = menuItem.getLabel();
- if (label != null && !label.equals("")) {
- writer.writeText(label, null);
- }
- }
-
- writer.endElement(TD_ELEM);
-
- encodeHeaderGroupIconRight(writer, context, menuItem, classPrefix);
-
- writer.endElement(TR_ELEMENT);
- writer.endElement(TBODY_ELEMENT);
- writer.endElement(TABLE_ELEMENT);
- }
-
- private void encodeHeaderGroupIconLeft(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuGroup, String classPrefix) throws IOException {
- String iconCollapsed = menuGroup.isDisabled() ? menuGroup.getIconLeftDisabled() : menuGroup.getIconLeftCollapsed();
- String iconExpanded = menuGroup.isDisabled() ? menuGroup.getIconLeftDisabled() : menuGroup.getIconLeftExpanded();
-
- encodeTdIcon(writer, context, classPrefix + "-ico", menuGroup.isExpanded(), iconCollapsed, iconExpanded);
- }
-
- private void encodeHeaderGroupIconRight(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuItem, String classPrefix) throws IOException {
- String iconCollapsed = menuItem.isDisabled() ? menuItem.getIconRightDisabled() : menuItem.getIconRightCollapsed();
- String iconExpanded = menuItem.isDisabled() ? menuItem.getIconRightDisabled() : menuItem.getIconRightExpanded();
-
- //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, classPrefix + "-exp-ico", menuItem.isExpanded(), iconCollapsed, iconExpanded);
- }
-
- private void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, boolean isExpanded, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
- writer.startElement(TD_ELEM, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
-
- encodeIdIcon(writer, context, isExpanded, attrIconCollapsedValue, "rf-pm-ico-colps");
- encodeIdIcon(writer, context, !isExpanded, attrIconExpandedValue, "rf-pm-ico-exp");
-
- writer.endElement(TD_ELEM);
- }
-
- private void encodeIdIcon(ResponseWriter writer, FacesContext context, boolean isExpanded, String attrIconValue, String styleClass) throws IOException {
- if (attrIconValue == null || attrIconValue.trim().length() <= 0) {
- encodeDivIcon(writer, isExpanded, PanelMenuIcons.none, styleClass);
- } else {
- PanelMenuIcons icon = getIcon(attrIconValue);
- if (icon != null) {
- encodeDivIcon(writer, isExpanded, icon, styleClass);
- } else {
- encodeImage(writer, context, attrIconValue);
- }
- }
- }
-
- private PanelMenuIcons getIcon(String attrIconCollapsedValue) {
- if (attrIconCollapsedValue == null) {
- return null;
- }
-
- try {
- return PanelMenuIcons.valueOf(attrIconCollapsedValue);
- } catch (IllegalArgumentException e) {
- return null;
- }
- }
-
- private void encodeDivIcon(ResponseWriter writer, boolean isDisplay, PanelMenuIcons icon, String styleClass) throws IOException {
- writer.startElement(DIV_ELEM, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, icon.cssClass()), null);
- writer.writeAttribute(STYLE_ATTRIBUTE, styleElement("display", isDisplay ? "none" : "block"), null);
writer.endElement(DIV_ELEM);
}
- private void encodeImage(ResponseWriter writer, FacesContext context, String attrIconValue) throws IOException {
- writer.startElement(IMG_ELEMENT, null);
- writer.writeAttribute(ALT_ATTRIBUTE, "", null);
- writer.writeURIAttribute(SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null);
- writer.endElement(IMG_ELEMENT);
- }
-
-
public String getCssClass(AbstractPanelMenuItem item, String postfix) {
return (item.isTopItem() ? TOP_CSS_CLASS_PREFIX : CSS_CLASS_PREFIX) + postfix;
}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -1,6 +1,5 @@
package org.richfaces.renderkit.html;
-import org.richfaces.component.html.HtmlPanelMenuGroup;
import org.richfaces.renderkit.RenderKitUtils;
import javax.faces.component.UIComponent;
@@ -12,64 +11,67 @@
import static org.richfaces.renderkit.HtmlConstants.*;
import static org.richfaces.renderkit.html.DivPanelRenderer.styleElement;
-public class TableIconsRendererHelper {
+public abstract class TableIconsRendererHelper {
- public void encodeHeaderGroup(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuItem, String classPrefix) throws IOException {
+ protected final String text;
+ protected final String cssClassPrefix;
+ protected final String cssIconsClassPrefix;
+
+ public TableIconsRendererHelper(String text, String cssClassPrefix, String cssIconsClassPrefix) {
+ this.text = text;
+ this.cssClassPrefix = cssClassPrefix;
+ this.cssIconsClassPrefix = cssIconsClassPrefix;
+ }
+
+ public void encodeHeader(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
writer.startElement(TABLE_ELEMENT, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix + "-gr", null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, cssClassPrefix + "-gr", null);
writer.startElement(TBODY_ELEMENT, null);
writer.startElement(TR_ELEMENT, null);
- encodeHeaderGroupIconLeft(writer, context, menuItem, classPrefix);
+ encodeHeaderIconLeft(writer, context, component);
+ encodeHeaderText(writer, context, component);
+ encodeHeaderIconRight(writer, context, component);
+ writer.endElement(TR_ELEMENT);
+ writer.endElement(TBODY_ELEMENT);
+ writer.endElement(TABLE_ELEMENT);
+ }
+
+ private void encodeHeaderText(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
writer.startElement(TD_ELEM, null);
- writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix + "-lbl", null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, cssClassPrefix + "-lbl", null);
+ encodeHeaderTextValue(writer, context, component);
+ writer.endElement(TD_ELEM);
+ }
- UIComponent headerFacet = menuItem.getFacet("label");
+ protected void encodeHeaderTextValue(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
+ UIComponent headerFacet = component.getFacet(text);
if (headerFacet != null && headerFacet.isRendered()) {
headerFacet.encodeAll(context);
} else {
- Object label = menuItem.getLabel();
+ Object label = component.getAttributes().get(text);
if (label != null && !label.equals("")) {
writer.writeText(label, null);
}
}
-
- writer.endElement(TD_ELEM);
-
- encodeHeaderGroupIconRight(writer, context, menuItem, classPrefix);
-
- writer.endElement(TR_ELEMENT);
- writer.endElement(TBODY_ELEMENT);
- writer.endElement(TABLE_ELEMENT);
}
- public void encodeHeaderGroupIconLeft(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuGroup, String classPrefix) throws IOException {
- String iconCollapsed = menuGroup.isDisabled() ? menuGroup.getIconLeftDisabled() : menuGroup.getIconLeftCollapsed();
- String iconExpanded = menuGroup.isDisabled() ? menuGroup.getIconLeftDisabled() : menuGroup.getIconLeftExpanded();
+ protected abstract void encodeHeaderIconLeft(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException;
- encodeTdIcon(writer, context, classPrefix + "-ico", menuGroup.isExpanded(), iconCollapsed, iconExpanded);
- }
+ protected abstract void encodeHeaderIconRight(ResponseWriter writer, FacesContext context, UIComponent menuItem) throws IOException;
- public void encodeHeaderGroupIconRight(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuItem, String classPrefix) throws IOException {
- String iconCollapsed = menuItem.isDisabled() ? menuItem.getIconRightDisabled() : menuItem.getIconRightCollapsed();
- String iconExpanded = menuItem.isDisabled() ? menuItem.getIconRightDisabled() : menuItem.getIconRightExpanded();
-
- //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
- encodeTdIcon(writer, context, classPrefix + "-exp-ico", menuItem.isExpanded(), iconCollapsed, iconExpanded);
- }
-
- public void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, boolean isExpanded, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
+ protected void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, boolean isExpanded, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
writer.startElement(TD_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
- encodeIdIcon(writer, context, isExpanded, attrIconCollapsedValue, "rf-pm-ico-colps");
- encodeIdIcon(writer, context, !isExpanded, attrIconExpandedValue, "rf-pm-ico-exp");
+ encodeIdIcon(writer, context, isExpanded, attrIconCollapsedValue, cssIconsClassPrefix + "colps");
+ encodeIdIcon(writer, context, !isExpanded, attrIconExpandedValue, cssIconsClassPrefix + "exp");
writer.endElement(TD_ELEM);
}
- public void encodeIdIcon(ResponseWriter writer, FacesContext context, boolean isExpanded, String attrIconValue, String styleClass) throws IOException {
+ protected void encodeIdIcon(ResponseWriter writer, FacesContext context, boolean isExpanded, String attrIconValue, String styleClass) throws IOException {
if (attrIconValue == null || attrIconValue.trim().length() <= 0) {
encodeDivIcon(writer, isExpanded, PanelMenuIcons.none, styleClass);
} else {
@@ -82,7 +84,7 @@
}
}
- public PanelMenuIcons getIcon(String attrIconCollapsedValue) {
+ protected PanelMenuIcons getIcon(String attrIconCollapsedValue) {
if (attrIconCollapsedValue == null) {
return null;
}
@@ -94,19 +96,17 @@
}
}
- public void encodeDivIcon(ResponseWriter writer, boolean isDisplay, PanelMenuIcons icon, String styleClass) throws IOException {
+ public static void encodeDivIcon(ResponseWriter writer, boolean isDisplay, PanelMenuIcons icon, String styleClass) throws IOException {
writer.startElement(DIV_ELEM, null);
writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, icon.cssClass()), null);
writer.writeAttribute(STYLE_ATTRIBUTE, styleElement("display", isDisplay ? "none" : "block"), null);
writer.endElement(DIV_ELEM);
}
- public void encodeImage(ResponseWriter writer, FacesContext context, String attrIconValue) throws IOException {
+ public static void encodeImage(ResponseWriter writer, FacesContext context, String attrIconValue) throws IOException {
writer.startElement(IMG_ELEMENT, null);
writer.writeAttribute(ALT_ATTRIBUTE, "", null);
writer.writeURIAttribute(SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null);
writer.endElement(IMG_ELEMENT);
}
-
-
}
Modified: branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2011-01-04 17:16:29 UTC (rev 20883)
@@ -43,7 +43,7 @@
this.selectedGroup = null;
rf.Event.bindById(this.id, this.options.showEvent, $.proxy(
this.___showHandler, this), this);
- rf.Event.bindById(this.id, "mouseover", $.proxy(this.__overHandler,
+ rf.Event.bindById(this.id, "mouseenter", $.proxy(this.__overHandler,
this), this);
rf.Event.bindById(this.id, "mouseleave", $.proxy(this.__leaveHandler,
this), this);
@@ -87,10 +87,10 @@
submitForm : function(item) {
var form = this.__getParentForm(item);
if (this.options.mode == "server") {
- // rf.submitForm(form, {selectedMenuItem: item.id});
+ rf.submitForm(form, {selectedMenuItem: item.id});
}
if (this.options.mode == "ajax") {
- // rf.ajax(item.id);
+ rf.ajax(item.id);
}
},
@@ -102,6 +102,11 @@
this.hide();
}
},
+
+ activateItem : function(menuItemId){
+ var item=$(RichFaces.getDomElement(menuItemId));
+ this.processItem(item);
+ },
selectItem : function(item) {
// if(item.attr('id') && !this.isDisabled(item)){
@@ -124,14 +129,14 @@
},
show: function() {
- this.menuManager.shutdownMenu();
+ this.menuManager.shutdownMenu();
+ this.menuManager.addMenuId(this.id);
this.__showPopup();
- this.menuManager.addMenuId(this.id);
},
hide: function() {
+ this.__hidePopup();
this.menuManager.deletedMenuId();
- this.__hidePopup();
},
__showPopup : function() {
Modified: branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2011-01-04 17:16:29 UTC (rev 20883)
@@ -76,11 +76,10 @@
font-family : '#{richSkin.generalFamilyFont}';
font-size : '#{richSkin.generalSizeFont}';
}
-.rf-pp-hndlr {
- opacity:0;
- filter: 'alpha(opacity=0)';
+.rf-pp-hndlr {
+ background-image: url("#{resource['spacer.gif']}");
position : absolute;
- margin : -4px;
+ margin : -4px;
}
.rf-pp-hndlr-l {
Modified: branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss 2011-01-04 17:16:29 UTC (rev 20883)
@@ -21,8 +21,6 @@
.rf-tb-sep {
padding:0 10px;
text-align:center;
- background-repeat:no-repeat;
- background-position:center center;
height: 100%;
}
Modified: branches/RF-9323/ui/output/ui/src/main/templates/dropdownmenu.template.xml
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-04 14:06:25 UTC (rev 20882)
+++ branches/RF-9323/ui/output/ui/src/main/templates/dropdownmenu.template.xml 2011-01-04 17:16:29 UTC (rev 20883)
@@ -47,8 +47,11 @@
</div>
</div>
</div>
+
<script type="text/javascript">
<cdk:scriptObject name="options">
+ <cdk:call expression='addToScriptHash(options, "direction", ((org.richfaces.component.Positioning)component.getAttributes().get("direction")).getValue())' />
+ <cdk:call expression='addToScriptHash(options, "jointPoint", ((org.richfaces.component.Positioning)component.getAttributes().get("jointPoint")).getValue())' />
<cdk:scriptOption attributes="hideDelay showDelay popupWith mode" />
<cdk:scriptOption attributes="onshow onhide ongroupshow ongrouphide onitemclick" wrapper="eventHandler"/>
</cdk:scriptObject>
Copied: branches/RF-9323/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java (from rev 20872, trunk/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java)
===================================================================
--- branches/RF-9323/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java (rev 0)
+++ branches/RF-9323/ui/output/ui/src/test/java/org/richfaces/renderkit/html/CollapsiblePanelRendererTest.java 2011-01-04 17:16:29 UTC (rev 20883)
@@ -0,0 +1,14 @@
+package org.richfaces.renderkit.html;
+
+import org.junit.Test;
+import org.xml.sax.SAXException;
+
+import java.io.IOException;
+
+public class CollapsiblePanelRendererTest extends RendererTestBase {
+
+ @Test
+ public void testEmpty() throws IOException, SAXException {
+// doTest("panelMenuGroup", "f:panelMenuGroup");
+ }
+}
12 years, 4 months
JBoss Rich Faces SVN: r20882 - modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 09:06:25 -0500 (Tue, 04 Jan 2011)
New Revision: 20882
Modified:
modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java
modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java
Log:
partially reverting patch - fixed sample for calendar with data model (r20767, ppitonak(a)redhat.com)
Modified: modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java
===================================================================
--- modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java 2011-01-04 13:51:34 UTC (rev 20881)
+++ modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModel.java 2011-01-04 14:06:25 UTC (rev 20882)
@@ -79,9 +79,4 @@
return modelItems;
}
-
- @Override
- public Object getToolTip(Date date) {
- return null;
- }
}
Modified: modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java
===================================================================
--- modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java 2011-01-04 13:51:34 UTC (rev 20881)
+++ modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/application/src/main/java/org/richfaces/tests/metamer/model/CalendarModelItem.java 2011-01-04 14:06:25 UTC (rev 20882)
@@ -49,20 +49,4 @@
public String getStyleClass() {
return styleClass;
}
-
- public Object getData() {
- return null;
- }
-
- public boolean hasToolTip() {
- return false;
- }
-
- public Object getToolTip() {
- return null;
- }
-
- public int getDay() {
- return 0;
- }
}
12 years, 5 months
JBoss Rich Faces SVN: r20881 - in modules/tests/metamer/trunk: application and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 08:51:34 -0500 (Tue, 04 Jan 2011)
New Revision: 20881
Modified:
modules/tests/metamer/trunk/application/pom.xml
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-01-04 13:51:19 UTC (rev 20880)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-01-04 13:51:34 UTC (rev 20881)
@@ -19,7 +19,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0.20110104-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:51:19 UTC (rev 20880)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:51:34 UTC (rev 20881)
@@ -30,14 +30,14 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-ftest</artifactId>
- <version>4.0.0.20110104-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<name>Metamer: RichFaces Testing Application - Functional Test</name>
<packaging>pom</packaging>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/ta...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/tags/...</developerConnection>
- <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/tags/meta...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/tr...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/trunk...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/trunk/ftest</url>
</scm>
<licenses>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:51:19 UTC (rev 20880)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:51:34 UTC (rev 20881)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0.20110104-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-01-04 13:51:19 UTC (rev 20880)
+++ modules/tests/metamer/trunk/pom.xml 2011-01-04 13:51:34 UTC (rev 20881)
@@ -31,7 +31,7 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0.20110104-M5</version>
+ <version>4.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>Metamer: RichFaces Testing Application - Project Root</name>
@@ -50,9 +50,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/ta...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/tags/...</developerConnection>
- <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/tags/meta...</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/trunk</url>
</scm>
<distributionManagement>
12 years, 5 months
JBoss Rich Faces SVN: r20880 - modules/tests/metamer/tags.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 08:51:19 -0500 (Tue, 04 Jan 2011)
New Revision: 20880
Added:
modules/tests/metamer/tags/metamer-4.0.0.20110104-M5/
Log:
[maven-scm] copy for tag metamer-4.0.0.20110104-M5
Copied: modules/tests/metamer/tags/metamer-4.0.0.20110104-M5 (from rev 20879, modules/tests/metamer/trunk)
12 years, 5 months
JBoss Rich Faces SVN: r20879 - in modules/tests/metamer/trunk: application and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 08:50:58 -0500 (Tue, 04 Jan 2011)
New Revision: 20879
Modified:
modules/tests/metamer/trunk/application/pom.xml
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
[maven-release-plugin] prepare release metamer-4.0.0.20110104-M5
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-01-04 13:46:14 UTC (rev 20878)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-01-04 13:50:58 UTC (rev 20879)
@@ -19,7 +19,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110104-M5</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:46:14 UTC (rev 20878)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:50:58 UTC (rev 20879)
@@ -30,14 +30,14 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-ftest</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110104-M5</version>
<name>Metamer: RichFaces Testing Application - Functional Test</name>
<packaging>pom</packaging>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/tr...</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/trunk...</developerConnection>
- <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/trunk/ftest</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/ta...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/tags/...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/tags/meta...</url>
</scm>
<licenses>
@@ -80,8 +80,8 @@
<properties>
<context.path>/metamer/</context.path>
<deployable.classifier>mojarra</deployable.classifier>
- <deployable.version>4.0.0-SNAPSHOT</deployable.version>
- <ftest.source.version>4.0.0-SNAPSHOT</ftest.source.version>
+ <deployable.version>4.0.0.20110104-M5</deployable.version>
+ <ftest.source.version>4.0.0.20110104-M5</ftest.source.version>
<testng.suite.xml>src/test/resources/testng.xml</testng.suite.xml>
<container.home>target/installs/${container.dir.deflatted}/${container.dir.unflatted}</container.home>
<jsf.config>Mojarra-2.0</jsf.config>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:46:14 UTC (rev 20878)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:50:58 UTC (rev 20879)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110104-M5</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-01-04 13:46:14 UTC (rev 20878)
+++ modules/tests/metamer/trunk/pom.xml 2011-01-04 13:50:58 UTC (rev 20879)
@@ -31,7 +31,7 @@
<groupId>org.richfaces.tests</groupId>
<artifactId>metamer-root</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20110104-M5</version>
<packaging>pom</packaging>
<name>Metamer: RichFaces Testing Application - Project Root</name>
@@ -50,9 +50,9 @@
</licenses>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/trunk</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/richfaces/modules/tests/metamer/ta...</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/richfaces/modules/tests/metamer/tags/...</developerConnection>
+ <url>http://fisheye.jboss.org/browse/RichFaces/modules/tests/metamer/tags/meta...</url>
</scm>
<distributionManagement>
12 years, 5 months
JBoss Rich Faces SVN: r20878 - in modules/tests/metamer/trunk: ftest and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 08:46:14 -0500 (Tue, 04 Jan 2011)
New Revision: 20878
Modified:
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
applying release versions: richfaces:4.0.0.20101226-M5, richfaces-selenium:1.5.2.SP3
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:37:47 UTC (rev 20877)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:46:14 UTC (rev 20878)
@@ -25,7 +25,7 @@
<parent>
<artifactId>functional-test-jboss-ci-template</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.3-SNAPSHOT</version>
+ <version>1.5.2.SP3</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:37:47 UTC (rev 20877)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:46:14 UTC (rev 20878)
@@ -37,7 +37,7 @@
<dependency>
<artifactId>root</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.3-SNAPSHOT</version>
+ <version>1.5.2.SP3</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-01-04 13:37:47 UTC (rev 20877)
+++ modules/tests/metamer/trunk/pom.xml 2011-01-04 13:46:14 UTC (rev 20878)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.richfaces.examples</groupId>
<artifactId>richfaces-example-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>4.0.0.20101226-M5</version>
</parent>
<groupId>org.richfaces.tests</groupId>
@@ -124,7 +124,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<richfaces.checkstyle.version>2</richfaces.checkstyle.version>
- <version.richfaces>4.0.0-SNAPSHOT</version.richfaces>
+ <version.richfaces>4.0.0.20101226-M5</version.richfaces>
</properties>
<dependencyManagement>
12 years, 5 months
JBoss Rich Faces SVN: r20877 - modules/tests/metamer/trunk/application.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 08:37:47 -0500 (Tue, 04 Jan 2011)
New Revision: 20877
Modified:
modules/tests/metamer/trunk/application/pom.xml
Log:
removed validation-api dependency from metamer
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-01-04 13:29:32 UTC (rev 20876)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-01-04 13:37:47 UTC (rev 20877)
@@ -67,11 +67,6 @@
<groupId>org.richfaces.cdk</groupId>
<artifactId>annotations</artifactId>
</dependency>
-
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- </dependency>
<dependency>
<groupId>javax.servlet</groupId>
@@ -304,7 +299,7 @@
<artifactId>maven-war-plugin</artifactId>
<configuration>
<classifier>jee6</classifier>
- <packagingExcludes>WEB-INF/lib/jsf-api-*,WEB-INF/lib/jsf-impl-*,WEB-INF/lib/myfaces-api-*,WEB-INF/lib/myfaces-impl-*,WEB-INF/lib/validation-api-*</packagingExcludes>
+ <packagingExcludes>WEB-INF/lib/jsf-api-*,WEB-INF/lib/jsf-impl-*,WEB-INF/lib/myfaces-api-*,WEB-INF/lib/myfaces-impl-*</packagingExcludes>
</configuration>
<executions>
<execution>
@@ -335,7 +330,7 @@
</goals>
<configuration>
<classifier>jee6-bundled-mojarra</classifier>
- <packagingExcludes>WEB-INF/lib/myfaces-api-*,WEB-INF/lib/myfaces-impl-*,WEB-INF/lib/validation-api-*</packagingExcludes>
+ <packagingExcludes>WEB-INF/lib/myfaces-api-*,WEB-INF/lib/myfaces-impl-*</packagingExcludes>
</configuration>
</execution>
</executions>
@@ -359,7 +354,7 @@
</goals>
<configuration>
<classifier>jee6-bundled-myfaces</classifier>
- <packagingExcludes>WEB-INF/lib/jsf-api-*,WEB-INF/lib/jsf-impl-*,WEB-INF/lib/validation-api-*</packagingExcludes>
+ <packagingExcludes>WEB-INF/lib/jsf-api-*,WEB-INF/lib/jsf-impl-*</packagingExcludes>
</configuration>
</execution>
</executions>
@@ -556,11 +551,6 @@
<artifactId>jsf-impl</artifactId>
<scope>provided</scope>
</dependency>
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <scope>provided</scope>
- </dependency>
</dependencies>
</profile>
</profiles>
12 years, 5 months
JBoss Rich Faces SVN: r20876 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richInplaceInput and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-01-04 08:29:32 -0500 (Tue, 04 Jan 2011)
New Revision: 20876
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
Log:
* added issue tracking info
* fixed testEnableManualInput in rich:select
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-01-04 13:20:04 UTC (rev 20875)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCalendar/TestRichCalendarAttributes.java 2011-01-04 13:29:32 UTC (rev 20876)
@@ -277,7 +277,7 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-9837")
+ @IssueTracking("https://issues.jboss.org/browse/RF-9837 https://issues.jboss.org/browse/RF-10085")
public void testDefaultTime() {
selenium.type(pjq("input[type=text][id$=defaultTimeInput]"), "21:24");
selenium.waitForPageToLoad();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-01-04 13:20:04 UTC (rev 20875)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richInplaceInput/TestRichInplaceInput.java 2011-01-04 13:29:32 UTC (rev 20876)
@@ -179,6 +179,7 @@
}
@Test
+ @IssueTracking("https://issues.jboss.org/browse/RF-10044")
public void testOnchange() {
selenium.type(pjq("input[type=text][id$=onchangeInput]"), "metamerEvents += \"change \"");
selenium.waitForPageToLoad();
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-04 13:20:04 UTC (rev 20875)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richSelect/TestRichSelect.java 2011-01-04 13:29:32 UTC (rev 20876)
@@ -179,6 +179,7 @@
selenium.click(options.format(10));
selenium.fireEvent(input, Event.BLUR);
+ selenium.fireEvent(input, Event.BLUR); // blur has to be fired twice for Firefox - just Selenium hack
assertTrue(selenium.belongsClass(options.format(10), "rf-sel-sel"));
waitGui.failWith("Bean was not updated").until(textEquals.locator(output).text("Hawaii"));
12 years, 5 months
JBoss Rich Faces SVN: r20875 - in modules/tests/metamer/trunk: ftest-source and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 08:20:04 -0500 (Tue, 04 Jan 2011)
New Revision: 20875
Modified:
modules/tests/metamer/trunk/ftest-source/pom.xml
modules/tests/metamer/trunk/ftest/pom.xml
Log:
tied richfaces-selenium version back to 1.5.3-SNAPSHOT
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:14:16 UTC (rev 20874)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:20:04 UTC (rev 20875)
@@ -25,7 +25,7 @@
<parent>
<artifactId>functional-test-jboss-ci-template</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.2.SP3</version>
+ <version>1.5.3-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.tests</groupId>
Modified: modules/tests/metamer/trunk/ftest-source/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:14:16 UTC (rev 20874)
+++ modules/tests/metamer/trunk/ftest-source/pom.xml 2011-01-04 13:20:04 UTC (rev 20875)
@@ -37,7 +37,7 @@
<dependency>
<artifactId>root</artifactId>
<groupId>org.jboss.test.richfaces-selenium</groupId>
- <version>1.5.2.SP3</version>
+ <version>1.5.3-SNAPSHOT</version>
<scope>import</scope>
<type>pom</type>
</dependency>
12 years, 5 months
JBoss Rich Faces SVN: r20874 - modules/tests/metamer/trunk/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-01-04 08:14:16 -0500 (Tue, 04 Jan 2011)
New Revision: 20874
Modified:
modules/tests/metamer/trunk/ftest/pom.xml
Log:
tweaked pom.xml to test jboss6x with myfaces with correct profile redefinition
Modified: modules/tests/metamer/trunk/ftest/pom.xml
===================================================================
--- modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 12:52:34 UTC (rev 20873)
+++ modules/tests/metamer/trunk/ftest/pom.xml 2011-01-04 13:14:16 UTC (rev 20874)
@@ -84,6 +84,7 @@
<ftest.source.version>4.0.0-SNAPSHOT</ftest.source.version>
<testng.suite.xml>src/test/resources/testng.xml</testng.suite.xml>
<container.home>target/installs/${container.dir.deflatted}/${container.dir.unflatted}</container.home>
+ <jsf.config>Mojarra-2.0</jsf.config>
</properties>
<repositories>
@@ -388,14 +389,12 @@
<id>jboss6x-snapshot-mojarra</id>
<properties>
<deployable.classifier>jee6</deployable.classifier>
- <jsf.config>Mojarra-2.0</jsf.config>
</properties>
</profile>
<profile>
<id>jboss6x-snapshot-mojarra_2_1_0</id>
<properties>
<deployable.classifier>mojarra_2_1_0</deployable.classifier>
- <jsf.config>Mojarra-2.0</jsf.config>
</properties>
</profile>
<profile>
@@ -406,6 +405,41 @@
</properties>
</profile>
<profile>
+ <id>jboss6x-rewrite-default-jsf-config</id>
+ <activation>
+ <property>
+ <name>containerId</name>
+ <value>jboss6x</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>com.google.code.maven-replacer-plugin</groupId>
+ <artifactId>maven-replacer-plugin</artifactId>
+ <version>1.3.2</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>replace</goal>
+ </goals>
+ <configuration>
+ <file>${container.home}/server/${container.configuration}/deployers/jsf.deployer/META-INF/jsf-integration-deployer-jboss-beans.xml</file>
+ <regex>true</regex>
+ <regexFlags>
+ <regexFlag>MULTILINE</regexFlag>
+ </regexFlags>
+ <token><property name="defaultJSFConfig">\s*<value>[a-zA-Z0-9\.\-]+</value></token>
+ <value><property name="defaultJSFConfig"><value>${jsf.config}</value></value>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>jboss6x-snapshot-rewrite-default-jsf-config</id>
<activation>
<property>
12 years, 5 months