JBoss Rich Faces SVN: r19073 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2010-09-01 10:06:56 -0400 (Wed, 01 Sep 2010)
New Revision: 19073
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
Log:
made MatrixConfigurator$getCurrentRealMethod() protected to allow overriding
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-09-01 13:59:09 UTC (rev 19072)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/MatrixConfigurator.java 2010-09-01 14:06:56 UTC (rev 19073)
@@ -103,7 +103,7 @@
|| m.isAfterSuiteConfiguration() || m.isAfterTestConfiguration();
}
- private Method getCurrentRealMethod() {
+ protected Method getCurrentRealMethod() {
return ((Queue<Method>) methods).poll();
}
14 years, 3 months
JBoss Rich Faces SVN: r19072 - in trunk/ui/output/ui/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-09-01 09:59:09 -0400 (Wed, 01 Sep 2010)
New Revision: 19072
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDivPanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
Log:
RF-9275 Accordion: server switch type opens new window in IE8
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDivPanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDivPanel.java 2010-09-01 13:45:43 UTC (rev 19071)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractDivPanel.java 2010-09-01 13:59:09 UTC (rev 19072)
@@ -27,7 +27,6 @@
/**
* @author akolonitsky
* @version 1.0
- * @since -4712-01-01
*
*/
public abstract class AbstractDivPanel extends UIOutput {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2010-09-01 13:45:43 UTC (rev 19071)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2010-09-01 13:59:09 UTC (rev 19072)
@@ -375,7 +375,7 @@
String previous = (String) getValue();
setValue(activeItem);
setSubmittedActiveItem(null);
- if (!previous.equalsIgnoreCase(activeItem)) {
+ if (previous != null && !previous.equalsIgnoreCase(activeItem)) {
queueEvent(new ItemChangeEvent(this, previous, activeItem));
}
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-09-01 13:45:43 UTC (rev 19071)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-09-01 13:59:09 UTC (rev 19072)
@@ -26,7 +26,6 @@
import org.ajax4jsf.renderkit.RendererUtils;
import org.richfaces.component.AbstractTogglePanelItem;
import org.richfaces.component.AbstractTogglePanelTitledItem;
-import org.richfaces.component.util.HtmlUtil;
import org.richfaces.renderkit.RenderKitUtils;
import javax.faces.application.ResourceDependencies;
@@ -38,6 +37,7 @@
import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates;
import static org.richfaces.component.html.HtmlAccordionItem.PropertyKeys;
+import static org.richfaces.component.util.HtmlUtil.concatClasses;
import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
/**
@@ -67,6 +67,14 @@
})
public class AccordionItemRenderer extends TogglePanelItemRenderer {
+ private static final RenderKitUtils.Attributes HEADER_ATTRIBUTES = RenderKitUtils.attributes()
+ .generic("style", PropertyKeys.headerStyle.toString())
+ .generic("onclick", PropertyKeys.onheaderclick.toString(), "headerclick")
+ .generic("ondblclick", PropertyKeys.onheaderdblclick.toString(), "headerdblclick")
+ .generic("onmousedown", PropertyKeys.onheadermousedown.toString(), "headermousedown")
+ .generic("onmousemove", PropertyKeys.onheadermousemove.toString(), "headermousemove")
+ .generic("onmouseup", PropertyKeys.onheadermouseup.toString(), "headermouseup");
+
@Override
protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
super.doEncodeBegin(writer, context, component);
@@ -78,7 +86,7 @@
@Override
protected String getStyleClass(UIComponent component) {
- return "rf-aci " + attributeAsString(component, "styleClass");
+ return concatClasses("rf-aci", attributeAsString(component, "styleClass"));
}
@Override
@@ -103,7 +111,7 @@
private void encodeContentBegin(UIComponent component, ResponseWriter writer) throws IOException {
writer.startElement("div", component);
- writer.writeAttribute("class", "rf-aci-c " + attributeAsString(component, "contentClass"), null);
+ writer.writeAttribute("class", concatClasses("rf-aci-c", attributeAsString(component, "contentClass")), null);
writer.writeAttribute("id", component.getClientId() + ":content", null);
if (!((AbstractTogglePanelItem) component).isActive()) {
@@ -118,16 +126,9 @@
private void encodeHeader(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
writer.startElement("div", component);
- writer.writeAttribute("class", "rf-aci-h " + attributeAsString(component, PropertyKeys.headerClass), null);
+ writer.writeAttribute("class", concatClasses("rf-aci-h", attributeAsString(component, PropertyKeys.headerClass)), null);
writer.writeAttribute("id", component.getClientId() + ":header", null);
- renderPassThroughAttributes(context, component, RenderKitUtils.attributes()
- .generic("style", PropertyKeys.headerStyle.toString())
- .generic("onclick", PropertyKeys.onheaderclick.toString(), "headerclick")
- .generic("ondblclick", PropertyKeys.onheaderdblclick.toString(), "headerdblclick")
- .generic("onmousedown", PropertyKeys.onheadermousedown.toString(), "headermousedown")
- .generic("onmousemove", PropertyKeys.onheadermousemove.toString(), "headermousemove")
- .generic("onmouseup", PropertyKeys.onheadermouseup.toString(), "headermouseup")
- );
+ renderPassThroughAttributes(context, component, HEADER_ATTRIBUTES);
AbstractTogglePanelTitledItem titledItem = (AbstractTogglePanelTitledItem) component;
boolean isActive = titledItem.isActive();
@@ -149,7 +150,7 @@
}
String name = "headerClass" + capitalize(state.toString());
- writer.writeAttribute("class", HtmlUtil.concatClasses("rf-aci-h-" + state, attributeAsString(component, name)), null);
+ writer.writeAttribute("class", concatClasses("rf-aci-h-" + state, attributeAsString(component, name)), null);
UIComponent headerFacet = component.getHeaderFacet(state);
if (headerFacet != null && headerFacet.isRendered()) {
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-09-01 13:45:43 UTC (rev 19071)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/TogglePanel.js 2010-09-01 13:59:09 UTC (rev 19072)
@@ -66,7 +66,7 @@
this.__setActiveItem(newPanel.getName());
- rf.submitForm(this.__getParentForm(), null, {});
+ rf.submitForm(this.__getParentForm());
return false;
},
14 years, 3 months
JBoss Rich Faces SVN: r19070 - in trunk/ui/input/ui/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-09-01 09:01:06 -0400 (Wed, 01 Sep 2010)
New Revision: 19070
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
trunk/ui/input/ui/src/main/templates/autocomplete.template.xml
Log:
Fix markup critical bug
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-09-01 12:32:44 UTC (rev 19069)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-09-01 13:01:06 UTC (rev 19070)
@@ -79,7 +79,6 @@
utils.addToScriptHash(options, "buttonId", component.getClientId() + "Button");
utils.addToScriptHash(options, "selectedItemClass", attributes.get("selectedItemClass"));
utils.addToScriptHash(options, "minChars", attributes.get("minChars"), "1");
- utils.addToScriptHash(options, "mode", attributes.get("mode"), "ajax");
utils.addToScriptHash(options, "filterFunction", attributes.get("filterFunction"));
utils.addToScriptHash(options, "autofill", attributes.get("autofill"), "true");
utils.addToScriptHash(options, "disabled", attributes.get("disabled"), "false");
@@ -90,12 +89,16 @@
utils.addToScriptHash(options, "onerror", attributes.get("onerror"));
utils.addToScriptHash(options, "onbeforedomupdate", attributes.get("onbeforedomupdate"));
utils.addToScriptHash(options, "onchange", attributes.get("onchange"));
- if (attributes.get("mode") != null) {
- if (attributes.get("mode").equals("ajax")){
- utils.addToScriptHash(options, "isCachedAjax", false, "true");
- } else if (attributes.get("mode").equals("client")) {
- utils.addToScriptHash(options, "ajaxMode", false, "true");
- }
+ String mode = (String)attributes.get("mode");
+ if (mode != null) {
+ if (mode.equals("ajax")){
+ utils.addToScriptHash(options, "isCachedAjax", false, "true");
+ } else if (mode.equals("client") || mode.equals("lazyClient")) {
+ utils.addToScriptHash(options, "ajaxMode", false, "true");
+ if (mode.equals("lazyClient")) {
+ utils.addToScriptHash(options, "lazyClientMode", true, "false");
+ }
+ }
}
StringBuilder builder = new StringBuilder();
builder.append(ScriptUtils.toScript(options));
@@ -218,13 +221,11 @@
if (mode!= null && mode.equals("client")) {
List<Object> fetchValues = new ArrayList<Object>();
this.encodeItems(facesContext, component, fetchValues);
- } else if (mode!= null && mode.equals("lazyClient")){
+ } else {
strategy.encodeItemsContainerBegin(facesContext, component);
+ // TODO: is it needed
+ //strategy.encodeFakeItem(facesContext, component);
strategy.encodeItemsContainerEnd(facesContext, component);
- } else{
- strategy.encodeItemsContainerBegin(facesContext, component);
- strategy.encodeFakeItem(facesContext, component);
- strategy.encodeItemsContainerEnd(facesContext, component);
}
}
@@ -251,7 +252,7 @@
writer.writeText(item, null);
}
}
-
+ strategy.encodeItemEnd(facesContext, comboBox);
}
private AutocompleteEncodeStrategy getStrategy(UIComponent component) {
Modified: trunk/ui/input/ui/src/main/templates/autocomplete.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/autocomplete.template.xml 2010-09-01 12:32:44 UTC (rev 19069)
+++ trunk/ui/input/ui/src/main/templates/autocomplete.template.xml 2010-09-01 13:01:06 UTC (rev 19070)
@@ -29,7 +29,7 @@
onmouseout="#{component.attributes['onmouseout']}"
onkeyup="#{component.attributes['onkeyup']}"
onkeydown="#{component.attributes['onkeydown']}"
- onkeypress="#{component.attributes['onkeypress']}" id="#{clientId}Input" value="#{component.attributes['value']}" disabled="#{disabled}" name="#{clientId}" type="text" class="rf-au-font rf-au-input" />
+ onkeypress="#{component.attributes['onkeypress']}" id="#{clientId}Input" value="#{component.attributes['value']}" disabled="#{disabled}" name="#{clientId}" type="text" class="rf-au-font rf-au-input" autocomplete="off"/>
<c:if test="#{component.attributes['showButton']}">
<c:if test="#{component.attributes['disabled']}">
<div id="#{clientId}Button" class="rf-au-button">
14 years, 3 months
JBoss Rich Faces SVN: r19069 - trunk/ui/input/ui/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-09-01 08:32:44 -0400 (Wed, 01 Sep 2010)
New Revision: 19069
Modified:
trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
Log:
<a4j:ajax id="inplaceInputAjax" event="change" render="output"/>
Modified: trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-09-01 12:14:36 UTC (rev 19068)
+++ trunk/ui/input/ui/src/main/templates/inplaceInput.template.xml 2010-09-01 12:32:44 UTC (rev 19069)
@@ -1,5 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core" xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite"
xmlns:javaee="http://java.sun.com/xml/ns/javaee">
@@ -25,7 +48,7 @@
</span>
<input id="#{clientId}:focus" type="image" style="position: absolute; top: 0px; left: 0px; outline-style: none;" class="rf-ii-none"/>
<span id="#{clientId}:edit" class="#{getEditStyleClass(component, inplaceState)}">
- <input id="#{clientId}:input" autocomplete="off" name="#{clientId}:input"
+ <input id="#{clientId}:input" autocomplete="off" name="#{clientId}"
type="text" value="#{getInputValue(facesContext, component)}" class="rf-ii-f" style="width: #{component.attributes['inputWidth']};"
cdk:passThrough="tabIndex">
<cdk:call expression="renderInputHandlers(facesContext, component);"/>
14 years, 3 months
JBoss Rich Faces SVN: r19068 - trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2010-09-01 08:14:36 -0400 (Wed, 01 Sep 2010)
New Revision: 19068
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
Log:
fix renderer to render onheaderclick
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-09-01 11:06:10 UTC (rev 19067)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/AccordionItemRenderer.java 2010-09-01 12:14:36 UTC (rev 19068)
@@ -26,6 +26,8 @@
import org.ajax4jsf.renderkit.RendererUtils;
import org.richfaces.component.AbstractTogglePanelItem;
import org.richfaces.component.AbstractTogglePanelTitledItem;
+import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.renderkit.RenderKitUtils;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
@@ -35,6 +37,8 @@
import java.io.IOException;
import static org.richfaces.component.AbstractTogglePanelTitledItem.HeaderStates;
+import static org.richfaces.component.html.HtmlAccordionItem.PropertyKeys;
+import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
/**
*
@@ -111,20 +115,28 @@
responseWriter.endElement("div");
}
- private void encodeHeader(FacesContext facesContext, UIComponent component, ResponseWriter responseWriter) throws IOException {
+ private void encodeHeader(FacesContext context, UIComponent component, ResponseWriter writer) throws IOException {
- responseWriter.startElement("div", component);
- responseWriter.writeAttribute("class", "rf-aci-h " + attributeAsString(component, "contentClass"), null);
- responseWriter.writeAttribute("id", component.getClientId() + ":header", null);
+ writer.startElement("div", component);
+ writer.writeAttribute("class", "rf-aci-h " + attributeAsString(component, PropertyKeys.headerClass), null);
+ writer.writeAttribute("id", component.getClientId() + ":header", null);
+ renderPassThroughAttributes(context, component, RenderKitUtils.attributes()
+ .generic("style", PropertyKeys.headerStyle.toString())
+ .generic("onclick", PropertyKeys.onheaderclick.toString(), "headerclick")
+ .generic("ondblclick", PropertyKeys.onheaderdblclick.toString(), "headerdblclick")
+ .generic("onmousedown", PropertyKeys.onheadermousedown.toString(), "headermousedown")
+ .generic("onmousemove", PropertyKeys.onheadermousemove.toString(), "headermousemove")
+ .generic("onmouseup", PropertyKeys.onheadermouseup.toString(), "headermouseup")
+ );
AbstractTogglePanelTitledItem titledItem = (AbstractTogglePanelTitledItem) component;
boolean isActive = titledItem.isActive();
boolean isDisabled = titledItem.isDisabled();
- encodeHeader(facesContext, titledItem, responseWriter, HeaderStates.inactive, !isActive && !isDisabled);
- encodeHeader(facesContext, titledItem, responseWriter, HeaderStates.active, isActive && !isDisabled);
- encodeHeader(facesContext, titledItem, responseWriter, HeaderStates.disable, isDisabled);
+ encodeHeader(context, titledItem, writer, HeaderStates.inactive, !isActive && !isDisabled);
+ encodeHeader(context, titledItem, writer, HeaderStates.active, isActive && !isDisabled);
+ encodeHeader(context, titledItem, writer, HeaderStates.disable, isDisabled);
- responseWriter.endElement("div");
+ writer.endElement("div");
}
private void encodeHeader(FacesContext facesContext, AbstractTogglePanelTitledItem component, ResponseWriter writer,
@@ -137,9 +149,8 @@
}
String name = "headerClass" + capitalize(state.toString());
- writer.writeAttribute("class", "rf-aci-h-" + state + " " + attributeAsString(component, name), name);
+ writer.writeAttribute("class", HtmlUtil.concatClasses("rf-aci-h-" + state, attributeAsString(component, name)), null);
-
UIComponent headerFacet = component.getHeaderFacet(state);
if (headerFacet != null && headerFacet.isRendered()) {
headerFacet.encodeAll(facesContext);
14 years, 3 months
JBoss Rich Faces SVN: r19067 - branches/autocomplete/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-09-01 07:06:10 -0400 (Wed, 01 Sep 2010)
New Revision: 19067
Modified:
branches/autocomplete/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
Log:
https://jira.jboss.org/browse/RF-8875
bug fixes
Modified: branches/autocomplete/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js
===================================================================
--- branches/autocomplete/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2010-09-01 10:59:33 UTC (rev 19066)
+++ branches/autocomplete/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.js 2010-09-01 11:06:10 UTC (rev 19067)
@@ -5,15 +5,17 @@
this.key = key.toLowerCase();
this.cache = {}
this.cache[this.key] = items || [];
- this.values = processValues(typeof values != "function" ? values || this.cache[this.key] : values(items));
+ this.originalValues = typeof values == "function" ? values(items) : values || this.cache[this.key];
+ this.values = processValues(this.originalValues);
this.useCache = useCache || checkValuesPrefix.call(this);
};
var processValues = function (values) {
+ var processedValues = [];
for (var i = 0; i<values.length; i++) {
- values[i] = values[i].toLowerCase();
+ processedValues.push(values[i].toLowerCase());
}
- return values;
+ return processedValues;
}
var checkValuesPrefix = function () {
@@ -59,7 +61,7 @@
};
var getItemValue = function (item) {
- return this.values[this.cache[this.key].index(item)];
+ return this.originalValues[this.cache[this.key].index(item)];
};
var isCached = function (key) {
@@ -275,7 +277,7 @@
var newItems = this.cache.getItems(value);
this.items = $(newItems);
//TODO: works only with simple markup, not with <tr>
- $(rf.getDomElement(this.id+ID.ITEMS)).empty().append();
+ $(rf.getDomElement(this.id+ID.ITEMS)).empty().append(this.items);
window.console && console.log && console.log("updateItemsFromCache");
};
14 years, 3 months
JBoss Rich Faces SVN: r19066 - in trunk/ui/iteration/ui/src/test: resources/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-09-01 06:59:33 -0400 (Wed, 01 Sep 2010)
New Revision: 19066
Modified:
trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerBean.java
trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java
trunk/ui/iteration/ui/src/test/resources/org/richfaces/renderkit/dataTableTest.xhtml
Log:
add testcase for the next/previous controls
Modified: trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerBean.java
===================================================================
--- trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerBean.java 2010-09-01 10:57:22 UTC (rev 19065)
+++ trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerBean.java 2010-09-01 10:59:33 UTC (rev 19066)
@@ -17,7 +17,6 @@
content.add("3 page content");
content.add("4 page content");
content.add("5 page content");
- content.add("6 page content");
}
public List<String> getContent() {
Modified: trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java
===================================================================
--- trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java 2010-09-01 10:57:22 UTC (rev 19065)
+++ trunk/ui/iteration/ui/src/test/java/org/richfaces/renderkit/DataScrollerRenderTest.java 2010-09-01 10:59:33 UTC (rev 19066)
@@ -47,7 +47,7 @@
assertEquals("span", span.getNodeName());
assertEquals("rf-ds", span.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
- // first/fastRewind buttons with arrows
+ // first/fastRewind/previous buttons with arrows
HtmlElement first = getFirstButton(page, scrollerId);
assertEquals("span", first.getNodeName());
assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", first.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
@@ -56,11 +56,15 @@
assertEquals("span", fastRewind.getNodeName());
assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", fastRewind.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ HtmlElement previous = getPreviousButton(page, scrollerId);
+ assertEquals("span", previous.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", previous.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
// currently selected digital button
- HtmlElement dc = getDigitalButton(page, scrollerId, 1);
- assertEquals("span", dc.getNodeName());
- assertEquals("rf-ds-dtl rf-ds-cur", dc.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
-
+ HtmlElement dc1 = getDigitalButton(page, scrollerId, 1);
+ assertEquals("span", dc1.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", dc1.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
// digital buttons
HtmlElement d2 = getDigitalButton(page, scrollerId, 2);
assertEquals("a", d2.getNodeName());
@@ -82,12 +86,12 @@
assertEquals("rf-ds-dtl", d5.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
assertEquals("javascript:void(0);", d5.getAttribute(HTML.HREF_ATTR));
- HtmlElement d6 = getDigitalButton(page, scrollerId, 6);
- assertEquals("a", d6.getNodeName());
- assertEquals("rf-ds-dtl", d6.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
- assertEquals("javascript:void(0);", d6.getAttribute(HTML.HREF_ATTR));
+ // next/fastForward/last buttons with arrows
+ HtmlElement next = getNextButton(page, scrollerId);
+ assertEquals("a", next.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-r", next.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("javascript:void(0);", next.getAttribute(HTML.HREF_ATTR));
- // last/fastForward buttons with arrows
HtmlElement fastForward = getFastForwardButton(page, scrollerId);
assertEquals("a", fastForward.getNodeName());
assertEquals("rf-ds-btn rf-ds-r", fastForward.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
@@ -134,6 +138,102 @@
}
@Test
+ public void testOutDataScrollerNextPreviousButtons() throws Exception {
+ HtmlPage page = environment.getPage("/test.jsf");
+ String firstScrollerId = "scroller1";
+
+ //dataScroller inside dataTable 'footer' facet
+ String secondScrollerId = "richTable:scroller2";
+
+ for(int i = 2; i <= 5; i++) {
+ HtmlElement next = getNextButton(page, firstScrollerId);
+
+ next.click();
+
+ HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
+ assertEquals("span", currentDigital1.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital1.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // if scroller inside dataTable has switched
+ HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
+ assertEquals("span", currentDigital2.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital2.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // check if page has switched
+ assertEquals(i + " page content", getCurrentPageContent(page, i));
+ }
+
+ checkLastPageButtons(page, firstScrollerId, secondScrollerId);
+
+ //scroll back
+ for(int i = 4; i >= 1; i--) {
+ HtmlElement previous = getPreviousButton(page, firstScrollerId);
+ previous.click();
+ HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
+
+ assertEquals("span", currentDigital1.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital1.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // if scroller inside dataTable has switched
+ HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
+ assertEquals("span", currentDigital2.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital2.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // check if page has switched
+ assertEquals(i + " page content", getCurrentPageContent(page, i));
+ }
+
+ checkFirstPageButtons(page, firstScrollerId, secondScrollerId);
+ }
+
+ @Test
+ public void testInnerDataScrollerNextPreviousButtons() throws Exception {
+ HtmlPage page = environment.getPage("/test.jsf");
+ String firstScrollerId = "scroller1";
+
+ //dataScroller inside dataTable 'footer' facet
+ String secondScrollerId = "richTable:scroller2";
+
+ for(int i = 2; i <= 5; i++) {
+ HtmlElement next = getNextButton(page, secondScrollerId);
+ next.click();
+ HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
+ assertEquals("span", currentDigital2.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital2.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // if scroller outside dataTable has switched
+ HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
+ assertEquals("span", currentDigital1.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital1.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // check if page has switched
+ assertEquals(i + " page content", getCurrentPageContent(page, i));
+ }
+
+ checkLastPageButtons(page, firstScrollerId, secondScrollerId);
+
+ //scroll back
+ for(int i = 4; i >= 1; i--) {
+ HtmlElement previous = getPreviousButton(page, secondScrollerId);
+ previous.click();
+
+ HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
+ assertEquals("span", currentDigital2.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital2.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // if scroller inside dataTable has switched
+ HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
+ assertEquals("span", currentDigital1.getNodeName());
+ assertEquals("rf-ds-dtl rf-ds-cur", currentDigital1.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ // check if page has switched
+ assertEquals(i + " page content", getCurrentPageContent(page, i));
+ }
+
+ checkFirstPageButtons(page, firstScrollerId, secondScrollerId);
+ }
+
+ @Test
public void testOutDataScrollerFastButtons() throws Exception {
HtmlPage page = environment.getPage("/test.jsf");
String firstScrollerId = "scroller1";
@@ -141,7 +241,7 @@
//dataScroller inside dataTable 'footer' facet
String secondScrollerId = "richTable:scroller2";
- for(int i = 2; i <= 6; i++) {
+ for(int i = 3; i <= 5; i = i + 2) {
HtmlElement ff = getFastForwardButton(page, firstScrollerId);
ff.click();
@@ -162,7 +262,7 @@
checkLastPageButtons(page, firstScrollerId, secondScrollerId);
//scroll back
- for(int i = 5; i >= 1; i--) {
+ for(int i = 3; i >= 1; i = i - 2) {
HtmlElement fr = getFastRewindButton(page, firstScrollerId);
fr.click();
HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
@@ -190,7 +290,7 @@
//dataScroller inside dataTable 'footer' facet
String secondScrollerId = "richTable:scroller2";
- for(int i = 2; i <= 6; i++) {
+ for(int i = 3; i <= 5; i = i + 2) {
HtmlElement ff = getFastForwardButton(page, secondScrollerId);
ff.click();
HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
@@ -209,7 +309,7 @@
checkLastPageButtons(page, firstScrollerId, secondScrollerId);
//scroll back
- for(int i = 5; i >= 1; i--) {
+ for(int i = 3; i >= 1; i = i - 2) {
HtmlElement fr = getFastRewindButton(page, secondScrollerId);
fr.click();
@@ -228,7 +328,7 @@
checkFirstPageButtons(page, firstScrollerId, secondScrollerId);
}
-
+
@Test
public void testOutDataScrollerDigitalButtons() throws Exception {
HtmlPage page = environment.getPage("/test.jsf");
@@ -237,7 +337,7 @@
//dataScroller inside dataTable 'footer' facet
String secondScrollerId = "richTable:scroller2";
- for(int i = 2; i <= 6; i++) {
+ for(int i = 2; i <= 5; i++) {
HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
currentDigital1.click();
@@ -257,7 +357,7 @@
checkLastPageButtons(page, firstScrollerId, secondScrollerId);
//scroll back
- for(int i = 5; i >= 1; i--) {
+ for(int i = 4; i >= 1; i--) {
HtmlElement currentDigital1 = getDigitalButton(page, firstScrollerId, i);
currentDigital1.click();
@@ -285,7 +385,7 @@
//dataScroller inside dataTable 'footer' facet
String secondScrollerId = "richTable:scroller2";
- for(int i = 2; i <= 6; i++) {
+ for(int i = 2; i <= 5; i++) {
HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
currentDigital2.click();
@@ -305,7 +405,7 @@
checkLastPageButtons(page, firstScrollerId, secondScrollerId);
//scroll back
- for(int i = 5; i >= 1; i--) {
+ for(int i = 4; i >= 1; i--) {
HtmlElement currentDigital2 = getDigitalButton(page, secondScrollerId, i);
currentDigital2.click();
@@ -334,25 +434,35 @@
private void checkFirstPageButtons(HtmlPage page, String firstScrollerId, String secondScrollerId) throws Exception {
HtmlElement fastForward = getFastForwardButton(page, firstScrollerId);
HtmlElement last = getLastButton(page, firstScrollerId);
+ HtmlElement next = getNextButton(page, firstScrollerId);
+ //check right buttons
assertEquals("a", fastForward.getNodeName());
assertEquals("rf-ds-btn rf-ds-r", fastForward.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
assertEquals("a", last.getNodeName());
assertEquals("rf-ds-btn rf-ds-r", last.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("a", next.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-r", next.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
fastForward = getFastForwardButton(page, secondScrollerId);
last = getFastForwardButton(page, secondScrollerId);
-
+ next = getNextButton(page, secondScrollerId);
+
assertEquals("a", fastForward.getNodeName());
assertEquals("rf-ds-btn rf-ds-r", fastForward.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
assertEquals("a", last.getNodeName());
assertEquals("rf-ds-btn rf-ds-r", last.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("a", next.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-r", next.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
//check if left buttons is disabled
HtmlElement fastRewind = getFastRewindButton(page, firstScrollerId);
HtmlElement first = getFirstButton(page, firstScrollerId);
+ HtmlElement previous = getPreviousButton(page, firstScrollerId);
assertEquals("span", fastRewind.getNodeName());
assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", fastRewind.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
@@ -360,20 +470,28 @@
assertEquals("span", first.getNodeName());
assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", first.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("span", previous.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", previous.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
fastRewind = getFastRewindButton(page, secondScrollerId);
first = getFirstButton(page, secondScrollerId);
+ next = getNextButton(page, secondScrollerId);
assertEquals("span", fastRewind.getNodeName());
assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", fastRewind.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
assertEquals("span", first.getNodeName());
- assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", first.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", first.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ assertEquals("span", previous.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-l rf-ds-dis", previous.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
}
private void checkLastPageButtons(HtmlPage page, String firstScrollerId, String secondScrollerId) throws Exception {
//check if right buttons is disabled
HtmlElement fastForward = getFastForwardButton(page, firstScrollerId);
HtmlElement last = getLastButton(page, firstScrollerId);
+ HtmlElement next = getNextButton(page, firstScrollerId);
assertEquals("span", fastForward.getNodeName());
assertEquals("rf-ds-btn rf-ds-r rf-ds-dis", fastForward.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
@@ -381,8 +499,13 @@
assertEquals("span", last.getNodeName());
assertEquals("rf-ds-btn rf-ds-r rf-ds-dis", last.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("span", next.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-r rf-ds-dis", next.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+
fastForward = getFastForwardButton(page, secondScrollerId);
last = getFastForwardButton(page, secondScrollerId);
+ next = getNextButton(page, secondScrollerId);
assertEquals("span", fastForward.getNodeName());
assertEquals("rf-ds-btn rf-ds-r rf-ds-dis", fastForward.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
@@ -390,9 +513,13 @@
assertEquals("span", last.getNodeName());
assertEquals("rf-ds-btn rf-ds-r rf-ds-dis", last.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("span", next.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-r rf-ds-dis", next.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
//check if left buttons is enabled
HtmlElement fastRewind = getFastRewindButton(page, firstScrollerId);
HtmlElement first = getFirstButton(page, firstScrollerId);
+ HtmlElement previous = getPreviousButton(page, firstScrollerId);
assertEquals("a", fastRewind.getNodeName());
assertEquals("rf-ds-btn rf-ds-l", fastRewind.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
@@ -400,14 +527,21 @@
assertEquals("a", first.getNodeName());
assertEquals("rf-ds-btn rf-ds-l", first.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+ assertEquals("a", previous.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-l", previous.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
fastRewind = getFastRewindButton(page, secondScrollerId);
first = getFirstButton(page, secondScrollerId);
+ previous = getPreviousButton(page, secondScrollerId);
assertEquals("a", fastRewind.getNodeName());
assertEquals("rf-ds-btn rf-ds-l", fastRewind.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
assertEquals("a", first.getNodeName());
assertEquals("rf-ds-btn rf-ds-l", first.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
+
+ assertEquals("a", previous.getNodeName());
+ assertEquals("rf-ds-btn rf-ds-l", previous.getAttribute(HTML.CLASS_ATTRIBUTE).trim());
}
private String getCurrentPageContent(HtmlPage page, int i) throws Exception {
@@ -417,6 +551,14 @@
return text.getNodeValue();
}
+ private HtmlElement getPreviousButton(HtmlPage page, String scrollerId) {
+ return page.getFirstByXPath("//*[@id = 'form:" + scrollerId +"_ds_prev']");
+ }
+
+ private HtmlElement getNextButton(HtmlPage page, String scrollerId) {
+ return page.getFirstByXPath("//*[@id = 'form:" + scrollerId +"_ds_next']");
+ }
+
private HtmlElement getFastRewindButton(HtmlPage page, String scrollerId) {
return page.getFirstByXPath("//*[@id = 'form:" + scrollerId +"_ds_fr']");
}
Modified: trunk/ui/iteration/ui/src/test/resources/org/richfaces/renderkit/dataTableTest.xhtml
===================================================================
--- trunk/ui/iteration/ui/src/test/resources/org/richfaces/renderkit/dataTableTest.xhtml 2010-09-01 10:57:22 UTC (rev 19065)
+++ trunk/ui/iteration/ui/src/test/resources/org/richfaces/renderkit/dataTableTest.xhtml 2010-09-01 10:59:33 UTC (rev 19066)
@@ -13,7 +13,7 @@
<h:body>
<h:form id="form">
- <it:dataScroller id="scroller1" for="richTable" page="#{dataScrollerBean.pageNumber}" maxPages="6"></it:dataScroller>
+ <it:dataScroller fastStep="2" id="scroller1" for="richTable" page="#{dataScrollerBean.pageNumber}" maxPages="5"></it:dataScroller>
<it:dataTable id="richTable" rowKeyVar="rowKey" var="content" value="#{dataScrollerBean.content}" rows="1">
<it:column>
<h:panelGroup id="pageContent">
@@ -21,7 +21,7 @@
</h:panelGroup>
</it:column>
<f:facet name="footer">
- <it:dataScroller id="scroller2" for="richTable" page="#{dataScrollerBean.pageNumber}" maxPages="6"></it:dataScroller>
+ <it:dataScroller fastStep="2" id="scroller2" for="richTable" page="#{dataScrollerBean.pageNumber}" maxPages="5"></it:dataScroller>
</f:facet>
</it:dataTable>
</h:form>
14 years, 3 months
JBoss Rich Faces SVN: r19065 - in trunk/ui/iteration/ui/src/main: java/org/richfaces/renderkit and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-09-01 06:57:22 -0400 (Wed, 01 Sep 2010)
New Revision: 19065
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ControlsState.java
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js
trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml
Log:
https://jira.jboss.org/browse/RF-8703, refactor template, fix fastStep
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2010-09-01 10:26:09 UTC (rev 19064)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2010-09-01 10:57:22 UTC (rev 19065)
@@ -68,6 +68,10 @@
public static final String LAST_FACET_NAME = "last";
+ public static final String NEXT_FACET_NAME = "next";
+
+ public static final String PREVIOUS_FACET_NAME = "previous";
+
public static final String FAST_FORWARD_FACET_NAME = "fastforward";
public static final String FAST_REWIND_FACET_NAME = "fastrewind";
@@ -82,16 +86,9 @@
private Integer page;
- protected enum PropertyKeys {
- boundaryControls, fastControls, fastStep, forComponent, inactiveStyle, selectStyle, inactiveStyleClass, selectStyleClass, scrollerListener, lastPageMode, maxPages, pageIndexVar, pagesVar, renderIfSinglePage, style, styleClass, stepControls
- }
-
@Attribute
public abstract String getLastPageMode();
- @Attribute(defaultValue="0")
- public abstract int getFastStep();
-
@Attribute
public abstract String getForComponent();
@@ -104,6 +101,12 @@
@Attribute(defaultValue="show")
public abstract String getFastControls();
+ @Attribute(defaultValue="show")
+ public abstract String getStepControls();
+
+ @Attribute(defaultValue="1")
+ public abstract int getFastStep();
+
public void addScrollerListener(DataScrollerListener listener) {
addFacesListener(listener);
}
@@ -163,10 +166,6 @@
return DataScrollerUtils.findDataTable(this);
}
- private int getFastStepOrDefault() {
- return (Integer) getStateHelper().eval(PropertyKeys.fastStep, 1);
- }
-
public int getPageForFacet(String facetName) {
if (facetName == null) {
throw new NullPointerException();
@@ -179,10 +178,14 @@
newPage = 1;
} else if (LAST_FACET_NAME.equals(facetName)) {
newPage = pageCount > 0 ? pageCount : 1;
+ } else if (PREVIOUS_FACET_NAME.equals(facetName)) {
+ newPage = getPage() - 1;
+ } else if (NEXT_FACET_NAME.equals(facetName)) {
+ newPage = getPage() + 1;
} else if (FAST_FORWARD_FACET_NAME.equals(facetName)) {
- newPage = getPage() + getFastStepOrDefault();
+ newPage = getPage() + getFastStep();
} else if (FAST_REWIND_FACET_NAME.equals(facetName)) {
- newPage = getPage() - getFastStepOrDefault();
+ newPage = getPage() - getFastStep();
} else {
try {
newPage = Integer.parseInt(facetName.toString());
@@ -234,7 +237,15 @@
public UIComponent getLast() {
return getFacetByKey(LAST_FACET_NAME);
}
+
+ public UIComponent getNext() {
+ return getFacetByKey(NEXT_FACET_NAME);
+ }
+ public UIComponent getPrevious() {
+ return getFacetByKey(PREVIOUS_FACET_NAME);
+ }
+
public UIComponent getFastForward() {
return getFacetByKey(FAST_FORWARD_FACET_NAME);
}
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ControlsState.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ControlsState.java 2010-09-01 10:26:09 UTC (rev 19064)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ControlsState.java 2010-09-01 10:57:22 UTC (rev 19065)
@@ -35,7 +35,15 @@
private boolean lastRendered = true;
private boolean lastEnabled = true;
+
+ private boolean nextRendered = true;
+
+ private boolean nextEnabled = true;
+ private boolean previousRendered = true;
+
+ private boolean previousEnabled = true;
+
private boolean fastRewindRendered = true;
private boolean fastRewindEnabled = true;
@@ -109,8 +117,40 @@
public void setFastForwardEnabled(boolean fastForwardEnabled) {
this.fastForwardEnabled = fastForwardEnabled;
}
+
+ public boolean getNextRendered() {
+ return nextRendered;
+ }
- public boolean isControlsSeparatorRendered() {
+ public void setNextRendered(boolean nextRendered) {
+ this.nextRendered = nextRendered;
+ }
+
+ public boolean getNextEnabled() {
+ return nextEnabled;
+ }
+
+ public void setNextEnabled(boolean nextEnabled) {
+ this.nextEnabled = nextEnabled;
+ }
+
+ public boolean getPreviousRendered() {
+ return previousRendered;
+ }
+
+ public void setPreviousRendered(boolean previousRendered) {
+ this.previousRendered = previousRendered;
+ }
+
+ public boolean getPreviousEnabled() {
+ return previousEnabled;
+ }
+
+ public void setPreviousEnabled(boolean previousEnabled) {
+ this.previousEnabled = previousEnabled;
+ }
+
+ public boolean getControlsSeparatorRendered() {
return controlsSeparatorRendered;
}
Modified: trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
===================================================================
--- trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2010-09-01 10:26:09 UTC (rev 19064)
+++ trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2010-09-01 10:57:22 UTC (rev 19065)
@@ -87,10 +87,10 @@
boolean useFirst = true;
boolean useLast = true;
-
+
boolean useBackFast = true;
boolean useForwFast = true;
-
+
ControlsState controlsState = new ControlsState();
if (pageIndex <= minPageIdx) {
@@ -110,6 +110,7 @@
}
String boundaryControls = (String) component.getAttributes().get("boundaryControls");
+ String stepControls = (String) component.getAttributes().get("stepControls");
String fastControls = (String) component.getAttributes().get("fastControls");
boolean isAuto = "auto".equals(boundaryControls);
@@ -125,7 +126,21 @@
controlsState.setFirstRendered(false);
controlsState.setLastRendered(false);
}
+
+ isAuto = "auto".equals(stepControls);
+ if (isAuto || "show".equals(stepControls)) {
+ if (isAuto) {
+ controlsState.setPreviousRendered(useFirst);
+ controlsState.setNextRendered(useLast);
+ }
+ controlsState.setPreviousEnabled(useFirst);
+ controlsState.setNextEnabled(useLast);
+ } else {
+ controlsState.setPreviousRendered(false);
+ controlsState.setNextRendered(false);
+ }
+
isAuto = "auto".equals(fastControls);
if (isAuto || "show".equals(fastControls)) {
if (isAuto) {
@@ -253,9 +268,17 @@
left.put(clientId + "_ds_fr", AbstractDataScroller.FAST_REWIND_FACET_NAME);
}
+ if (controlsState.getPreviousRendered() && controlsState.getPreviousEnabled()) {
+ left.put(clientId + "_ds_prev", AbstractDataScroller.PREVIOUS_FACET_NAME);
+ }
+
if (controlsState.getFastForwardRendered() && controlsState.getFastForwardEnabled()) {
right.put(clientId + "_ds_ff", AbstractDataScroller.FAST_FORWARD_FACET_NAME);
}
+
+ if (controlsState.getNextRendered() && controlsState.getNextEnabled()) {
+ right.put(clientId + "_ds_next", AbstractDataScroller.NEXT_FACET_NAME);
+ }
if (controlsState.getLastRendered() && controlsState.getLastEnabled()) {
right.put(clientId + "_ds_l", AbstractDataScroller.LAST_FACET_NAME);
@@ -306,6 +329,10 @@
definition.addToBody(buffer);
return definition;
}
+
+ public void encodeFacet(FacesContext context, UIComponent component) throws IOException {
+ component.encodeAll(context);
+ }
public boolean getRendersChildren() {
return true;
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js 2010-09-01 10:26:09 UTC (rev 19064)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/datascroller.js 2010-09-01 10:57:22 UTC (rev 19065)
@@ -132,13 +132,21 @@
RichFaces.Event.fireById(this.id, this.getScrollEventName(), {'page' : page});
}
},
-
+
+ fastForward: function() {
+ this.switchToPage("fastforward");
+ },
+
+ fastRewind: function() {
+ this.switchToPage("fastrewind");
+ },
+
next: function() {
- this.switchToPage("fastforward");
+ this.switchToPage("next");
},
previous: function() {
- this.switchToPage("fastrewind");
+ this.switchToPage("previous");
},
first: function() {
Modified: trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml 2010-09-01 10:26:09 UTC (rev 19064)
+++ trunk/ui/iteration/ui/src/main/templates/datascroller.template.xml 2010-09-01 10:57:22 UTC (rev 19065)
@@ -1,8 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core" xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee">
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude">
<cc:interface>
<cdk:class>org.richfaces.renderkit.html.DataScrollerRenderer</cdk:class>
@@ -12,81 +36,79 @@
</cc:interface>
<cc:implementation>
-
<cdk:object type="org.richfaces.renderkit.ControlsState" name="controlsState" value="#{getControlsState(facesContext,component)}" />
<span id="#{clientId}" class="rf-ds"><!-- Now decor is disabled !!! -->
+
<c:if test="#{controlsState.firstRendered}">
- <c:choose>
- <c:when test="#{controlsState.firstEnabled}">
- <a id="#{clientId}_ds_f" class="rf-ds-btn rf-ds-l" href="javascript:void(0)" >
- ««
- </a>
- </c:when>
- <c:otherwise>
- <span id="#{clientId}_ds_f" class="rf-ds-btn rf-ds-l rf-ds-dis">
- ««
- </span>
- </c:otherwise>
- </c:choose>
+ <cdk:object type="boolean" name="isEnabled" value="#{controlsState.firstEnabled}"/>
+ <cdk:object type="UIComponent" name="facet" value="#{component.getFacet('first')}"/>
+ <cdk:object type="String" name="enabledStyles" value="rf-ds-btn rf-ds-l"/>
+ <cdk:object type="String" name="disabledStyles" value="rf-ds-btn rf-ds-l rf-ds-dis"/>
+ <cdk:object type="String" name="id" value="#{clientId}_ds_f"/>
+ <cdk:object type="String" name="defaultText" value="««««"/>
+ <xi:include xpointer="xpointer(/*)" href="buttons.template.include" />
</c:if>
-
<c:if test="#{controlsState.fastRewindRendered}">
- <c:choose>
- <c:when test="#{controlsState.fastRewindEnabled}">
- <a id="#{clientId}_ds_fr" class="rf-ds-btn rf-ds-l" href="javascript:void(0)">
- «
- </a>
- </c:when>
- <c:otherwise>
- <span id="#{clientId}_ds_fr" class="rf-ds-btn rf-ds-l rf-ds-dis">
- «
- </span>
- </c:otherwise>
- </c:choose>
+ <cdk:object type="boolean" name="isEnabled" value="#{controlsState.fastRewindEnabled}"/>
+ <cdk:object type="UIComponent" name="facet" value="#{component.getFacet('fastRewind')}"/>
+ <cdk:object type="java.lang.String" name="enabledStyles" value="rf-ds-btn rf-ds-l"/>
+ <cdk:object type="java.lang.String" name="disabledStyles" value="rf-ds-btn rf-ds-l rf-ds-dis"/>
+ <cdk:object type="java.lang.String" name="id" value="#{clientId}_ds_fr"/>
+ <cdk:object type="java.lang.String" name="defaultText" value="««"/>
+ <xi:include xpointer="xpointer(/*)" href="buttons.template.include" />
</c:if>
+
+ <c:if test="#{controlsState.previousRendered}">
+ <cdk:object name="isEnabled" value="#{controlsState.previousEnabled}"/>
+ <cdk:object name="facet" value="#{component.getFacet('previous')}"/>
+ <cdk:object type="java.lang.String" name="enabledStyles" value="rf-ds-btn rf-ds-l"/>
+ <cdk:object type="java.lang.String" name="disabledStyles" value="rf-ds-btn rf-ds-l rf-ds-dis"/>
+ <cdk:object name="id" value="#{clientId}_ds_prev"/>
+ <cdk:object name="defaultText" value="«"/>
+ <xi:include xpointer="xpointer(/*)" href="buttons.template.include" />
+ </c:if>
- <cdk:object type="java.util.Map" name="digitals" value="#{renderPager(responseWriter, facesContext, component)}" />
-
- <c:if test="#{controlsState.fastForwardRendered}">
- <c:choose>
- <c:when test="#{controlsState.fastForwardEnabled}">
- <a id="#{clientId}_ds_ff" class="rf-ds-btn rf-ds-r" href="javascript:void(0);">
- »
- </a>
- </c:when>
- <c:otherwise>
- <span id="#{clientId}_ds_ff" class="rf-ds-btn rf-ds-r rf-ds-dis">
- »
- </span>
- </c:otherwise>
- </c:choose>
+ <cdk:object type="java.util.Map" name="digitals" value="#{renderPager(responseWriter, facesContext, component)}" />
+
+ <c:if test="#{controlsState.nextRendered}">
+ <cdk:object name="isEnabled" value="#{controlsState.nextEnabled}"/>
+ <cdk:object name="facet" value="#{component.getFacet('next')}"/>
+ <cdk:object type="java.lang.String" name="enabledStyles" value="rf-ds-btn rf-ds-r"/>
+ <cdk:object type="java.lang.String" name="disabledStyles" value="rf-ds-btn rf-ds-r rf-ds-dis"/>
+ <cdk:object name="id" value="#{clientId}_ds_next"/>
+ <cdk:object name="defaultText" value="»"/>
+ <xi:include xpointer="xpointer(/*)" href="buttons.template.include" />
</c:if>
+ <c:if test="#{controlsState.fastForwardRendered}">
+ <cdk:object name="isEnabled" value="#{controlsState.fastForwardEnabled}"/>
+ <cdk:object name="facet" value="#{component.getFacet('fastForward')}"/>
+ <cdk:object type="java.lang.String" name="enabledStyles" value="rf-ds-btn rf-ds-r"/>
+ <cdk:object type="java.lang.String" name="disabledStyles" value="rf-ds-btn rf-ds-r rf-ds-dis"/>
+ <cdk:object name="id" value="#{clientId}_ds_ff"/>
+ <cdk:object name="defaultText" value="»»"/>
+ <xi:include xpointer="xpointer(/*)" href="buttons.template.include" />
+ </c:if>
+
<c:if test="#{controlsState.lastRendered}">
- <c:choose>
- <c:when test="#{controlsState.lastEnabled}">
- <a id="#{clientId}_ds_l" class="rf-ds-btn rf-ds-r" href="javascript:void(0);">
- »»
- </a>
- </c:when>
- <c:otherwise>
- <span id="#{clientId}_ds_l" class="rf-ds-btn rf-ds-r rf-ds-dis">
- »»
- </span>
- </c:otherwise>
- </c:choose>
- </c:if>
-
+ <cdk:object name="isEnabled" value="#{controlsState.lastEnabled}"/>
+ <cdk:object name="facet" value="#{component.getFacet('last')}"/>
+ <cdk:object type="java.lang.String" name="enabledStyles" value="rf-ds-btn rf-ds-r"/>
+ <cdk:object type="java.lang.String" name="disabledStyles" value="rf-ds-btn rf-ds-r rf-ds-dis"/>
+ <cdk:object name="id" value="#{clientId}_ds_l"/>
+ <cdk:object name="defaultText" value="»»»»"/>
+ <xi:include xpointer="xpointer(/*)" href="buttons.template.include" />
+ </c:if>
+
<cdk:object type="java.util.Map" name="buttons" value="#{getControls(facesContext, component, controlsState)}" />
<script type="text/javascript">
<cdk:call expression="buildScript(responseWriter, facesContext, component, buttons, digitals);"/>
</script>
</span>
-
-
+
</cc:implementation>
</cdk:root>
\ No newline at end of file
14 years, 3 months
JBoss Rich Faces SVN: r19064 - in modules/tests/metamer/trunk/application/src/main: webapp and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-01 06:26:09 -0400 (Wed, 01 Sep 2010)
New Revision: 19064
Added:
modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
Log:
* version of JDK, JSF, operating system and browser added to VersionBean
* footer in templates remade
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-01 10:23:37 UTC (rev 19063)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/VersionBean.java 2010-09-01 10:26:09 UTC (rev 19064)
@@ -21,11 +21,20 @@
*******************************************************************************/
package org.richfaces.tests.metamer.bean;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
+import java.net.URL;
+import java.security.CodeSource;
import java.util.Properties;
+import java.util.jar.JarInputStream;
+import java.util.jar.Manifest;
import javax.annotation.PostConstruct;
import javax.faces.bean.ApplicationScoped;
import javax.faces.bean.ManagedBean;
+import javax.faces.context.FacesContext;
+import javax.servlet.http.HttpServletRequest;
import org.richfaces.log.RichfacesLogger;
import org.richfaces.log.Logger;
@@ -47,6 +56,7 @@
private String scmRevision;
private String scmTimestamp;
private String fullVersion;
+ private String jsfVersion;
/**
* Initializes the managed bean.
@@ -102,6 +112,61 @@
return fullVersion;
}
+ public String getJavaVersion() {
+ return System.getProperty("java.runtime.name") + " " + System.getProperty("java.runtime.version");
+ }
+
+ public String getOsVersion() {
+ return System.getProperty("os.name") + " " + System.getProperty("os.version");
+ }
+
+ public String getJsfVersion() {
+ if (jsfVersion != null) {
+ return jsfVersion;
+ }
+
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ if (facesContext == null) {
+ return null;
+ }
+
+ Class<?> applicationClass = facesContext.getApplication().getClass();
+ JarInputStream jarInputStream = null;
+
+ try {
+ CodeSource codeSource = applicationClass.getProtectionDomain().getCodeSource();
+ URL url = codeSource.getLocation();
+ File file = new File(url.getFile());
+ jarInputStream = new JarInputStream(new FileInputStream(file));
+ Manifest manifest = jarInputStream.getManifest();
+
+ if (manifest != null && manifest.getMainAttributes() != null) {
+ jsfVersion = manifest.getMainAttributes().getValue("Implementation-Title");
+ jsfVersion += " ";
+ jsfVersion += manifest.getMainAttributes().getValue("Implementation-Version");
+ } else {
+ jsfVersion = "Unknown version of JSF";
+ }
+ } catch (Exception e) {
+ LOGGER.error(e);
+ } finally {
+ if (jarInputStream != null) {
+ try {
+ jarInputStream.close();
+ } catch (IOException e) {
+ LOGGER.error(e);
+ }
+ }
+ }
+
+ return jsfVersion;
+ }
+
+ public String getBrowserVersion() {
+ HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest();
+ return request.getHeader("user-agent");
+ }
+
@Override
public String toString() {
return getFullVersion();
Modified: modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2010-09-01 10:23:37 UTC (rev 19063)
+++ modules/tests/metamer/trunk/application/src/main/webapp/index.xhtml 2010-09-01 10:26:09 UTC (rev 19064)
@@ -22,7 +22,8 @@
<!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:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jsp/jstl/core"
- xmlns:a4j="http://richfaces.org/a4j">
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
<title>Metamer: RichFaces Testing Application</title>
@@ -59,11 +60,7 @@
</h:panelGroup>
</h:panelGrid>
- <hr style="width: 1050px; margin-left: 0px;"/>
- #{a4j.version}
- <br/>
- #{metamer.fullVersion}
-
+ <ui:include src="/templates/footer.xhtml" />
</h:form>
</h:body>
</html>
\ No newline at end of file
Added: modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml (rev 0)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/footer.xhtml 2010-09-01 10:26:09 UTC (rev 19064)
@@ -0,0 +1,37 @@
+<!--
+JBoss, Home of Professional Open Source
+Copyright 2010, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+This software is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:a4j="http://richfaces.org/a4j" xmlns:c="http://java.sun.com/jsp/jstl/core">
+
+ <hr style="width: 1050px; margin-left: 0px;"/>
+ <ul>
+ <li><h:outputText id="richfacesVersion" value="#{a4j.version}"/></li>
+ <li><h:outputText id="metamerVersion" value="#{metamer.fullVersion}"/></li>
+ <li><h:outputText id="javaVersion" value="#{metamer.javaVersion}"/></li>
+ <li><h:outputText id="osVersion" value="#{metamer.osVersion}"/></li>
+ <li><h:outputText id="jsfVersion" value="#{metamer.jsfVersion}"/></li>
+ <li><h:outputText id="browserVersion" value="#{metamer.browserVersion}"/></li>
+ </ul>
+
+</ui:composition>
\ No newline at end of file
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml 2010-09-01 10:23:37 UTC (rev 19063)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/list.xhtml 2010-09-01 10:26:09 UTC (rev 19064)
@@ -47,9 +47,6 @@
<ui:insert name="links">Insert some links to pages here</ui:insert>
</h:panelGroup>
- <hr style="width: 900px; margin-left: 0px;"/>
- #{a4j.version}
- <br/>
- #{metamer.fullVersion}
+ <ui:include src="/templates/footer.xhtml" />
</h:body>
</html>
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2010-09-01 10:23:37 UTC (rev 19063)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/template.xhtml 2010-09-01 10:26:09 UTC (rev 19064)
@@ -67,10 +67,7 @@
<div class="footer">
<ui:insert name="footer">
- <hr />
- #{a4j.version}
- <br/>
- #{metamer.fullVersion}
+ <ui:include src="/templates/footer.xhtml" />
</ui:insert>
</div>
14 years, 3 months
JBoss Rich Faces SVN: r19063 - modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-09-01 06:23:37 -0400 (Wed, 01 Sep 2010)
New Revision: 19063
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml
Log:
* useless text replaced by current time
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml 2010-09-01 10:02:54 UTC (rev 19062)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/a4jAjax/hGraphicImage.xhtml 2010-09-01 10:23:37 UTC (rev 19063)
@@ -59,8 +59,12 @@
/>
</h:graphicImage>
+ <br/><br/>
+
<a4j:outputPanel id="output">
- <h:outputText value="#{a4jAjaxBean.input}"/>
+ <h:outputText value="#{timeBean.date}">
+ <f:convertDateTime pattern="HH:mm:ss.SSS" />
+ </h:outputText>
</a4j:outputPanel>
</ui:define>
14 years, 3 months