JBoss Rich Faces SVN: r2026 - in trunk: samples/rich-message-demo and 5 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-02 14:53:10 -0400 (Thu, 02 Aug 2007)
New Revision: 2026
Added:
trunk/samples/rich-message-demo/
trunk/ui/message/
Removed:
trunk/sandbox/samples/rich-message-demo/
trunk/sandbox/ui/message/
Modified:
trunk/samples/pom.xml
trunk/samples/rich-message-demo/pom.xml
trunk/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml
trunk/sandbox/samples/pom.xml
trunk/sandbox/ui/pom.xml
trunk/ui/message/pom.xml
trunk/ui/pom.xml
Log:
message moved from sandbox to head
Modified: trunk/samples/pom.xml
===================================================================
--- trunk/samples/pom.xml 2007-08-02 17:50:54 UTC (rev 2025)
+++ trunk/samples/pom.xml 2007-08-02 18:53:10 UTC (rev 2026)
@@ -443,5 +443,6 @@
<module>ajaxPortlet</module>
-->
<module>panelmenu-sample</module>
+ <module>rich-message-demo</module>
</modules>
</project>
\ No newline at end of file
Copied: trunk/samples/rich-message-demo (from rev 2025, trunk/sandbox/samples/rich-message-demo)
Modified: trunk/samples/rich-message-demo/pom.xml
===================================================================
--- trunk/sandbox/samples/rich-message-demo/pom.xml 2007-08-02 17:50:54 UTC (rev 2025)
+++ trunk/samples/rich-message-demo/pom.xml 2007-08-02 18:53:10 UTC (rev 2026)
@@ -1,7 +1,7 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>samples</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
+ <groupId>org.richfaces</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -11,7 +11,7 @@
<name>rich-message-demo</name>
<dependencies>
<dependency>
- <groupId>org.richfaces.sandbox.ui</groupId>
+ <groupId>org.richfaces.ui</groupId>
<artifactId>message</artifactId>
<version>3.1.0-SNAPSHOT</version>
</dependency>
@@ -27,19 +27,4 @@
</dependency>
</dependencies>
- <build>
-
- <finalName>rich-message-demo</finalName>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
</project>
\ No newline at end of file
Modified: trunk/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml
===================================================================
--- trunk/sandbox/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml 2007-08-02 17:50:54 UTC (rev 2025)
+++ trunk/samples/rich-message-demo/src/main/webapp/pages/message-demo.xhtml 2007-08-02 18:53:10 UTC (rev 2026)
@@ -3,7 +3,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:r="http://labs.jboss.com/jbossrichfaces/ui/ui/message"
+ xmlns:r="http://labs.jboss.com/jbossrichfaces/ui/message"
xmlns:a4j="http://richfaces.org/a4j">
<head>
<link rel="stylesheet" type="text/css" href="/rich-message-demo/css/app.css" />
Modified: trunk/sandbox/samples/pom.xml
===================================================================
--- trunk/sandbox/samples/pom.xml 2007-08-02 17:50:54 UTC (rev 2025)
+++ trunk/sandbox/samples/pom.xml 2007-08-02 18:53:10 UTC (rev 2026)
@@ -16,6 +16,5 @@
<module>scrollable-grid-demo</module>
<module>panel2-sample</module>
<module>simpleTogglePanel2-sample</module>
- <module>rich-message-demo </module>
</modules>
</project>
\ No newline at end of file
Modified: trunk/sandbox/ui/pom.xml
===================================================================
--- trunk/sandbox/ui/pom.xml 2007-08-02 17:50:54 UTC (rev 2025)
+++ trunk/sandbox/ui/pom.xml 2007-08-02 18:53:10 UTC (rev 2026)
@@ -15,6 +15,5 @@
<module>panel2</module>
<module>scrollable-grid</module>
<module>simpleTogglePanel2</module>
- <module>message</module>
</modules>
</project>
\ No newline at end of file
Copied: trunk/ui/message (from rev 2025, trunk/sandbox/ui/message)
Modified: trunk/ui/message/pom.xml
===================================================================
--- trunk/sandbox/ui/message/pom.xml 2007-08-02 17:50:54 UTC (rev 2025)
+++ trunk/ui/message/pom.xml 2007-08-02 18:53:10 UTC (rev 2026)
@@ -1,11 +1,11 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>ui</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
+ <groupId>org.richfaces</groupId>
<version>3.1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox.ui</groupId>
+ <groupId>org.richfaces.ui</groupId>
<artifactId>message</artifactId>
<name>Message</name>
<build>
Modified: trunk/ui/pom.xml
===================================================================
--- trunk/ui/pom.xml 2007-08-02 17:50:54 UTC (rev 2025)
+++ trunk/ui/pom.xml 2007-08-02 18:53:10 UTC (rev 2026)
@@ -83,6 +83,7 @@
<module>panelmenu</module>
<module>calendar</module>
<module>treeModel</module>
+ <module>message</module>
</modules>
<dependencies>
<dependency>
17 years, 5 months
JBoss Rich Faces SVN: r2024 - trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-08-02 13:34:13 -0400 (Thu, 02 Aug 2007)
New Revision: 2024
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
Log:
commented out cell renderer for FF
Modified: trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-08-02 16:33:17 UTC (rev 2023)
+++ trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/common/utils/Utils.js 2007-08-02 17:34:13 UTC (rev 2024)
@@ -1,7 +1,5 @@
var Utils = {
- xmlns: new RegExp("xmlns=\"http://www.w3.org/1999/xhtml\"", 'g'),
-
DOM: {
copyAttributes : function(target, source, opts) {
@@ -65,7 +63,7 @@
Utils.DOM._clearAttributes(target);
Utils.DOM.copyAttributes(target, src);
- var tdSrc, tdNode, subNode;
+ /*var tdSrc, tdNode, subNode;
var childs = src.childNodes;
var ccount = childs.length;
var tcount = target.childNodes.length;
@@ -87,8 +85,8 @@
innerHTML.push(tdSrc?tdSrc.innerHTML:"");
innerHTML.push("</td>");
}
-
- target.innerHTML = innerHTML.join("");
+ */
+ target.innerHTML = src.innerHTML;//nnerHTML.join("");
return target;
}
}
17 years, 5 months
JBoss Rich Faces SVN: r2023 - trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2007-08-02 12:33:17 -0400 (Thu, 02 Aug 2007)
New Revision: 2023
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
Log:
now cell styles are updated correctly
Modified: trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-08-02 16:32:19 UTC (rev 2022)
+++ trunk/sandbox/ui/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ScrollableGridBaseRenderer.java 2007-08-02 16:33:17 UTC (rev 2023)
@@ -250,42 +250,6 @@
};
- private final ColumnVisitor ajaxCellRenderer = new ExtendedColumnVisitor(){
-
- public void renderContent(FacesContext context, UIScrollableGridColumn column, ResponseWriter writer, GridRendererState state) throws IOException {
- String cell_id = state.getRowIndex()+ "_" + state.getCellIndex();
-
- if (log.isTraceEnabled()) {
- log.trace("cell_index: " + cell_id);
- }
-
- String client_id = state.getClientId();
- int cell_index = state.getCellIndex();
-
-// ComponentVariables variables = ComponentsVariableResolver.getVariables(cellTemplate, column);
-// variables.setVariable("cell_id",cell_id);
-// variables.setVariable("client_id", client_id);
-// variables.setVariable("cell_index", new Integer(cell_index));
-// variables.setVariable("columnClass", state.getColumnClass(cell_index));
-
- UIScrollableGrid grid = state.getGrid();
- writer.startElement("td", grid);
- writer.startElement("div", grid);
- getUtils().writeAttribute(writer, "class", "dr-sgrid-bcbody1");
- writer.startElement("div", grid);
- getUtils().writeAttribute(writer, "class", "dr-sgrid-bcbody");
- String divId = client_id + ":bc_" + cell_id;
- getUtils().writeAttribute(writer, "id", divId);
- if(!state.isFake()) {
- renderChildren(context, column);
- }
- writer.endElement("div");
- writer.endElement("div");
- writer.endElement("td");
-
- }
- };
-
private final DataVisitor rowsRenderer = new DataVisitor(){
public void process(FacesContext context, Object rowKey, Object argument) throws IOException {
@@ -398,7 +362,7 @@
}
UIScrollableGridColumn column = (UIScrollableGridColumn)kid;
- columnsCount += ajaxCellRenderer.visit(context, column, writer, state);
+ columnsCount += cellRenderer.visit(context, column, writer, state);
// columnsCount += cellRenderer.visit(context, column, writer, state);
state.nextCell();
@@ -775,12 +739,12 @@
private boolean onlyPartialUpdateNeeded(UIComponent grid) {
Boolean b = (Boolean) grid.getAttributes().get(PARTIAL_UPDATE);
- return b != null && b.booleanValue();
+ return b != null && b.booleanValue() && AjaxContext.getCurrentInstance().isAjaxRequest();
}
private boolean shouldUpdateHeader(UIComponent grid) {
- Boolean b = (Boolean) grid.getAttributes().get(PARTIAL_UPDATE);
- return b != null && b.booleanValue();
+ Boolean b = (Boolean) grid.getAttributes().get(UPDATE_HEADER);
+ return b != null && b.booleanValue() && AjaxContext.getCurrentInstance().isAjaxRequest();
}
public void encodeChildren(FacesContext context, UIComponent component
17 years, 5 months
JBoss Rich Faces SVN: r2022 - trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-08-02 12:32:19 -0400 (Thu, 02 Aug 2007)
New Revision: 2022
Modified:
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
Log:
RF-297
Modified: trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-08-02 16:29:00 UTC (rev 2021)
+++ trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-08-02 16:32:19 UTC (rev 2022)
@@ -743,16 +743,23 @@
},
showRow: function(rowIndex) {
- var row = $(this.gridId + ":f:" + rowIndex);
- var offsetTop = this.fTable.offsetTop + row.offsetTop;
- if(this.frozenContentBox.getElement().scrollTop > offsetTop) {
- this.setScrollPos(offsetTop);
+ if(rowIndex == "up") {
+ this.scrollBox.getElement().scrollTop = this.scrollBox.getElement().scrollTop - this.fTable.rows[1].offsetTop;
+ } else if(rowIndex == "down") {
+ this.scrollBox.getElement().scrollTop = this.scrollBox.getElement().scrollTop + this.fTable.rows[1].offsetTop;
} else {
- offsetTop += row.offsetHeight;
- offsetTop -= this.frozenContentBox.getElement().clientHeight;
- if (this.frozenContentBox.getElement().scrollTop < offsetTop){
- this.setScrollPos(offsetTop);
+ var row = $(this.gridId + ":f:" + rowIndex);
+ var offsetTop = this.fTable.offsetTop + row.offsetTop;
+ if(this.frozenContentBox.getElement().scrollTop > offsetTop) {
+ this.scrollBox.getElement().scrollTop = offsetTop;
+ } else {
+ offsetTop += row.offsetHeight;
+ offsetTop -= this.frozenContentBox.getElement().clientHeight;
+ if (this.frozenContentBox.getElement().scrollTop < offsetTop){
+ this.scrollBox.getElement().scrollTop = offsetTop;
+ }
}
}
+ this.scrollBox.updateScrollPos();
}
});
Modified: trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js
===================================================================
--- trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-08-02 16:29:00 UTC (rev 2021)
+++ trunk/sandbox/ui/scrollable-grid/src/main/javascript/ClientUI/controls/grid/Selection.js 2007-08-02 16:32:19 UTC (rev 2022)
@@ -326,55 +326,56 @@
var range, rowIndex;
var activeRow = this.activeRow;
var noDefault = false;
+ this.firstIndex = Number($(this.prefix + ":f").rows[0].id.split(this.prefix)[1].split(":")[2]);;
switch (event.keyCode || event.charCode) {
case Event.KEY_UP:
- if (this.inFocus && activeRow) {
- if(activeRow) {
- rowIndex = activeRow - 1;
+ if (this.inFocus && activeRow != null) {
+ if(this.firstIndex != activeRow) {
+ rowIndex = (this.rowCount + activeRow - 1) % this.rowCount;
+ if (!event.ctrlKey && !event.shiftKey) {
+ this.selectionFlag = "x";
+ range = [rowIndex, rowIndex];
+ this.setSelection(range);
+ } else if (!event.ctrlKey && event.shiftKey) {
+ if(!this.shiftRow) {
+ this.shiftRow = this.activeRow;
+ }
+ if(this.shiftRow >= this.activeRow) {
+ this.addRowToSelection(rowIndex);
+ } else {
+ this.removeRowFromSelection(activeRow);
+ }
+ }
+ noDefault = true;
+ this.setActiveRow(rowIndex);
} else {
- rowIndex = this.rowCount - 1;
+ this.grid.getBody().showRow("up");
}
- if (!event.ctrlKey && !event.shiftKey) {
- this.selectionFlag = "x";
- range = [rowIndex, rowIndex];
- this.setSelection(range);
- } else if (!event.ctrlKey && event.shiftKey) {
- if(!this.shiftRow) {
- this.shiftRow = this.activeRow;
- }
- if(this.shiftRow >= this.activeRow) {
- this.addRowToSelection(rowIndex);
- } else {
- this.removeRowFromSelection(activeRow);
- }
- }
- noDefault = true;
- this.setActiveRow(rowIndex);
}
break;
case Event.KEY_DOWN:
if (this.inFocus && activeRow != null) {
- if(activeRow == this.rowCount - 1) {
- rowIndex = 0;
+ rowIndex = (activeRow + 1) % this.rowCount;
+ if(this.firstIndex != rowIndex) {
+ if (!event.ctrlKey && !event.shiftKey) {
+ this.selectionFlag = "x";
+ range = [rowIndex, rowIndex];
+ this.setSelection(range);
+ } else if (!event.ctrlKey && event.shiftKey) {
+ if(!this.shiftRow) {
+ this.shiftRow = this.activeRow;
+ }
+ if(this.shiftRow <= this.activeRow) {
+ this.addRowToSelection(rowIndex);
+ } else {
+ this.removeRowFromSelection(activeRow);
+ }
+ }
+ noDefault = true;
+ this.setActiveRow(rowIndex);
} else {
- rowIndex = activeRow + 1;
+ this.grid.getBody().showRow("down");
}
- if (!event.ctrlKey && !event.shiftKey) {
- this.selectionFlag = "x";
- range = [rowIndex, rowIndex];
- this.setSelection(range);
- } else if (!event.ctrlKey && event.shiftKey) {
- if(!this.shiftRow) {
- this.shiftRow = this.activeRow;
- }
- if(this.shiftRow <= this.activeRow) {
- this.addRowToSelection(rowIndex);
- } else {
- this.removeRowFromSelection(activeRow);
- }
- }
- noDefault = true;
- this.setActiveRow(rowIndex);
}
break;
case 65: case 97: // Ctrl-A
17 years, 5 months
JBoss Rich Faces SVN: r2021 - trunk/framework/api/src/main/java/org/richfaces/model.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-02 12:29:00 -0400 (Thu, 02 Aug 2007)
New Revision: 2021
Modified:
trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java
Log:
StackingTreeModel API: models map changed to getModelById() & getModelsIterator()
UIRecursiveTreeNodes updated to comply changes
Modified: trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java 2007-08-02 16:28:54 UTC (rev 2020)
+++ trunk/framework/api/src/main/java/org/richfaces/model/StackingTreeModel.java 2007-08-02 16:29:00 UTC (rev 2021)
@@ -103,7 +103,7 @@
return this;
} else {
Key key = (Key) keyIterator.next();
- StackingTreeModel stackingTreeModel = (StackingTreeModel) this.getModels().get(key.modelId);
+ StackingTreeModel stackingTreeModel = this.getModelById(key.modelId);
if (entriesIterator != null && entriesIterator.hasNext()) {
StackEntry entry = (StackEntry) entriesIterator.next();
if (entry.model != stackingTreeModel || entry.modelKey != key.modelKey) {
@@ -199,8 +199,7 @@
}
StackEntry lastEntry = (StackEntry) stackEntries.getLast();
- Collection values = lastEntry.model.getModels().values();
- for (Iterator iterator = values.iterator(); iterator.hasNext();) {
+ for (Iterator iterator = lastEntry.model.getModelsIterator(); iterator.hasNext();) {
StackingTreeModel stackingTreeModel = (StackingTreeModel) iterator.next();
if (!stackingTreeModel.isEmpty()) {
@@ -238,10 +237,9 @@
new Visitor1(dataVisitor));
if (treeRange == null || treeRange.processChildren(argumentKey)) {
- Iterator iterator = StackingTreeModel.this.getModels().entrySet().iterator();
+ Iterator iterator = this.getModelsIterator();
while (iterator.hasNext()) {
- Map.Entry entry = (Map.Entry) iterator.next();
- StackingTreeModel model = (StackingTreeModel) entry.getValue();
+ StackingTreeModel model = (StackingTreeModel) iterator.next();
Argument argument2 = new Argument();
argument2.listRowKey = argumentKey;
@@ -260,10 +258,14 @@
}
}
- public Map getModels() {
- return models;
+ public StackingTreeModel getModelById(String id) {
+ return (StackingTreeModel) models.get(id);
}
-
+
+ public Iterator getModelsIterator() {
+ return models.values().iterator();
+ }
+
public void walk(FacesContext context, DataVisitor dataVisitor,
Range range, Object rowKey, Object argument,
boolean last) throws IOException {
17 years, 5 months
JBoss Rich Faces SVN: r2020 - trunk/ui/treeModel/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-02 12:28:54 -0400 (Thu, 02 Aug 2007)
New Revision: 2020
Modified:
trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java
Log:
StackingTreeModel API: models map changed to getModelById() & getModelsIterator()
UIRecursiveTreeNodes updated to comply changes
Modified: trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java
===================================================================
--- trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java 2007-08-02 16:11:32 UTC (rev 2019)
+++ trunk/ui/treeModel/src/main/java/org/richfaces/component/UIRecursiveTreeNodes.java 2007-08-02 16:28:54 UTC (rev 2020)
@@ -4,10 +4,11 @@
package org.richfaces.component;
-import java.util.Map;
+import java.util.Iterator;
import javax.faces.context.FacesContext;
+import org.apache.commons.collections.iterators.IteratorChain;
import org.richfaces.model.StackingTreeModel;
import org.richfaces.model.StackingTreeModelDataProvider;
@@ -48,9 +49,22 @@
componentSelected(UIRecursiveTreeNodes.this);
}
- public Map getModels() {
- return this.getParent().getModels();
+ public StackingTreeModel getModelById(String id) {
+ StackingTreeModel model = super.getModelById(id);
+ if (model == null) {
+ model = this.getParent().getModelById(id);
+ }
+
+ return model;
}
+
+ public Iterator getModelsIterator() {
+ IteratorChain chain = new IteratorChain();
+ chain.addIterator(super.getModelsIterator());
+ chain.addIterator(this.getParent().getModelsIterator());
+
+ return chain;
+ }
};
stackingModel.addStackingModel(recursiveModel);
17 years, 5 months
JBoss Rich Faces SVN: r2019 - in trunk/ui/modal-panel/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-08-02 12:11:32 -0400 (Thu, 02 Aug 2007)
New Revision: 2019
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-533
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2007-08-02 16:10:00 UTC (rev 2018)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2007-08-02 16:11:32 UTC (rev 2019)
@@ -44,6 +44,12 @@
height: 20px;
/*position: absolute;*/
}
+
+ .dr-mpnl-pnl-a {
+ position: absolute;
+ left: -32000px;
+ }
+
</f:verbatim>
<u:selector name=".dr-mpnl-spacer, .dr-mpnl-resizer">
Modified: trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-08-02 16:10:00 UTC (rev 2018)
+++ trunk/ui/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-08-02 16:11:32 UTC (rev 2019)
@@ -76,7 +76,7 @@
<div style="position: absolute; overflow: hidden; z-index: 2;"
class="dr-mpnl-pnl" id="#{clientId}ContentDiv">
- <a href="#" style="position: absolute; left: -32000" id="#{clientId}FirstHref" >_</a>
+ <a href="#" class="dr-mpnl-pnl-a" id="#{clientId}FirstHref" >_</a>
<table style="height: 100%; width: 100%;" border="0" cellpadding="0" cellspacing="0">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("header")!=null && component.getFacet("header").isRendered()) {]]>
@@ -107,7 +107,7 @@
<f:call name="renderChildren" />
</vcp:body>
<f:clientid var="clientId"/>
- <a href="#" style="position: absolute; left: -32001" id="#{clientId}LastHref" >_</a>
+ <a href="#" class="dr-mpnl-pnl-a" id="#{clientId}LastHref" >_</a>
</td>
</tr>
</table>
17 years, 5 months
JBoss Rich Faces SVN: r2018 - trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-08-02 12:10:00 -0400 (Thu, 02 Aug 2007)
New Revision: 2018
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java
Log:
richfaces-demo made compileable
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java 2007-08-02 15:47:18 UTC (rev 2017)
+++ trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/ajaxSamples/rsBean.java 2007-08-02 16:10:00 UTC (rev 2018)
@@ -24,7 +24,7 @@
this.addent2 = addent2;
}
public String doSum() {
- sum = addent1 + addent2;
+ sum = new Integer((addent1 != null ? addent1.intValue() : 0) + (addent2 != null ? addent2.intValue() : 0));
return null;
}
17 years, 5 months
JBoss Rich Faces SVN: r2017 - in trunk/ui/calendar: src/main/config/component and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-08-02 11:47:18 -0400 (Thu, 02 Aug 2007)
New Revision: 2017
Modified:
trunk/ui/calendar/
trunk/ui/calendar/src/main/config/component/calendar.xml
trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
trunk/ui/calendar/src/test/java/org/richfaces/component/CurrentDateEventTest.java
Log:
added test for updateCurrentDate and broadcast methods.
added tags for auto test generation.
Property changes on: trunk/ui/calendar
___________________________________________________________________
Name: svn:ignore
- .settings
target
.classpath
.project
bin
+ .settings
target
.classpath
.project
bin
.clover
Modified: trunk/ui/calendar/src/main/config/component/calendar.xml
===================================================================
--- trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-02 15:43:11 UTC (rev 2016)
+++ trunk/ui/calendar/src/main/config/component/calendar.xml 2007-08-02 15:47:18 UTC (rev 2017)
@@ -6,6 +6,10 @@
<family>org.richfaces.Calendar</family>
<classname>org.richfaces.component.html.HtmlCalendar</classname>
<superclass>org.richfaces.component.UICalendar</superclass>
+ <test>
+ <classname>org.richfaces.component.html.HtmlCalendarTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
<description>
<![CDATA[
]]>
@@ -20,6 +24,11 @@
<superclass>
org.ajax4jsf.webapp.taglib.HtmlComponentTagBase
</superclass>
+
+ <test>
+ <classname>org.richfaces.component.html.HtmlCalendarTest</classname>
+ <superclassname>org.ajax4jsf.tests.AbstractAjax4JsfTestCase</superclassname>
+ </test>
</tag>
<!--
<taghandler>
Modified: trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java
===================================================================
--- trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2007-08-02 15:43:11 UTC (rev 2016)
+++ trunk/ui/calendar/src/test/java/org/richfaces/component/CalendarComponentTest.java 2007-08-02 15:47:18 UTC (rev 2017)
@@ -10,6 +10,7 @@
import java.util.List;
import java.util.Locale;
import java.util.Set;
+import java.util.TimeZone;
import javax.faces.component.UIComponent;
import javax.faces.component.html.HtmlForm;
@@ -17,10 +18,12 @@
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.lang.StringUtils;
+import com.gargoylesoftware.htmlunit.html.HtmlButton;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlInput;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.html.HtmlScript;
+import com.gargoylesoftware.htmlunit.html.HtmlSpan;
/**
* @author Nick Belaevski - mailto:nbelaevski@exadel.com created 08.06.2007
@@ -54,16 +57,22 @@
form = new HtmlForm();
form.setId("form");
facesContext.getViewRoot().getChildren().add(form);
-
- calendar = (UICalendar) application
- .createComponent(UICalendar.COMPONENT_TYPE);
- calendar.setLocale(Locale.CHINESE);
+ calendar = (UICalendar) application.createComponent(UICalendar.COMPONENT_TYPE);
+ calendar.setLocale(Locale.UK);
calendar.setDatePattern("d/MM/yyyy");
+ calendar.setTimeZone(TimeZone.getTimeZone("Europe/London"));
+ /*String[] strarr = TimeZone.getAvailableIDs();
+ for(int i=0; i < strarr.length; i++){
+ System.out.println(strarr[i]);
+ } */
+ calendar.setButtonLabel("PopUp");
+ calendar.setPopup(true);
Calendar calendarObject = Calendar.getInstance();
- calendarObject.set(2001, Calendar.SEPTEMBER, 11);
+ calendarObject.set(2001, Calendar.SEPTEMBER, 11,1,1,1);
calendar.setId("calendar");
-
+ calendar.setSubmittedValue(calendarObject.getTime());
form.getChildren().add(calendar);
+
}
@@ -140,24 +149,43 @@
public void testCalendarRenderer() throws Exception {
+/* UIViewRoot root = facesContext.getViewRoot();
+ root.processDecodes(facesContext);
+ root.processValidators(facesContext);
+ root.processUpdates(facesContext);
+ root.processApplication(facesContext);
+*/
HtmlPage page = renderView();
assertNotNull(page);
- // System.out.println(page.asXml());
+ //System.out.println(page.asXml());
+
HtmlElement htmlCalendar = page.getHtmlElementById(calendar.getClientId(facesContext));
assertNotNull(htmlCalendar);
- System.out.println(htmlCalendar.getAttributeValue("datePattern"));
- //System.out.println(htmlCalendar.getAttributeValue("class"));
-
- htmlCalendar.getAttributeValue("class");
- HtmlInput htmlCalendarInput = (HtmlInput) page.getHtmlElementById(calendar.getClientId(facesContext)+"PopupInput");
- HtmlElement htmlCalendarButton = page.getHtmlElementById(calendar.getClientId(facesContext)+"PopupButton");
+
+ HtmlInput htmlCalendarInput = (HtmlInput) page.getHtmlElementById(calendar.getClientId(facesContext)+"InputDate");
+ HtmlButton htmlCalendarButton = (HtmlButton) page.getHtmlElementById(calendar.getClientId(facesContext)+"PopupButton");
+ HtmlSpan htmlCalendarSpan =(HtmlSpan) page.getHtmlElementById(calendar.getClientId(facesContext)+"Popup");
assertNotNull(htmlCalendarInput);
assertNotNull(htmlCalendarButton);
- htmlCalendarInput.setValueAttribute("11/09/2001");
- // assertTrue(htmlCalendarInput.getAttributeValue("class").contains("org.richfaces.component.html.HtmlCalendar"));
- // assertTrue(htmlCalendarButton.getAttributeValue("class").contains("org.richfaces.component.html.HtmlCalendar"));
+ assertNotNull(htmlCalendarSpan);
+
+ assertEquals("10/09/2001", htmlCalendarInput.getValueAttribute());
+
}
+
+ public void testCalendarDecode() throws Exception{
+
+ calendar.decode(facesContext);
+ assertEquals("Tue Sep 11 01:01:01 EEST 2001", calendar.getSubmittedValue().toString());
+ Calendar calendarObject = Calendar.getInstance();
+ calendarObject.set(2002, Calendar.SEPTEMBER, 11,1,1,1);
+ calendar.updateCurrentDate(facesContext, calendarObject.getTime());
+ assertEquals("Wed Sep 11 01:01:01 EEST 2002", calendar.getCurrentDate().toString());
+ //assertEquals("11/09/2001", htmlCalendarInput.getValueAttribute());
+
+ }
+
public void testCalendarStyles() throws Exception {
HtmlPage page = renderView();
assertNotNull(page);
@@ -177,6 +205,18 @@
for (Iterator it = scripts.iterator(); it.hasNext();) {
HtmlScript item = (HtmlScript) it.next();
String srcAttr = item.getSrcAttribute();
+ if(item.getFirstChild()!=null ){
+ String scriptBodyString = item.getFirstChild().toString();
+ if(scriptBodyString.contains("new Calendar")){
+
+ assertTrue(scriptBodyString.contains("datePattern"));
+ assertTrue(scriptBodyString.contains("d/MM/yyyy"));
+ assertTrue(scriptBodyString.contains("selectedDate"));
+ assertTrue(scriptBodyString.contains("Date(2001,8,11)"));
+ assertTrue(scriptBodyString.contains("popup: true"));
+
+ }
+ }
if (StringUtils.isNotBlank(srcAttr)) {
boolean found = false;
Modified: trunk/ui/calendar/src/test/java/org/richfaces/component/CurrentDateEventTest.java
===================================================================
--- trunk/ui/calendar/src/test/java/org/richfaces/component/CurrentDateEventTest.java 2007-08-02 15:43:11 UTC (rev 2016)
+++ trunk/ui/calendar/src/test/java/org/richfaces/component/CurrentDateEventTest.java 2007-08-02 15:47:18 UTC (rev 2017)
@@ -23,6 +23,7 @@
import java.util.Calendar;
+import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
/**
@@ -32,6 +33,8 @@
private CurrentDateChangeEvent event1;
private CurrentDateChangeEvent event2;
+ private CurrentDateChangeEvent event4;
+ private AjaxEvent event3;
private UICalendar calendar;
private Calendar cal;
@@ -51,11 +54,13 @@
super.setUp();
calendar = (UICalendar) application.createComponent(UICalendar.COMPONENT_TYPE);;
- event1 = new CurrentDateChangeEvent (calendar, "09/11/2001");
+ event1 = new CurrentDateChangeEvent (calendar, "11/2001");
cal = Calendar.getInstance();
- cal.set(2001, 8, 11);
+ cal.set(2001, 10, 9);
event2 = new CurrentDateChangeEvent (calendar, cal.getTime());
- }
+ event4 = new CurrentDateChangeEvent (calendar, "");
+ event3 = new AjaxEvent(calendar);
+ }
/* (non-Javadoc)
* @see org.ajax4jsf.tests.AbstractAjax4JsfTestCase#tearDown()
@@ -69,8 +74,15 @@
public void testEvent() throws Exception {
assertEquals(cal.getTime(), event2.getCurrentDate());
- assertEquals("09/11/2001", event1.getCurrentDateString());
+ assertEquals("11/2001", event1.getCurrentDateString());
}
-
+ public void testBrodcastEvent() throws Exception{
+
+ calendar.broadcast(event1);
+ calendar.broadcast(event3);
+ calendar.broadcast(event4);
+ // calendar.broadcast(event2);
+
+ }
}
17 years, 5 months
JBoss Rich Faces SVN: r2016 - trunk/docs/userguide/en/src/main/resources/images.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-08-02 11:43:11 -0400 (Thu, 02 Aug 2007)
New Revision: 2016
Added:
trunk/docs/userguide/en/src/main/resources/images/panelmenu.png
trunk/docs/userguide/en/src/main/resources/images/panelmenu1.png
Log:
http://jira.jboss.com/jira/browse/RF-445
Added: trunk/docs/userguide/en/src/main/resources/images/panelmenu.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/panelmenu.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/docs/userguide/en/src/main/resources/images/panelmenu1.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/userguide/en/src/main/resources/images/panelmenu1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 5 months