JBoss Rich Faces SVN: r4544 - in trunk/ui/inputnumber-spinner/src: main/java/org/richfaces and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-12-06 07:06:46 -0500 (Thu, 06 Dec 2007)
New Revision: 4544
Removed:
trunk/ui/inputnumber-spinner/src/main/java/org/richfaces/renderkit/
Modified:
trunk/ui/inputnumber-spinner/src/main/config/resources/resources-config.xml
trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss
trunk/ui/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/component/InputNumberSpinnerComponentTest.java
trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java
Log:
RF-1545
Modified: trunk/ui/inputnumber-spinner/src/main/config/resources/resources-config.xml
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/config/resources/resources-config.xml 2007-12-06 12:02:22 UTC (rev 4543)
+++ trunk/ui/inputnumber-spinner/src/main/config/resources/resources-config.xml 2007-12-06 12:06:46 UTC (rev 4544)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<resource-config>
- <resource class="org.richfaces.renderkit.html.images.background.SpinnerButtonGradient">
- <name>org.richfaces.renderkit.html.images.background.SpinnerButtonGradient</name>
+ <resource class="org.richfaces.renderkit.html.images.SpinnerButtonGradient">
+ <name>org.richfaces.renderkit.html.images.SpinnerButtonGradient</name>
</resource>
- <resource class="org.richfaces.renderkit.html.images.background.SpinnerFieldGradient">
- <name>org.richfaces.renderkit.html.images.background.SpinnerFieldGradient</name>
+ <resource class="org.richfaces.renderkit.html.images.SpinnerFieldGradient">
+ <name>org.richfaces.renderkit.html.images.SpinnerFieldGradient</name>
</resource>
<!--resource class="org.richfaces.renderkit.html.images.buttons.SpinnerButtonImage">
<name>org.richfaces.renderkit.html.images.buttons.SpinnerButtonImage</name>
Modified: trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss 2007-12-06 12:02:22 UTC (rev 4543)
+++ trunk/ui/inputnumber-spinner/src/main/resources/org/richfaces/renderkit/html/css/spinner.xcss 2007-12-06 12:06:46 UTC (rev 4544)
@@ -47,7 +47,7 @@
<u:selector name=".dr-spnr-e">
<u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.background.SpinnerFieldGradient" />
+ <f:resource f:key="org.richfaces.renderkit.html.images.SpinnerFieldGradient" />
</u:style>
<u:style name="background-color" skin="controlBackgroundColor" />
<u:style name="border-color" skin="panelBorderColor" />
@@ -57,7 +57,7 @@
<u:selector name=".dr-spnr-b">
<u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.background.SpinnerButtonGradient" />
+ <f:resource f:key="org.richfaces.renderkit.html.images.SpinnerButtonGradient" />
</u:style>
</u:selector>
</f:template>
\ No newline at end of file
Modified: trunk/ui/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx
===================================================================
--- trunk/ui/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx 2007-12-06 12:02:22 UTC (rev 4543)
+++ trunk/ui/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx 2007-12-06 12:06:46 UTC (rev 4544)
@@ -11,10 +11,10 @@
>
<f:clientid var="clientId"/>
- <f:resource name="org.richfaces.renderkit.html.images.buttons.SpinnerButtonUp"
+ <f:resource name="org.richfaces.renderkit.html.images.SpinnerButtonUp"
var="up_arrow" />
- <f:resource name="org.richfaces.renderkit.html.images.buttons.SpinnerButtonDown"
+ <f:resource name="org.richfaces.renderkit.html.images.SpinnerButtonDown"
var="down_arrow" />
<h:scripts>new org.ajax4jsf.javascript.PrototypeScript(),script/SpinnerScript.js,/org/richfaces/renderkit/html/scripts/browser_info.js</h:scripts>
Modified: trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/component/InputNumberSpinnerComponentTest.java
===================================================================
--- trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/component/InputNumberSpinnerComponentTest.java 2007-12-06 12:02:22 UTC (rev 4543)
+++ trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/component/InputNumberSpinnerComponentTest.java 2007-12-06 12:06:46 UTC (rev 4544)
@@ -46,10 +46,10 @@
import org.ajax4jsf.resource.image.ImageInfo;
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.apache.commons.lang.StringUtils;
-import org.richfaces.renderkit.html.images.background.SpinnerButtonGradient;
-import org.richfaces.renderkit.html.images.background.SpinnerFieldGradient;
-import org.richfaces.renderkit.html.images.buttons.SpinnerButtonDown;
-import org.richfaces.renderkit.html.images.buttons.SpinnerButtonUp;
+import org.richfaces.renderkit.html.images.SpinnerButtonDown;
+import org.richfaces.renderkit.html.images.SpinnerButtonGradient;
+import org.richfaces.renderkit.html.images.SpinnerButtonUp;
+import org.richfaces.renderkit.html.images.SpinnerFieldGradient;
import com.gargoylesoftware.htmlunit.KeyValuePair;
import com.gargoylesoftware.htmlunit.Page;
Modified: trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java
===================================================================
--- trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java 2007-12-06 12:02:22 UTC (rev 4543)
+++ trunk/ui/inputnumber-spinner/src/test/java/org/richfaces/renderkit/html/images/buttons/SpinnerButtonImageTest.java 2007-12-06 12:06:46 UTC (rev 4544)
@@ -5,6 +5,8 @@
import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
import org.ajax4jsf.util.HtmlColor;
+import org.richfaces.renderkit.html.images.SpinnerButtonImage;
+import org.richfaces.renderkit.html.images.SpinnerButtonUp;
import org.richfaces.skin.Skin;
import org.richfaces.skin.SkinFactory;
@@ -36,7 +38,7 @@
Color color1 = HtmlColor.decode(headerTextColor);
- byte [] data = (byte []) img.getDataToStore(facesContext, null);
+/* byte [] data = (byte []) img.getDataToStore(facesContext, null);
assertNotNull(data);
@@ -47,6 +49,7 @@
Color color2 = new Color(results.intValue());
assertEquals(color1, color2);
+*/
}
}
18 years, 5 months
JBoss Rich Faces SVN: r4543 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-12-06 07:02:22 -0500 (Thu, 06 Dec 2007)
New Revision: 4543
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
Log:
RF-1545
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-12-06 12:00:03 UTC (rev 4542)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/css/calendar.xcss 2007-12-06 12:02:22 UTC (rev 4543)
@@ -335,7 +335,7 @@
<u:selector name=".rich-calendar-spinner-up">
<u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.buttons.SpinnerButtonUp" />
+ <f:resource f:key="org.richfaces.renderkit.html.images.SpinnerButtonUp" />
</u:style>
<u:style name="height" value="7px" />
@@ -345,7 +345,7 @@
<u:selector name=".rich-calendar-spinner-down">
<u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.buttons.SpinnerButtonDown" />
+ <f:resource f:key="org.richfaces.renderkit.html.images.SpinnerButtonDown" />
</u:style>
<u:style name="height" value="7px"/>
@@ -361,7 +361,7 @@
<u:style name="background-color" skin="headerBackgroundColor" />
<u:style name="border-color" skin="headerBackgroundColor" />
<u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.background.SpinnerButtonGradient" />
+ <f:resource f:key="org.richfaces.renderkit.html.images.SpinnerButtonGradient" />
</u:style>
</u:selector>
@@ -374,7 +374,7 @@
<u:selector name=".rich-calendar-spinner-input-container">
<u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.html.images.background.SpinnerFieldGradient" />
+ <f:resource f:key="org.richfaces.renderkit.html.images.SpinnerFieldGradient" />
</u:style>
<u:style name="background-color" skin="controlBackgroundColor" />
<u:style name="border-color" skin="panelBorderColor" />
18 years, 5 months
JBoss Rich Faces SVN: r4542 - trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-12-06 07:00:03 -0500 (Thu, 06 Dec 2007)
New Revision: 4542
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java
Log:
additional commit for RF-1500
Modified: trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java
===================================================================
--- trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java 2007-12-06 11:58:45 UTC (rev 4541)
+++ trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java 2007-12-06 12:00:03 UTC (rev 4542)
@@ -153,7 +153,7 @@
writer.writeAttribute("width", "1", null);
writer.writeAttribute("height", "1", null);
writer.writeAttribute("style", width!=null && width.length() > 0 ? "width: " + HtmlUtil.qualifySize(width) : "", null);
- writer.writeText(" ", null);
+ writer.write(" ");
writer.endElement("div");
writer.endElement("div");
18 years, 5 months
JBoss Rich Faces SVN: r4541 - branches/3.1.x/ui/menu-components/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: akushunin
Date: 2007-12-06 06:58:45 -0500 (Thu, 06 Dec 2007)
New Revision: 4541
Modified:
branches/3.1.x/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java
Log:
additional commit for RF-1500
Modified: branches/3.1.x/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java
===================================================================
--- branches/3.1.x/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java 2007-12-06 10:52:45 UTC (rev 4540)
+++ branches/3.1.x/ui/menu-components/src/main/java/org/richfaces/renderkit/html/AbstractMenuRenderer.java 2007-12-06 11:58:45 UTC (rev 4541)
@@ -152,7 +152,7 @@
writer.writeAttribute("width", "1", null);
writer.writeAttribute("height", "1", null);
writer.writeAttribute("style", width!=null && width.length() > 0 ? "width: " + HtmlUtil.qualifySize(width) : "", null);
- writer.writeText(" ", null);
+ writer.write(" ");
writer.endElement("div");
writer.endElement("div");
18 years, 5 months
JBoss Rich Faces SVN: r4540 - in branches/3.1.x/samples/richfaces-demo/src/main: resources/org/richfaces/demo/common and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2007-12-06 05:52:45 -0500 (Thu, 06 Dec 2007)
New Revision: 4540
Added:
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/usage.xhtml
Modified:
branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml
branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml
Log:
Component control and context menu demos updated
Modified: branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2007-12-06 09:43:13 UTC (rev 4539)
+++ branches/3.1.x/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2007-12-06 10:52:45 UTC (rev 4540)
@@ -73,6 +73,15 @@
return allCars;
}
+ public List<DemoInventoryItem> getTenRandomCars() {
+ List<DemoInventoryItem> result = new ArrayList<DemoInventoryItem>();
+ int size = getAllCars().size()-1;
+ for (int i = 0; i < 10; i++) {
+ result.add(getAllCars().get(rand(1, size)));
+ }
+ return result;
+ }
+
public int genRand() {
return rand(1,10000);
}
Modified: branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-12-06 09:43:13 UTC (rev 4539)
+++ branches/3.1.x/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2007-12-06 10:52:45 UTC (rev 4540)
@@ -68,4 +68,5 @@
page= ajaxMisc, Ajax Page, /images/ico_common.gif, /images/cn_AjaxPage.gif, RichFacesComponentsLibrary.html#page, jbossajax4jsf/freezone/docs/tlddoc/a4j/page.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIAjaxRegion.html, /richfaces/page.jsf
portlet= ajaxMisc, Ajax Portlet, /images/ico_common.gif, /images/cn_AjaxPortlet.gif, RichFacesComponentsLibrary.html#portlet, jbossajax4jsf/freezone/docs/tlddoc/a4j/portlet.html, jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPortlet.html, /richfaces/portlet.jsf
effect= richMisc, Effect, /images/ico_common.gif, /images/cn_Effect.gif, RichFacesComponentsLibrary.html#effect, jbossrichfaces/freezone/docs/tlddoc/rich/effect.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEffect.html, /richfaces/effect.jsf
-contextMenu= richMenu, Context Menu, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, RichFacesComponentsLibrary.html#contextMenu, jbossrichfaces/freezone/docs/tlddoc/rich/contextMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIContextMenu.html, /richfaces/contextMenu.jsf
\ No newline at end of file
+contextMenu= richMenu, Context Menu, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, RichFacesComponentsLibrary.html\#contextMenu, jbossrichfaces/freezone/docs/tlddoc/rich/contextMenu.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIContextMenu.html, /richfaces/contextMenu.jsf
+componentControl= richMisc, Component Control, /images/ico_dropDownMenu.gif, /images/cn_DropDownMenu.gif, RichFacesComponentsLibrary.html\#componentControl, jbossrichfaces/freezone/docs/tlddoc/rich/componentControl.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomponentControl.html, /richfaces/componentControl.jsf
\ No newline at end of file
Added: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml (rev 0)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -0,0 +1,58 @@
+<f:subview xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich" id="subview">
+ <style>
+ .cur{
+ cursor:pointer;
+ }
+ </style>
+ <h:form id="form">
+
+ <rich:contextMenu attached="false" id="menu">
+ <rich:menuItem>
+ <b>{car} {model}</b> details
+ </rich:menuItem>
+ <rich:menuGroup value="Actions">
+ <rich:menuItem>
+ Put <b>{car} {model}</b> To Basket
+ </rich:menuItem>
+ <rich:menuItem value="Read Comments"/>
+ <rich:menuItem>
+ Go to <b>{car}</b> site
+ </rich:menuItem>
+ </rich:menuGroup>
+ </rich:contextMenu>
+
+ <rich:dataTable value="#{dataTableScrollerBean.tenRandomCars}" var="car" id="table"
+ onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
+ onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur">
+ <rich:column>
+ <f:facet name="header">
+ Make
+ </f:facet>
+ <h:outputText value="#{car.make}"/>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ Model
+ </f:facet>
+ <h:outputText value="#{car.model}"/>
+ </rich:column>
+ <rich:column>
+ <f:facet name="header">
+ Price
+ </f:facet>
+ <h:outputText value="#{car.price}" />
+ </rich:column>
+
+ <rich:componentControl event="onRowClick" for=":subview:form:menu" operation="doShow">
+ <f:param value="#{car.model}" name="model"/>
+ <f:param value="#{car.make}" name="car"/>
+ </rich:componentControl>
+
+ </rich:dataTable>
+ </h:form>
+</f:subview>
\ No newline at end of file
Added: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml (rev 0)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/control.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -0,0 +1,48 @@
+<ui:composition xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <style>
+ .atop{
+ vertical-align:top;
+ }
+ </style>
+ <p>RichFaces Component Control is a component that allows to manage any components
+ with their client side JS API.
+ </p>
+ <p>
+ In this simple example Component Control components attached to links and just calls "show" and "hide"
+ functions on Modal Panel.
+ </p>
+ <ui:include src="/richfaces/componentControl/examples/mpusage.xhtml" />
+ <rich:separator/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/componentControl/examples/mpusage.xhtml"/>
+ </ui:include>
+
+ <p>
+ Another usefull feature - that Component Control component allows to transfer
+ parameters to managed components.
+ </p>
+ <p>
+ You may put <b>f:param</b> components as nested to component control component
+ and all the parameters that defined will be available from target component.
+ </p>
+ <p>
+ In next example component control used inside <b>rich:dataTable</b> component.
+ Component control defined with two parameters which has current row values.
+ So the <b>rich:contextMenu</b> component which called by this Component Control
+ will take this parameters and will be able to display them in its items values.
+ </p>
+ <p>
+ Click at any table row to see the context menu that generated individually for
+ every row using parameters.
+ </p>
+ <ui:include src="/richfaces/componentControl/examples/cmenuusage.xhtml" />
+ <rich:separator/>
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/componentControl/examples/cmenuusage.xhtml"/>
+ </ui:include>
+</ui:composition>
\ No newline at end of file
Added: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml (rev 0)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -0,0 +1,27 @@
+<f:subview xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <rich:modalPanel id="panel" width="350" height="100">
+ <f:facet name="header">
+ <h:panelGroup>
+ <h:outputText value="Modal Panel"></h:outputText>
+ </h:panelGroup>
+ </f:facet>
+ <f:facet name="controls">
+ <h:panelGroup>
+ <h:graphicImage value="/images/modal/close.png" style="cursor:pointer" id="hidelink"/>
+ <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/>
+ </h:panelGroup>
+ </f:facet>
+ <h:outputText value="This panel called using Component Control Component"></h:outputText>
+ <br/>
+ <h:outputText value="Closure link (X) works aso througn Component Control"></h:outputText>
+ </rich:modalPanel>
+ <h:outputLink value="#" id="link">
+ Show Modal Panel
+ <rich:componentControl for="panel" attachTo="link" operation="show" event="onclick"/>
+ </h:outputLink>
+</f:subview>
\ No newline at end of file
Added: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/usage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/usage.xhtml (rev 0)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/usage.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -0,0 +1,20 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <ui:composition template="/templates/component-sample.xhtml">
+ <ui:define name="sample">
+
+ <div class="sample-container">
+
+ <ui:include src="/richfaces/componentControl/examples/control.xhtml"/>
+
+ </div>
+
+ </ui:define>
+
+ </ui:composition>
+</html>
Added: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl.xhtml (rev 0)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/componentControl.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -0,0 +1,20 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:rich="http://richfaces.org/rich">
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="title">RichFaces - Open Source Rich JSF Components - Component Control Component</ui:define>
+ <ui:define name="body">
+ <rich:tabPanel switchType="server" styleClass="top_tab" contentClass="content_tab" headerClass="header_tabs_class" inactiveTabClass="inactive_tab" activeTabClass="active_tab">
+ <rich:tab label="Usage">
+ <ui:include src="/richfaces/componentControl/usage.xhtml"/>
+ </rich:tab>
+ <ui:include src="/templates/include/tagInfo.xhtml">
+ <ui:param name="path" value="rich/componentControl"/>
+ </ui:include>
+ </rich:tabPanel>
+ </ui:define>
+</ui:composition>
+</html>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml 2007-12-06 09:43:13 UTC (rev 4539)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -1,59 +1,31 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:a4j="http://richfaces.org/a4j"
- xmlns:rich="http://richfaces.org/rich">
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:a4j="http://richfaces.org/a4j"
+ xmlns:rich="http://richfaces.org/rich">
+ <style>
+ .cent{
+ text-align:center;
+ }
+</style>
+ <h:panelGrid columns="1" columnClasses="cent,cent,cent,cent" cellspacing="10px">
+
+ <h:outputText value="Perform right-click on the picture to call the menu" style="font-weight:bold"></h:outputText>
- <h:form id="form">
- <rich:contextMenu attached="false" id="menu" submitMode="ajax">
- <rich:menuItem value="Show Details">
- <a4j:actionparam name="current" value="Show Details" assignTo="#{ddmenu.current}"/>
- </rich:menuItem>
- <rich:menuGroup value="Actions">
- <rich:menuItem value="Put To Basket">
- <a4j:actionparam name="current" value="Put To Basket" assignTo="#{ddmenu.current}"/>
- </rich:menuItem>
- <rich:menuItem value="Read Comments">
- <a4j:actionparam name="current" value="Read Comments" assignTo="#{ddmenu.current}"/>
- </rich:menuItem>
- <rich:menuItem value="Go to {car} {model} site">
- <a4j:actionparam name="current" value="Go to #{car.make} #{car.model} site" assignTo="#{ddmenu.current}"/>
- </rich:menuItem>
- </rich:menuGroup>
- </rich:contextMenu>
- <rich:dataGrid value="#{dataTableScrollerBean.allCars}" var="car" columns="4" elements="12">
- <rich:panel id="panel">
- <rich:componentControl attachTo="panel" event="oncontextmenu" for=":form:menu" operation="doShow">
- <f:param value="#{car.model}" name="model"/>
- <f:param value="#{car.make}" name="car"/>
- </rich:componentControl>
- <f:facet name="header">
- <h:outputText value="#{car.make} #{car.model}"/>
- </f:facet>
- <h:panelGrid columns="2">
- <h:outputText value="Price:" styleClass="label"/>
- <h:outputText value="#{car.price}" />
- <h:outputText value="Mileage:" styleClass="label"/>
- <h:outputText value="#{car.mileage}" />
- <h:outputText value="VIN:" styleClass="label"/>
- <h:outputText value="#{car.vin}" />
- <h:outputText value="Stock:" styleClass="label"/>
- <h:outputText value="#{car.stock}" />
- </h:panelGrid>
- </rich:panel>
- <f:facet name="footer">
- <rich:datascroller/>
- </f:facet>
- </rich:dataGrid>
- <rich:spacer height="30px"/>
- <a4j:outputPanel ajaxRendered="true">
- <rich:panel>
- <f:facet name="header">
- <h:outputText value="Last actions fired:"/>
- </f:facet>
- <h:outputText value="#{ddmenu.current}"/>
- </rich:panel>
- </a4j:outputPanel>
- </h:form>
+ <h:panelGroup>
+ <h:graphicImage value="/richfaces/jQuery/images/pic1.jpg" id="pic"/>
+ <rich:contextMenu event="oncontextmenu" attached="true">
+ <rich:menuItem value="Enlarge"></rich:menuItem>
+ <rich:menuItem value="Open in new window"></rich:menuItem>
+ <rich:menuGroup value="Save">
+ <rich:menuItem value="Download image"></rich:menuItem>
+ <rich:menuItem value="Copy to clipboard"></rich:menuItem>
+ <rich:menuItem value="Copy image adress"></rich:menuItem>
+ </rich:menuGroup>
+ </rich:contextMenu>
+ </h:panelGroup>
+
+ </h:panelGrid>
+
</ui:composition>
\ No newline at end of file
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml 2007-12-06 09:43:13 UTC (rev 4539)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -10,13 +10,10 @@
- <p>RichFaces Context menu is a component that allows to organize the hierarchical popup menus
+ <p>RichFaces Context menu is a component that allows to organize the hierarchical cointext menus
similar to one that almost every desktop application has.
</p>
-
- <p>
- To call the menu - perform right click inside any car info panel. After you click some item - panel above the grid will be updated.
- </p>
+ <p><b>Example:</b>To call the menu - perform the right click on the picture</p>
<div class="sample-container">
<ui:include src="/richfaces/contextMenu/example/menu.xhtml"/>
@@ -25,18 +22,52 @@
</ui:include>
</div>
- <p>The context menu is an invisible panel
+ <p>Context Menu can contains a set of Menu Items, Menu Groups and Menu Separators.
+ Usage of these components are similar to usage in RichFaces Drop Down Menu.
+ </p>
+ <p>Context menu itself is an invisible panel
that appears after a particular client side event (onmouseover, onclick etc) occured on parent component.
- The event is defined with an 'event' attribute.</p>
-
- <p>Context Menu can contains a set of Menu Items, Menu Groups and Menu Separators.
- Group plays a role of label for secondary levels on the menu. Separator is represented with
- horizontal lines between the items or groups. An item is an active element that might produce
- Ajax or non-Ajax requests. The submittion mode is defined with 'submitMode' attribute that has
- three possible options - "server", "ajax" or "none". Mode "none" does not produce any request, but
- allows you to provide your own functionality inside the menu item with an inline content.
+ The event is defined with an <b>event</b> attribute.</p>
+ <p>
+ Other usefull attributes are:
+ <ul>
+ <li>
+ <b>disableDefaultMenu</b> - if true the event which defined on the menu
+ will not be handled by other client handlers except context menu handler. You
+ may see on the first example that standard browser menu isn't called
+ after right click.
+ </li>
+ <li>
+ <b>attached</b> if true - the menu attached to parent component. In other case
+ it should be called via JS API (using componentControl)
+ </li>
+ </ul>
+ </p>
+ <p>
+ Unlike dropDownMenu, contextMenu has no representation element, and has strong right-click
+ support.
+ </p>
+ <p>
+ And the main difference from drop down menu - context menu could be defined once on the page
+ and used by different components. Single instance of the menu will be created and shared between the components.
+ </p>
+ <p>
+ To customize shared menu for every component macrosubstitutions could be used.
+ <b>ComponentControl</b> component could be used to call the instance of the menu for
+ the concrete component. <b>f:param</b> components could be used to add parameters to menu.
+ </p>
+ <p>
+ <b>Example:</b> To call the menu - click any car row.
</p>
-
+ <ui:include src="/richfaces/componentControl/examples/cmenuusage.xhtml" />
+ <ui:include src="/templates/include/sourceview.xhtml">
+ <ui:param name="sourcepath" value="/richfaces/componentControl/examples/cmenuusage.xhtml"/>
+ </ui:include>
+ <p>
+ Pay your attention to the source code. Inside the table you may see component control that calls the menu.
+ Menu recreated after every call on the client and new <b>{car}</b> and <b>{model}</b> values inserted to the menu.
+ </p>
+ <p>Look through componentControl demo page for more information.</p>
</ui:define>
</ui:composition>
Modified: branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml
===================================================================
--- branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml 2007-12-06 09:43:13 UTC (rev 4539)
+++ branches/3.1.x/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml 2007-12-06 10:52:45 UTC (rev 4540)
@@ -11,9 +11,8 @@
height:30px;
}
</style>
-
<h:panelGrid columns="2">
- <rich:gmap gmapVar="map" zoom="#{gmBean.zoom}" style="width:400px;height:400px" gmapKey="#{gmBean.gmapkey}" />
+ <rich:gmap gmapVar="map" zoom="#{gmBean.zoom}" style="width:400px;height:400px" gmapKey="#{gmBean.gmapkey}" id="gmap"/>
<h:panelGroup>
<rich:tabPanel switchType="ajax" width="350" height="400">
18 years, 5 months
JBoss Rich Faces SVN: r4539 - branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-12-06 04:43:13 -0500 (Thu, 06 Dec 2007)
New Revision: 4539
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelStraightforward.xhtml
Log:
fix ID
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2007-12-06 05:41:55 UTC (rev 4538)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanel.xhtml 2007-12-06 09:43:13 UTC (rev 4539)
@@ -1,14 +1,18 @@
<f:subview id="modalPanelSubviewID" xmlns:a4j="http://richfaces.org/a4j" xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" xmlns:ui="http://java.sun.com/jsf/facelets">
<h:messages />
- <rich:modalPanel id="MPid" minHeight="#{modalPanel.minHeight}" minWidth="#{modalPanel.minWidth}" height="#{modalPanel.height}"
+ <rich:modalPanel id="modalPanelID" minHeight="#{modalPanel.minHeight}" minWidth="#{modalPanel.minWidth}" height="#{modalPanel.height}"
width="#{modalPanel.width}" moveable="#{modalPanel.moveable}" resizeable="#{modalPanel.resizeable}"
+ immediate="#{modalPanel.immediate}" keepVisualState="#{modalPanel.keepVisualState}" rendered="#{modalPanel.rendered}"
+ zindex="#{modalPanel.zindex}" autosized="#{modalPanel.autosized}" left="#{modalPanel.left}" top="#{modalPanel.top}"
+ required="#{modalPanel.required}" requiredMessage="#{modalPanel.requiredMessage}" shadowDepth="#{modalPanel.shadowDepth}"
+ shadowOpacity="#{modalPanel.shadowOpacity}" showWhenRendered="#{modalPanel.showWhenRendered}"
onhide="print('onhideInputID', 'onhide work!')" onshow="print('onshowInputID', 'onshow work!')">
<f:facet name="header">
<h:outputText value="Heder goes here..." />
</f:facet>
<f:facet name="controls">
- <h:graphicImage value="/pics/error.gif" onclick="Richfaces.hideModalPanel('MPid');return false;" />
+ <h:graphicImage value="/pics/error.gif" onclick="Richfaces.hideModalPanel('modalPanelID');return false;" />
</f:facet>
<h:outputText value="This is Modal Panel example" styleClass="text1" />
<f:verbatim>
@@ -20,14 +24,14 @@
</h:outputLink>
</rich:modalPanel>
- <a onclick="Richfaces.showModalPanel('MPid');" href="#">Show MP</a>
+ <a onclick="Richfaces.showModalPanel('modalPanelID');" href="#">Show MP</a>
<f:verbatim>
<br />
<br />
</f:verbatim>
- <h:graphicImage value="/pics/info.gif" onclick="Richfaces.showModalPanel('MPid');" />
+ <h:graphicImage value="/pics/info.gif" onclick="Richfaces.showModalPanel('modalPanelID');" />
<f:verbatim>
<br />
<br />
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml 2007-12-06 05:41:55 UTC (rev 4538)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelProperty.xhtml 2007-12-06 09:43:13 UTC (rev 4539)
@@ -8,79 +8,79 @@
<h:panelGrid columns="2">
<h:outputText value="shadowDepth" />
<h:inputText value="#{modalPanel.shadowDepth}" >
- <a4j:support event="onchange" action="submit();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="shadowOpacity" />
<h:inputText value="#{modalPanel.shadowOpacity}" >
- <a4j:support event="onchange" action="submit();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="keepVisualState" />
<h:selectBooleanCheckbox value="#{modalPanel.keepVisualState}" >
- <a4j:support event="onchange" action="submit();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="left" />
<h:inputText value="#{modalPanel.left}" >
- <a4j:support event="onchange" action="submit();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="top" />
<h:inputText value="#{modalPanel.top}" >
- <a4j:support event="onchange" action="submit();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="rendered" />
<h:selectBooleanCheckbox value="#{modalPanel.rendered}" >
- <a4j:support event="onchange" action="submit();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="showWhenRendered" />
<h:selectBooleanCheckbox value="#{modalPanel.showWhenRendered}" >
- <a4j:support event="onchange" action="suport();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID""></a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="zindex" />
<h:selectOneRadio value="#{modalPanel.zindex}">
<f:selectItem itemLabel="1" itemValue="1" />
<f:selectItem itemLabel="3" itemValue="3" />
- <a4j:support event="onchange" action="suport();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="autosized" />
<h:selectBooleanCheckbox value="#{modalPanel.autosized}" >
- <a4j:support event="onchange" action="suport();"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="Width:" />
<h:inputText value="#{modalPanel.width}">
- <a4j:support event="onchange" reRender="MPid"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="Height:" />
<h:inputText value="#{modalPanel.height}">
- <a4j:support event="onchange" reRender="MPid"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="minWidth:" />
<h:inputText value="#{modalPanel.minWidth}">
- <a4j:support event="onchange" reRender="MPid"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="minHeight:" />
<h:inputText value="#{modalPanel.minHeight}">
- <a4j:support event="onchange" reRender="MPid"></a4j:support>
+ <a4j:support event="onchange" reRender="modalPanelID"></a4j:support>
</h:inputText>
<h:outputText value="Resizeable:" />
<h:selectBooleanCheckbox value="#{modalPanel.resizeable}">
- <a4j:support event="onclick" reRender="MPid"></a4j:support>
+ <a4j:support event="onclick" reRender="modalPanelID"></a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="Moveable:" />
<h:selectBooleanCheckbox value="#{modalPanel.moveable}">
- <a4j:support event="onclick" reRender="MPid"></a4j:support>
+ <a4j:support event="onclick" reRender="modalPanelID"></a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="immediate" />
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelStraightforward.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelStraightforward.xhtml 2007-12-06 05:41:55 UTC (rev 4538)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/ModalPanel/ModalPanelStraightforward.xhtml 2007-12-06 09:43:13 UTC (rev 4539)
@@ -7,23 +7,23 @@
<rich:simpleTogglePanel switchType="client" opened="true" label="modalPanel straightforward">
<h:panelGrid columns="3">
<h:outputText value="Test1" />
- <a4j:commandButton action="#{modalPanel.bTest1}" value="run" reRender="MPform:MPid,mpPropertyID"></a4j:commandButton>
+ <a4j:commandButton action="#{modalPanel.bTest1}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
<h:outputText value="#{msg.t1ModalPanel}"/>
<h:outputText value="Test2" />
- <a4j:commandButton action="#{modalPanel.bTest2}" value="run" reRender="MPform:MPid,mpPropertyID"></a4j:commandButton>
+ <a4j:commandButton action="#{modalPanel.bTest2}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
<h:outputText value="#{msg.t2ModalPanel}"/>
<h:outputText value="Test3" />
- <a4j:commandButton action="#{modalPanel.bTest3}" value="run" reRender="MPform:MPid,mpPropertyID"></a4j:commandButton>
+ <a4j:commandButton action="#{modalPanel.bTest3}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
<h:outputText value="#{msg.t3ModalPanel}"/>
<h:outputText value="Test4" />
- <a4j:commandButton action="#{modalPanel.bTest4}" value="run" reRender="MPform:MPid,mpPropertyID"></a4j:commandButton>
+ <a4j:commandButton action="#{modalPanel.bTest4}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
<h:outputText value="#{msg.t4ModalPanel}"/>
<h:outputText value="Test5" />
- <a4j:commandButton action="#{modalPanel.bTest5}" value="run" reRender="MPform:MPid,mpPropertyID"></a4j:commandButton>
+ <a4j:commandButton action="#{modalPanel.bTest5}" value="run" reRender="modalPanelID,mpPropertyID"></a4j:commandButton>
<h:outputText value="#{msg.t5ModalPanel}"/>
</h:panelGrid>
</rich:simpleTogglePanel>
18 years, 5 months
JBoss Rich Faces SVN: r4538 - in branches/3.1.x/ui/listShuttle/src: test/java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-06 00:41:55 -0500 (Thu, 06 Dec 2007)
New Revision: 4538
Modified:
branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java
Log:
- excess extend.js removed
- current extend.js updated to comply prototype.js 1.6.0
Modified: branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx
===================================================================
--- branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 05:41:48 UTC (rev 4537)
+++ branches/3.1.x/ui/listShuttle/src/main/templates/org/richfaces/htmlListShuttle.jspx 2007-12-06 05:41:55 UTC (rev 4538)
@@ -18,7 +18,7 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
- scripts/extend.js,
+ scripts/extend/extend.js,
scripts/ShuttleUtils.js
scripts/SelectItem.js,
scripts/LayoutManager.js
Modified: branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java
===================================================================
--- branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java 2007-12-06 05:41:48 UTC (rev 4537)
+++ branches/3.1.x/ui/listShuttle/src/test/java/org/richfaces/renderkit/ListShuttleRenderingTest.java 2007-12-06 05:41:55 UTC (rev 4538)
@@ -67,7 +67,7 @@
javaScripts.add("scripts/LayoutManager.js");
javaScripts.add("scripts/Control.js");
javaScripts.add("scripts/OrderingList.js");
- javaScripts.add("scripts/extend.js");
+ javaScripts.add("scripts/extend/extend.js");
javaScripts.add("scripts/ListShuttle.js");
javaScripts.add("scripts/ListBase.js");
18 years, 5 months
JBoss Rich Faces SVN: r4537 - in branches/3.1.x/ui/orderingList/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-06 00:41:48 -0500 (Thu, 06 Dec 2007)
New Revision: 4537
Removed:
branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/extend.js
Modified:
branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
Log:
- excess extend.js removed
- current extend.js updated to comply prototype.js 1.6.0
Deleted: branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/extend.js
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/extend.js 2007-12-06 05:41:40 UTC (rev 4536)
+++ branches/3.1.x/ui/orderingList/src/main/resources/org/richfaces/renderkit/html/scripts/extend.js 2007-12-06 05:41:48 UTC (rev 4537)
@@ -1,189 +0,0 @@
-// vim: tw=80 ts=4 sw=4 noet
-// ----------------------------------------------------------------------------
-// Project : Extend - Prototype OOP extension
-// URL : <http://www.ivy.fr/js/extend>
-// ----------------------------------------------------------------------------
-// Author : Sebastien Pierre <sebastien(a)ivy.fr>
-// License : Revised BSD License
-// ----------------------------------------------------------------------------
-// Creation : 08-Sep-2006
-// Last mod : 17-Nov-2006
-// ----------------------------------------------------------------------------
-
-// The Extend object holds all the information required to implement the
-// inheritance and other OO-goodness.
-if(!window.Extend) {
-
-Extend = {
- VERSION: 1.1,
- CLASSDEF: "CLASSDEF",
- DELETE: "DELETE",
- // These are a list of methods of class instances that are reserved by the
- // OO layer (see the reparent method for more info)
- INSTANCE_RESERVED: {
- CLASSDEF: true,
- getClass: true,
- parentClass: true
- },
-
- // Sets up a class
- setupClass: function( _class, declaration )
- {
- // We create an empty prototype if the user did not provide one
- declaration = declaration || {}
- _class.prototype = declaration
- // We clone the given method definition, because they will be augmented
- // with the ones defined in the parent class
- _class.methods = {}
- for ( var key in declaration ) { _class.methods[key] = declaration[key] }
- _class.inherited = {}
- _class.parentClass = undefined
- if ( declaration[Extend.CLASSDEF] )
- { _class.className = declaration[Extend.CLASSDEF].name }
- else
- { _class.className = undefined }
- _class.subclasses = _class.subclasses || []
- _class.constructor = Extend.Operations.constructor
- _class.reparent = Extend.Operations.reparent
- _class.method = Extend.Operations.method
- _class.update = Extend.Operations.update
- if ( declaration[Extend.CLASSDEF] )
- { _class.reparent(declaration[Extend.CLASSDEF].parent) }
- // We update the class methods with an `ofClass` method that returns the
- // class, so that instances will have a proper
- declaration.getClass = function() {return _class}
- declaration.parentClass = function() {return this.getClass().parentClass}
- declaration.parentCall = function() {
- var new_args = []
- for ( var i=1;i<arguments.length;i++ ) {new_args.push(arguments[i])}
- return this.parentClass().method(arguments[0]).apply(this, new_args)
- }
- declaration.setClass = function(newClass) {
- return this.getClass().parentClass
- }
- // We reparent the subclasses if any
- for ( var i=0 ; i<_class.subclasses ; i++ ) {
- _class.subclasses[i].reparent(_class)
- }
- return _class
- },
- // These are operations that will be "mixed-in" with the new classes
- Operations: {
- constructor: function() {
- return this.prototype.initialize || function() {}
- },
- // Reparents this class
- reparent: function( newParentClass )
- {
- if ( this.parentClass )
- {
- var this_index = this.subclasses.indexOf(this)
- this.parentClass.subclasses.splice(this_index, 1)
- for ( var method_name in this.inherited ) {
- this.method(method_name, null, this.parentClass)
- }
- }
- this.parentClass = newParentClass
- if ( !newParentClass ) return
- var parent_methods = newParentClass.prototype
- // We iterate on all the parent methods
- for ( parent_method_name in parent_methods ) {
- // If the method is a reserved one, we skip it
- if ( Extend.INSTANCE_RESERVED[parent_method_name] == true ) { continue }
- // If the method is not directly defined in the current class, we add it
- if ( this.methods[parent_method_name] == undefined )
- {
- this.method( parent_method_name,
- parent_methods[parent_method_name],
- newParentClass.inherited[parent_method_name] || newParentClass
- )
- }
- }
- newParentClass.subclasses.push(this)
- },
- update: function(newPrototype) {
- Extend.setupClass(this, newPrototype||this.prototype)
- },
- // Returns, sets or deletes a method in this class
- method: function( name, body, declaredIn ) {
- if ( body == undefined )
- {
- var method = this.prototype[name]
- if ( name == undefined ) throw new Error("Method not found: "+name)
- return method
- }
- else
- {
- declaredIn = declaredIn || this
- // If the method is declared in this class
- if ( declaredIn == this )
- {
- if ( body == Extend.DELETE ) {
- delete this.methods[name]
- delete this.inherited[name]
- delete this.prototype[name]
- // If the method is defined in the parent we set it
- if ( this.parentClass ) {
- var parent_method = this.parentClass.method(name)
- if ( parent_method ) {
- this.method(name, parent_method, this.parentClass.inherited[name] || this.parentClass)
- }
- }
- } else {
- this.methods[name] = body
- this.prototype[name] = body
- delete this.inherited[name]
- }
- }
- // Or if its declared in another class
- else
- {
- if ( body == Extend.DELETE ) {
- delete this.inherited[name]
- delete this.methods[name]
- delete this.prototype[name]
- // If the method is defined in the parent we set it
- if ( this.parentClass ) {
- var parent_method = this.parentClass.method(name)
- if ( parent_method ) {
- this.method(name, parent_method, this.parentClass.inherited[name] || this.parentClass)
- }
- }
- }
- else {
- if ( this.methods[name] == undefined ) {
- this.inherited[name] = declaredIn
- this.prototype[name] = body
- }
- }
- }
- for ( var i=0 ; i<this.subclasses.length ; i++ )
- {
- this.subclasses[i].method(name,body,declaredIn)
- }
- }
- }
- }
-}
-
-// In case prototype is not available, we use this instead
-try {
- Class = Class
-} catch ( Error ) {
- Class = {create:function() {return function() {this.initialize.apply(this, arguments)}}}
-}
-Class._create = Class.create
-Class.create = function( declaration ) {
- var new_class = Extend.setupClass(declaration ? Class._create(declaration) : Class._create(), declaration)
- // The following only works on FireFox
- /*
- new_class.watch("prototype", function(id,oldval,newval) {
- new_class.prototype = newval
- Extend.setupClass(new_class, newval)
- return newval
- })*/
- return new_class
-};
-
-};
-// EOF
Modified: branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx
===================================================================
--- branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-06 05:41:40 UTC (rev 4536)
+++ branches/3.1.x/ui/orderingList/src/main/templates/org/richfaces/htmlOrderingList.jspx 2007-12-06 05:41:48 UTC (rev 4537)
@@ -17,7 +17,7 @@
<h:scripts>
new org.ajax4jsf.javascript.PrototypeScript(),
- scripts/extend.js,
+ scripts/extend/extend.js,
scripts/ShuttleUtils.js,
scripts/SelectItem.js,
scripts/LayoutManager.js
18 years, 5 months
JBoss Rich Faces SVN: r4536 - branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/extend.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-06 00:41:40 -0500 (Thu, 06 Dec 2007)
New Revision: 4536
Modified:
branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/extend/extend.js
Log:
- excess extend.js removed
- current extend.js updated to comply prototype.js 1.6.0
Modified: branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/extend/extend.js
===================================================================
--- branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/extend/extend.js 2007-12-06 05:28:57 UTC (rev 4535)
+++ branches/3.1.x/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/extend/extend.js 2007-12-06 05:41:40 UTC (rev 4536)
@@ -174,7 +174,7 @@
}
Class._create = Class.create
Class.create = function( declaration ) {
- var new_class = Extend.setupClass(Class._create(declaration), declaration)
+ var new_class = Extend.setupClass(declaration ? Class._create(declaration) : Class._create(), declaration)
// The following only works on FireFox
/*
new_class.watch("prototype", function(id,oldval,newval) {
18 years, 5 months
JBoss Rich Faces SVN: r4535 - branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-06 00:28:57 -0500 (Thu, 06 Dec 2007)
New Revision: 4535
Modified:
branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
Log:
orderingList & listShuttle: selection initialization fixed
Modified: branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp
===================================================================
--- branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-06 05:28:53 UTC (rev 4534)
+++ branches/3.1.x/samples/listShuttleDemo/src/main/webapp/pages/index.jsp 2007-12-06 05:28:57 UTC (rev 4535)
@@ -78,7 +78,7 @@
<h:commandButton value="Submit" />
<h:commandButton value="Submit Immediate" immediate="true" />
- <h:commandButton value="Start over" action="#{listShuttleDemoBean.startOver}" immediate="true"/>
+ <h:commandButton value="Start over" action="#{listShuttleDemoBean.startOver}" immediate="true" rendered="false"/>
<ls:listShuttle id="listShuttle1" var="item" sourceValue="#{listShuttleDemoBean.numbers}">
18 years, 5 months