Author: maksimkaszynski
Date: 2008-02-19 09:21:16 -0500 (Tue, 19 Feb 2008)
New Revision: 6166
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
Log:
merged demo with 3.1.x branch
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/calendar/CalendarBean.java 2008-02-19
14:21:16 UTC (rev 6166)
@@ -12,7 +12,7 @@
private boolean popup;
private String pattern;
private Date selectedDate;
-
+ private boolean showApply=true;
private boolean useCustomDayLabels;
public Locale getLocale() {
@@ -43,7 +43,7 @@
locale = Locale.US;
popup = true;
- pattern = "MMM d, yyyy";
+ pattern = "MMM d, yyyy, HH:mm";
}
public void selectLocale(ValueChangeEvent event) {
@@ -72,4 +72,12 @@
this.selectedDate = selectedDate;
}
+ public boolean isShowApply() {
+ return showApply;
+ }
+
+ public void setShowApply(boolean showApply) {
+ this.showApply = showApply;
+ }
+
}
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/common/Environment.java 2008-02-19
14:21:16 UTC (rev 6166)
@@ -3,9 +3,12 @@
import java.util.HashMap;
import java.util.Map;
+import javax.faces.application.Application;
+import javax.faces.context.FacesContext;
+
public class Environment {
private Map params = new HashMap();
-
+ private String version;
public Map getParams() {
return params;
}
@@ -14,4 +17,8 @@
this.params = params;
}
+ public String getVersion() {
+ String shortVersion =
FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createValueExpression(FacesContext.getCurrentInstance().getELContext(),
"#{a4j.version}",
String.class).getValue(FacesContext.getCurrentInstance().getELContext()).toString();
+ return shortVersion.substring(0, shortVersion.indexOf("$Date"));
+ }
}
Modified: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/gmap/Bean.java 2008-02-19
14:21:16 UTC (rev 6166)
@@ -3,6 +3,7 @@
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
@@ -10,7 +11,7 @@
public class Bean {
- private ArrayList point;
+ private List<Place> point;
private String currentId;
private int zoom;
private String gmapkey;
@@ -28,7 +29,7 @@
- public ArrayList getPoint() {
+ public List<Place> getPoint() {
if (point == null)
initData();
return point;
@@ -36,15 +37,15 @@
- public void setPoint(ArrayList point) {
+ public void setPoint(List<Place> point) {
this.point = point;
}
public Place getCurrentPlace() {
- Iterator it = point.iterator();
+ Iterator<Place> it = point.iterator();
while (it.hasNext()) {
- Place pl = (Place)it.next();
+ Place pl = it.next();
if (currentId.equals(pl.getId())) {
zoom = pl.getZoom(); //sync with zoom of new place
return pl;
@@ -54,7 +55,7 @@
}
private void initData() {
- point = new ArrayList();
+ point = new ArrayList<Place>();
point.add(new Place ("goldengate",
"/org/richfaces/demo/gmap/images/gold.gif", "37.81765",
"-122.477603" , 14,
"Golden Gate Bridge, San Francisco"));
point.add(new Place ("eiffeltower",
"/org/richfaces/demo/gmap/images//tower.gif", "48.858489",
"2.295295" , 17,
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-02-19
13:50:09 UTC (rev 6165)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -73,7 +73,7 @@
<managed-bean>
<managed-bean-name>dataTableScrollerBean</managed-bean-name>
<managed-bean-class>org.richfaces.datatablescroller.DataTableScrollerBean</managed-bean-class>
- <managed-bean-scope>application</managed-bean-scope>
+ <managed-bean-scope>session</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>toggleBean</managed-bean-name>
@@ -251,7 +251,7 @@
<managed-bean>
<managed-bean-name>updateBean</managed-bean-name>
<managed-bean-class>org.richfaces.datatable.UpdateBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
+ <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
<managed-bean>
<managed-bean-name>panelMenu</managed-bean-name>
@@ -264,7 +264,7 @@
</managed-property>
<managed-property>
<property-name>singleMode</property-name>
- <property-class>java.lang.Boolean</property-class>
+ <property-class>boolean</property-class>
<value>true</value>
</managed-property>
</managed-bean>
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-02-19 13:50:09 UTC
(rev 6165)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-02-19 14:21:16 UTC
(rev 6166)
@@ -37,6 +37,10 @@
</context-param>
<context-param>
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_STYLE</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
@@ -46,11 +50,11 @@
<!--context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
<param-value>DEFAULT</param-value>
- </context-param>
+ </context-param-->
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
<param-value>DEFAULT</param-value>
- </context-param-->
+ </context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -8,6 +8,9 @@
<style type="text/css">
.ecol1 { width:250px; vertical-align: top; }
.ecol2 { vertical-align: top; border-left:1px solid #CCC; }
+ .rich-calendar-tool-btn{
+ font-family: Arial, Verdana;
+ }
</style>
<h:form>
@@ -18,7 +21,7 @@
locale="#{calendarBean.locale}"
popup="#{calendarBean.popup}"
datePattern="#{calendarBean.pattern}"
- />
+ showApplyButton="#{calendarBean.showApply}"/>
</a4j:outputPanel>
@@ -27,7 +30,10 @@
<h:selectBooleanCheckbox value="#{calendarBean.popup}">
<a4j:support event="onclick" reRender="calendar"/>
</h:selectBooleanCheckbox>
-
+ <h:outputText value="Apply Button:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.showApply}">
+ <a4j:support event="onclick" reRender="calendar"/>
+ </h:selectBooleanCheckbox>
<h:outputText value="Select Locale" />
<h:selectOneRadio value="en/US"
valueChangeListener="#{calendarBean.selectLocale}">
<a4j:support event="onclick" reRender="calendar"/>
@@ -40,8 +46,8 @@
<h:outputText value="Select Date Pattern:"/>
<h:selectOneMenu value="#{calendarBean.pattern}">
<a4j:support event="onchange" reRender="calendar"/>
- <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy"/>
- <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy"/>
+ <f:selectItem itemLabel="d/M/yy HH:mm" itemValue="d/M/yy
HH:mm"/>
+ <f:selectItem itemLabel="dd/M/yy hh:mm a" itemValue="dd/M/yy hh:mm
a"/>
<f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y"/>
<f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d,
yyyy"/>
</h:selectOneMenu>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml 2008-02-19
13:50:09 UTC (rev 6165)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/usage.xhtml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -8,8 +8,8 @@
<ui:composition template="/templates/component-sample.xhtml">
<ui:define name="sample">
- <p>
- rich:calendar allows to select the date using monthly calendar elements on pages.
+ <p><b>
+ rich:calendar</b> allows to select the date using monthly calendar elements on
pages.
It is possible to use the component in a popup and inline code. At a popup mode
Calendar
is initially rendered as input for date and button on the right side to call a popup.
In case of an inline mode, the monthly calendar is located on a page initially.
@@ -23,9 +23,13 @@
</ui:include>
</div>
+ <p>Calendar component allows to work with <b>time</b> also. You
should just define time in pattern ( for example "<i>d/M/yy
HH:mm</i>" as it's defined in this sample by default)
+ </p>
+ <p>After you choose some date, you'll be able to manage time for this date.
Spinner will be called after click on the time fields to edit them.</p>
+ <p>Calendar could be used without "Apply" button (will be closed after
date selected)</p>
<p>
<b>locale</b> attribute is defined as a Locale. The default value is set
to the Locale of the current page.
- The name of the month and week days names depend of the Locale.
+ The name of the month and week days depend on the Locale.
</p>
<p>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dragSupport/examples/dnd.xhtml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -23,7 +23,7 @@
<h:panelGrid columnClasses="panelc" columns="4"
width="100%">
- <rich:panel style="width:100px">
+ <rich:panel style="width:133px">
<f:facet name="header">
<h:outputText value="Source List" />
</f:facet>
@@ -31,7 +31,7 @@
var="fm" >
<h:column>
- <a4j:outputPanel style="border:1px solid gray;padding:2px;"
+ <a4j:outputPanel style="width:100px;border:1px solid
gray;padding:2px"
layout="block">
<rich:dragSupport dragIndicator=":indicator"
dragType="#{fm.family}" dragValue="#{fm}">
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/gmap/examples/mapUsage.xhtml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -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">
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/tooltipUsage.xhtml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -36,7 +36,7 @@
</p>
</rich:panel>
<rich:panel id="sample2" styleClass="tooltip-text">
- <rich:toolTip followMouse="true" direction="top-right"
delay="500" styleClass="tooltip" style="width:250px">
+ <rich:toolTip followMouse="true" direction="top-right"
showDelay="500" styleClass="tooltip">
<span style="white-space:nowrap">
This tool-tip content also <strong>pre-rendered</strong> to the
page.<br/>
However, the look of this tool-tip is customized<br/>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml 2008-02-19
13:50:09 UTC (rev 6165)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/toolTip/examples/withTable.xhtml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -45,7 +45,7 @@
<h:outputText value="Make"/>
</f:facet>
<h:outputText id="make" value="#{vehicle.make}" >
- <rich:toolTip direction="top-right" mode="ajax"
delay="30" styleClass="tooltip" immediate="true"
layout="block">
+ <rich:toolTip direction="top-right" mode="ajax"
showDelay="300" styleClass="tooltip" immediate="true"
layout="block">
<a4j:actionparam name="key" value="#{row}"
assignTo="#{toolTipData.currentVehicleIndex}" />
<h:panelGrid columns="4">
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml 2008-02-19
13:50:09 UTC (rev 6165)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/header.xhtml 2008-02-19
14:21:16 UTC (rev 6166)
@@ -114,12 +114,14 @@
<f:param value="DEFAULT" name="s"/>
</h:outputLink>
</td>
+ <ui:remove>
<td>
<h:outputLink
value="#{componentNavigator.currentComponent.contextRelativeDemoLocation}">
Null
<f:param value="NULL" name="s"/>
</h:outputLink>
</td>
+ </ui:remove>
<td class="control">
<rich:toggleControl for="skin_chooser" value="«
less" />
</td>
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2008-02-19 13:50:09
UTC (rev 6165)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/main.xhtml 2008-02-19 14:21:16
UTC (rev 6166)
@@ -48,7 +48,7 @@
<!-- tabpanel end -->
<rich:spacer style="height:10px;" />
<rich:separator style="height:1px" />
- <div style="float:right"
class="footer-text">${a4j.version}</div>
+ <div style="float:right;"
class="footer-text">#{environment.version}</div>
<div style="float:none">
<a
href="http://jboss.com/index.html?module=bb&op=viewtopic&...
style="color:#000; display:block"
class="footer-text">RichFaces. Most Important Links</a>