JBoss Rich Faces SVN: r21933 - in branches/4.0.0.CR1/ui/output/ui/src/main: java/org/richfaces/renderkit/html and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2011-02-25 06:53:36 -0500 (Fri, 25 Feb 2011)
New Revision: 21933
Modified:
branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js
branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
Log:
https://jira.jboss.org/browse/RF-10517
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-02-25 10:46:14 UTC (rev 21932)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuGroup.java 2011-02-25 11:53:36 UTC (rev 21933)
@@ -30,6 +30,7 @@
import javax.el.MethodExpression;
import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
@@ -126,8 +127,8 @@
}
@Attribute
- public boolean isExpanded() {
- return getValue() == null ? false : (Boolean) getValue();
+ public Boolean isExpanded() {
+ return (Boolean) getValue();
}
public void setExpanded(boolean expanded) {
@@ -323,4 +324,46 @@
@Attribute(events = @EventName("beforeselect"))
public abstract String getOnbeforeselect();
+
+ public boolean hasActiveItem(UIComponent component, String activeItem) {
+ if (activeItem == null) {
+ return false;
+ }
+ if (component instanceof AbstractPanelMenuItem) {
+ AbstractPanelMenuItem item = (AbstractPanelMenuItem) component;
+ if (activeItem.equals(item.getName())) {
+ return true;
+ }
+ }
+
+ if (component instanceof AbstractPanelMenuGroup) {
+ AbstractPanelMenuGroup group = (AbstractPanelMenuGroup) component;
+ if (!group.getPanelMenu().isBubbleSelection()) {
+ return false;
+ }
+ }
+
+ if (component.getChildCount() > 0) {
+ for (UIComponent child : component.getChildren()) {
+ if (!child.isRendered()) {
+ continue;
+ }
+
+ if (!(child instanceof AbstractPanelMenuItem)) {
+ continue;
+ }
+
+ if (hasActiveItem(child, activeItem)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+ }
+
+ public boolean getState() {
+ Boolean flag = this.isExpanded();
+ return (flag == null ? this.hasActiveItem(this, this.getPanelMenu().getActiveItem()) : flag);
+ }
}
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-02-25 10:46:14 UTC (rev 21932)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-02-25 11:53:36 UTC (rev 21933)
@@ -45,6 +45,10 @@
protected AbstractPanelMenuItem() {
setRendererType("org.richfaces.PanelMenuItemRenderer");
}
+
+ public boolean isActiveItem() {
+ return this.getName().equals(this.getPanelMenu().getActiveItem());
+ }
public boolean isTopItem() {
return getParentItem() instanceof AbstractPanelMenu;
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-02-25 10:46:14 UTC (rev 21932)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-02-25 11:53:36 UTC (rev 21933)
@@ -43,14 +43,11 @@
import javax.faces.context.ResponseWriter;
import javax.faces.event.ActionEvent;
-import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSObject;
-import org.ajax4jsf.javascript.ScriptUtils;
import org.richfaces.PanelMenuMode;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.component.AbstractPanelMenuGroup;
import org.richfaces.component.AbstractPanelMenuItem;
-import org.richfaces.renderkit.HtmlConstants;
import com.google.common.base.Strings;
@@ -117,7 +114,7 @@
writer.writeAttribute(ID_ATTRIBUTE, expanded, null);
writer.writeAttribute(NAME_ATTRIBUTE, expanded, null);
writer.writeAttribute(TYPE_ATTR, INPUT_TYPE_HIDDEN, null);
- writer.writeAttribute(VALUE_ATTRIBUTE, String.valueOf(menuGroup.isExpanded()), null);
+ writer.writeAttribute(VALUE_ATTRIBUTE, String.valueOf(menuGroup.getState()), null);
writer.endElement(INPUT_ELEM);
encodeHeader(writer, context, menuGroup);
@@ -128,7 +125,8 @@
writer.startElement(DIV_ELEM, null);
writer.writeAttribute(ID_ATTRIBUTE, menuGroup.getClientId(context) + ":hdr", null);
writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(getCssClass(menuGroup, "-hdr"),
- "rf-pm-hdr-" + (menuGroup.isExpanded() ? "exp" : "colps"),
+ "rf-pm-hdr-" + (menuGroup.getState() ? "exp" : "colps"),
+ (menuGroup.getPanelMenu().isBubbleSelection() && menuGroup.hasActiveItem(menuGroup, menuGroup.getPanelMenu().getActiveItem()) ? getCssClass(menuGroup, "-sel") : ""),
PanelMenuItemRenderer.isParentPanelMenuDisabled(menuGroup) || menuGroup.isDisabled() ? getCssClass(menuGroup, "-hdr-dis") : null), null);
(menuGroup.isTopItem() ? topHeaderRenderer : headerRenderer).encodeHeader(writer, context, menuGroup);
@@ -143,7 +141,7 @@
private void encodeContentBegin(ResponseWriter writer, FacesContext context, AbstractPanelMenuGroup menuGroup) throws IOException {
writer.startElement(DIV_ELEM, null);
writer.writeAttribute(ID_ATTRIBUTE, menuGroup.getClientId(context) + ":cnt", null);
- writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(getCssClass(menuGroup, "-cnt"), menuGroup.isExpanded() ? "rf-pm-exp" : "rf-pm-colps"), null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(getCssClass(menuGroup, "-cnt"), menuGroup.getState() ? "rf-pm-exp" : "rf-pm-colps"), null);
writeJavaScript(writer, context, menuGroup);
}
@@ -202,9 +200,10 @@
options.put("disabled", PanelMenuItemRenderer.isParentPanelMenuDisabled(panelMenuGroup) || panelMenuGroup.isDisabled());
options.put("expandEvent", getExpandEvent(panelMenuGroup));
options.put("collapseEvent", getCollapseEvent(panelMenuGroup));
- options.put("expanded", panelMenuGroup.isExpanded());
+ options.put("expanded", panelMenuGroup.getState());
options.put("selectable", panelMenuGroup.isSelectable());
options.put("unselectable", panelMenuGroup.isUnselectable());
+ options.put("stylePrefix", getCssClass(panelMenuGroup, ""));
addEventOption(context, panelMenuGroup, options, COLLAPSE);
addEventOption(context, panelMenuGroup, options, EXPAND);
@@ -235,40 +234,6 @@
return true;
}
- private boolean containsActiveItem(UIComponent component, String activeItem) {
- if (component instanceof AbstractPanelMenuItem) {
- AbstractPanelMenuItem item = (AbstractPanelMenuItem) component;
- if (activeItem.equals(item.getName())) {
- return true;
- }
- }
-
- if (component instanceof AbstractPanelMenuGroup) {
- AbstractPanelMenuGroup group = (AbstractPanelMenuGroup) component;
- if (!group.getPanelMenu().isBubbleSelection()) {
- return false;
- }
- }
-
- if (component.getChildCount() > 0) {
- for (UIComponent child : component.getChildren()) {
- if (!child.isRendered()) {
- continue;
- }
-
- if (!(child instanceof AbstractPanelMenuItem)) {
- continue;
- }
-
- if (containsActiveItem(child, activeItem)) {
- return true;
- }
- }
- }
-
- return false;
- }
-
@Override
protected void doEncodeChildren(ResponseWriter writer, FacesContext context, UIComponent component)
throws IOException {
@@ -277,16 +242,8 @@
boolean isClientMode = group.getMode() == PanelMenuMode.client;
- if (isClientMode || group.isExpanded()) {
+ if (isClientMode || group.getState()) {
renderChildren(context, component);
- } else {
- String activeItem = group.getPanelMenu().getActiveItem();
- if (!Strings.isNullOrEmpty(activeItem) && containsActiveItem(component, activeItem)) {
- writer.startElement(HtmlConstants.SCRIPT_ELEM, component);
- writer.writeAttribute(HtmlConstants.TYPE_ATTR, HtmlConstants.TEXT_JAVASCRIPT_TYPE, null);
- writer.writeText(ScriptUtils.toScript(new JSFunction("RichFaces.$", component.getClientId(context))) + ".__restoreSelection();", null);
- writer.endElement(HtmlConstants.SCRIPT_ELEM);
- }
}
}
}
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-02-25 10:46:14 UTC (rev 21932)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuItemRenderer.java 2011-02-25 11:53:36 UTC (rev 21933)
@@ -189,13 +189,14 @@
writer.endElement(TD_ELEM);
}
-
+
@Override
protected String getStyleClass(UIComponent component) {
AbstractPanelMenuItem menuItem = (AbstractPanelMenuItem) component;
return concatClasses(getCssClass(menuItem, ""),
attributeAsString(component, "styleClass"),
PanelMenuItemRenderer.isParentPanelMenuDisabled(menuItem) || menuItem.isDisabled() ? getCssClass(menuItem, "-dis") : "",
+ (menuItem.isActiveItem() ? getCssClass(menuItem, "-sel") : ""),
PanelMenuItemRenderer.isParentPanelMenuDisabled(menuItem) || menuItem.isDisabled() ? attributeAsString(component, "disabledClass") : "");
}
@@ -221,6 +222,7 @@
options.put("name", panelMenuItem.getName());
options.put("selectable", panelMenuItem.isSelectable());
options.put("unselectable", panelMenuItem.isUnselectable());
+ options.put("stylePrefix", getCssClass(panelMenuItem, ""));
addEventOption(context, panelMenuItem, options, UNSELECT);
addEventOption(context, panelMenuItem, options, SELECT);
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js 2011-02-25 10:46:14 UTC (rev 21932)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.js 2011-02-25 11:53:36 UTC (rev 21933)
@@ -107,7 +107,7 @@
* @return {String} TODO ...
*/
selectedItem: function (id) {
- if (id != undefined) {
+ if (typeof id != "undefined") {
var valueInput = this.__getValueInput();
var prevActiveItem = valueInput.value;
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-02-25 10:46:14 UTC (rev 21932)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-02-25 11:53:36 UTC (rev 21933)
@@ -161,10 +161,6 @@
// todo move it
this.selectionClass = this.options.stylePrefix + "-sel";
- if (panelMenu.__isActiveItem(this)) {
- rootElt.ready($.proxy(this.__restoreSelection, this));
- }
-
if (!this.options.disabled) {
var item = this;
@@ -292,11 +288,6 @@
__header : function () {
return this.__item();
},
-
- __restoreSelection: function() {
- this.__select();
- //this.__fireSelect();
- },
__isSelected: function() {
return this.__header().hasClass(this.selectionClass);
13 years, 10 months
JBoss Rich Faces SVN: r21932 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-25 05:46:14 -0500 (Fri, 25 Feb 2011)
New Revision: 21932
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java
Log:
rich:CST - fixed facet instant changes tests
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java 2011-02-25 10:22:45 UTC (rev 21931)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableFacets.java 2011-02-25 10:46:14 UTC (rev 21932)
@@ -72,7 +72,12 @@
assertEquals(selenium.getText(subtable.getHeader()), SAMPLE_STRING);
facets.setHeader(EMPTY_STRING);
- assertEquals(selenium.getText(subtable.getHeader()), EMPTY_STRING);
+ if (selenium.isElementPresent(subtable.getHeader())) {
+ assertEquals(selenium.getText(subtable.getHeader()), EMPTY_STRING);
+ }
+
+ facets.setHeader(SAMPLE_STRING);
+ assertEquals(selenium.getText(subtable.getHeader()), SAMPLE_STRING);
}
@Test
@@ -81,6 +86,11 @@
assertEquals(selenium.getText(subtable.getFooter()), SAMPLE_STRING);
facets.setFooter(EMPTY_STRING);
- assertEquals(selenium.getText(subtable.getFooter()), EMPTY_STRING);
+ if (selenium.isElementPresent(subtable.getFooter())) {
+ assertEquals(selenium.getText(subtable.getFooter()), EMPTY_STRING);
+ }
+
+ facets.setFooter(SAMPLE_STRING);
+ assertEquals(selenium.getText(subtable.getFooter()), SAMPLE_STRING);
}
}
13 years, 10 months
JBoss Rich Faces SVN: r21931 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-25 05:22:45 -0500 (Fri, 25 Feb 2011)
New Revision: 21931
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java
Log:
rich:CST - added assertions on subtable visibility after using toggler
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java 2011-02-25 09:48:06 UTC (rev 21930)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsibleSubTable/TestCollapsibleSubTableScroller.java 2011-02-25 10:22:45 UTC (rev 21931)
@@ -25,6 +25,8 @@
import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
import java.net.URL;
import java.util.List;
@@ -106,7 +108,11 @@
if (expandMode != ExpandMode.none) {
final RequestType requestType = getRequestTypeForExpandMode();
guard(selenium, requestType).click(toggler);
+ assertFalse(subtable.isVisible());
+ assertTrue(secondSubtable.isVisible());
guard(selenium, requestType).click(toggler);
+ assertTrue(subtable.isVisible());
+ assertTrue(secondSubtable.isVisible());
}
assertEquals(secondDataScroller.getCurrentPage(), secondScrollerPage);
13 years, 10 months
JBoss Rich Faces SVN: r21930 - in modules/tests/metamer/trunk: application/src/main/webapp/components/richCollapsiblePanel and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-25 04:48:06 -0500 (Fri, 25 Feb 2011)
New Revision: 21930
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
Log:
attribute bypassUpdates removed from all samples for panels
tests for bypassUpdates removed
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richAccordion/simple.xhtml 2011-02-25 09:48:06 UTC (rev 21930)
@@ -39,7 +39,6 @@
<ui:define name="component">
<rich:accordion id="accordion"
activeItem="#{richAccordionBean.attributes['activeItem'].value}"
- bypassUpdates="#{richAccordionBean.attributes['bypassUpdates'].value}"
cycledSwitching="#{richAccordionBean.attributes['cycledSwitching'].value}"
dir="#{richAccordionBean.attributes['dir'].value}"
height="#{richAccordionBean.attributes['height'].value}"
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/facets.xhtml 2011-02-25 09:48:06 UTC (rev 21930)
@@ -41,7 +41,6 @@
<rich:collapsiblePanel id="collapsiblePanel"
bodyClass="#{richCollapsiblePanelBean.attributes['bodyClass'].value}"
- bypassUpdates="#{richCollapsiblePanelBean.attributes['bypassUpdates'].value}"
dir="#{richCollapsiblePanelBean.attributes['dir'].value}"
expanded="#{richCollapsiblePanelBean.attributes['expanded'].value}"
header="#{richCollapsiblePanelBean.attributes['header'].value}"
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richCollapsiblePanel/simple.xhtml 2011-02-25 09:48:06 UTC (rev 21930)
@@ -40,7 +40,6 @@
<rich:collapsiblePanel id="collapsiblePanel"
bodyClass="#{richCollapsiblePanelBean.attributes['bodyClass'].value}"
- bypassUpdates="#{richCollapsiblePanelBean.attributes['bypassUpdates'].value}"
dir="#{richCollapsiblePanelBean.attributes['dir'].value}"
expanded="#{richCollapsiblePanelBean.attributes['expanded'].value}"
header="#{richCollapsiblePanelBean.attributes['header'].value}"
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTabPanel/simple.xhtml 2011-02-25 09:48:06 UTC (rev 21930)
@@ -40,7 +40,6 @@
<rich:tabPanel id="tabPanel"
activeItem="#{richTabPanelBean.attributes['activeItem'].value}"
- bypassUpdates="#{richTabPanelBean.attributes['bypassUpdates'].value}"
cycledSwitching="#{richTabPanelBean.attributes['cycledSwitching'].value}"
dir="#{richTabPanelBean.attributes['dir'].value}"
headerAlignment="#{richTabPanelBean.attributes['headerAlignment'].value}"
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richTogglePanel/simple.xhtml 2011-02-25 09:48:06 UTC (rev 21930)
@@ -77,7 +77,6 @@
<rich:togglePanel id="richTogglePanel"
activeItem="#{richTogglePanelBean.attributes['activeItem'].value}"
- bypassUpdates="#{richTogglePanelBean.attributes['bypassUpdates'].value}"
cycledSwitching="#{richTogglePanelBean.attributes['cycledSwitching'].value}"
dir="#{richTogglePanelBean.attributes['dir'].value}"
immediate="#{richTogglePanelBean.attributes['immediate'].value}"
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richAccordion/TestRichAccordion.java 2011-02-25 09:48:06 UTC (rev 21930)
@@ -132,20 +132,6 @@
}
@Test
- @RegressionTest("https://issues.jboss.org/browse/RF-10054")
- public void testBypassUpdates() {
- selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
- selenium.waitForPageToLoad();
-
- selenium.click(itemHeaders[2]);
- waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
-
- phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
- PhaseId.RENDER_RESPONSE);
- phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "item changed: item1 -> item3");
- }
-
- @Test
public void testCycledSwitching() {
String accordionId = selenium.getEval(new JavaScript("window.testedComponentId"));
String result = null;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richCollapsiblePanel/TestRichCollapsiblePanel.java 2011-02-25 09:48:06 UTC (rev 21930)
@@ -80,21 +80,6 @@
}
@Test
- @RegressionTest("https://issues.jboss.org/browse/RF-10054")
- public void testBypassUpdates() {
- selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
- selenium.waitForPageToLoad();
-
- String reqTime = selenium.getText(time);
- guardXhr(selenium).click(header);
- waitGui.failWith("Page was not updated").waitForChange(reqTime, retrieveText.locator(time));
-
- phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
- PhaseId.RENDER_RESPONSE);
- phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "panel collapsed");
- }
-
- @Test
public void testDir() {
testDir(panel);
}
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTabPanel/TestRichTabPanel.java 2011-02-25 09:48:06 UTC (rev 21930)
@@ -138,20 +138,6 @@
}
@Test
- @RegressionTest("https://issues.jboss.org/browse/RF-10054")
- public void testBypassUpdates() {
- selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
- selenium.waitForPageToLoad();
-
- selenium.click(inactiveHeaders[2]);
- waitGui.failWith("Tab 3 is not displayed.").until(isDisplayed.locator(itemContents[2]));
-
- phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
- PhaseId.RENDER_RESPONSE);
- phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "item changed: tab1 -> tab3");
- }
-
- @Test
public void testCycledSwitching() {
String panelId = selenium.getEval(new JavaScript("window.testedComponentId"));
String result = null;
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-02-25 09:47:08 UTC (rev 21929)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richTogglePanel/TestRichTogglePanel.java 2011-02-25 09:48:06 UTC (rev 21930)
@@ -24,12 +24,10 @@
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardHttp;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardNoRequest;
import static org.jboss.test.selenium.guard.request.RequestTypeGuardFactory.guardXhr;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
import java.net.URL;
@@ -40,7 +38,6 @@
import org.jboss.test.selenium.locator.JQueryLocator;
import org.jboss.test.selenium.waiting.EventFiredCondition;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.RegressionTest;
import org.testng.annotations.Test;
@@ -185,20 +182,6 @@
}
@Test
- @RegressionTest("https://issues.jboss.org/browse/RF-10054")
- public void testBypassUpdates() {
- selenium.click(pjq("input[type=radio][name$=bypassUpdatesInput][value=true]"));
- selenium.waitForPageToLoad();
-
- selenium.click(tc3);
- waitGui.failWith("Item 3 is not displayed.").until(isDisplayed.locator(item3));
-
- phaseInfo.assertPhases(PhaseId.RESTORE_VIEW, PhaseId.APPLY_REQUEST_VALUES, PhaseId.PROCESS_VALIDATIONS,
- PhaseId.RENDER_RESPONSE);
- phaseInfo.assertListener(PhaseId.PROCESS_VALIDATIONS, "item changed: item1 -> item3");
- }
-
- @Test
public void testCycledSwitching() {
selenium.click(pjq("input[type=radio][name$=cycledSwitchingInput][value=true]"));
selenium.waitForPageToLoad();
13 years, 10 months
JBoss Rich Faces SVN: r21929 - in modules/tests/metamer/trunk: application and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2011-02-25 04:47:08 -0500 (Fri, 25 Feb 2011)
New Revision: 21929
Modified:
modules/tests/metamer/trunk/application/pom.xml
modules/tests/metamer/trunk/pom.xml
Log:
header in pom updated
Modified: modules/tests/metamer/trunk/application/pom.xml
===================================================================
--- modules/tests/metamer/trunk/application/pom.xml 2011-02-24 19:26:34 UTC (rev 21928)
+++ modules/tests/metamer/trunk/application/pom.xml 2011-02-25 09:47:08 UTC (rev 21929)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- JBoss, Home of Professional Open Source Copyright 2010, Red Hat, Inc. and individual contributors by the
+ JBoss, Home of Professional Open Source Copyright 2010-2011, 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
Modified: modules/tests/metamer/trunk/pom.xml
===================================================================
--- modules/tests/metamer/trunk/pom.xml 2011-02-24 19:26:34 UTC (rev 21928)
+++ modules/tests/metamer/trunk/pom.xml 2011-02-25 09:47:08 UTC (rev 21929)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- JBoss, Home of Professional Open Source Copyright 2010, Red Hat, Inc.
+ JBoss, Home of Professional Open Source Copyright 2010-2011, Red Hat, Inc.
and individual contributors by the @authors tag. See the copyright.txt
in the distribution for a full listing of individual contributors.
13 years, 10 months
JBoss Rich Faces SVN: r21928 - branches/4.0.0.CR1/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-02-24 14:26:34 -0500 (Thu, 24 Feb 2011)
New Revision: 21928
Modified:
branches/4.0.0.CR1/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
Log:
RF-10596
Modified: branches/4.0.0.CR1/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
===================================================================
--- branches/4.0.0.CR1/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2011-02-24 18:56:11 UTC (rev 21927)
+++ branches/4.0.0.CR1/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2011-02-24 19:26:34 UTC (rev 21928)
@@ -164,7 +164,8 @@
var originalEncoding = this.form.attr("encoding");
var originalEnctype = this.form.attr("enctype");
try {
- this.form.attr("action", originalAction + "?" + UID + "=" + this.loadableItem.uid);
+ var delimiter = originalAction.indexOf("?") == -1 ? "?" : "&";
+ this.form.attr("action", originalAction + delimiter + UID + "=" + this.loadableItem.uid);
this.form.attr("encoding", "multipart/form-data");
this.form.attr("enctype", "multipart/form-data");
richfaces.submitForm(this.form, {"org.richfaces.ajax.component": this.id}, this.id);
13 years, 10 months
JBoss Rich Faces SVN: r21927 - branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-02-24 13:56:11 -0500 (Thu, 24 Feb 2011)
New Revision: 21927
Modified:
branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java
Log:
RF-10595
Modified: branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java
===================================================================
--- branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java 2011-02-24 17:45:09 UTC (rev 21926)
+++ branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java 2011-02-24 18:56:11 UTC (rev 21927)
@@ -21,10 +21,8 @@
*/
package org.richfaces.view.facelets;
-import java.io.Serializable;
-
import javax.el.MethodExpression;
-import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
import javax.faces.view.facelets.ComponentConfig;
import javax.faces.view.facelets.ComponentHandler;
import javax.faces.view.facelets.FaceletContext;
@@ -35,8 +33,9 @@
import javax.faces.view.facelets.TagAttribute;
import org.richfaces.component.AbstractFileUpload;
+import org.richfaces.event.FileUploadEvent;
import org.richfaces.event.FileUploadListener;
-import org.richfaces.event.FileUploadEvent;
+import org.richfaces.event.MethodExpressionEventListener;
/**
* @author Konstantin Mishin
@@ -44,17 +43,18 @@
*/
public class FileUploadHandler extends ComponentHandler {
- public static final class FileUploadListenerImpl implements FileUploadListener, Serializable {
+ public static final class FileUploadListenerImpl extends MethodExpressionEventListener implements FileUploadListener {
- private static final long serialVersionUID = -3824721864533652683L;
- private MethodExpression expression;
+ public FileUploadListenerImpl() {
+ super();
+ }
public FileUploadListenerImpl(MethodExpression expression) {
- this.expression = expression;
+ super(expression);
}
- public void processUpload(FileUploadEvent event) {
- expression.invoke(FacesContext.getCurrentInstance().getELContext(), new Object[] {event});
+ public void processUpload(FileUploadEvent event) throws AbortProcessingException {
+ processEvent(event);
}
}
13 years, 10 months
JBoss Rich Faces SVN: r21926 - branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2011-02-24 12:45:09 -0500 (Thu, 24 Feb 2011)
New Revision: 21926
Modified:
branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java
Log:
RF-10595
Modified: branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java
===================================================================
--- branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java 2011-02-24 17:18:45 UTC (rev 21925)
+++ branches/4.0.0.CR1/ui/input/ui/src/main/java/org/richfaces/view/facelets/FileUploadHandler.java 2011-02-24 17:45:09 UTC (rev 21926)
@@ -21,7 +21,10 @@
*/
package org.richfaces.view.facelets;
+import java.io.Serializable;
+
import javax.el.MethodExpression;
+import javax.faces.context.FacesContext;
import javax.faces.view.facelets.ComponentConfig;
import javax.faces.view.facelets.ComponentHandler;
import javax.faces.view.facelets.FaceletContext;
@@ -41,6 +44,20 @@
*/
public class FileUploadHandler extends ComponentHandler {
+ public static final class FileUploadListenerImpl implements FileUploadListener, Serializable {
+
+ private static final long serialVersionUID = -3824721864533652683L;
+ private MethodExpression expression;
+
+ public FileUploadListenerImpl(MethodExpression expression) {
+ this.expression = expression;
+ }
+
+ public void processUpload(FileUploadEvent event) {
+ expression.invoke(FacesContext.getCurrentInstance().getELContext(), new Object[] {event});
+ }
+ }
+
public FileUploadHandler(ComponentConfig config) {
super(config);
}
@@ -58,11 +75,7 @@
@Override
public void applyMetadata(final FaceletContext ctx, Object instance) {
final MethodExpression expression = getMethodExpression(ctx);
- ((AbstractFileUpload) instance).addFileUploadListener(new FileUploadListener(){
- public void processUpload(FileUploadEvent event) {
- expression.invoke(ctx.getFacesContext().getELContext(), new Object[] {event});
- }
- });
+ ((AbstractFileUpload) instance).addFileUploadListener(new FileUploadListenerImpl(expression));
}
};
}
13 years, 10 months
JBoss Rich Faces SVN: r21925 - in branches/4.0.0.CR1/ui: iteration/ui/src/main/java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-24 12:18:45 -0500 (Thu, 24 Feb 2011)
New Revision: 21925
Added:
branches/4.0.0.CR1/ui/common/ui/src/main/java/org/richfaces/StateHolderList.java
Modified:
branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java
Log:
Added: branches/4.0.0.CR1/ui/common/ui/src/main/java/org/richfaces/StateHolderList.java
===================================================================
--- branches/4.0.0.CR1/ui/common/ui/src/main/java/org/richfaces/StateHolderList.java (rev 0)
+++ branches/4.0.0.CR1/ui/common/ui/src/main/java/org/richfaces/StateHolderList.java 2011-02-24 17:18:45 UTC (rev 21925)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2011, 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.
+ */
+package org.richfaces;
+
+import java.util.AbstractList;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import javax.faces.component.StateHolder;
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+import com.google.common.collect.Lists;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public class StateHolderList extends AbstractList<Object> implements StateHolder {
+
+ private boolean tranzient = false;
+
+ private ArrayList<Object> backingList = Lists.newArrayListWithCapacity(2);
+
+ public Object saveState(FacesContext context) {
+ Object[] savedState = new Object[backingList.size()];
+
+ boolean hasNonNullState = false;
+
+ for (int i = 0; i < savedState.length; i++) {
+ Object state = UIComponentBase.saveAttachedState(context, backingList.get(i));
+ savedState[i] = state;
+
+ if (state != null) {
+ hasNonNullState = true;
+ }
+ }
+
+ if (hasNonNullState) {
+ return savedState;
+ } else {
+ return null;
+ }
+ }
+
+ public void restoreState(FacesContext context, Object stateObject) {
+ if (stateObject != null) {
+ Object[] state = (Object[]) stateObject;
+
+ backingList.ensureCapacity(state.length);
+
+ for (int i = 0; i < state.length; i++) {
+ backingList.add(UIComponentBase.restoreAttachedState(context, state[i]));
+ }
+ }
+ }
+
+ public boolean isTransient() {
+ return tranzient;
+ }
+
+ public void setTransient(boolean newTransientValue) {
+ this.tranzient = newTransientValue;
+ }
+
+ public boolean contains(Object o) {
+ return backingList.contains(o);
+ }
+
+ public Iterator<Object> iterator() {
+ return backingList.iterator();
+ }
+
+ public boolean add(Object e) {
+ return backingList.add(e);
+ }
+
+ public boolean remove(Object o) {
+ return backingList.remove(o);
+ }
+
+ public boolean containsAll(Collection<?> c) {
+ return backingList.containsAll(c);
+ }
+
+ public boolean addAll(Collection<? extends Object> c) {
+ return backingList.addAll(c);
+ }
+
+ public boolean addAll(int index, Collection<? extends Object> c) {
+ return backingList.addAll(index, c);
+ }
+
+ public boolean removeAll(Collection<?> c) {
+ return backingList.removeAll(c);
+ }
+
+ public boolean retainAll(Collection<?> c) {
+ return backingList.retainAll(c);
+ }
+
+ public void clear() {
+ backingList.clear();
+ }
+
+ public Object set(int index, Object element) {
+ return backingList.set(index, element);
+ }
+
+ public void add(int index, Object element) {
+ backingList.add(index, element);
+ }
+
+ public Object remove(int index) {
+ return backingList.remove(index);
+ }
+
+ public int indexOf(Object o) {
+ return backingList.indexOf(o);
+ }
+
+ public int lastIndexOf(Object o) {
+ return backingList.lastIndexOf(o);
+ }
+
+ public ListIterator<Object> listIterator() {
+ return backingList.listIterator();
+ }
+
+ public ListIterator<Object> listIterator(int index) {
+ return backingList.listIterator(index);
+ }
+
+ public List<Object> subList(int fromIndex, int toIndex) {
+ return backingList.subList(fromIndex, toIndex);
+ }
+
+ @Override
+ public Object get(int index) {
+ return backingList.get(index);
+ }
+
+ @Override
+ public int size() {
+ return backingList.size();
+ }
+
+}
Modified: branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java
===================================================================
--- branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java 2011-02-24 16:54:18 UTC (rev 21924)
+++ branches/4.0.0.CR1/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java 2011-02-24 17:18:45 UTC (rev 21925)
@@ -28,6 +28,7 @@
import javax.faces.event.AbortProcessingException;
import javax.faces.event.FacesEvent;
+import org.richfaces.StateHolderList;
import org.richfaces.cdk.annotations.Attribute;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
@@ -141,10 +142,11 @@
}
public void setIterationState(Object stateObject) {
- Object[] state = (Object[]) stateObject;
- if (state != null) {
- super.setIterationState(state[0]);
- getStateHelper().put(PropertyKeys.expanded, state[1]);
+ StateHolderList stateHolderList = (StateHolderList) stateObject;
+
+ if (stateHolderList != null && !stateHolderList.isEmpty()) {
+ super.setIterationState(stateHolderList.get(0));
+ getStateHelper().put(PropertyKeys.expanded, (Boolean) stateHolderList.get(1));
} else {
super.setIterationState(null);
getStateHelper().put(PropertyKeys.expanded, null);
@@ -152,9 +154,11 @@
}
public Object getIterationState() {
- Object [] state = new Object[2];
- state[0] = super.getIterationState();
- state[1] = getStateHelper().get(PropertyKeys.expanded);
- return state;
+ StateHolderList holderList = new StateHolderList();
+
+ holderList.add(super.getIterationState());
+ holderList.add(getStateHelper().get(PropertyKeys.expanded));
+
+ return holderList;
}
}
\ No newline at end of file
13 years, 10 months
JBoss Rich Faces SVN: r21924 - branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: Alex.Kolonitsky
Date: 2011-02-24 11:54:18 -0500 (Thu, 24 Feb 2011)
New Revision: 21924
Modified:
branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java
branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
Log:
RF-10588 Taglib: bypassUpdates attribute should be removed from panel containers (WAS: Taglib: tabPanel is missing attribute bypassUpdates)
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java 2011-02-24 16:48:28 UTC (rev 21923)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractCollapsiblePanel.java 2011-02-24 16:54:18 UTC (rev 21924)
@@ -213,9 +213,7 @@
@Override
public void broadcast(FacesEvent event) throws AbortProcessingException {
super.broadcast(event);
-
- if (event instanceof PanelToggleEvent
- && (isBypassUpdates() || isImmediate())) {
+ if (event instanceof PanelToggleEvent && isImmediate()) {
FacesContext.getCurrentInstance().renderResponse();
}
}
Modified: branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
===================================================================
--- branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2011-02-24 16:48:28 UTC (rev 21923)
+++ branches/4.0.0.CR1/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2011-02-24 16:54:18 UTC (rev 21924)
@@ -413,9 +413,6 @@
if (isImmediate() || (event.getNewItem() != null &&
RendererUtils.getInstance().isBooleanAttribute(event.getNewItem(), "immediate"))) {
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else if (isBypassUpdates() || (event.getNewItem() != null &&
- RendererUtils.getInstance().isBooleanAttribute(event.getNewItem(), "bypassUpdates"))) {
- event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
} else {
event.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
@@ -424,8 +421,6 @@
protected void setEventPhase(FacesEvent event) {
if (isImmediate()) {
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else if (isBypassUpdates()) {
- event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
} else {
event.setPhaseId(PhaseId.INVOKE_APPLICATION);
}
@@ -618,9 +613,6 @@
getStateHelper().put(PropertyKeys.switchType, switchType);
}
- @Attribute
- public abstract boolean isBypassUpdates();
-
@Attribute(hidden = true)
public abstract boolean isLimitRender();
13 years, 10 months