JBoss Rich Faces SVN: r2935 - trunk/docs/userguide/en/src/main/docbook.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-09-14 08:53:13 -0400 (Fri, 14 Sep 2007)
New Revision: 2935
Modified:
trunk/docs/userguide/en/src/main/docbook/master.xml
Log:
http://jira.jboss.com/jira/browse/RF-574
Modified: trunk/docs/userguide/en/src/main/docbook/master.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/master.xml 2007-09-13 18:47:52 UTC (rev 2934)
+++ trunk/docs/userguide/en/src/main/docbook/master.xml 2007-09-14 12:53:13 UTC (rev 2935)
@@ -92,10 +92,10 @@
&insert_table;
&message_table;
&modalPanel_table;
-&panelMenu_table;
&paint2D_table;
&panel_table;
&panelBar_table;
+&panelMenu_table;
&scrollableDataTable_table;
&separator_table;
&simpleTogglePanel_table;
18 years, 7 months
JBoss Rich Faces SVN: r2934 - trunk/ui/effect/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-09-13 14:47:52 -0400 (Thu, 13 Sep 2007)
New Revision: 2934
Modified:
trunk/ui/effect/src/main/templates/effect.jspx
Log:
removed extra js file from effect template
Modified: trunk/ui/effect/src/main/templates/effect.jspx
===================================================================
--- trunk/ui/effect/src/main/templates/effect.jspx 2007-09-13 17:09:02 UTC (rev 2933)
+++ trunk/ui/effect/src/main/templates/effect.jspx 2007-09-13 18:47:52 UTC (rev 2934)
@@ -17,7 +17,7 @@
<c:set var="type" value="#{component.attributes['type']}"/>
<c:set var="targetId" value="#{component.attributes['targetId']}"/>
<c:set var="params" value="#{this:convertParameters(context, component)}"/>
- <h:scripts>new org.ajax4jsf.javascript.PrototypeScript(),scripts/scriptaculous/scriptaculous.js,scripts/scriptaculous/effects.js,/org/richfaces/renderkit/html/script/processEffect.js</h:scripts>
+ <h:scripts>new org.ajax4jsf.javascript.PrototypeScript(),scripts/scriptaculous/effects.js,/org/richfaces/renderkit/html/script/processEffect.js</h:scripts>
<jsp:scriptlet>
18 years, 7 months
JBoss Rich Faces SVN: r2933 - in trunk/test-applications/facelets/src/main: webapp/Calendar and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-09-13 13:09:02 -0400 (Thu, 13 Sep 2007)
New Revision: 2933
Modified:
trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java
trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java
trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
Log:
update
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-09-13 17:03:40 UTC (rev 2932)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarBean.java 2007-09-13 17:09:02 UTC (rev 2933)
@@ -24,35 +24,51 @@
import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
-
+import java.util.TimeZone;
import javax.faces.event.ValueChangeEvent;
-/**
- * 20/07/2007
- *
- * @author Alexej Kushunin
- * @mailto: akushunin(a)exadel.com
- *
- */
+import org.richfaces.event.CurrentDateChangeEvent;
+
public class CalendarBean {
- private static final String[] WEEK_DAY_LABELS = new String[] { "Sun *",
+ private static final String [] WEEK_DAY_LABELS = new String [] { "Sun *",
"Mon +", "Tue +", "Wed +", "Thu +", "Fri +", "Sat *" };
+ private static final String [] WEEK_DAY = new String [] {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
+
private Locale locale;
-
private boolean popup;
private boolean readonly;
private boolean showInput;
private boolean enableManualInput;
- private String pattern;
+ private boolean ajaxSingle;
+ private boolean disabled;
+ private boolean bypassUpdates;
+ private boolean rendered;
+ private boolean useCustomDayLabels;
+ private boolean useCustomDay;
+ private boolean required;
private Date currentDate;
private Date selectedDate;
+ private String height;
+ private String width;
+ private String pattern;
private String jointPoint;
private String direction;
private String boundary;
-
- private boolean useCustomDayLabels;
-
+ private String icon;
+ private String toolTipMode;
+ private String scrollMode;
+ private int zindex;
+ private int counter;
+
+ public void changeIcons() {
+ if (icon != null) {
+ icon = null;
+ } else {
+ icon = "/pics/ajax_process.gif";
+ }
+ }
+
public Locale getLocale() {
return locale;
}
@@ -86,7 +102,8 @@
}
public CalendarBean() {
-
+ height = "400px";
+ width = "400px";
locale = Locale.US;
popup = true;
pattern = "MMM d, yyyy";
@@ -96,6 +113,14 @@
enableManualInput=false;
showInput=true;
boundary = "inactive";
+ icon = null;
+ disabled = false;
+ bypassUpdates = false;
+ rendered = true;
+ zindex = 2;
+ toolTipMode = "none";
+ scrollMode = "client";
+ required = false;
}
@@ -124,7 +149,6 @@
}
public void selectLocale(ValueChangeEvent event) {
-
String tLocale = (String) event.getNewValue();
if (tLocale != null) {
String lang = tLocale.substring(0, 2);
@@ -148,6 +172,14 @@
return null;
}
}
+
+ public Object getWeekDayLabels() {
+ if (isUseCustomDay()) {
+ return WEEK_DAY;
+ } else {
+ return null;
+ }
+ }
public String getCurrentDateAsText() {
Date currentDate = getCurrentDate();
@@ -206,5 +238,117 @@
public void setBoundary(String boundary) {
this.boundary = boundary;
}
+ public void dcl(CurrentDateChangeEvent event){
+ System.out.println(event.getCurrentDateString());
+ System.out.println("ajvhckndskncs");
+ }
+ public void ddd(ValueChangeEvent event){
+ System.out.println(event.getOldValue());
+ System.out.println(event.getNewValue());
+
+ }
+ public int getCounter() {
+ return counter++;
+ }
+
+ public boolean isAjaxSingle() {
+ return ajaxSingle;
+ }
+
+ public void setAjaxSingle(boolean ajaxSingle) {
+ this.ajaxSingle = ajaxSingle;
+ }
+
+ public String getIcon() {
+ return icon;
+ }
+
+ public void setIcon(String icon) {
+ this.icon = icon;
+ }
+
+ public boolean isDisabled() {
+ return disabled;
+ }
+
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
+ }
+
+ public boolean isBypassUpdates() {
+ return bypassUpdates;
+ }
+
+ public void setBypassUpdates(boolean bypassUpdates) {
+ this.bypassUpdates = bypassUpdates;
+ }
+
+ public String getHeight() {
+ return height;
+ }
+
+ public void setHeight(String height) {
+ this.height = height;
+ }
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+ public String getToolTipMode() {
+ return toolTipMode;
+ }
+
+ public void setToolTipMode(String toolTipMode) {
+ this.toolTipMode = toolTipMode;
+ }
+
+ public String getScrollMode() {
+ return scrollMode;
+ }
+
+ public void setScrollMode(String scrollMode) {
+ this.scrollMode = scrollMode;
+ }
+
+ public int getZindex() {
+ return zindex;
+ }
+
+ public void setZindex(int zindex) {
+ this.zindex = zindex;
+ }
+
+ public String getWidth() {
+ return width;
+ }
+
+ public void setWidth(String width) {
+ this.width = width;
+ }
+
+
+
+ public boolean isUseCustomDay() {
+ return useCustomDay;
+ }
+
+
+
+ public void setUseCustomDay(boolean useCustomDay) {
+ this.useCustomDay = useCustomDay;
+ }
+
+ public boolean isRequired() {
+ return required;
+ }
+
+ public void setRequired(boolean required) {
+ this.required = required;
+ }
}
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java 2007-09-13 17:03:40 UTC (rev 2932)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelImpl.java 2007-09-13 17:09:02 UTC (rev 2933)
@@ -55,7 +55,6 @@
protected CalendarDataModelItem createDataModelItem(Date date) {
CalendarDataModelItemImpl item = new CalendarDataModelItemImpl();
- item.setDate(date);
Map data = new HashMap();
DateFormat enFormatter = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.ENGLISH);
DateFormat frFormatter = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.FRENCH);
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-09-13 17:03:40 UTC (rev 2932)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarDataModelItemImpl.java 2007-09-13 17:09:02 UTC (rev 2933)
@@ -21,8 +21,6 @@
package calendar;
-import java.util.Date;
-
import org.richfaces.model.CalendarDataModelItem;
/**
@@ -33,7 +31,6 @@
public class CalendarDataModelItemImpl implements CalendarDataModelItem {
private Object data;
- private Date date;
private String styleClass;
private Object toolTip;
private boolean enabled = true;
@@ -46,13 +43,6 @@
}
/* (non-Javadoc)
- * @see org.richfaces.component.CalendarDataModelItem#getDate()
- */
- public Date getDate() {
- return date;
- }
-
- /* (non-Javadoc)
* @see org.richfaces.component.CalendarDataModelItem#getStyleClass()
*/
public String getStyleClass() {
@@ -88,13 +78,6 @@
}
/**
- * @param date the date to set
- */
- public void setDate(Date date) {
- this.date = date;
- }
-
- /**
* @param styleClass the styleClass to set
*/
public void setStyleClass(String styleClass) {
Modified: trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java 2007-09-13 17:03:40 UTC (rev 2932)
+++ trunk/test-applications/facelets/src/main/java/calendar/CalendarValidator.java 2007-09-13 17:09:02 UTC (rev 2933)
@@ -1,6 +1,3 @@
-/**
- *
- */
package calendar;
import java.util.Calendar;
Modified: trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-13 17:03:40 UTC (rev 2932)
+++ trunk/test-applications/facelets/src/main/webapp/Calendar/Calendar.xhtml 2007-09-13 17:09:02 UTC (rev 2933)
@@ -3,7 +3,7 @@
xmlns:rich="http://richfaces.org/rich"
xmlns:h="http://java.sun.com/jsf/html">
- <style type="text/css">
+ <style type="text/css">
.smallText {
font-size: xx-small;
}
@@ -16,116 +16,192 @@
background-color: #0087FF;
}
</style>
- <f:verbatim>
- <br />
- </f:verbatim>
+
- <rich:calendar id="calendar" dataModel="#{calendarDataModel}"
- locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
- datePattern="#{calendarBean.pattern}"
- weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
- value="#{calendarBean.selectedDate}"
- currentDate="#{calendarBean.currentDate}"
- jointPoint="#{calendarBean.jointPoint}"
- direction="#{calendarBean.direction}" buttonLabel="PopUp"
- enableManualInput="#{calendarBean.enableManualInput}"
- showInput="#{calendarBean.showInput}"
- boundaryDatesMode="#{calendarBean.boundary}">
- <f:facet name="optionalHeader">
- <h:outputText value="optionalHeader Facet" />
- </f:facet>
- <f:facet name="optionalFooter">
- <h:outputText value="optionalFooter Facet" />
- </f:facet>
- <f:validator validatorId="org.richfaces.CalendarValidator" />
+ <f:verbatim>
+ <br />
+ </f:verbatim>
- <h:panelGrid columns="2">
- <f:verbatim>
- <span style="padding: 2px;">{day}</span>
- </f:verbatim>
+ <rich:calendar id="calendarID" dataModel="#{calendarDataModel}"
+ locale="#{calendarBean.locale}" popup="#{calendarBean.popup}"
+ datePattern="#{calendarBean.pattern}"
+ weekDayLabelsShort="#{calendarBean.weekDayLabelsShort}"
+ weekDayLabels="#{calendarBean.weekDayLabels}"
+ value="#{calendarBean.selectedDate}"
+ currentDate="#{calendarBean.currentDate}"
+ jointPoint="#{calendarBean.jointPoint}"
+ direction="#{calendarBean.direction}" buttonLabel="Select Date"
+ enableManualInput="#{calendarBean.enableManualInput}"
+ showInput="#{calendarBean.showInput}"
+ boundaryDatesMode="#{calendarBean.boundary}"
+ currentDateChangeListener="#{calendarBean.dcl}"
+ valueChangeListener="#{calendarBean.ddd}" reRender="counter"
+ inputClass="ic" buttonClass="bc"
+ ajaxSingle="#{calendarBean.ajaxSingle}"
+ buttonIcon="#{calendarBean.icon}"
+ buttonIconDisabled="/pics/ajax_stoped.gif"
+ disabled="#{calendarBean.disabled}"
+ bypassUpdates="#{calendarBean.bypassUpdates}"
+ height="#{calendarBean.height}"
+ width="#{calendarBean.width}"
+ zindex="#{calendarBean.zindex}"
+ toolTipMode="#{calendarBean.toolTipMode}"
+ scrollMode="#{calendarBean.scrollMode}"
+ rendered="#{calendarBean.rendered}"
+ focus="popupModeID"
+ required="#{calendarBean.required}"
+ requiredMessage="Required Message">
+ <f:facet name="optionalHeader">
+ <h:outputText value="optionalHeader Facet" />
+ </f:facet>
+ <f:facet name="optionalFooter">
+ <h:outputText value="optionalFooter Facet" />
+ </f:facet>
+ <f:validator validatorId="org.richfaces.CalendarValidator" />
+ <h:panelGrid columns="2">
+ <f:verbatim>
+ <span style="padding: 2px;">{day}</span>
+ </f:verbatim>
+ <h:panelGrid>
+ <h:outputText styleClass="smallText" value="{data.enLabel}" />
+ <h:outputText styleClass="smallText" value="{data.frLabel}" />
+ <h:outputText styleClass="smallText" value="{data.deLabel}" />
</h:panelGrid>
- </rich:calendar>
+ </h:panelGrid>
+ </rich:calendar>
- <h:panelGrid columns="2">
- <h:outputText value="Select Locale:" />
- <h:selectOneRadio onchange="submit()" value="en/US"
- valueChangeListener="#{calendarBean.selectLocale}">
- <f:selectItem itemLabel="US" itemValue="en/US" />
- <f:selectItem itemLabel="DE" itemValue="de/DE" />
- <f:selectItem itemLabel="FR" itemValue="fr/FR" />
- <f:selectItem itemLabel="RU" itemValue="ru/RU" />
- </h:selectOneRadio>
- <h:outputText value="Popup Mode:" />
- <h:selectBooleanCheckbox value="#{calendarBean.popup}"
- onclick="submit()" />
- <h:outputText value="Custom day labels:" />
- <h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}"
- onclick="submit()" />
- <h:outputText value="Select Date Pattern:" />
- <h:selectOneMenu value="MMM d, yyyy" onchange="submit()"
- valueChangeListener="#{calendarBean.selectPattern}">
- <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy" />
- <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy" />
- <f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y" />
- <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy" />
- </h:selectOneMenu>
- <h:inputText id="selectdate" />
- <h:commandButton type="button" value="Select Date"
- onclick="$(this.form.id+':calendar').component.selectDate(this.form[this.form.id+':selectdate'].value);" />
- <h:outputText value="Select Popup Joint Point:" />
- <h:selectOneRadio onchange="submit()"
- value="#{calendarBean.jointPoint}"
- valueChangeListener="#{calendarBean.selectJointPoint}">
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- </h:selectOneRadio>
- <h:outputText value="Select Popup Direction:" />
- <h:selectOneRadio onchange="submit()"
- value="#{calendarBean.direction}"
- valueChangeListener="#{calendarBean.selectDirection}">
- <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
- <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
- <f:selectItem itemLabel="top-right" itemValue="top-right" />
- <f:selectItem itemLabel="top-left" itemValue="top-left" />
- <f:selectItem itemLabel="auto" itemValue="auto" />
- </h:selectOneRadio>
- <h:outputText value="BoundaryDatesMode:" />
- <h:selectOneRadio onclick="submit()" value="#{calendarBean.boundary}">
- <f:selectItem itemLabel="inactive" itemValue="inactive" />
- <f:selectItem itemLabel="select" itemValue="select" />
- <f:selectItem itemLabel="scroll" itemValue="scroll" />
- </h:selectOneRadio>
- <h:outputText value="EnableManualInput:"></h:outputText>
- <h:selectBooleanCheckbox value="#{calendarBean.enableManualInput}"
- onclick="submit()">
- </h:selectBooleanCheckbox>
- <h:outputText value="ShowInput:"></h:outputText>
- <h:selectBooleanCheckbox value="#{calendarBean.showInput}"
- onclick="submit()">
- </h:selectBooleanCheckbox>
+ <h:panelGrid columns="2">
+ <h:outputText value="Select Locale:" />
+ <h:selectOneRadio onchange="submit()" value="en/US"
+ valueChangeListener="#{calendarBean.selectLocale}">
+ <f:selectItem itemLabel="US" itemValue="en/US" />
+ <f:selectItem itemLabel="DE" itemValue="de/DE" />
+ <f:selectItem itemLabel="FR" itemValue="fr/FR" />
+ <f:selectItem itemLabel="RU" itemValue="ru/RU" />
+ </h:selectOneRadio>
+
+ <h:outputText value="Popup Mode:" />
+ <h:selectBooleanCheckbox id="popupModeID" value="#{calendarBean.popup}"
+ onclick="submit()" />
+
+ <h:outputText value="Custom day labels short:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.useCustomDayLabels}"
+ onclick="submit()" />
+
+ <h:outputText value="Custom day labels" />
+ <h:selectBooleanCheckbox value="#{calendarBean.useCustomDay}"
+ onclick="submit()" />
+
+
+ <h:outputText value="Select Date Pattern:" />
+ <h:selectOneMenu value="MMM d, yyyy" onchange="submit()"
+ valueChangeListener="#{calendarBean.selectPattern}">
+ <f:selectItem itemLabel="d/M/yy" itemValue="d/M/yy" />
+ <f:selectItem itemLabel="dd/M/yy" itemValue="dd/M/yy" />
+ <f:selectItem itemLabel="d/MMM/y" itemValue="d/MMM/y" />
+ <f:selectItem itemLabel="MMM d, yyyy" itemValue="MMM d, yyyy" />
+ </h:selectOneMenu>
+
+ <h:inputText id="selectdate" />
+ <h:commandButton type="button" value="Select Date"
+ onclick="$(this.form.id+':calendarID').component.selectDate(this.form[this.form.id+':selectdate'].value);" />
+ <h:outputText value="z-index:" />
+ <h:inputText value="#{calendarBean.zindex}">
+ <a4j:support event="onchange" reRender="calendarID"></a4j:support>
+ </h:inputText>
+ <h:outputText value="Height:" />
+ <h:inputText value="#{calendarBean.height}">
+ <a4j:support event="onchange" reRender="calendarID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="Width:" />
+ <h:inputText value="#{calendarBean.width}">
+ <a4j:support event="onchange" reRender="calendarID"></a4j:support>
+ </h:inputText>
+
+ <h:outputText value="reRender (counter):" />
+ <h:outputText id="counter" value="#{calendarBean.counter}" />
+
+ <h:outputText value="Required" />
+ <h:selectBooleanCheckbox value="#{calendarBean.required}" onclick="submit()"/>
+
+ <h:outputText value="Select Popup Joint Point:" />
+ <h:selectOneRadio onchange="submit()"
+ value="#{calendarBean.jointPoint}"
+ valueChangeListener="#{calendarBean.selectJointPoint}">
+ <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
+ <f:selectItem itemLabel="top-right" itemValue="top-right" />
+ <f:selectItem itemLabel="top-left" itemValue="top-left" />
+ </h:selectOneRadio>
+
+ <h:outputText value="Select Popup Direction:" />
+ <h:selectOneRadio onchange="submit()"
+ value="#{calendarBean.direction}"
+ valueChangeListener="#{calendarBean.selectDirection}">
+ <f:selectItem itemLabel="bottom-right" itemValue="bottom-right" />
+ <f:selectItem itemLabel="bottom-left" itemValue="bottom-left" />
+ <f:selectItem itemLabel="top-right" itemValue="top-right" />
+ <f:selectItem itemLabel="top-left" itemValue="top-left" />
+ <f:selectItem itemLabel="auto" itemValue="auto" />
+ </h:selectOneRadio>
+
+ <h:outputText value="ToolTip Mode:" />
+ <h:selectOneRadio value="#{calendarBean.toolTipMode}" onchange="submit();">
+ <f:selectItem itemLabel="none" itemValue="none"/>
+ <f:selectItem itemLabel="single" itemValue="single"/>
+ <f:selectItem itemLabel="batch" itemValue="batch"/>
+ </h:selectOneRadio>
- </h:panelGrid>
-
+ <h:outputText value="Scroll Mode:" />
+ <h:selectOneRadio value="#{calendarBean.scrollMode}" onchange="submit();">
+ <f:selectItem itemLabel="client" itemValue="client"/>
+ <f:selectItem itemLabel="ajax" itemValue="ajax"/>
+ </h:selectOneRadio>
+
+ <h:outputText value="BoundaryDatesMode:" />
+ <h:selectOneRadio onclick="submit()" value="#{calendarBean.boundary}">
+ <f:selectItem itemLabel="inactive" itemValue="inactive" />
+ <f:selectItem itemLabel="select" itemValue="select" />
+ <f:selectItem itemLabel="scroll" itemValue="scroll" />
+ </h:selectOneRadio>
+
+ <h:outputText value="EnableManualInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.enableManualInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="ShowInput:"></h:outputText>
+ <h:selectBooleanCheckbox value="#{calendarBean.showInput}"
+ onclick="submit()">
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="Disabled:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.disabled}" onclick="submit()"/>
+
+ <h:outputText value="Rendered:" />
+ <h:selectBooleanCheckbox value="#{calendarBean.rendered}" onclick="submit()"/>
+
+ <f:verbatim></f:verbatim>
+ <h:commandButton action="#{calendarBean.changeIcons}" value="ChangeIcons" />
+
<h:outputText value="Current date: " />
<h:outputText value="#{calendarBean.currentDateAsText}" />
- <f:verbatim>
- <br />
- </f:verbatim>
+
<h:outputText value="Selected date: " />
<h:outputText value="#{calendarBean.selectedDate}" />
- <f:verbatim>
- <br />
- </f:verbatim>
+
+ <f:verbatim></f:verbatim>
+ <h:commandButton value="Submit" />
+ </h:panelGrid>
- <h:commandButton value="Submit" />
- <f:verbatim>
- <br />
- </f:verbatim>
- <h:commandLink value="Back" action="main"></h:commandLink>
+ <f:verbatim>
+ <br />
+ </f:verbatim>
+
+ <h:commandLink value="Back" action="main"></h:commandLink>
</h:form>
18 years, 7 months
JBoss Rich Faces SVN: r2932 - trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2007-09-13 13:03:40 -0400 (Thu, 13 Sep 2007)
New Revision: 2932
Modified:
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
Log:
RF-910
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-09-13 15:42:22 UTC (rev 2931)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2007-09-13 17:03:40 UTC (rev 2932)
@@ -60,11 +60,41 @@
}
this.attachOnLoadEventsListner = this.attachOnLoadEvents.bindAsEventListener(this);
+ this.setToolTipPositionListner = this.setToolTipPosition.bindAsEventListener(this);
+ this.doHideListner = this.doHide.bindAsEventListener(this);
+ this.leaveToolTipListner = this.leaveToolTip.bindAsEventListener(this);
+ if (Richfaces.tooltips[parentId])
+ {
+ Richfaces.tooltips[parentId].destroy();
+ }
+
if(!this.disabled) Event.observe(document, "mousemove", this.attachOnLoadEventsListner, true);
+
//it means we have only one tooltip for element
Richfaces.tooltips[parentId] = this;
+
},
+
+ destroy: function()
+ {
+ if (!this.parentAttached) Event.stopObserving(document, "mousemove", this.attachOnLoadEventsListner, true);
+ else if (this.followMouse) Event.stopObserving(this.parent, 'mousemove', this.setToolTipPositionListner, false);
+
+ Event.stopObserving(this.parent, this.event, this.customEventHandlerListner, false);
+ Event.stopObserving(this.parent, "mouseout", this.doHideListner, false);
+ Event.stopObserving(this.toolTip, 'mouseout', this.leaveToolTipListner, false);
+
+ this.hintParentElement = null;
+ this.parent = null;
+ this.toolTip = null;
+ this.toolTipContent = null;
+ this.toolTipDefaultContent = null;
+ this.iframe = null;
+ this.eventCopy = null;
+ this.event = null;
+ },
+
attachOnLoadEvents: function(){
if(!this.parentAttached){
this.parent = $(this.parentId);
@@ -75,32 +105,34 @@
Event.stopObserving(document, "mousemove", this.attachOnLoadEventsListner, true);
}
},
+
+ customEventHandler: function(event) {
+ if (this.activationTimerHandle) {
+ return ;
+ }
+
+ this.eventCopy = A4J.AJAX.CloneObject(event, false);
+
+ this.activationTimerHandle = setTimeout(function() {
+ this.doShow(this.eventCopy);
+ }.bind(this), this.delay);
+ },
+
attachParentEvents: function(){
if(this.followMouse){
- Event.observe(this.parent, 'mousemove', this.setToolTipPosition.bindAsEventListener(this), false);
+ Event.observe(this.parent, 'mousemove', this.setToolTipPositionListner, false);
}
var eventHandler;
if (this.delay > 0) {
- eventHandler = function(event) {
- if (this.activationTimerHandle) {
- return ;
- }
-
- this.eventCopy = A4J.AJAX.CloneObject(event, false);
-
- this.activationTimerHandle = setTimeout(function() {
- this.doShow(this.eventCopy);
- }.bind(this), this.delay);
- }.bindAsEventListener(this);
+ this.customEventHandlerListner = this.customEventHandler.bindAsEventListener(this);
} else {
- eventHandler = this.doShow.bindAsEventListener(this);
+ this.customEventHandlerListner = this.doShow.bindAsEventListener(this);
}
- Event.observe(this.parent, this.event, eventHandler, false);
- Event.observe(this.parent, "mouseout", this.doHide.bindAsEventListener(this), false);
-
- Event.observe(this.toolTip, 'mouseout', this.leaveToolTip.bindAsEventListener(this), false)
+ Event.observe(this.parent, this.event, this.customEventHandlerListner, false);
+ Event.observe(this.parent, "mouseout", this.doHideListner, false);
+ Event.observe(this.toolTip, 'mouseout', this.leaveToolTipListner, false);
},
detectAncestorNode: function(leaf, element) {
@@ -128,6 +160,7 @@
},
doShow: function(e){
+
var needToShow = true;
var obj;
if (!e) var e = window.event;
@@ -193,6 +226,8 @@
},
doHide: function(e){
+ this.eventCopy = null;
+
var needToHide = true;
if (!e) var e = window.event;
@@ -284,11 +319,7 @@
this.iframe.style.left = (coords.x - this.toolTipBorderWidth) + 'px';
}
- this.eventCopy = null;
- if (this.delay>0)
- {
- this.eventCopy = A4J.AJAX.CloneObject(e, false);
- }
+ this.eventCopy = A4J.AJAX.CloneObject(e, false);
},
prePosition: function(basePoint, elementDim, horizontalDirection, verticalDirection, offset){
@@ -389,7 +420,7 @@
this.toolTip.style.visibility = "hidden";
this.toolTip.style.display = 'block';
- this.setToolTipPosition(obj);
+ this.setToolTipPosition((this.eventCopy ? this.eventCopy : obj));
}
}
18 years, 7 months
JBoss Rich Faces SVN: r2931 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: afedosik
Date: 2007-09-13 11:42:22 -0400 (Thu, 13 Sep 2007)
New Revision: 2931
Modified:
trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
Log:
source code fixing panelMenu
Modified: trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-09-13 15:42:02 UTC (rev 2930)
+++ trunk/docs/userguide/en/src/main/docbook/included/panelMenu.xml 2007-09-13 15:42:22 UTC (rev 2931)
@@ -175,7 +175,7 @@
<mediaobject>
<imageobject>
- <imagedata fileref="images/panelMenu1.png"/>
+ <imagedata fileref="images/panelmenu1.png"/>
</imageobject>
</mediaobject>
</figure>
18 years, 7 months
JBoss Rich Faces SVN: r2930 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: afedosik
Date: 2007-09-13 11:42:02 -0400 (Thu, 13 Sep 2007)
New Revision: 2930
Modified:
trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml
Log:
source code fixing keepAlive
Modified: trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml 2007-09-13 15:18:16 UTC (rev 2929)
+++ trunk/docs/userguide/en/src/main/docbook/included/keepAlive.xml 2007-09-13 15:42:02 UTC (rev 2930)
@@ -70,8 +70,8 @@
Note that the attribute 'beanName' must point to a legal jsf EL expression which resolves to a managed mean instance. For example for
the above code the class definition may look like this:</para>
- <programlisting role="XML"><![CDATA[
-class MyClass{
+ <programlisting role="JAVA"><![CDATA[
+ class MyClass{
...
private TestBean testBean;
// Getters and Setters for testBean.
18 years, 7 months
JBoss Rich Faces SVN: r2929 - trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-09-13 11:18:16 -0400 (Thu, 13 Sep 2007)
New Revision: 2929
Added:
trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxPageRendererTest.java
Log:
JUnit tests for AjaxPageRenderer class.
Added: trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxPageRendererTest.java
===================================================================
--- trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxPageRendererTest.java (rev 0)
+++ trunk/ui/core/src/test/java/org/ajax4jsf/renderkit/html/AjaxPageRendererTest.java 2007-09-13 15:18:16 UTC (rev 2929)
@@ -0,0 +1,122 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.renderkit.html;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+
+import javax.faces.component.UIOutput;
+
+import org.ajax4jsf.tests.AbstractAjax4JsfTestCase;
+import org.apache.commons.lang.StringUtils;
+
+import com.gargoylesoftware.htmlunit.html.HtmlElement;
+import com.gargoylesoftware.htmlunit.html.HtmlPage;
+import com.gargoylesoftware.htmlunit.html.HtmlScript;
+
+public class AjaxPageRendererTest extends AbstractAjax4JsfTestCase{
+ private static final String SCRIPT_NAME = "org.ajax4jsf.javascript.AjaxScript";
+
+ private org.ajax4jsf.component.html.HtmlPage ajaxPage = null;
+
+ public AjaxPageRendererTest(String name) {
+ super(name);
+ }
+
+ public void setUp() throws Exception {
+ super.setUp();
+
+ ajaxPage = (org.ajax4jsf.component.html.HtmlPage) application.createComponent(org.ajax4jsf.component.html.HtmlPage.COMPONENT_TYPE);
+ ajaxPage.setId("page");
+
+ UIOutput head = new UIOutput();
+ head.setValue("HEAD");
+ ajaxPage.getFacets().put("head", head);
+
+ UIOutput content = new UIOutput();
+ content.setValue("content");
+ ajaxPage.getChildren().add(content);
+
+ ajaxPage.setFormat("xhtml");
+ ajaxPage.setPageTitle("title");
+
+ facesContext.getViewRoot().setLocale(new Locale("be", "BY"));
+
+ facesContext.getViewRoot().getChildren().add(ajaxPage);
+ }
+
+ public void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testRender() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+ System.out.println(page.asXml());
+
+ HtmlElement html = (HtmlElement)page.getFirstChild();
+ assertNotNull(html);
+ assertEquals("html", html.getTagName());
+
+ String lang = html.getAttributeValue("lang");
+ assertNotNull(lang);
+ assertEquals(lang, "be_BY");
+
+ HtmlElement title = (HtmlElement) html.getHtmlElementsByTagName("title").get(0);
+ assertNotNull(title);
+
+ assertEquals("title", title.getFirstChild().asText());
+
+ HtmlElement meta = (HtmlElement) html.getHtmlElementsByTagName("meta").get(0);
+
+ assertNotNull(meta);
+ String httpEquiv = meta.getAttributeValue("http-equiv");
+ assertEquals(httpEquiv, "Content-Type");
+
+ String content = meta.getAttributeValue("content");
+ assertEquals(content, "application/xhtml+xml");
+ }
+
+ public void testRenderScript() throws Exception {
+ HtmlPage page = renderView();
+ assertNotNull(page);
+
+ List scripts = page.getDocumentElement().getHtmlElementsByTagName("script");
+ int found = 0;
+ int count = 0;
+ for (Iterator it = scripts.iterator(); it.hasNext();) {
+ count++;
+ HtmlScript item = (HtmlScript) it.next();
+ String srcAttr = item.getSrcAttribute();
+ if (StringUtils.isNotBlank(srcAttr)) {
+ if (srcAttr.contains(SCRIPT_NAME)) {
+ found++;
+ break;
+ }
+ }
+ }
+ assertEquals(1, found);
+ assertEquals(1, count);
+ }
+
+}
18 years, 7 months
JBoss Rich Faces SVN: r2928 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-09-13 10:55:41 -0400 (Thu, 13 Sep 2007)
New Revision: 2928
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml
Log:
Link to "Ajax4jsf Developer Guide" was removed.
Modified: trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml 2007-09-13 14:17:41 UTC (rev 2927)
+++ trunk/docs/userguide/en/src/main/docbook/included/dropSupport.xml 2007-09-13 14:55:41 UTC (rev 2928)
@@ -219,10 +219,7 @@
<property><rich:dropSupport></property>
</emphasis> has all the common attributes (<emphasis><property>"timeout"</property>,</emphasis>
<emphasis><property>"limitToList"</property>,</emphasis>
- <emphasis><property>"reRender"</property>,</emphasis> etc.) for Ajax request customization. To
- get detailed information on these attributes, read the <ulink
- url="http://labs.jboss.com/file-access/default/members/jbossajax4jsf/freezone/..."
- >Ajax4jsf Developer Guide</ulink>.</para>
+ <emphasis><property>"reRender"</property>,</emphasis> etc.) for Ajax request customization.</para>
<para>Finally, the component has the following extra attributes for event processing on the
client:</para>
18 years, 7 months
JBoss Rich Faces SVN: r2927 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: afedosik
Date: 2007-09-13 10:17:41 -0400 (Thu, 13 Sep 2007)
New Revision: 2927
Modified:
trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml
Log:
http://jira.jboss.com/jira/browse/RF-744 dropdownmenu source code fixing
Modified: trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml 2007-09-13 13:00:05 UTC (rev 2926)
+++ trunk/docs/userguide/en/src/main/docbook/included/dropDownMenu.xml 2007-09-13 14:17:41 UTC (rev 2927)
@@ -66,7 +66,8 @@
<!--Nested menu components-->
</rich:dropDownMenu>
...
- </programlisting>
+ ]]></programlisting>
+
</section>
<section>
@@ -107,7 +108,7 @@
<h:graphicImage value="/images/img1.gif"/>
</f:facet>
...
- </programlisting>
+ ]]></programlisting>
<para>Use the <emphasis>
<property>"event"</property>
@@ -118,11 +119,13 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
+
<programlisting role="XML"><![CDATA[...
<rich:dropDownMenu event="onclick" value="Item1">
<!--Nested menu components-->
</rich:dropDownMenu>
-...]]></programlisting>
+...
+]]></programlisting>
<para>The <emphasis role="bold">
<property><rich:dropDownMenu></property>
@@ -271,6 +274,7 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
+
<programlisting role="XML"><![CDATA[...
<rich:dropDownMenu value="Item1" direction="bottom-right" jointPoint="tr" horizontalOffset="-15" verticalOffset="0">
<!--Nested menu components-->
18 years, 7 months
JBoss Rich Faces SVN: r2926 - trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2007-09-13 09:00:05 -0400 (Thu, 13 Sep 2007)
New Revision: 2926
Modified:
trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
Log:
RF-873
Modified: trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-09-13 12:58:33 UTC (rev 2925)
+++ trunk/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2007-09-13 13:00:05 UTC (rev 2926)
@@ -784,12 +784,12 @@
},
_calcDefaultRowHeight: function() {
- //var templNormal = this.templNormal.getElement();
- // var height = Math.ceil(templNormal.offsetHeight / templNormal.rows.length);
- var height = (this.templNormal && this.templNormal.getElement() &&
- this.templNormal.getElement().rows &&
- this.templNormal.getElement().rows.length>1) ? this.templNormal.getElement().rows[1].offsetTop : 16;
- return height;
-
+ var templNormal = this.templNormal.getElement();
+ var length = templNormal.rows.length;
+ if (length) {
+ return Math.ceil(templNormal.offsetHeight / length);
+ } else {
+ return 16;
+ }
}
});
18 years, 7 months