JBoss Rich Faces SVN: r21753 - modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-18 05:45:03 -0500 (Fri, 18 Feb 2011)
New Revision: 21753
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
Log:
fixed panelMenu - testClientSideExpansionEvent - needs to toggle twice to call expansion events
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-02-18 10:28:20 UTC (rev 21752)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-02-18 10:45:03 UTC (rev 21753)
@@ -64,7 +64,6 @@
public void testClientSideCollapsionEvent() {
attributes.setMode(ajax);
menu.setGroupMode(ajax);
-
super.testRequestEventsBefore(event);
topGroup.toggle();
super.testRequestEventsAfter(event);
@@ -75,6 +74,7 @@
public void testClientSideExpansionEvent() {
attributes.setMode(ajax);
menu.setGroupMode(ajax);
+ topGroup.toggle();
super.testRequestEventsBefore(event);
topGroup.toggle();
super.testRequestEventsAfter(event);
15 years, 2 months
JBoss Rich Faces SVN: r21752 - in modules/tests/metamer/trunk: ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-18 05:28:20 -0500 (Fri, 18 Feb 2011)
New Revision: 21752
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
Log:
rich:panelMenuGroup - fixed sample - missing @begin
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-02-18 10:27:25 UTC (rev 21751)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richPanelMenuGroup/simple.xhtml 2011-02-18 10:28:20 UTC (rev 21752)
@@ -78,6 +78,7 @@
onbeforeexpand="#{richPanelMenuGroupBean.attributes['onbeforeexpand'].value}"
onbeforeselect="#{richPanelMenuGroupBean.attributes['onbeforeselect'].value}"
onbeforeswitch="#{richPanelMenuGroupBean.attributes['onbeforeswitch'].value}"
+ onbegin="#{richPanelMenuGroupBean.attributes['onbegin'].value}"
onclick="#{richPanelMenuGroupBean.attributes['onclick'].value}"
oncollapse="#{richPanelMenuGroupBean.attributes['oncollapse'].value}"
oncomplete="#{richPanelMenuGroupBean.attributes['oncomplete'].value}"
@@ -132,6 +133,7 @@
onbeforeexpand="#{richPanelMenuGroupBean.attributes['onbeforeexpand'].value}"
onbeforeselect="#{richPanelMenuGroupBean.attributes['onbeforeselect'].value}"
onbeforeswitch="#{richPanelMenuGroupBean.attributes['onbeforeswitch'].value}"
+ onbegin="#{richPanelMenuGroupBean.attributes['onbegin'].value}"
onclick="#{richPanelMenuGroupBean.attributes['onclick'].value}"
oncollapse="#{richPanelMenuGroupBean.attributes['oncollapse'].value}"
oncomplete="#{richPanelMenuGroupBean.attributes['oncomplete'].value}"
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-02-18 10:27:25 UTC (rev 21751)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupClientSideHandlers.java 2011-02-18 10:28:20 UTC (rev 21752)
@@ -43,14 +43,16 @@
@Inject
@Use(empty = true)
String event;
- String[] ajaxExpansionEvents = new String[] { "begin", "beforedomupdate", "beforeexpand", "beforeselect",
- "beforeswitch", "switch", "expand", "select", "complete" };
- String[] ajaxCollapsionEvents = new String[] { "begin", "beforedomupdate", "beforecollapse", "beforeswitch",
- "switch", "collapse", "complete" };
- String[] clientExpansionEvents = new String[] { "beforeexpand", "beforeselect", "beforeswitch", "switch", "expand" };
- String[] clientCollapsionEvents = new String[] { "beforecollapse", "beforeswitch", "switch", "collapse" };
- String[] serverExpansionEvents = new String[] { "switch", "expand" };
- String[] serverCollapsionEvents = new String[] { "switch", "collapse" };
+ String[] ajaxExpansionEvents = new String[] { "beforeswitch", "beforeexpand", "beforeselect", "begin",
+ "beforedomupdate", "select", "expand", "switch", "complete" };
+ String[] ajaxCollapsionEvents = new String[] { "beforeswitch", "beforecollapse", "beforeselect", "begin",
+ "beforedomupdate", "select", "collapse", "switch", "complete" };
+ String[] clientExpansionEvents = new String[] { "beforeswitch", "beforeexpand", "beforeselect", "select", "expand",
+ "switch" };
+ String[] clientCollapsionEvents = new String[] { "beforeswitch", "beforecollapse", "beforeselect", "select",
+ "collapse", "switch" };
+ String[] serverExpansionEvents = new String[] { "beforeswitch", "beforeexpand" };
+ String[] serverCollapsionEvents = new String[] { "beforeswitch", "beforecollapse" };
@Override
public URL getTestUrl() {
@@ -62,7 +64,7 @@
public void testClientSideCollapsionEvent() {
attributes.setMode(ajax);
menu.setGroupMode(ajax);
-
+
super.testRequestEventsBefore(event);
topGroup.toggle();
super.testRequestEventsAfter(event);
15 years, 2 months
JBoss Rich Faces SVN: r21751 - in modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest: richPanelMenuItem and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: lfryc(a)redhat.com
Date: 2011-02-18 05:27:25 -0500 (Fri, 18 Feb 2011)
New Revision: 21751
Modified:
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupMode.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java
modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java
Log:
panelMenu - removed issue tracking
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupMode.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupMode.java 2011-02-18 08:28:56 UTC (rev 21750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuGroup/TestPanelMenuGroupMode.java 2011-02-18 10:27:25 UTC (rev 21751)
@@ -35,7 +35,6 @@
import org.richfaces.PanelMenuMode;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.annotations.Uses;
import org.testng.annotations.Test;
@@ -44,7 +43,6 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-@IssueTracking({ "https://issues.jboss.org/browse/RF-10550" })
public class TestPanelMenuGroupMode extends AbstractPanelMenuGroupTest {
@Inject
@@ -91,7 +89,6 @@
@Test
@Uses({ @Use(field = "immediate", empty = true), @Use(field = "bypassUpdates", empty = true),
@Use(field = "mode", empty = true), @Use(field = "listener", empty = true) })
- @IssueTracking("https://issues.jboss.org/browse/RF-10551")
public void testClientMode() {
attributes.setMode(PanelMenuMode.client);
menu.setGroupMode(PanelMenuMode.client);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java 2011-02-18 08:28:56 UTC (rev 21750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemClientSideHandlers.java 2011-02-18 10:27:25 UTC (rev 21751)
@@ -30,7 +30,6 @@
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.model.PanelMenu;
import org.testng.annotations.Test;
@@ -58,7 +57,6 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10320")
@Use(field = "event", value = "ajaxEvents")
public void testClientSideEvent() {
attributes.setMode(ajax);
@@ -69,7 +67,6 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10320")
public void testClientSideEventsOrderClient() {
attributes.setMode(client);
menu.setItemMode(client);
@@ -79,7 +76,6 @@
}
@Test
- @IssueTracking("https://issues.jboss.org/browse/RF-10320")
public void testClientSideEventsOrderAjax() {
attributes.setMode(ajax);
menu.setItemMode(ajax);
Modified: modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java
===================================================================
--- modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java 2011-02-18 08:28:56 UTC (rev 21750)
+++ modules/tests/metamer/trunk/ftest-source/src/main/java/org/richfaces/tests/metamer/ftest/richPanelMenuItem/TestPanelMenuItemMode.java 2011-02-18 10:27:25 UTC (rev 21751)
@@ -37,7 +37,6 @@
import org.richfaces.PanelMenuMode;
import org.richfaces.tests.metamer.ftest.AbstractMetamerTest;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
-import org.richfaces.tests.metamer.ftest.annotations.IssueTracking;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.ftest.model.PanelMenu;
import org.testng.annotations.Test;
@@ -46,7 +45,6 @@
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
-@IssueTracking({ "https://issues.jboss.org/browse/RF-10436", "https://issues.jboss.org/browse/RF-10314" })
public class TestPanelMenuItemMode extends AbstractMetamerTest {
PanelMenuItemAttributes attributes = new PanelMenuItemAttributes();
15 years, 2 months
JBoss Rich Faces SVN: r21750 - trunk/examples/richfaces-showcase/src/main/webapp/resources/css.
by richfaces-svn-commits@lists.jboss.org
Author: Ochikvina
Date: 2011-02-18 03:28:56 -0500 (Fri, 18 Feb 2011)
New Revision: 21750
Modified:
trunk/examples/richfaces-showcase/src/main/webapp/resources/css/application.css
Log:
RF-10561 - changed text color in the footer.
Modified: trunk/examples/richfaces-showcase/src/main/webapp/resources/css/application.css
===================================================================
--- trunk/examples/richfaces-showcase/src/main/webapp/resources/css/application.css 2011-02-18 04:17:18 UTC (rev 21749)
+++ trunk/examples/richfaces-showcase/src/main/webapp/resources/css/application.css 2011-02-18 08:28:56 UTC (rev 21750)
@@ -141,7 +141,7 @@
#footer{
background:url('#{facesContext.externalContext.requestContextPath}/images/footer.png') top left no-repeat;
- color:#2d4351;
+ color:#000000;
text-align:center;
padding:15px 20px 10px;
}
15 years, 2 months
JBoss Rich Faces SVN: r21749 - modules/docs/trunk/Component_Reference/src/main/docbook/en-US.
by richfaces-svn-commits@lists.jboss.org
Author: SeanRogers
Date: 2011-02-17 23:17:18 -0500 (Thu, 17 Feb 2011)
New Revision: 21749
Modified:
modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
Log:
Updated calendar docs as per RFPL-985
Modified: modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml
===================================================================
--- modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2011-02-17 20:36:13 UTC (rev 21748)
+++ modules/docs/trunk/Component_Reference/src/main/docbook/en-US/chap-Component_Reference-Rich_inputs.xml 2011-02-18 04:17:18 UTC (rev 21749)
@@ -328,6 +328,44 @@
<para>
To set the locale of the calendar, use the <varname>locale</varname> attribute. The calendar will render month and day names in the relevant language. For example, to set the calendar to the US locale, specify <code>locale="en/US"</code>.
</para>
+ <para>
+ Use an application resource bundle to localize the calendar control labels. Define the following strings in the resource bundle:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ The <property>RICH_CALENDAR_APPLY_LABEL</property> string is the label for the <guibutton>Apply</guibutton> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <property>RICH_CALENDAR_TODAY_LABEL</property> string is the label for the <guibutton>Today</guibutton> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <property>RICH_CALENDAR_CLOSE_LABEL</property> string is the label for the <guibutton>Close</guibutton> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <property>RICH_CALENDAR_OK_LABEL</property> string is the label for the <guibutton>OK</guibutton> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <property>RICH_CALENDAR_CLEAN_LABEL</property> string is the label for the <guibutton>Clean</guibutton> button.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The <property>RICH_CALENDAR_CANCEL_LABEL</property> string is the label for the <guibutton>Cancel</guibutton> button.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ Alternatively, use the <classname>org.richfaces.renderkit.calendar</classname> resource bundle with Java Archive files (<acronym>JAR</acronym>s) defining the same properties.
+ </para>
</section>
<!-- TODO not in M4 -->
@@ -388,7 +426,7 @@
<section id="sect-Component_Reference-richcalendar-Client-side_customization">
<title>Client-side customization</title>
<para>
- Instead of using a data model, the <sgmltag><rich:calendar></sgmltag> component can be customized on the client-side. <xref linkend="exam-Component_Reference-richcalendar-Client-side_customization" /> demonstrates how client-side customization can be used to style different days in a calendar.
+ Instead of using a data model, the <sgmltag><rich:calendar></sgmltag> component can be customized on the client-side using JavaScript. Use the <varname>dayClassFunction</varname> attribute to reference the function that determines the CSS style class for each day cell. Use the <varname>dayDisableFunction</varname> to reference the function that enables or disables a day cell. <xref linkend="exam-Component_Reference-richcalendar-Client-side_customization" /> demonstrates how client-side customization can be used to style different days in a calendar.
</para>
<example id="exam-Component_Reference-richcalendar-Client-side_customization">
<title>Client-side customization</title>
@@ -403,6 +441,30 @@
</para>
<variablelist>
<varlistentry>
+ <term><function>showPopup()</function></term>
+ <listitem>
+ <para>
+ Expand the pop-up calendar element.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>hidePopup()</function></term>
+ <listitem>
+ <para>
+ Collapse the pop-up calendar element.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><function>switchPopup()</function></term>
+ <listitem>
+ <para>
+ Invert the state of the pop-up calendar element.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><function>selectDate(date)</function></term>
<listitem>
<para>
@@ -410,6 +472,7 @@
</para>
</listitem>
</varlistentry>
+ <!--
<varlistentry>
<term><function>isDateEnabled(date)</function></term>
<listitem>
@@ -450,6 +513,7 @@
</para>
</listitem>
</varlistentry>
+ -->
<varlistentry>
<term><function>nextMonth()</function></term>
<listitem>
@@ -530,30 +594,6 @@
</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term><function>doCollapse()</function></term>
- <listitem>
- <para>
- Collapse the pop-up calendar element.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>doExpand()</function></term>
- <listitem>
- <para>
- Expand the pop-up calendar element.
- </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term><function>doSwitch()</function></term>
- <listitem>
- <para>
- Invert the state of the pop-up calendar element.
- </para>
- </listitem>
- </varlistentry>
</variablelist>
</section>
15 years, 2 months
JBoss Rich Faces SVN: r21748 - trunk/ui/output/ui/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2011-02-17 15:36:13 -0500 (Thu, 17 Feb 2011)
New Revision: 21748
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItemInterface.java
Log:
RF-10488 Accordion: cannot switch with Myfaces when switchType is not defined
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java 2011-02-17 20:22:58 UTC (rev 21747)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractAccordionItem.java 2011-02-17 20:36:13 UTC (rev 21748)
@@ -22,11 +22,15 @@
package org.richfaces.component;
-import org.richfaces.cdk.annotations.*;
-
import javax.faces.component.UIComponent;
import javax.faces.component.behavior.ClientBehaviorHolder;
+import org.richfaces.cdk.annotations.Attribute;
+import org.richfaces.cdk.annotations.JsfComponent;
+import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.Tag;
+import org.richfaces.cdk.annotations.TagType;
+
/**
* @author akolonitsky
* @since 2010-08-13
@@ -40,7 +44,7 @@
enum Properties {
header,
-
+
contentClass,
leftActiveIcon,
leftInactiveIcon,
@@ -51,7 +55,8 @@
headerActiveClass,
headerDisabledClass,
headerInactiveClass,
- headerClass
+ headerClass,
+ switchType
}
public AbstractAccordionItem() {
@@ -181,5 +186,21 @@
public void setContentClass(String contentClass) {
getStateHelper().put(Properties.contentClass, contentClass);
}
+
+ @Attribute(generate = false)
+ public SwitchType getSwitchType() {
+ SwitchType switchType = (SwitchType) getStateHelper().eval(Properties.switchType, SwitchType.DEFAULT);
+ if (switchType == null) {
+ switchType = getParentPanel().getSwitchType();
+ }
+ if (switchType == null) {
+ switchType = SwitchType.DEFAULT;
+ }
+ return switchType;
+ }
+
+ public void setSwitchType(SwitchType switchType) {
+ getStateHelper().put(Properties.switchType, switchType);
+ }
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java 2011-02-17 20:22:58 UTC (rev 21747)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTab.java 2011-02-17 20:36:13 UTC (rev 21748)
@@ -30,6 +30,7 @@
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
+import org.richfaces.component.AbstractAccordionItem.Properties;
import org.richfaces.renderkit.html.DivPanelRenderer;
/**
@@ -49,7 +50,14 @@
// ------------------------------------------------ Html Attributes
enum Properties {
- headerDisabledClass, headerInactiveClass, headerClass, contentClass, execute, headerActiveClass, header
+ headerDisabledClass,
+ headerInactiveClass,
+ headerClass,
+ contentClass,
+ execute,
+ headerActiveClass,
+ header,
+ switchType
}
@Attribute(generate = false)
@@ -196,5 +204,21 @@
public String toString() {
return "TogglePanelItem {name: " + getName() + ", switchType: " + getSwitchType() + '}';
}
+
+ @Attribute(generate = false)
+ public SwitchType getSwitchType() {
+ SwitchType switchType = (SwitchType) getStateHelper().eval(Properties.switchType, SwitchType.DEFAULT);
+ if (switchType == null) {
+ switchType = getParentPanel().getSwitchType();
+ }
+ if (switchType == null) {
+ switchType = SwitchType.DEFAULT;
+ }
+ return switchType;
+ }
+
+ public void setSwitchType(SwitchType switchType) {
+ getStateHelper().put(Properties.switchType, switchType);
+ }
}
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 2011-02-17 20:22:58 UTC (rev 21747)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanel.java 2011-02-17 20:36:13 UTC (rev 21748)
@@ -614,7 +614,7 @@
}
- @Attribute
+ @Attribute(generate = false)
public SwitchType getSwitchType() {
SwitchType switchType = (SwitchType) getStateHelper().eval(PropertyKeys.switchType, SwitchType.DEFAULT);
if (switchType == null) {
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java 2011-02-17 20:22:58 UTC (rev 21747)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItem.java 2011-02-17 20:36:13 UTC (rev 21748)
@@ -27,6 +27,7 @@
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
+import org.richfaces.component.AbstractAccordionItem.Properties;
import javax.faces.component.UIOutput;
@@ -44,6 +45,10 @@
public static final String COMPONENT_FAMILY = "org.richfaces.TogglePanelItem";
protected static final String NAME = "name";
+ enum Properties {
+ switchType
+ }
+
protected AbstractTogglePanelItem() {
setRendererType("org.richfaces.TogglePanelItemRenderer");
}
@@ -79,4 +84,20 @@
public String toString() {
return "TogglePanelItem {name: " + getName() + ", switchType: " + getSwitchType() + '}';
}
+
+ @Attribute(generate = false)
+ public SwitchType getSwitchType() {
+ SwitchType switchType = (SwitchType) getStateHelper().eval(Properties.switchType, SwitchType.DEFAULT);
+ if (switchType == null) {
+ switchType = getParentPanel().getSwitchType();
+ }
+ if (switchType == null) {
+ switchType = SwitchType.DEFAULT;
+ }
+ return switchType;
+ }
+
+ public void setSwitchType(SwitchType switchType) {
+ getStateHelper().put(Properties.switchType, switchType);
+ }
}
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItemInterface.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItemInterface.java 2011-02-17 20:22:58 UTC (rev 21747)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractTogglePanelItemInterface.java 2011-02-17 20:36:13 UTC (rev 21748)
@@ -15,7 +15,6 @@
String getName();
- @Attribute(defaultValue = "getParentPanel().getSwitchType()")
SwitchType getSwitchType();
// ------------------------------------------------ Html Attributes
15 years, 2 months
JBoss Rich Faces SVN: r21747 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-17 15:22:58 -0500 (Thu, 17 Feb 2011)
New Revision: 21747
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
Log:
https://issues.jboss.org/browse/RF-10538
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2011-02-17 19:49:18 UTC (rev 21746)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2011-02-17 20:22:58 UTC (rev 21747)
@@ -124,14 +124,14 @@
if(!this.__isFocused()) {
this.__setFocused(true);
this.focusValue = this.__getValue();
- this.invokeEvent.call(this, "focus", document.getElementById(this.id + 'Input'), e);
+ this.invokeEvent.call(this, "focus", document.getElementById(this.id), e);
}
},
onblur: function(e) {
if(this.__isFocused()) {
this.__setFocused(false);
- this.invokeEvent.call(this, "blur", document.getElementById(this.id + 'Input'), e);
+ this.invokeEvent.call(this, "blur", document.getElementById(this.id), e);
if(this.isValueSaved() || this.__isSaveOnBlur()) {
this.save();
@@ -143,7 +143,7 @@
if(!this.cancelButton) {
if(this.__isValueChanged()) {
- this.invokeEvent.call(this, "change", document.getElementById(this.id + 'Input'), e);
+ this.invokeEvent.call(this, "change", document.getElementById(this.id), e);
}
}
this.getInput().bind("focus", $.proxy(this.__editHandler, this));
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-02-17 19:49:18 UTC (rev 21746)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2011-02-17 20:22:58 UTC (rev 21747)
@@ -127,7 +127,7 @@
if(!this.__isFocused()) {
this.__setFocused(true);
this.focusValue = this.selValueInput.val();
- this.invokeEvent.call(this, "focus", document.getElementById(this.id + 'Input'), e);
+ this.invokeEvent.call(this, "focus", document.getElementById(this.id), e);
}
},
processItem: function(item) {
@@ -141,7 +141,7 @@
this.save();
}
- this.invokeEvent.call(this,"selectitem", document.getElementById(this.id + 'Input'));
+ this.invokeEvent.call(this,"selectitem", document.getElementById(this.id));
},
getItemValue: function(item) {
var key = $(item).attr("id");
15 years, 2 months
JBoss Rich Faces SVN: r21746 - in trunk: 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-17 14:49:18 -0500 (Thu, 17 Feb 2011)
New Revision: 21746
Modified:
trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
Log:
https://jira.jboss.org/browse/RF-10320
https://jira.jboss.org/browse/RF-10551
Modified: trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml
===================================================================
--- trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml 2011-02-17 19:25:22 UTC (rev 21745)
+++ trunk/examples/output-demo/src/main/webapp/examples/panelMenu.xhtml 2011-02-17 19:49:18 UTC (rev 21746)
@@ -49,11 +49,21 @@
itemDisabledLeftIcon="triangleLeft"
topItemDisabledLeftIcon="triangleUp"
topItemLeftIcon="triangleDown"
- groupMode="client" activeItem="item41"
+ groupMode="server" activeItem="item41"
bubbleSelection="true"
expandSingle="true">
- <rich:panelMenuGroup id="group1" label="Group 1">
- <rich:panelMenuItem id="item11" label="Item 1.1" />
+ <rich:panelMenuGroup id="group1" label="Group 1" selectable="true"
+ onbeforecollapse="alert('onbeforecollapse')"
+ onbeforeexpand="alert('onbeforeexpand')"
+ onbeforeselect="alert('onbeforeselect')"
+ oncollapse="alert('oncollapse')"
+ onexpand="alert('onexpand')"
+ onselect="alert('onselect')"
+ onswitch="alert('onswitch')"
+ onbeforeswitch="alert('onbeforeswitch')">
+ <rich:panelMenuItem id="item11" label="Item 1.1"
+ onbeforeselect="alert('onbeforeselect')"
+ onselect="alert('onselectItem')"/>
<rich:panelMenuItem id="item12" label="Item 1.2" />
</rich:panelMenuGroup>
<rich:panelMenuItem id="item2" label="Item 2" disabled="true" />
Modified: trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-02-17 19:25:22 UTC (rev 21745)
+++ trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2011-02-17 19:49:18 UTC (rev 21746)
@@ -67,6 +67,7 @@
public static final String BEFORE_COLLAPSE = "beforecollapse";
public static final String BEFORE_EXPAND = "beforeexpand";
public static final String BEFORE_SWITCH = "beforeswitch";
+ public static final String SELECT = "select";
private static final String CSS_CLASS_PREFIX = "rf-pm-gr";
//TODO nick - shouldn't this be rf-pm-gr-top?
@@ -210,6 +211,7 @@
addEventOption(context, panelMenuGroup, options, BEFORE_COLLAPSE);
addEventOption(context, panelMenuGroup, options, BEFORE_EXPAND);
addEventOption(context, panelMenuGroup, options, BEFORE_SWITCH);
+ addEventOption(context, panelMenuGroup, options, SELECT);
return options;
}
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js 2011-02-17 19:25:22 UTC (rev 21745)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuGroup.js 2011-02-17 19:49:18 UTC (rev 21746)
@@ -149,6 +149,33 @@
}
});
}
+ } else {
+
+ if (this.options.expandEvent == this.options.collapseEvent) {
+ if (this.options.expandEvent != 'click') {
+ this.__header().bind(this.options.expandEvent, function () {
+ menuGroup.switchExpantion();
+ });
+ }
+
+ } else {
+ if (this.options.expandEvent != 'click') {
+ this.__header().bind(this.options.expandEvent, function () {
+ if (menuGroup.collapsed()) {
+ return menuGroup.expand();
+ }
+ });
+ }
+
+ if (this.options.collapseEvent != 'click') {
+ this.__header().bind(this.options.collapseEvent, function () {
+ if (menuGroup.expanded()) {
+ return menuGroup.collapse();
+ }
+ });
+ }
+ }
+
}
if (this.options.selectable || this.options.bubbleSelection) {
@@ -301,10 +328,11 @@
__switch : function (expand) {
if (expand) {
- this.expand();
+ this.__expand();
} else {
- this.collapse();
+ this.__collapse();
}
+ return this.__fireEvent("switch");
},
/***************************** Private Methods ****************************************************************/
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-02-17 19:25:22 UTC (rev 21745)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-02-17 19:49:18 UTC (rev 21746)
@@ -41,6 +41,17 @@
* @return {void}
* */
exec : function (item) {
+
+ if (item.expanded) {
+ var flag = item.options.expandEvent == item.options.collapseEvent && item.options.collapseEvent == "click";
+ if (flag && item.__fireEvent("beforeswitch")==false) return false;
+ if (!item.expanded()) {
+ if ( item.options.expandEvent == "click" && item.__fireEvent("beforeexpand")==false) return false;
+ } else {
+ if ( item.options.collapseEvent == "click" && item.__fireEvent("beforecollapse")==false) return false;
+ }
+ }
+
var mode = item.mode;
if (mode == "server") {
return this.execServer(item);
@@ -104,8 +115,16 @@
panelMenu.selectedItem(item.itemName);
item.__select();
-
- return item.__fireSelect();
+ var result = item.__fireSelect();
+
+ if (item.__switch) {
+ var mode = item.mode;
+ if (mode == "client" || mode == "none") {
+ item.__switch(!item.expanded());
+ }
+ }
+
+ return result;
},
/**
@@ -275,7 +294,7 @@
__restoreSelection: function() {
this.__select();
- this.__fireSelect();
+ //this.__fireSelect();
},
__isSelected: function() {
15 years, 2 months
JBoss Rich Faces SVN: r21745 - trunk/core/impl/src/main/resources/META-INF/resources.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2011-02-17 14:25:22 -0500 (Thu, 17 Feb 2011)
New Revision: 21745
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/richfaces-queue.js
Log:
RF-10357: function handler is fixed
Modified: trunk/core/impl/src/main/resources/META-INF/resources/richfaces-queue.js
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2011-02-17 19:18:22 UTC (rev 21744)
+++ trunk/core/impl/src/main/resources/META-INF/resources/richfaces-queue.js 2011-02-17 19:25:22 UTC (rev 21745)
@@ -290,10 +290,13 @@
var callEventHandler = function (handlerName, entry) {
var handler = entry.queueOptions[handlerName];
- if (handler) {
- // what is a context should be??
- handler.call(null, entry);
- }
+ if (handler) {
+ if (typeof(handler) == "string") {
+ new Function(handler).call(null, entry);
+ } else {
+ handler.call(null, entry);
+ }
+ }
var opts, handler2;
if (entry.queueOptions.queueId &&
(opts=defaultQueueOptions[entry.queueOptions.queueId]) &&
15 years, 2 months
JBoss Rich Faces SVN: r21744 - in trunk: cdk/generator and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2011-02-17 14:18:22 -0500 (Thu, 17 Feb 2011)
New Revision: 21744
Modified:
trunk/bom/pom.xml
trunk/cdk/generator/pom.xml
trunk/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml
trunk/cdk/maven-cdk-plugin/src/it/renderer-template-test/pom.xml
trunk/cdk/maven-cdk-plugin/src/it/xml-configured-component/pom.xml
trunk/cdk/maven-resources-plugin/src/it/richfaces-application/pom.xml
Log:
https://issues.jboss.org/browse/RF-9960
Modified: trunk/bom/pom.xml
===================================================================
--- trunk/bom/pom.xml 2011-02-17 19:14:59 UTC (rev 21743)
+++ trunk/bom/pom.xml 2011-02-17 19:18:22 UTC (rev 21744)
@@ -139,12 +139,12 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.3-b03</version>
+ <version>2.0.4-b09</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
- <version>2.0.3-b03</version>
+ <version>2.0.4-b09</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
Modified: trunk/cdk/generator/pom.xml
===================================================================
--- trunk/cdk/generator/pom.xml 2011-02-17 19:14:59 UTC (rev 21743)
+++ trunk/cdk/generator/pom.xml 2011-02-17 19:18:22 UTC (rev 21744)
@@ -127,7 +127,7 @@
may be needed, cdk-parent/cdk-bom? -->
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.3-b03</version>
+ <version>2.0.4-b09</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
Modified: trunk/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml 2011-02-17 19:14:59 UTC (rev 21743)
+++ trunk/cdk/maven-cdk-plugin/src/it/annotated-component/pom.xml 2011-02-17 19:18:22 UTC (rev 21744)
@@ -44,7 +44,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.3-b03</version>
+ <version>2.0.4-b09</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified: trunk/cdk/maven-cdk-plugin/src/it/renderer-template-test/pom.xml
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/it/renderer-template-test/pom.xml 2011-02-17 19:14:59 UTC (rev 21743)
+++ trunk/cdk/maven-cdk-plugin/src/it/renderer-template-test/pom.xml 2011-02-17 19:18:22 UTC (rev 21744)
@@ -66,7 +66,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.3-b03</version>
+ <version>2.0.4-b09</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified: trunk/cdk/maven-cdk-plugin/src/it/xml-configured-component/pom.xml
===================================================================
--- trunk/cdk/maven-cdk-plugin/src/it/xml-configured-component/pom.xml 2011-02-17 19:14:59 UTC (rev 21743)
+++ trunk/cdk/maven-cdk-plugin/src/it/xml-configured-component/pom.xml 2011-02-17 19:18:22 UTC (rev 21744)
@@ -41,7 +41,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.3-b03</version>
+ <version>2.0.4-b09</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified: trunk/cdk/maven-resources-plugin/src/it/richfaces-application/pom.xml
===================================================================
--- trunk/cdk/maven-resources-plugin/src/it/richfaces-application/pom.xml 2011-02-17 19:14:59 UTC (rev 21743)
+++ trunk/cdk/maven-resources-plugin/src/it/richfaces-application/pom.xml 2011-02-17 19:18:22 UTC (rev 21744)
@@ -69,7 +69,7 @@
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
- <version>2.0.3-b03</version>
+ <version>2.0.4-b09</version>
<scope>compile</scope>
</dependency>
<dependency>
15 years, 2 months