JBoss Rich Faces SVN: r1379 - trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-28 15:01:12 -0400 (Thu, 28 Jun 2007)
New Revision: 1379
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
Some improvements for RF-46.
Modified: trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-06-28 18:28:14 UTC (rev 1378)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-06-28 19:01:12 UTC (rev 1379)
@@ -164,6 +164,9 @@
this.eventFirstOnfocus = this.firstOnfocus.bindAsEventListener(this);
this.eventLastOnfocus = this.lastOnfocus.bindAsEventListener(this);
+
+ this.firstHref = $(this.markerId.id + "FirstHref");
+ this.lastHref = $(this.markerId.id + "LastHref");
},
destroy: function() {
@@ -263,93 +266,77 @@
},
firstOnfocus: function(event) {
- var firstHref = $(this.markerId.id + "FirstHref");
- if (firstHref) {
- firstHref.focus();
+ if (this.firstHref) {
+ this.firstHref.focus();
}
},
lastOnfocus: function(event) {
- var lastHref = $(this.markerId.id + "LastHref");
- if (lastHref) {
- lastHref.focus();
+ if (this.lastHref) {
+ this.lastHref.focus();
}
},
- isInModalPanel: function(input) {
- var element = $(input);
- if (!element)
- return false;
- while (element && element.tagName && element.tagName.toLowerCase != "body") {
- if (element == this.cdiv)
- return true;
- element = element.parentNode;
+ processAllFocusElements: function(root) {
+ if (root.focus &&
+ // Many not visible elements have focus method, we is had to avoid processing them.
+ /^a|input|select|button|textarea$/i.test(root.tagName) &&
+ !root.disabled && !/^hidden$/.test(root.type) &&
+ !/^none$/.test(root.style.display)) {
+ this.execute(root);
+ } else {
+ if (root == this.cdiv)
+ this.inModalPanel = true;
+ var child = root.firstChild;
+ while (child) {
+ this.processAllFocusElements(child);
+ child = child.nextSibling;
+ }
+ if (root == this.cdiv)
+ this.inModalPanel = false;
}
- return false;
},
- processTabindexes: function(inputs) {
- if (!inputs || !inputs.length)
- return ;
- for (var i = 0; i < inputs.length; i++) {
- if (!this.isInModalPanel(inputs[i])) {
- if (!this.firstOutside)
- this.firstOutside = inputs[i];
- this.lastOutside = inputs[i];
- if (inputs[i].tabIndex) {
- inputs[i].prevTabIndex = inputs[i].tabIndex;
- }
- inputs[i].tabIndex = null;
- if (inputs[i].accesskey) {
- inputs[i].prevAccesskey = inputs[i].accesskey;
- }
- inputs[i].accesskey = undefined;
+ processTabindexes: function(input) {
+ if (!this.inModalPanel) {
+ if (!this.firstOutside)
+ this.firstOutside = input;
+ this.lastOutside = input;
+ if (input.tabIndex) {
+ input.prevTabIndex = input.tabIndex;
}
+ input.tabIndex = undefined;
+ if (input.accesskey) {
+ input.prevAccesskey = input.accesskey;
+ }
+ input.accesskey = undefined;
}
},
- restoreTabindexes: function(inputs) {
- if (!inputs || !inputs.length)
- return;
- for (var i = 0; i < inputs.length; i++) {
- if (!this.isInModalPanel(inputs[i])) {
- inputs[i].tabIndex = inputs[i].prevTabIndex;
- inputs[i].accesskey = inputs[i].prevAccesskey;
- }
+ restoreTabindexes: function(input) {
+ if (!this.inModalPanel) {
+ if (input.prevTabIndex)
+ input.tabIndex = input.prevTabIndex;
+ if (input.prevAccesskey)
+ input.accesskey = input.prevAccesskey;
}
},
preventFocus: function() {
- var inputs = document.getElementsByTagName("input");
- this.processTabindexes(inputs);
- var selects = document.getElementsByTagName("select");
- this.processTabindexes(selects);
- var buttons = document.getElementsByTagName("button");
- this.processTabindexes(buttons);
- var hrefs = document.getElementsByTagName("a");
- this.processTabindexes(hrefs);
- var texts = document.getElementsByTagName("textarea");
- this.processTabindexes(texts);
+ this.execute = this.processTabindexes;
+ this.processAllFocusElements(document);
if (this.firstOutside) {
Event.observe(this.firstOutside, "focus", this.eventFirstOnfocus);
}
- if (this.lastOutside) {
+ if (this.lastOutside && this.lastOutside != this.firstOutside) {
Event.observe(this.lastOutside, "focus", this.eventLastOnfocus);
}
},
restoreFocus: function() {
- var inputs = document.getElementsByTagName("input");
- this.restoreTabindexes(inputs);
- var selects = document.getElementsByTagName("select");
- this.restoreTabindexes(selects);
- var buttons = document.getElementsByTagName("button");
- this.restoreTabindexes(buttons);
- var hrefs = document.getElementsByTagName("a");
- this.restoreTabindexes(hrefs);
- var texts = document.getElementsByTagName("textarea");
- this.restoreTabindexes(texts);
+ this.execute = this.restoreTabindexes;
+ this.processAllFocusElements(document);
if (this.firstOutside) {
Event.stopObserving(this.firstOutside, "focus", this.eventFirstOnfocus);
17 years, 6 months
JBoss Rich Faces SVN: r1378 - in trunk/richfaces-samples/richfaces-demo: src/main/webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-06-28 14:28:14 -0400 (Thu, 28 Jun 2007)
New Revision: 1378
Modified:
trunk/richfaces-samples/richfaces-demo/pom.xml
trunk/richfaces-samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
trunk/richfaces-samples/richfaces-demo/src/main/webapp/templates/main.xhtml
Log:
Switch demo to use FastFilter
Modified: trunk/richfaces-samples/richfaces-demo/pom.xml
===================================================================
--- trunk/richfaces-samples/richfaces-demo/pom.xml 2007-06-28 18:11:33 UTC (rev 1377)
+++ trunk/richfaces-samples/richfaces-demo/pom.xml 2007-06-28 18:28:14 UTC (rev 1378)
@@ -26,6 +26,12 @@
<version>1.0</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ <version>0.9.5</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
<finalName>richfaces-demo</finalName>
Modified: trunk/richfaces-samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/richfaces-samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2007-06-28 18:11:33 UTC (rev 1377)
+++ trunk/richfaces-samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2007-06-28 18:28:14 UTC (rev 1378)
@@ -42,7 +42,7 @@
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
- <filter-class>org.ajax4jsf.Filter</filter-class>
+ <filter-class>org.ajax4jsf.FastFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>
Modified: trunk/richfaces-samples/richfaces-demo/src/main/webapp/templates/main.xhtml
===================================================================
--- trunk/richfaces-samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2007-06-28 18:11:33 UTC (rev 1377)
+++ trunk/richfaces-samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2007-06-28 18:28:14 UTC (rev 1378)
@@ -47,8 +47,7 @@
</tr>
</tbody>
</table>
-
-
+ <a4j:log hotkey="M"/>
</body>
</html>
<!--
17 years, 6 months
JBoss Rich Faces SVN: r1377 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-28 14:11:33 -0400 (Thu, 28 Jun 2007)
New Revision: 1377
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
Log:
Add restoreScrollState method
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-28 17:37:19 UTC (rev 1376)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/ScrollableGrid.js 2007-06-28 18:11:33 UTC (rev 1377)
@@ -138,6 +138,18 @@
this.getBody().hideColumn(index, frozen);
if(this.getFooter()) {this.getFooter().hideColumn(index, frozen);}
this.updateLayout();
+ },
+
+ restoreScrollState: function(state, start, end) {
+ this.getBody().scrollBox.getElement().scrollTop = state.pos;
+ this.getBody().currentPos = state.pos;
+ this.getBody().setScrollPos(state.pos);
+ this.getBody().currRange.start == start;
+ this.getBody().currRange.end = end;
+ },
+
+ getScrollPos: function() {
+ return this.getBody().currentPos;
}
});
17 years, 6 months
JBoss Rich Faces SVN: r1376 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-28 13:37:19 -0400 (Thu, 28 Jun 2007)
New Revision: 1376
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
Log:
Fix broken sort event
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-28 17:11:59 UTC (rev 1375)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2007-06-28 17:37:19 UTC (rev 1376)
@@ -418,12 +418,14 @@
for(var i = 0, len = this.getColumns().length; i < len; i++) {
var h = this.getColumns()[i];
- if(i != index) {
- Element.setStyle(h.sortDesc, {display: 'none'});
- Element.setStyle(h.sortAsc, {display: 'none'});
- } else{
- Element.setStyle(h.sortDesc, {display: (dir == 'desc' ? 'block' : 'none')});
- Element.setStyle(h.sortAsc, {display: (dir == 'asc' ? 'block' : 'none')});
+ if(h.sortDesc && h.sortAsc) {
+ if(i != index) {
+ Element.setStyle(h.sortDesc, {display: 'none'});
+ Element.setStyle(h.sortAsc, {display: 'none'});
+ } else{
+ Element.setStyle(h.sortDesc, {display: (dir == 'desc' ? 'block' : 'none')});
+ Element.setStyle(h.sortAsc, {display: (dir == 'asc' ? 'block' : 'none')});
+ }
}
}
17 years, 6 months
JBoss Rich Faces SVN: r1375 - in trunk/richfaces/tree/src: main/java/org/richfaces/component/state and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-06-28 13:11:59 -0400 (Thu, 28 Jun 2007)
New Revision: 1375
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java
trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseAllCommandEventTest.java
trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java
trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandAllCommandEventTest.java
trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java
Log:
- JUnit tests fixed
- http://jira.jboss.com/jira/browse/RF-216 fixed
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -278,7 +278,11 @@
faces.getExternalContext().getRequestParameterMap().get(
getBaseClientId(faces) + LAST_ELEMENT_FLAG) != null);
} finally {
- setRowKey(savedRowKey);
+ try {
+ setRowKey(faces, savedRowKey);
+ } catch (Exception e) {
+ faces.getExternalContext().log(e.getMessage(), e);
+ }
}
}
@@ -643,12 +647,18 @@
*/
public Object getRowData(Object rowKey) {
Object storedKey = getRowKey();
+ FacesContext context = FacesContext.getCurrentInstance();
+
try {
- setRowKey(rowKey);
+ setRowKey(context, rowKey);
return getRowData();
} finally {
- setRowKey(storedKey);
+ try {
+ setRowKey(context, storedKey);
+ } catch (Exception e) {
+ context.getExternalContext().log(e.getMessage(), e);
+ }
}
}
@@ -659,13 +669,18 @@
* @return {@link TreeNode} instance corresponding to the current row key
*/
public TreeNode getTreeNode(Object rowKey) {
+ FacesContext context = FacesContext.getCurrentInstance();
Object storedKey = getRowKey();
try {
- setRowKey(rowKey);
+ setRowKey(context, rowKey);
return getTreeNode();
} finally {
- setRowKey(storedKey);
+ try {
+ setRowKey(context, storedKey);
+ } catch (Exception e) {
+ context.getExternalContext().log(e.getMessage(), e);
+ }
}
}
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/state/TreeState.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -53,7 +53,7 @@
public void process(FacesContext context, Object rowKey, Object argument)
throws IOException {
- tree.setRowKey(rowKey);
+ tree.setRowKey(context, rowKey);
if (tree.isRowAvailable()) {
TreeRowKey nextKey = (TreeRowKey) rowKey;
@@ -223,7 +223,6 @@
}
public void expandAll(UITree tree) throws IOException {
- FacesContext context = FacesContext.getCurrentInstance();
queuedCollapsedNodes.clear();
// SubTreeChildrenAppender infoAppender = null;
//
@@ -255,7 +254,6 @@
}
public void expandNode(UITree tree, final TreeRowKey rowKey) throws IOException {
- FacesContext context = FacesContext.getCurrentInstance();
// SubTreeChildrenAppender infoAppender;
// if (storedPersister != null) {
// infoAppender = storedPersister.getAppender(rowKey);
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeDataModelEventNavigator.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -23,6 +23,8 @@
import java.io.IOException;
+import javax.faces.context.FacesContext;
+
import org.richfaces.component.LastElementAware;
import org.richfaces.component.TreeRowKey;
import org.richfaces.component.UITree;
@@ -51,7 +53,7 @@
this.floatingKey = floatingKey;
}
- public void followRowKey(TreeRowKey newRowKey) throws IOException {
+ public void followRowKey(FacesContext context, TreeRowKey newRowKey) throws IOException {
actualLast = lastElement;
resetLastElement();
@@ -73,7 +75,7 @@
stackedLast = new Boolean(actualLast);
- this.tree.setRowKey(newRowKey);
+ this.tree.setRowKey(context, newRowKey);
if (delta > 0) {
afterUp(delta);
@@ -96,7 +98,7 @@
}
}
- this.tree.setRowKey(null);
+ this.tree.setRowKey(context, null);
if (level != 0) {
afterUp(level);
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -78,8 +78,8 @@
this.clientId = getClientId();
}
- public void followRowKey(TreeRowKey newRowKey) throws IOException {
- super.followRowKey(newRowKey);
+ public void followRowKey(FacesContext context, TreeRowKey newRowKey) throws IOException {
+ super.followRowKey(context, newRowKey);
this.expanded = this.tree.isExpanded();
this.clientId = getClientId();
@@ -170,7 +170,7 @@
public void process(FacesContext context, Object rowKey, Object argument)
throws IOException {
- navigator.followRowKey((TreeRowKey) rowKey);
+ navigator.followRowKey(context, (TreeRowKey) rowKey);
processAdvisors(context, (TreeRowKey)rowKey);
@@ -290,7 +290,7 @@
boolean encodeScripts = false;
- tree.setRowKey(null);
+ tree.setRowKey(context, null);
//we should add xmlns to AJAX response
//we'll write neutral inner element and add xmlns there
@@ -306,7 +306,7 @@
Iterator ajaxKeysItr = ajaxKeys.iterator();
while (ajaxKeysItr.hasNext()) {
TreeRowKey key = (TreeRowKey) ajaxKeysItr.next();
- tree.setRowKey(key);
+ tree.setRowKey(context, key);
String id = tree.getNodeFacet().getClientId(context);
if (ids.isEmpty() || ids.contains(id) || ids.contains(tree.getClientId(context))/* handle tree updates requests */) {
@@ -322,8 +322,12 @@
} catch (Exception e) {
throw new FacesException(e);
} finally {
- tree.setRowKey(null);
- tree.restoreOrigValue();
+ try {
+ tree.setRowKey(context, null);
+ tree.restoreOrigValue();
+ } catch (Exception e) {
+ context.getExternalContext().log(e.getMessage(), e);
+ }
}
if (encodeScripts) {
writeScript(context, tree, encodedAreaIds, renderedAreas);
@@ -337,7 +341,11 @@
responseWriter.endElement("div");
}
} finally {
- ComponentsVariableResolver.removeVariables(this, component);
+ try {
+ ComponentsVariableResolver.removeVariables(this, component);
+ } catch (Exception e) {
+ context.getExternalContext().log(e.getMessage(), e);
+ }
}
}
@@ -458,9 +466,9 @@
if (key != null) {
droppedDownToLevelFlag.setFlag();
openLevelDownTable(context, input, writer);
- input.setRowKey((TreeRowKey) key);
+ input.setRowKey(context, key);
} else {
- input.setRowKey(null);
+ input.setRowKey(context, null);
}
TreeDataModelEventNavigator levelNavigator = new RendererDataModelEventNavigator(input, rowKey, context,
@@ -478,7 +486,7 @@
if (currentKey == null ? rowKey != null : !currentKey.equals(rowKey)) {
//currentKey NE rowKey
- input.setRowKey(rowKey);
+ input.setRowKey(context, rowKey);
}
UITreeNode nodeFacet = input.getNodeFacet();
@@ -499,7 +507,7 @@
closeLevelDownTable(context, input, writer);
}
- levelNavigator.followRowKey(null);
+ levelNavigator.followRowKey(context, null);
ComponentVariables variables = ComponentsVariableResolver.getVariables(this, input);
String value = selectionValueHolder.getValue();
@@ -509,7 +517,7 @@
variables.setVariable("selectionId", "");
}
} finally {
- input.setRowKey(null);
+ input.setRowKey(context, null);
input.restoreOrigValue();
}
}
Modified: trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseAllCommandEventTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseAllCommandEventTest.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseAllCommandEventTest.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -25,6 +25,9 @@
import javax.faces.component.UIOutput;
import javax.faces.event.FacesListener;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UITree;
+
import junit.framework.TestCase;
/**
@@ -32,7 +35,7 @@
* created 14.04.2007
*
*/
-public class CollapseAllCommandEventTest extends TestCase {
+public class CollapseAllCommandEventTest extends AbstractAjax4JsfTestCase {
private CollapseAllCommandEvent event;
/**
@@ -45,16 +48,16 @@
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
- this.event = new CollapseAllCommandEvent(new UIOutput());
+ this.event = new CollapseAllCommandEvent(application.createComponent(UITree.COMPONENT_TYPE));
}
/* (non-Javadoc)
* @see junit.framework.TestCase#tearDown()
*/
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
super.tearDown();
this.event = null;
Modified: trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/CollapseNodeCommandEventTest.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -27,8 +27,10 @@
import javax.faces.component.UIOutput;
import javax.faces.event.FacesListener;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.richfaces.component.ListRowKey;
import org.richfaces.component.TreeRowKey;
+import org.richfaces.component.UITree;
import junit.framework.TestCase;
@@ -37,7 +39,7 @@
* created 14.04.2007
*
*/
-public class CollapseNodeCommandEventTest extends TestCase {
+public class CollapseNodeCommandEventTest extends AbstractAjax4JsfTestCase {
private CollapseNodeCommandEvent event;
private TreeRowKey treeRowKey;
@@ -52,7 +54,7 @@
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
ArrayList keyBase = new ArrayList();
@@ -61,13 +63,13 @@
keyBase.add(new Long(-17));
this.treeRowKey = new ListRowKey(keyBase);
- this.event = new CollapseNodeCommandEvent(new UIOutput(), treeRowKey);
+ this.event = new CollapseNodeCommandEvent(application.createComponent(UITree.COMPONENT_TYPE), treeRowKey);
}
/* (non-Javadoc)
* @see junit.framework.TestCase#tearDown()
*/
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
super.tearDown();
this.event = null;
Modified: trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandAllCommandEventTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandAllCommandEventTest.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandAllCommandEventTest.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -25,6 +25,9 @@
import javax.faces.component.UIOutput;
import javax.faces.event.FacesListener;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.richfaces.component.UITree;
+
import junit.framework.TestCase;
/**
@@ -32,7 +35,7 @@
* created 14.04.2007
*
*/
-public class ExpandAllCommandEventTest extends TestCase {
+public class ExpandAllCommandEventTest extends AbstractAjax4JsfTestCase {
private ExpandAllCommandEvent event;
/**
@@ -45,16 +48,16 @@
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
- this.event = new ExpandAllCommandEvent(new UIOutput());
+ this.event = new ExpandAllCommandEvent(application.createComponent(UITree.COMPONENT_TYPE));
}
/* (non-Javadoc)
* @see junit.framework.TestCase#tearDown()
*/
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
super.tearDown();
this.event = null;
Modified: trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java
===================================================================
--- trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java 2007-06-28 16:37:40 UTC (rev 1374)
+++ trunk/richfaces/tree/src/test/java/org/richfaces/component/state/events/ExpandNodeCommandEventTest.java 2007-06-28 17:11:59 UTC (rev 1375)
@@ -27,8 +27,10 @@
import javax.faces.component.UIOutput;
import javax.faces.event.FacesListener;
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.richfaces.component.ListRowKey;
import org.richfaces.component.TreeRowKey;
+import org.richfaces.component.UITree;
import junit.framework.TestCase;
@@ -37,7 +39,7 @@
* created 14.04.2007
*
*/
-public class ExpandNodeCommandEventTest extends TestCase {
+public class ExpandNodeCommandEventTest extends AbstractAjax4JsfTestCase {
private ExpandNodeCommandEvent event;
private TreeRowKey treeRowKey;
@@ -52,7 +54,7 @@
/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
- protected void setUp() throws Exception {
+ public void setUp() throws Exception {
super.setUp();
ArrayList keyBase = new ArrayList();
@@ -61,13 +63,13 @@
keyBase.add(new Long(-17));
this.treeRowKey = new ListRowKey(keyBase);
- this.event = new ExpandNodeCommandEvent(new UIOutput(), treeRowKey);
+ this.event = new ExpandNodeCommandEvent(application.createComponent(UITree.COMPONENT_TYPE), treeRowKey);
}
/* (non-Javadoc)
* @see junit.framework.TestCase#tearDown()
*/
- protected void tearDown() throws Exception {
+ public void tearDown() throws Exception {
super.tearDown();
this.event = null;
17 years, 6 months
JBoss Rich Faces SVN: r1374 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts.
by richfaces-svn-commits@lists.jboss.org
Author: dmorozov
Date: 2007-06-28 12:37:40 -0400 (Thu, 28 Jun 2007)
New Revision: 1374
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js
Log:
Fix layout manager
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2007-06-28 15:44:08 UTC (rev 1373)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2007-06-28 16:37:40 UTC (rev 1374)
@@ -7,6 +7,7 @@
ClientUILib.requireClass("ClientUI.common.box.Box");
ClientUILib.requireClass("ClientUI.layouts.VLayoutManager");
+ClientUILib.requireClass("ClientUI.layouts.LayoutManager");
var GridLayout_Enum = {
HEADER: 1,
@@ -36,6 +37,7 @@
ClientUI.layouts.LayoutManager.method("updateLayout").call(this);
var parentBox = this.getContainer();
+ if(parentBox==null) parentBox = this;
var height = parentBox.getViewportHeight();
var width = parentBox.getViewportWidth();
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-06-28 15:44:08 UTC (rev 1373)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/LayoutManager.js 2007-06-28 16:37:40 UTC (rev 1374)
@@ -75,6 +75,6 @@
ClientUI.layouts.LayoutManager.parentClass.method("updateLayout").call(this);
},
getContainer: function() {
- return this;
+ return this.container;
}
});
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-06-28 15:44:08 UTC (rev 1373)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2007-06-28 16:37:40 UTC (rev 1374)
@@ -43,10 +43,10 @@
destroy: function() {
ClientUI.layouts.VLayoutManager.parentClass.method("destroy").call(this);
},
- containerResize: function(event) {
+ /*containerResize: function(event) {
ClientUI.layouts.VLayoutManager.parentClass.method("containerResize").call(this, event);
this.updateLayout();
- },
+ },*/
addPane: function(align, pane) {
if(!this.panels) { this.panels = []; }
@@ -61,6 +61,7 @@
ClientUI.layouts.VLayoutManager.parentClass.method("updateLayout").call(this);
var parentBox = this.getContainer();
+ if(!parentBox) parentBox = this;
var height = parentBox.getViewportHeight();
var width = parentBox.getViewportWidth();
if(ClientUILib.isGecko) {
17 years, 6 months
JBoss Rich Faces SVN: r1373 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-28 11:44:08 -0400 (Thu, 28 Jun 2007)
New Revision: 1373
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
Info updated
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-28 15:23:37 UTC (rev 1372)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-28 15:44:08 UTC (rev 1373)
@@ -333,18 +333,19 @@
<section>
<?dbhtml filename="Howtoremembercurrentselectedtab"?>
<title>How to remember the current selected tab?</title>
- <para>To implement this feature use the "action" attribute of
- <emphasis role="bold"><rich:tab></emphasis> and
- "selectedTab" of the <emphasis role="bold"
- ><rich:tabPanel></emphasis>. Simple code is placed
- below:</para>
+ <para> Simple code is placed below:</para>
<programlisting role="XML"><![CDATA[...
- <rich:tab label="MyName" id="MyName" action="#{MySessionBean.activateSecuritySettingsTab}" >
- ...
- <rich:tabPanel id="tblPnl" selectedTab="#{MySessionBean.activeTabName}">
- ...
- </rich:tabPanel>
- </rich:tab>
+ <rich:tabPanel selectedTab="t2">
+ <rich:tab label="tab 1" name="t1">
+ <h:outputText value="tab 1" />
+ </rich:tab>
+ <rich:tab label="tab 1" name="t2">
+ <h:outputText value="tab 2" />
+ </rich:tab>
+ <rich:tab label="tab 1" name="t3">
+ <h:outputText value="tab 3" />
+ </rich:tab>
+ </rich:tabPanel>
...
]]></programlisting>
</section>
17 years, 6 months
JBoss Rich Faces SVN: r1372 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-06-28 11:23:37 -0400 (Thu, 28 Jun 2007)
New Revision: 1372
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
Log:
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-28 14:36:04 UTC (rev 1371)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-28 15:23:37 UTC (rev 1372)
@@ -206,7 +206,7 @@
RichFaces is a facelets based application. So, the answer is yes.</para>
</section>
- <section>
+ <!-- <section>
<?dbhtml filename="RerenderingPartPage.html"?>
<title>How to reRender only particular row(s) of dataTable?</title>
<para> If you use <emphasis role="bold"><rich:dataTable></emphasis>
@@ -216,7 +216,7 @@
role="bold"><a4j:repeat></emphasis> component are
available <ulink url="http://livedemo.exadel.com/a4j-repeat/"
>here</ulink>.</para>
- </section>
+ </section>-->
<section>
<?dbhtml filename="Isitpossibletocreatedynamicmenu"?>
17 years, 6 months
JBoss Rich Faces SVN: r1371 - trunk/richfaces/spacer/src/test/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-06-28 10:36:04 -0400 (Thu, 28 Jun 2007)
New Revision: 1371
Modified:
trunk/richfaces/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java
Log:
commented System.out.print statements
Modified: trunk/richfaces/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java
===================================================================
--- trunk/richfaces/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java 2007-06-28 13:15:15 UTC (rev 1370)
+++ trunk/richfaces/spacer/src/test/java/org/richfaces/component/SpacerComponentTest.java 2007-06-28 14:36:04 UTC (rev 1371)
@@ -91,7 +91,7 @@
public void testComponent() throws Exception {
HtmlPage renderedView = renderView();
assertNotNull(renderedView);
- System.out.println(renderedView.asXml());
+ //System.out.println(renderedView.asXml());
HtmlAnchor htmlLink = (HtmlAnchor) renderedView
.getHtmlElementById(command.getClientId(facesContext));
@@ -115,7 +115,7 @@
str = htmlSpacer.getSrcAttribute();
assertTrue(str.contains("images/spacer.gif"));
- System.out.println(renderedView.getWebResponse().getContentAsString());
+ //System.out.println(renderedView.getWebResponse().getContentAsString());
/*
* List lastParameters = this.webConnection.getLastParameters(); for
17 years, 6 months
JBoss Rich Faces SVN: r1370 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-06-28 09:15:15 -0400 (Thu, 28 Jun 2007)
New Revision: 1370
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml
trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
Log:
English language and xml markup correction
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-06-28 13:13:06 UTC (rev 1369)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2007-06-28 13:15:15 UTC (rev 1370)
@@ -50,7 +50,7 @@
change all interrelating values, otherwise your interface can appear a
bit clumsy. The chances of such an interface coming about is very high,
as CSS editing usually becomes the duty of a general developer who
- doesn't necessarily have much knowledge of user interface design.</para>
+ doesn't necessarily have much knowledge of user interface design.</para>
<para>Moreover, if a customer wishes to have an interface look-and-feel
that can be adjusted on-the-fly by an end user, your work is multiplied,
@@ -66,8 +66,8 @@
synchronized fashion without messing up user interface
consistency.</para>
- <para>The <property>skinnability</property> feature can't completely
- replace standard CSS and certainly doesn't eliminate its usage.
+ <para>The <property>skinnability</property> feature can't completely
+ replace standard CSS and certainly doesn't eliminate its usage.
<property>Skinnability</property> is a high-level extension of standard
CSS, which can be used together with regular CSS declarations. You can
also refer to skin parameters in CSS via JSF Expression Language. You
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-28 13:13:06 UTC (rev 1369)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCfaq.xml 2007-06-28 13:15:15 UTC (rev 1370)
@@ -384,14 +384,14 @@
<section>
<?dbhtml filename="Isthereawaytocapturetherowdata"?>
<title>Is there a way to capture the rowdata of dataTable and rich:subTable?</title>
- <para> For information you can see discussion about this problem on the <ulink
+ <para> For necessary information you can see discussion about this problem on the <ulink
url="http://jboss.com/index.html?module=bb&op=viewtopic&t=111965"
>RichFaces Users Forum</ulink></para>
</section>
<section>
<?dbhtml filename="Isitpossibletouse thedatascroller"?>
- <title>Is it possible to use datascroller without it's table border and styles (to show only links)?</title>
+ <title>Is it possible to use datascroller without its table border and styles (to show only links)?</title>
<para> It' necessary to redefine rich* classes for example like this:</para>
<programlisting role="JAVA"><![CDATA[.rich-datascr-button {
border: 0px;
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml 2007-06-28 13:13:06 UTC (rev 1369)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCidesupport.xml 2007-06-28 13:15:15 UTC (rev 1370)
@@ -14,6 +14,6 @@
</keywordset>
</chapterinfo>
<title>IDE Support</title>
- <para><ulink url="http://www.exadel.com/web/portal/products/ExadelStudioPro">Exadel Studio 4.0.4</ulink> is an <property>IDE</property> that provides full support for Java Server Faces, Exadel RichFaces, Ajax4jsf, Facelets, Struts, and other Web technologies. In addition to this, it seamlessly combines visual and source-oriented development approaches. One of the special support features for <property>Ajax4jsf</property> and <property>RichFaces</property> is that they are both available as project "capabilities". These project capabilities can be added to any existing JSF project to make the project an Ajax4jsf or RichFaces JSF project by automatically adding libraries and modifying configuration files as required.</para>
+ <para><ulink url="http://www.exadel.com/web/portal/products/ExadelStudioPro">Exadel Studio 4.0.4</ulink> is an <property>IDE</property> that provides full support for Java Server Faces, Exadel RichFaces, Ajax4jsf, Facelets, Struts, and other Web technologies. In addition to this, it seamlessly combines visual and source-oriented development approaches. One of the special support features for <property>Ajax4jsf</property> and <property>RichFaces</property> is that they are both available as project "capabilities". These project capabilities can be added to any existing JSF project to make the project an Ajax4jsf or RichFaces JSF project by automatically adding libraries and modifying configuration files as required.</para>
</chapter>
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml 2007-06-28 13:13:06 UTC (rev 1369)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCsetwebappl.xml 2007-06-28 13:15:15 UTC (rev 1370)
@@ -17,7 +17,7 @@
<para>Using the Rich Faces library doesn't require a major change of
approach in how you set up a Web application, but a few steps are necessary,
mostly for setting up the Ajax4jsf framework. When you just add RichFaces
- capability to an existing project, the behavior of the application doesn't
+ capability to an existing project, the behavior of the application doesn't
change.</para>
<section id="Installation">
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-06-28 13:13:06 UTC (rev 1369)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCtechreqs.xml 2007-06-28 13:15:15 UTC (rev 1370)
@@ -135,7 +135,7 @@
<listitem>Safari 2.0</listitem>
</itemizedlist>
- <para>This list is composed basing on reports received from our users. We assume the list can be incomplete and absence of your environment in the list doesn't mean incompatibility.</para>
+ <para>This list is composed basing on reports received from our users. We assume the list can be incomplete and absence of your environment in the list doesn't mean incompatibility.</para>
<para>We appreciate your feedback on platforms and browsers that aren't in the list but are compatible with RichFaces. It helps us to keep the list up-to-date.</para>
</section>
</chapter>
\ No newline at end of file
17 years, 6 months