JBoss Rich Faces SVN: r20849 - trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-12-30 13:21:18 -0500 (Thu, 30 Dec 2010)
New Revision: 20849
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
Log:
RF-9424
Modified: trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js
===================================================================
--- trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-12-30 15:44:17 UTC (rev 20848)
+++ trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/extendedDataTable.js 2010-12-30 18:21:18 UTC (rev 20849)
@@ -288,7 +288,7 @@
}
el = el.nextSibling;
}
- if (this.bodyElement.offsetHeight > height) {
+ if (this.bodyElement.offsetHeight > height || !this.contentElement) {
this.bodyElement.style.height = height + "px";
}
},
14 years, 1 month
JBoss Rich Faces SVN: r20848 - in trunk: examples/dnd-demo/src/main/webapp and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-12-30 10:44:17 -0500 (Thu, 30 Dec 2010)
New Revision: 20848
Added:
trunk/examples/dnd-demo/src/main/webapp/index.jsp
Modified:
trunk/examples/dnd-demo/src/main/java/org/demo/DataBean.java
trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml
trunk/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js
Log:
RF-10056: 'acceptedTypes' attribute checking on null is added
Modified: trunk/examples/dnd-demo/src/main/java/org/demo/DataBean.java
===================================================================
--- trunk/examples/dnd-demo/src/main/java/org/demo/DataBean.java 2010-12-30 14:23:16 UTC (rev 20847)
+++ trunk/examples/dnd-demo/src/main/java/org/demo/DataBean.java 2010-12-30 15:44:17 UTC (rev 20848)
@@ -13,13 +13,10 @@
public class DataBean {
private List<String> dropValues = new ArrayList<String>();
-
private String dragValue1 = "dragValue 1";
-
- private String dragValue2 = "dragValue 3";
-
+ private String dragValue2 = "dragValue 2";
private String dragValue3 = "dragValue 3";
-
+ private String acceptedTypes = "drg1, drg2";
public List<String> getDropValues(){
return dropValues;
@@ -52,12 +49,29 @@
public void setDropValues(List<String> dropValues){
this.dropValues = dropValues;
}
-
+
+ public String getAcceptedTypes() {
+ return acceptedTypes;
+ }
+
+ public void setAcceptedTypes(String acceptedTypes) {
+ this.acceptedTypes = acceptedTypes;
+ }
+
public void processEvent(DropEvent event) {
String value = (String)event.getDragValue();
dropValues.add(value);
System.out.println("DataBean.processEvent()");
}
-
-
+
+ public void makeAcceptedTypesNullable(){
+ this.setAcceptedTypes(null);
+ this.setDropValues(new ArrayList<String>());
+ }
+
+ public void resetAcceptedTypes(){
+ this.setAcceptedTypes("drg1, drg2");
+ this.setDropValues(new ArrayList<String>());
+ }
+
}
Modified: trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml
===================================================================
--- trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml 2010-12-30 14:23:16 UTC (rev 20847)
+++ trunk/examples/dnd-demo/src/main/webapp/examples/dnd.xhtml 2010-12-30 15:44:17 UTC (rev 20848)
@@ -1,85 +1,102 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!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:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:dnd="http://richfaces.org/dnd"
- xmlns:a4j="http://richfaces.org/a4j">
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:dnd="http://richfaces.org/dnd"
+ xmlns:a4j="http://richfaces.org/a4j">
<h:head>
- <title>Drag-n-Drop sample</title>
- <style type="text/css">
-.droppable {
- border: 1px solid blue;
- margin: 4px;
- height: 200px;
- width: 200px;
- background-color: yellow;
- overflow: auto;
-}
+ <title>Drag-n-Drop sample</title>
+ <style type="text/css">
+ .droppable {
+ border: 1px solid blue;
+ margin: 4px;
+ height: 200px;
+ width: 200px;
+ background-color: yellow;
+ overflow: auto;
+ }
-.draggable {
- border: 1px solid #000000;
- background-color: grey;
- opacity: 0.3;
- margin: 2px;
- height: 50px;
- width: 100px;
-}
+ .draggable {
+ border: 1px solid #000000;
+ background-color: gray;
+ opacity: 0.3;
+ margin: 2px;
+ height: 50px;
+ width: 100px;
+ }
-.rf-ind {
- height: 20px;
- width: 20px;
- border: 1px dotted red;
- background-color: blue
-}
+ .rf-ind {
+ height: 20px;
+ width: 20px;
+ border: 1px dotted red;
+ background-color: blue
+ }
-.rf-ind-acpt {
- height: 20px;
- width: 20px;
- border: 1px dotted red;
- background-color: green;
-}
+ .rf-ind-acpt {
+ height: 20px;
+ width: 20px;
+ border: 1px dotted red;
+ background-color: green;
+ }
-.rf-ind-rejt {
- height: 20px;
- width: 20px;
- border: 1px dotted green;
- background-color: red;
-}
-</style>
+ .rf-ind-rejt {
+ height: 20px;
+ width: 20px;
+ border: 1px dotted green;
+ background-color: red;
+ }
+ </style>
</h:head>
<h:body>
- <h:form>
+ <h:form>
+ <dnd:dragIndicator id="ind"/>
+ <table>
+ <tr>
+ <td>
+ <a4j:outputPanel id="drg1" layout="block" styleClass="draggable">
+ <h:outputText value="#{dataBean.dragValue1}"/>
+ <dnd:dragSource type="drg1" dragValue="#{dataBean.dragValue1}"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <a4j:outputPanel id="drg2" layout="block" styleClass="draggable">
+ <h:outputText value="#{dataBean.dragValue2}"/>
+ <dnd:dragSource type="drg2" dragIndicator="ind" dragValue="#{dataBean.dragValue2}"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <a4j:outputPanel id="drg3" layout="block" styleClass="draggable">
+ <h:outputText value="#{dataBean.dragValue3}"/>
+ <dnd:dragSource type="drg3" dragIndicator="ind" dragValue="#{dataBean.dragValue3}"/>
+ </a4j:outputPanel>
+ </td>
+ <td>
+ <ul>
+ <li>
+ <a4j:commandLink value="Set acceptedTypes to [drg1, drg2]"
+ action="#{dataBean.resetAcceptedTypes}"
+ render="drp"/>
+ </li>
+ <li>
+ <a4j:commandLink value="Make acceptedTypes nullable. Every type will be accepted."
+ action="#{dataBean.makeAcceptedTypesNullable}"
+ render="drp"/>
+ </li>
+ </ul>
+ </td>
+ </tr>
+ </table>
- <dnd:dragIndicator id="ind"/>
-
- <table>
- <tr>
- <td><a4j:outputPanel id="drg1" layout="block" styleClass="draggable">
- <h:outputText value="#{dataBean.dragValue1}"/>
- <dnd:dragSource type="drg1" dragValue="#{dataBean.dragValue1}"/>
- </a4j:outputPanel></td>
- <td><a4j:outputPanel id="drg2" layout="block" styleClass="draggable">
- <h:outputText value="#{dataBean.dragValue2}"/>
- <dnd:dragSource type="drg2" dragIndicator="ind" dragValue="#{dataBean.dragValue2}"/>
- </a4j:outputPanel></td>
- <td><a4j:outputPanel id="drg3" layout="block" styleClass="draggable">
- <h:outputText value="#{dataBean.dragValue3}"/>
- <dnd:dragSource type="drg3" dragIndicator="ind" dragValue="#{dataBean.dragValue3}"/>
- </a4j:outputPanel></td>
- </tr>
- </table>
-
- <a4j:outputPanel id="drp" layout="block" styleClass="droppable">
- <dnd:dropTarget acceptedTypes="drg1, drg2" dropListener="#{dataBean.processEvent}" render="grid"></dnd:dropTarget>
- <h:dataTable id="grid" var="dropValue" value="#{dataBean.dropValues}">
- <h:column>
- <h:outputText value="#{dropValue}"/>
- </h:column>
- </h:dataTable>
- </a4j:outputPanel>
-
- </h:form>
+ <a4j:outputPanel id="drp" layout="block" styleClass="droppable">
+ <dnd:dropTarget acceptedTypes="#{dataBean.acceptedTypes}" dropListener="#{dataBean.processEvent}"
+ render="grid"/>
+ <h:dataTable id="grid" var="dropValue" value="#{dataBean.dropValues}">
+ <h:column>
+ <h:outputText value="#{dropValue}"/>
+ </h:column>
+ </h:dataTable>
+ </a4j:outputPanel>
+ </h:form>
</h:body>
</html>
\ No newline at end of file
Added: trunk/examples/dnd-demo/src/main/webapp/index.jsp
===================================================================
--- trunk/examples/dnd-demo/src/main/webapp/index.jsp (rev 0)
+++ trunk/examples/dnd-demo/src/main/webapp/index.jsp 2010-12-30 15:44:17 UTC (rev 20848)
@@ -0,0 +1 @@
+<jsp:forward page="examples/dnd.jsf" />
\ No newline at end of file
Modified: trunk/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js
===================================================================
--- trunk/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js 2010-12-30 14:23:16 UTC (rev 20847)
+++ trunk/ui/dnd/ui/src/main/resources/META-INF/resources/org.richfaces/dnd-droppable.js 2010-12-30 15:44:17 UTC (rev 20848)
@@ -60,6 +60,10 @@
},
accept: function(draggable) {
+ // since acceptedTypes is optional it could be null.
+ // In this case all types are accepted
+ if(!this.options.acceptedTypes) return true;
+
var accept;
var acceptType = draggable.data("type");
if(acceptType) {
14 years, 1 month
JBoss Rich Faces SVN: r20847 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-12-30 09:23:16 -0500 (Thu, 30 Dec 2010)
New Revision: 20847
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss
Log:
RF-10070 Toolbar: item separator rendered wrong in IE7
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss 2010-12-30 14:06:09 UTC (rev 20846)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/toolbar.ecss 2010-12-30 14:23:16 UTC (rev 20847)
@@ -21,8 +21,6 @@
.rf-tb-sep {
padding:0 10px;
text-align:center;
- background-repeat:no-repeat;
- background-position:center center;
height: 100%;
}
14 years, 1 month
JBoss Rich Faces SVN: r20846 - trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-12-30 09:06:09 -0500 (Thu, 30 Dec 2010)
New Revision: 20846
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
Log:
https://issues.jboss.org/browse/RF-9740 Popup panel: not resizeable in Internet Explorer
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss
===================================================================
--- trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2010-12-30 12:56:42 UTC (rev 20845)
+++ trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.ecss 2010-12-30 14:06:09 UTC (rev 20846)
@@ -76,11 +76,10 @@
font-family : '#{richSkin.generalFamilyFont}';
font-size : '#{richSkin.generalSizeFont}';
}
-.rf-pp-hndlr {
- opacity:0;
- filter: 'alpha(opacity=0)';
+.rf-pp-hndlr {
+ background-image: url("#{resource['spacer.gif']}");
position : absolute;
- margin : -4px;
+ margin : -4px;
}
.rf-pp-hndlr-l {
14 years, 1 month
JBoss Rich Faces SVN: r20845 - in trunk: ui/input/ui/src/main/resources/META-INF/resources/org.richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-12-30 07:56:42 -0500 (Thu, 30 Dec 2010)
New Revision: 20845
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/skinning.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
Log:
RF-10049 Review richfaces components with inputs for css styles unification
Modified: trunk/core/impl/src/main/resources/META-INF/resources/skinning.ecss
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/skinning.ecss 2010-12-30 02:34:42 UTC (rev 20844)
+++ trunk/core/impl/src/main/resources/META-INF/resources/skinning.ecss 2010-12-30 12:56:42 UTC (rev 20845)
@@ -57,7 +57,7 @@
textarea, input[type="text"], input[type="password"], select {
border-width: 1px;
- border-style: inset;
+ border-style: solid;
border-color: '#{richSkin.panelBorderColor}';
font-size: '#{richSkin.generalSizeFont}';
@@ -72,4 +72,5 @@
textarea[disabled], input[type="text"][disabled], input[type="password"][disabled], select[disabled] {
color: '#{richSkin.panelBorderColor}';
+ cursor:default;
}
\ No newline at end of file
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2010-12-30 02:34:42 UTC (rev 20844)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2010-12-30 12:56:42 UTC (rev 20845)
@@ -6,7 +6,6 @@
input.rf-au-inp {
border-width: 0px;
- background: none;
width: 100%;
}
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2010-12-30 02:34:42 UTC (rev 20844)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inputNumberSlider.ecss 2010-12-30 12:56:42 UTC (rev 20845)
@@ -66,11 +66,6 @@
}
input.rf-insl-inp {
- background: url("#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']}") top repeat-x;
- background-color: '#{richSkin.controlBackgroundColor}';
- border-width: 1px;
- border-style: inset;
- border-color: '#{richSkin.panelBorderColor}';
margin: 0px 10px 0px 10px;
vertical-align: bottom;
}
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2010-12-30 02:34:42 UTC (rev 20844)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.ecss 2010-12-30 12:56:42 UTC (rev 20845)
@@ -6,7 +6,6 @@
input.rf-sel-inp {
border-width: 0px;
- background: none;
width: 100%;
color: '#{richSkin.generalTextColor}';
font-size: '#{richSkin.generalSizeFont}';
14 years, 1 month
JBoss Rich Faces SVN: r20844 - in branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk: model and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-29 21:34:42 -0500 (Wed, 29 Dec 2010)
New Revision: 20844
Modified:
branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptSourceUtils.java
branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java
branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java
Log:
OPEN - issue RF-9323: CDK annotation @RendererSpecificComponent.attributes doesn't work
https://issues.jboss.org/browse/RF-9323
Modified: branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptSourceUtils.java
===================================================================
--- branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptSourceUtils.java 2010-12-29 22:21:20 UTC (rev 20843)
+++ branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/AptSourceUtils.java 2010-12-30 02:34:42 UTC (rev 20844)
@@ -154,11 +154,11 @@
ExecutableElement method, boolean setter) {
String propertyName = getPropertyName(method);
if (!HIDDEN_PROPERTIES.contains(propertyName)) {
- ClassName propertyType = asClassDescription(method.getReturnType());
+ ClassName propertyType = asClassDescription(setter?method.getParameters().get(0).asType():method.getReturnType());
if (result.containsKey(propertyName)) {
// Merge property with existed one.
AptBeanProperty beanProperty = result.get(propertyName);
- if (null != beanProperty.getter) {
+ if (null != (setter?beanProperty.setter:beanProperty.getter)) {
log.warn("Two " + (setter ? "setter" : "getter") + " methods for the same bean property "
+ propertyName + " in the class " + type.getQualifiedName());
}
Modified: branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java
===================================================================
--- branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java 2010-12-29 22:21:20 UTC (rev 20843)
+++ branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/apt/CdkProcessorImpl.java 2010-12-30 02:34:42 UTC (rev 20844)
@@ -38,6 +38,7 @@
import javax.lang.model.element.TypeElement;
import javax.tools.Diagnostic.Kind;
+import org.richfaces.cdk.CdkException;
import org.richfaces.cdk.CdkProcessingException;
import org.richfaces.cdk.LibraryBuilder;
import org.richfaces.cdk.Logger;
@@ -96,52 +97,65 @@
for (CdkAnnotationProcessor process : processors) {
processAnnotation(process, roundEnv);
}
- } else {
+ } else {
// parse non-java sources
processNonJavaSources();
+ verify();
+ if (0 == log.getErrorCount()) {
+ generate();
+ }
}
return false;
}
- /* (non-Javadoc)
+ private void generate() {
+ log.debug("Generate output files");
+ builder.generate(library);
+ }
+
+ private void verify() {
+ try {
+ log.debug("Validate model");
+ validator.verify(library);
+
+ } catch (CdkException e) {
+ sendError(e);
+ }
+ }
+
+ /*
+ * (non-Javadoc)
+ *
* @see org.richfaces.cdk.apt.CdkProcessor#processNonJavaSources()
*/
public void processNonJavaSources() {
for (ModelBuilder builder : builders) {
- log.debug("Run builder "+builder.getClass().getName());
- builder.build();
+ log.debug("Run builder " + builder.getClass().getName());
+ try {
+ builder.build();
+
+ } catch (CdkException e) {
+ sendError(e);
+ }
}
- // validator should be called even if previvous phases finish with errors, to collect all possible problems.
- log.debug("Validate model");
- validator.verify(library);
- if(0 == log.getErrorCount()) {
- // processing over, generate files.
- log.debug("Generate output files");
- builder.generate(library);
- }
}
protected void processAnnotation(CdkAnnotationProcessor processor, RoundEnvironment environment) {
Class<? extends Annotation> processedAnnotation = processor.getProcessedAnnotation();
- log.debug("Process all elements annotated with "+processedAnnotation.getName());
+ log.debug("Process all elements annotated with " + processedAnnotation.getName());
Target target = processedAnnotation.getAnnotation(Target.class);
- try {
- Set<? extends Element> rootElements = environment.getRootElements();
- for (Element element : rootElements) {
- if (isAppropriateTarget(element, target)){
- processElement(processor, processedAnnotation, element);
- } else {
- for (Element enclosedElement : element.getEnclosedElements()) {
- if (isAppropriateTarget(enclosedElement, target)){
- processElement(processor, processedAnnotation, enclosedElement);
- }
+ Set<? extends Element> rootElements = environment.getRootElements();
+ for (Element element : rootElements) {
+ if (isAppropriateTarget(element, target)) {
+ processElement(processor, processedAnnotation, element);
+ } else {
+ for (Element enclosedElement : element.getEnclosedElements()) {
+ if (isAppropriateTarget(enclosedElement, target)) {
+ processElement(processor, processedAnnotation, enclosedElement);
}
}
}
- } catch (Exception e) {
- processingEnv.getMessager().printMessage(Kind.ERROR,
- "Errorr processing annotation " + processedAnnotation + ": " + e);
}
}
@@ -149,22 +163,23 @@
Element element) {
if (null != element.getAnnotation(processedAnnotation)) {
try {
- log.debug("Process "+element.getSimpleName()+" annotated with "+processedAnnotation.getName());
+ log.debug("Process " + element.getSimpleName() + " annotated with " + processedAnnotation.getName());
processor.process(element, library);
} catch (CdkProcessingException e) {
sendError(element, e);
}
}
}
-
- private boolean isAppropriateTarget(Element element,Target target){
+
+ private boolean isAppropriateTarget(Element element, Target target) {
boolean match = false;
ElementKind kind = element.getKind();
- if(null != target){
- for(ElementType targetType : target.value()){
+ if (null != target) {
+ for (ElementType targetType : target.value()) {
switch (targetType) {
case TYPE:
- match |= ElementKind.CLASS.equals(kind)||ElementKind.INTERFACE.equals(kind)||ElementKind.ENUM.equals(kind);
+ match |= ElementKind.CLASS.equals(kind) || ElementKind.INTERFACE.equals(kind)
+ || ElementKind.ENUM.equals(kind);
break;
case PACKAGE:
match |= ElementKind.PACKAGE.equals(kind);
@@ -181,19 +196,22 @@
}
} else {
// Annotation without @Target match any element.
- match =
- ElementKind.CLASS.equals(kind) || ElementKind.INTERFACE.equals(kind) || ElementKind.ENUM.equals(kind)
- || ElementKind.PACKAGE.equals(kind) || ElementKind.METHOD.equals(kind)
- || ElementKind.FIELD.equals(kind);
+ match = ElementKind.CLASS.equals(kind) || ElementKind.INTERFACE.equals(kind)
+ || ElementKind.ENUM.equals(kind) || ElementKind.PACKAGE.equals(kind) || ElementKind.METHOD.equals(kind)
+ || ElementKind.FIELD.equals(kind);
}
return match;
}
- protected void sendError(Element componentElement, CdkProcessingException e) {
+ protected void sendError(Element componentElement, Exception e) {
// rise error and continue.
processingEnv.getMessager().printMessage(javax.tools.Diagnostic.Kind.ERROR, e.getMessage(), componentElement);
}
+ protected void sendError(CdkException e) {
+ processingEnv.getMessager().printMessage(javax.tools.Diagnostic.Kind.ERROR, e.getMessage());
+ }
+
@Override
public Set<String> getSupportedAnnotationTypes() {
return PROCESSED_ANNOTATION;
Modified: branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java
===================================================================
--- branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java 2010-12-29 22:21:20 UTC (rev 20843)
+++ branches/RF-9323/cdk/generator/src/main/java/org/richfaces/cdk/model/PropertyBase.java 2010-12-30 02:34:42 UTC (rev 20844)
@@ -293,9 +293,7 @@
@Override
public void merge(PropertyBase other) {
- boolean generate = getGenerate();
ComponentLibrary.merge(this, other);
- setGenerate(generate || other.getGenerate());
}
public <R,D> R accept(Visitor<R,D> visitor, D data) {
14 years, 1 month
JBoss Rich Faces SVN: r20843 - in branches/RF-9323: core/api/src/main/java/org/ajax4jsf/context and 54 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2010-12-29 17:21:20 -0500 (Wed, 29 Dec 2010)
New Revision: 20843
Added:
branches/RF-9323/core/api/src/main/java/org/richfaces/context/ExtendedPartialViewContext.java
branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextFactoryImpl.java
branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextImpl.java
branches/RF-9323/ui/common/api/src/main/java/org/richfaces/component/Positioning.java
branches/RF-9323/ui/core/api/src/main/java/org/richfaces/component/OutputPanelLayout.java
branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java
branches/RF-9323/ui/iteration/api/src/main/java/org/richfaces/component/DataScrollerControlsMode.java
branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/cdk/
branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
Removed:
branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/package-info.java
branches/RF-9323/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java
branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java
branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes/
branches/RF-9323/ui/output/api/src/main/java/org/richfaces/TooltipDirection.java
branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIBeanValidator.java
Modified:
branches/RF-9323/
branches/RF-9323/core/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java
branches/RF-9323/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java
branches/RF-9323/core/api/src/test/java/org/ajax4jsf/javascript/ScriptUtilsTest.java
branches/RF-9323/core/impl/src/main/java/org/richfaces/util/Util.java
branches/RF-9323/core/impl/src/main/resources/META-INF/components.faces-config.xml
branches/RF-9323/core/impl/src/main/resources/META-INF/faces-config.xml
branches/RF-9323/core/impl/src/main/resources/META-INF/resources/richfaces.js
branches/RF-9323/examples/core-demo/src/main/webapp/mediaOutput.xhtml
branches/RF-9323/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
branches/RF-9323/examples/input-demo/src/main/webapp/examples/calendar.xhtml
branches/RF-9323/examples/input-demo/src/main/webapp/examples/fileupload.xhtml
branches/RF-9323/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js
branches/RF-9323/examples/output-demo/src/main/webapp/examples/tooltip.xhtml
branches/RF-9323/examples/output-demo/src/main/webapp/qunit/tooltip.xhtml
branches/RF-9323/examples/output-demo/src/main/webapp/resources/tests/richfaces-tooltip-qunit.js
branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/message.xhtml
branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/messages.xhtml
branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/RendererUtils.java
branches/RF-9323/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractMediaOutput.java
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractOutputPanel.java
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxOutputPanelRenderer.java
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java
branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/resource/MediaOutputResource.java
branches/RF-9323/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js
branches/RF-9323/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/log.template.xml
branches/RF-9323/ui/input/ui/src/main/config/faces-config.xml
branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss
branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
branches/RF-9323/ui/input/ui/src/main/templates/autocomplete.template.xml
branches/RF-9323/ui/input/ui/src/main/templates/calendar.template.xml
branches/RF-9323/ui/input/ui/src/main/templates/fileupload.template.xml
branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
branches/RF-9323/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTableToggler.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeEncoderBase.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRenderingContext.java
branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js
branches/RF-9323/ui/iteration/ui/src/main/templates/tree.template.xml
branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/component/UIColumnTest.java
branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/component/AbstractJQuery.java
branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java
branches/RF-9323/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/UITooltip.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlCollapsiblePanel.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java
branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java
branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js
branches/RF-9323/ui/output/ui/src/main/templates/popupPanel.template.xml
branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIAjaxValidator.java
Log:
Merged revisions 20815-20822,20824-20834,20836-20842 via svnmerge from
https://svn.jboss.org/repos/richfaces/trunk
.......
r20815 | nbelaevski | 2010-12-27 11:16:45 -0800 (Mon, 27 Dec 2010) | 3 lines
https://issues.jboss.org/browse/RF-10091
Fixed wrong detection of one-arg method in 'autocompleteMethod' attribute
Updated autocomplete-qunit.js
.......
r20816 | nbelaevski | 2010-12-27 11:31:03 -0800 (Mon, 27 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10099
.......
r20817 | nbelaevski | 2010-12-27 12:07:13 -0800 (Mon, 27 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10092
.......
r20818 | konstantin.mishin | 2010-12-27 12:30:58 -0800 (Mon, 27 Dec 2010) | 1 line
RF-9568
.......
r20819 | nbelaevski | 2010-12-27 15:26:18 -0800 (Mon, 27 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10092
.......
r20820 | nbelaevski | 2010-12-27 15:37:21 -0800 (Mon, 27 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10098
.......
r20821 | nbelaevski | 2010-12-27 15:53:45 -0800 (Mon, 27 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10092
.......
r20822 | nbelaevski | 2010-12-27 16:01:35 -0800 (Mon, 27 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10092
.......
r20824 | Alex.Kolonitsky | 2010-12-28 01:23:56 -0800 (Tue, 28 Dec 2010) | 1 line
rename TooltipDirection Positioning
.......
r20825 | pyaschenko | 2010-12-28 03:14:21 -0800 (Tue, 28 Dec 2010) | 1 line
http://jira.jboss.com/jira/browse/RF-9074
.......
r20826 | nbelaevski | 2010-12-28 06:27:29 -0800 (Tue, 28 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10098
.......
r20827 | nbelaevski | 2010-12-28 06:49:14 -0800 (Tue, 28 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10098
.......
r20828 | amarkhel | 2010-12-28 07:02:33 -0800 (Tue, 28 Dec 2010) | 1 line
RF-9741 Popup panel: attribute onhide doesn't work
.......
r20829 | nbelaevski | 2010-12-28 07:03:21 -0800 (Tue, 28 Dec 2010) | 1 line
added cdk:passThroughWithExclusions to a4j:log component in order to encode 'style' etc. attributes
.......
r20830 | amarkhel | 2010-12-28 07:07:08 -0800 (Tue, 28 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-9741 Popup panel: attribute onhide doesn't work
.......
r20831 | nbelaevski | 2010-12-28 11:51:29 -0800 (Tue, 28 Dec 2010) | 1 line
Fixed NPE in Util.java for null contentType
.......
r20832 | nbelaevski | 2010-12-28 12:02:52 -0800 (Tue, 28 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-8330
.......
r20833 | konstantin.mishin | 2010-12-28 12:16:31 -0800 (Tue, 28 Dec 2010) | 1 line
RF-10082
.......
r20834 | nbelaevski | 2010-12-28 14:22:16 -0800 (Tue, 28 Dec 2010) | 1 line
https://issues.jboss.org/browse/RF-10041
.......
r20836 | pyaschenko | 2010-12-29 05:07:44 -0800 (Wed, 29 Dec 2010) | 1 line
.......
r20837 | Alex.Kolonitsky | 2010-12-29 05:18:33 -0800 (Wed, 29 Dec 2010) | 1 line
Revert RF-10041
.......
r20838 | amarkhel | 2010-12-29 06:01:34 -0800 (Wed, 29 Dec 2010) | 1 line
RF-9639 hashParam: not works properly with popupPanel (seems need to revise in general)
.......
r20839 | Alex.Kolonitsky | 2010-12-29 07:03:28 -0800 (Wed, 29 Dec 2010) | 1 line
RF-9435
.......
r20840 | amarkhel | 2010-12-29 08:31:41 -0800 (Wed, 29 Dec 2010) | 1 line
RF-9652 Calendar: apply outcome of M4 pre-promotion code review
.......
r20841 | pyaschenko | 2010-12-29 08:46:42 -0800 (Wed, 29 Dec 2010) | 1 line
http://jira.jboss.com/jira/browse/RF-4865
.......
r20842 | konstantin.mishin | 2010-12-29 09:25:47 -0800 (Wed, 29 Dec 2010) | 1 line
RF-9935
.......
Property changes on: branches/RF-9323
___________________________________________________________________
Name: svnmerge-integrated
- /trunk:1-20813
+ /trunk:1-20842
Deleted: branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java
===================================================================
--- branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/AjaxContext.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,223 +0,0 @@
-/**
- * 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.context;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-
-import org.ajax4jsf.resource.util.URLToStreamHelper;
-
-public abstract class AjaxContext {
-
- /**
- * Key for keep request state information in request-scope attributes.
- */
- public static final String AJAX_CONTEXT_KEY = "ajaxContext";
- static final String SERVICE_RESOURCE = "META-INF/services/" + AjaxContext.class.getName();
- private static final String DEFAULT_CONTEXT_CLASS = "org.ajax4jsf.context.AjaxContextImpl";
- private static Map<ClassLoader, Class<? extends AjaxContext>> ajaxContextClasses =
- new HashMap<ClassLoader, Class<? extends AjaxContext>>();
- private boolean limitRender;
-
- protected AjaxContext() { }
-
- public abstract Map<String, Object> getCommonAjaxParameters();
-
- public abstract String getAjaxActionURL(FacesContext context);
-
- public abstract void setResponseData(Object responseData);
-
- public abstract Object getResponseData();
-
- public abstract void setOncomplete(Object oncompleteFunction);
-
- public abstract void appendOncomplete(Object oncompleteFunction);
-
- public abstract Object getOncomplete();
-
- public abstract void setOnbeforedomupdate(Object onbeforedomupdateFunction);
-
- public abstract Object getOnbeforedomupdate();
-
- public abstract boolean removeRenderedArea(String id);
-
- public abstract void addRenderedArea(String id);
-
- public abstract Set<String> getAjaxRenderedAreas();
-
- public abstract void addRegionsFromComponent(UIComponent component);
-
- /**
- * @param component
- * @since 3.3.0
- */
- public abstract void addAreasToProcessFromComponent(FacesContext context, UIComponent component);
-
- public abstract Set<String> getAjaxAreasToRender();
-
- public abstract Set<String> getAjaxAreasToProcess();
-
- public boolean isAjaxRequest(FacesContext facesContext) {
- return isAjaxRequest();
- }
-
- public abstract boolean isAjaxRequest();
-
- public abstract void encodeAjaxEnd(FacesContext context) throws IOException;
-
- public abstract void encodeAjaxBegin(FacesContext context) throws IOException;
-
- public abstract void renderAjax(FacesContext context);
-
- public abstract void release();
-
- public abstract Map<String, Object> getResponseComponentDataMap();
-
- public abstract void setAjaxRequest(boolean b);
-
- public abstract boolean isSelfRender();
-
- public abstract void setSelfRender(boolean b);
-
- public abstract String getSubmittedRegionClientId();
-
- public abstract void saveViewState(FacesContext context) throws IOException;
-
- public abstract void setAjaxSingleClientId(String ajaxSingleClientId);
-
- public abstract String getAjaxSingleClientId();
-
- public abstract void setAjaxAreasToProcess(Set<String> ajaxAreasToProcess);
-
- public abstract void setSubmittedRegionClientId(String submittedClientId);
-
- public boolean isLimitRender() {
- return limitRender;
- }
-
- public void setLimitRender(boolean limitRender) {
- this.limitRender = limitRender;
- }
-
- /**
- * Get instance of current AJAX Context. Instance get by
- * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
- *
- * @return memento instance for current request
- */
- public static AjaxContext getCurrentInstance() {
- FacesContext context = FacesContext.getCurrentInstance();
-
- return getCurrentInstance(context);
- }
-
- /**
- * Get instance of current AJAX Context. Instance get by
- * variable {@link AjaxContext#AJAX_CONTEXT_KEY}
- *
- * @param context
- * current FacesContext
- * @return instance of AjaxContext.
- */
- public static AjaxContext getCurrentInstance(FacesContext context) {
- if (null == context) {
- throw new NullPointerException("FacesContext is null");
- }
-
- Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
- AjaxContext ajaxContext = (AjaxContext) requestMap.get(AJAX_CONTEXT_KEY);
-
- if (null == ajaxContext) {
- ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
-
- if (null == contextClassLoader) {
- contextClassLoader = AjaxContext.class.getClassLoader();
- }
-
- Class<? extends AjaxContext> clazz;
-
- synchronized (ajaxContextClasses) {
- clazz = ajaxContextClasses.get(contextClassLoader);
-
- if (null == clazz) {
- String factoryClassName = DEFAULT_CONTEXT_CLASS;
-
- // Pluggable factories.
- InputStream input = null; // loader.getResourceAsStream(SERVICE_RESOURCE);
-
- input = URLToStreamHelper.urlToStreamSafe(contextClassLoader.getResource(SERVICE_RESOURCE));
-
- // have services file.
- if (input != null) {
- try {
- BufferedReader reader = new BufferedReader(new InputStreamReader(input));
-
- factoryClassName = reader.readLine();
- } catch (Exception e) {
- throw new FacesException("Error to create AjaxContext Instance", e);
- } finally {
- try {
- input.close();
- } catch (IOException e) {
-
- // Ignore
- }
- }
- }
-
- try {
- clazz = Class.forName(factoryClassName, false,
- contextClassLoader).asSubclass(AjaxContext.class);
- } catch (ClassNotFoundException e) {
- throw new FacesException("AjaxContext implementation class " + factoryClassName
- + " not found ", e);
- }
-
- ajaxContextClasses.put(contextClassLoader, clazz);
- }
- }
-
- try {
- ajaxContext = clazz.newInstance();
- } catch (InstantiationException e) {
- throw new FacesException("Error to create AjaxContext Instance", e);
- } catch (IllegalAccessException e) {
- throw new FacesException("No access to AjaxContext constructor", e);
- }
-
- requestMap.put(AJAX_CONTEXT_KEY, ajaxContext);
- }
-
- return ajaxContext;
- }
-}
Deleted: branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/package-info.java
===================================================================
--- branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/package-info.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/api/src/main/java/org/ajax4jsf/context/package-info.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,5 +0,0 @@
-
-/**
- * Classes and interfaces that defines contextual request information
- */
-package org.ajax4jsf.context;
Modified: branches/RF-9323/core/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java
===================================================================
--- branches/RF-9323/core/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/api/src/main/java/org/ajax4jsf/javascript/ScriptUtils.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -154,6 +154,8 @@
// all other put as encoded strings.
appendEncodedString(appendable, obj);
+ } else if (obj instanceof Character) {
+ appendEncodedString(appendable, obj);
} else if (obj instanceof Enum<?>) {
// all other put as encoded strings.
Copied: branches/RF-9323/core/api/src/main/java/org/richfaces/context/ExtendedPartialViewContext.java (from rev 20842, trunk/core/api/src/main/java/org/richfaces/context/ExtendedPartialViewContext.java)
===================================================================
--- branches/RF-9323/core/api/src/main/java/org/richfaces/context/ExtendedPartialViewContext.java (rev 0)
+++ branches/RF-9323/core/api/src/main/java/org/richfaces/context/ExtendedPartialViewContext.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.context;
+
+import java.util.Map;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.PartialViewContext;
+
+import com.google.common.collect.Maps;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public abstract class ExtendedPartialViewContext extends PartialViewContext {
+
+ private static final String ATTRIBUTE_NAME = ExtendedPartialViewContext.class.getName();
+
+ private FacesContext facesContext;
+
+ private boolean limitRender = false;
+
+ private Object responseData = null;
+
+ private Map<String, Object> responseComponentDataMap = Maps.newHashMap();
+
+ private StringBuilder beforedomupdateHandler = new StringBuilder();
+
+ private StringBuilder completeHandler = new StringBuilder();
+
+ public ExtendedPartialViewContext(FacesContext facesContext) {
+ this.facesContext = facesContext;
+
+ setInstance(facesContext, this);
+ }
+
+ protected FacesContext getFacesContext() {
+ return facesContext;
+ }
+
+ private static void setInstance(FacesContext facesContext, ExtendedPartialViewContext instance) {
+ facesContext.getAttributes().put(ATTRIBUTE_NAME, instance);
+ }
+
+ public static ExtendedPartialViewContext getInstance(FacesContext facesContext) {
+ return (ExtendedPartialViewContext) facesContext.getAttributes().get(ATTRIBUTE_NAME);
+ }
+
+ @Override
+ public void release() {
+ setInstance(facesContext, null);
+ facesContext = null;
+ }
+
+ public Object getResponseData() {
+ return responseData;
+ }
+
+ public void setResponseData(Object responseData) {
+ this.responseData = responseData;
+ }
+
+ public void appendOncomplete(Object handler) {
+ if (handler != null) {
+ completeHandler.append(handler.toString());
+ completeHandler.append(';');
+ }
+ }
+
+ public Object getOncomplete() {
+ return completeHandler.toString();
+ }
+
+ public void appendOnbeforedomupdate(Object handler) {
+ if (handler != null) {
+ beforedomupdateHandler.append(handler.toString());
+ beforedomupdateHandler.append(';');
+ }
+ }
+
+ public Object getOnbeforedomupdate() {
+ return beforedomupdateHandler.toString();
+ }
+
+ public Map<String, Object> getResponseComponentDataMap() {
+ return responseComponentDataMap;
+ }
+
+ public boolean isLimitRender() {
+ return limitRender;
+ }
+
+ public void setLimitRender(boolean limitRender) {
+ this.limitRender = limitRender;
+ }
+
+}
Modified: branches/RF-9323/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java
===================================================================
--- branches/RF-9323/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/api/src/main/java/org/richfaces/renderkit/util/CoreAjaxRendererUtils.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -34,8 +34,8 @@
import javax.faces.context.FacesContext;
import javax.faces.context.PartialResponseWriter;
-import org.ajax4jsf.context.AjaxContext;
import org.richfaces.application.ServiceTracker;
+import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.renderkit.AjaxDataSerializer;
import org.richfaces.renderkit.HtmlConstants;
@@ -109,14 +109,14 @@
}
public static void renderAjaxExtensions(FacesContext facesContext, UIComponent component) throws IOException {
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
+ ExtendedPartialViewContext partialContext = ExtendedPartialViewContext.getInstance(facesContext);
Map<String, String> attributes = Collections.singletonMap(HtmlConstants.ID_ATTRIBUTE,
facesContext.getExternalContext().encodeNamespace(EXTENSION_ID));
PartialResponseWriter writer = facesContext.getPartialViewContext().getPartialResponseWriter();
boolean[] writingState = new boolean[]{false};
- Object onbeforedomupdate = ajaxContext.getOnbeforedomupdate();
+ Object onbeforedomupdate = partialContext.getOnbeforedomupdate();
if (onbeforedomupdate != null) {
String string = onbeforedomupdate.toString();
if (string.length() != 0) {
@@ -127,7 +127,7 @@
}
}
- Object oncomplete = ajaxContext.getOncomplete();
+ Object oncomplete = partialContext.getOncomplete();
if (oncomplete != null) {
String string = oncomplete.toString();
if (string.length() != 0) {
@@ -138,7 +138,7 @@
}
}
- Object responseData = ajaxContext.getResponseData();
+ Object responseData = partialContext.getResponseData();
if (responseData != null) {
startExtensionElementIfNecessary(writer, attributes, writingState);
writer.startElement(DATA_ELEMENT_NAME, component);
@@ -149,7 +149,7 @@
writer.endElement(DATA_ELEMENT_NAME);
}
- Map<String, Object> responseComponentDataMap = ajaxContext.getResponseComponentDataMap();
+ Map<String, Object> responseComponentDataMap = partialContext.getResponseComponentDataMap();
if (responseComponentDataMap != null && !responseComponentDataMap.isEmpty()) {
startExtensionElementIfNecessary(writer, attributes, writingState);
writer.startElement(COMPONENT_DATA_ELEMENT_NAME, component);
Modified: branches/RF-9323/core/api/src/test/java/org/ajax4jsf/javascript/ScriptUtilsTest.java
===================================================================
--- branches/RF-9323/core/api/src/test/java/org/ajax4jsf/javascript/ScriptUtilsTest.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/api/src/test/java/org/ajax4jsf/javascript/ScriptUtilsTest.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -287,6 +287,10 @@
assertEquals("\"TestEnum: B\"", ScriptUtils.toScript(TestEnum.B));
}
+ public void testCharacter() throws Exception {
+ assertEquals("\"N\"", ScriptUtils.toScript('N'));
+ }
+
private void assertCaptureEquals(Capture<? extends Object> capture, String expected) {
StringBuilder sb = new StringBuilder();
List<? extends Object> list = capture.getValues();
Deleted: branches/RF-9323/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java
===================================================================
--- branches/RF-9323/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/impl/src/main/java/org/ajax4jsf/context/AjaxContextImpl.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,520 +0,0 @@
-/**
- * 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.context;
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.FacesException;
-import javax.faces.FactoryFinder;
-import javax.faces.application.StateManager;
-import javax.faces.application.ViewHandler;
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIViewRoot;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.render.RenderKit;
-import javax.faces.render.RenderKitFactory;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-
-import org.ajax4jsf.Messages;
-import org.richfaces.log.Logger;
-import org.richfaces.log.RichfacesLogger;
-import org.richfaces.renderkit.HtmlConstants;
-import org.richfaces.renderkit.util.CoreAjaxRendererUtils;
-import org.richfaces.renderkit.util.CoreRendererUtils;
-
-/**
- * This class incapsulated
- *
- * @author asmirnov(a)exadel.com (latest modification by $Author: alexsmirnov $)
- * @version $Revision: 1.1.2.7 $ $Date: 2007/02/08 19:07:16 $
- */
-public class AjaxContextImpl extends AjaxContext {
- public static final String SERVLET_ERROR_EXCEPTION_ATTRIBUTE = "javax.servlet.error.exception";
-
- //TODO remove this
- private static final String SERIALIZED_STATE_KEY = "org.ajax4jsf.view.serializedstate";
-
- private static final Logger LOG = RichfacesLogger.CONTEXT.getLogger();
- Set<String> ajaxAreasToProcess = null;
- Set<String> ajaxAreasToRender = new LinkedHashSet<String>();
- Set<String> ajaxRenderedAreas = new LinkedHashSet<String>();
- boolean ajaxRequest = false;
- String ajaxSingleClientId = null;
- Object oncomplete = null;
- Object onbeforedomupdate = null;
- boolean selfRender = false;
- String submittedRegionClientId = null;
- Integer viewSequence = new Integer(1);
- Map<String, Object> responseComponentDataMap = new HashMap<String, Object>();
- Map<String, Object> commonAjaxParameters = new HashMap<String, Object>();
- Object responseData = null;
-
- public void release() {
- ajaxAreasToRender = new LinkedHashSet<String>();
- ajaxAreasToProcess = null;
- ajaxRenderedAreas = new LinkedHashSet<String>();
- ajaxRequest = false;
- selfRender = false;
- viewSequence = new Integer(1);
- submittedRegionClientId = null;
- responseComponentDataMap = new HashMap<String, Object>();
- commonAjaxParameters = new HashMap<String, Object>();
- responseData = null;
- }
-
- /**
- * @param context
- * @throws javax.faces.event.AbortProcessingException
- *
- */
- public void renderAjax(FacesContext context) throws FacesException {
- if (LOG.isDebugEnabled()) {
- LOG.debug(Messages.getMessage(Messages.RENDER_AJAX_REQUEST, getSubmittedRegionClientId()));
- }
-
- try {
-
- // Just in case...
- setSelfRender(true);
- setAjaxRequest(true);
-
- // create response writer.
- ExternalContext extContext = context.getExternalContext();
- RenderKit renderKit = context.getRenderKit();
- String encoding;
-
- // Depends if we talk about servlets, portlets, ...
- if (extContext.getRequest() instanceof ServletRequest) {
- ServletRequest request = (ServletRequest) extContext.getRequest();
- ServletResponse response = (ServletResponse) extContext.getResponse();
-
- // Setup encoding and content type
- String contentType = "text/xml";
-
- // get the encoding - must be setup by faces context or filter.
- encoding = request.getCharacterEncoding();
-
- if (encoding == null) {
- encoding = "UTF-8";
- }
-
- response.setContentType(contentType + ";charset=" + encoding);
- } else {
- encoding = "UTF-8";
- }
-
- PrintWriter servletWriter;
-
- servletWriter = getWriter(extContext);
-
- ResponseWriter writer = renderKit.createResponseWriter(servletWriter, null, encoding);
-
- context.setResponseWriter(writer);
-
- // make response
- writer.startDocument();
- encodeAjaxBegin(context);
- context.getViewRoot().encodeAll(context);
- saveViewState(context);
- encodeAjaxEnd(context);
- writer.endDocument();
- writer.flush();
- writer.close();
- servletWriter.close();
-
- // Save tree state.
- } catch (IOException e) {
- throw new FacesException(Messages.getMessage(Messages.RENDERING_AJAX_REGION_ERROR,
- getSubmittedRegionClientId()), e);
- } finally {
- context.responseComplete();
-
- // component.setRendererType(defaultRenderer);
- }
- }
-
- /**
- * Encode declaration for AJAX response. Render <html><body>
- *
- * @param context
- * @throws IOException
- */
- public void encodeAjaxBegin(FacesContext context) throws IOException {
- UIViewRoot viewRoot = context.getViewRoot();
-
- // AjaxContainer ajax = (AjaxContainer) component;
- ResponseWriter out = context.getResponseWriter();
-
- // DebugUtils.traceView("ViewRoot in AJAX Page encode begin");
- out.startElement(HtmlConstants.HTML_ELEMENT, viewRoot);
-
- Locale locale = viewRoot.getLocale();
-
- out.writeAttribute(HtmlConstants.LANG_ATTRIBUTE, locale.toString(), "lang");
- out.startElement(HtmlConstants.BODY_ELEMENT, viewRoot);
- }
-
- /**
- * End encoding of AJAX response. Render tag with included areas and close
- * </body></html>
- *
- * @param context
- * @throws IOException
- */
- public void encodeAjaxEnd(FacesContext context) throws IOException {
-
- // AjaxContainer ajax = (AjaxContainer) component;
- ResponseWriter out = context.getResponseWriter();
-
- // DebugUtils.traceView("ViewRoot in AJAX Page encode begin");
- out.endElement(HtmlConstants.BODY_ELEMENT);
- out.endElement(HtmlConstants.HTML_ELEMENT);
- }
-
- public void saveViewState(FacesContext context) throws IOException {
- ResponseWriter writer = context.getResponseWriter();
- StateManager stateManager = context.getApplication().getStateManager();
- Object serializedView = stateManager.saveView(context);
-
- if ((null != serializedView) && (null != writer)) {
- StringWriter bufWriter = new StringWriter();
- ResponseWriter tempWriter;
-
- tempWriter = writer.cloneWithWriter(bufWriter);
- context.setResponseWriter(tempWriter);
- stateManager.writeState(context, serializedView);
- tempWriter.flush();
-
- if (bufWriter.getBuffer().length() > 0) {
- context.getExternalContext().getRequestMap().put(SERIALIZED_STATE_KEY,
- bufWriter.toString());
- }
-
- context.setResponseWriter(writer);
- }
- }
-
- protected RenderKit getRenderKit(FacesContext context) {
- RenderKit renderKit = context.getRenderKit();
-
- if (null == renderKit) {
- String renderKitId = context.getApplication().getViewHandler().calculateRenderKitId(context);
- RenderKitFactory factory = (RenderKitFactory) FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
-
- renderKit = factory.getRenderKit(context, renderKitId);
- }
-
- return renderKit;
- }
-
- /**
- * @return Returns the ajaxRequest.
- */
- public boolean isAjaxRequest() {
- return ajaxRequest;
- }
-
- /**
- * @param ajaxRequest The ajaxRequest to set.
- */
- public void setAjaxRequest(boolean ajaxRequest) {
- this.ajaxRequest = ajaxRequest;
- }
-
- /**
- * @return Returns the ajaxAreasToRender.
- */
- public Set<String> getAjaxAreasToRender() {
- return this.ajaxAreasToRender;
- }
-
- /**
- * @return the ajaxAreasToProcess
- */
- @Override
- public Set<String> getAjaxAreasToProcess() {
- return ajaxAreasToProcess;
- }
-
- /**
- * @param ajaxAreasToProcess the ajaxAreasToProcess to set
- */
- @Override
- public void setAjaxAreasToProcess(Set<String> ajaxAreasToProcess) {
- this.ajaxAreasToProcess = ajaxAreasToProcess;
- }
-
- /**
- * Add affected regions's ID to ajaxView component.
- *
- * @param component
- */
- public void addRegionsFromComponent(UIComponent component) {
-
- // First step - find parent ajax view
- Set<String> ajaxRegions = CoreAjaxRendererUtils.getAjaxAreas(component);
-
- // if (ajaxRegions == null){
- // FacesContext context = FacesContext.getCurrentInstance();
- // ajaxRegions = AjaxRendererUtils.getAbsoluteId(context,component);
- // }
- if (LOG.isDebugEnabled()) {
- LOG.debug(Messages.getMessage(Messages.INVOKE_AJAX_REGION_LISTENER, component.getId()));
- }
-
-
- if (ajaxRegions != null) {
- ajaxAreasToRender.addAll(CoreRendererUtils.INSTANCE.findComponentsFor(FacesContext.getCurrentInstance(), component, ajaxRegions));
- }
-
- // Is that component limit to list ?
- if (Boolean.TRUE.equals(component.getAttributes().get("limitRender"))) {
- setLimitRender(true);
- }
- }
-
- /**
- * Add IDs of regions to process
- *
- * @see org.ajax4jsf.context.AjaxContext#addAreasToProcessFromComponent(javax.faces.component.UIComponent)
- */
- @Override
- public void addAreasToProcessFromComponent(FacesContext context, UIComponent component) {
- Set<String> areasToProcess = CoreAjaxRendererUtils.getAjaxAreasToProcess(component);
-
- if (areasToProcess != null) {
- Collection<String> convertedAreaIds = CoreRendererUtils.INSTANCE.findComponentsFor(context, component, areasToProcess);
-
- if (this.ajaxAreasToProcess == null) {
- this.ajaxAreasToProcess = new HashSet<String>(convertedAreaIds);
- } else {
- this.ajaxAreasToProcess.addAll(convertedAreaIds);
- }
- }
- }
-
- /**
- * @return Returns the ajaxRenderedAreas.
- */
- public Set<String> getAjaxRenderedAreas() {
- return ajaxRenderedAreas;
- }
-
- public void addRenderedArea(String id) {
- ajaxRenderedAreas.add(id);
- }
-
- public boolean removeRenderedArea(String id) {
- return ajaxRenderedAreas.remove(id);
- }
-
- /**
- * @return Returns the submittedClientId.
- */
- public String getSubmittedRegionClientId() {
- return this.submittedRegionClientId;
- }
-
- /**
- * @param submittedClientId The submittedClientId to set.
- */
- @Override
- public void setSubmittedRegionClientId(String submittedClientId) {
- this.submittedRegionClientId = submittedClientId;
- }
-
- /**
- * @return the ajaxSingleClientId
- */
- @Override
- public String getAjaxSingleClientId() {
- return ajaxSingleClientId;
- }
-
- /**
- * @param ajaxSingleClientId the ajaxSingleClientId to set
- */
- @Override
- public void setAjaxSingleClientId(String ajaxSingleClientId) {
- this.ajaxSingleClientId = ajaxSingleClientId;
- }
-
- /**
- * @return Returns the selfRender.
- */
- public boolean isSelfRender() {
- return selfRender;
- }
-
- /**
- * @param selfRender The selfRender to set.
- */
- public void setSelfRender(boolean selfRender) {
- this.selfRender = selfRender;
- }
-
- /**
- * @return the responseData
- */
- public Object getResponseData() {
- return responseData;
- }
-
- /**
- * @param responseData the responseData to set
- */
- public void setResponseData(Object responseData) {
- this.responseData = responseData;
- }
-
- /**
- * @return the responseDataMap
- */
- public Map<String, Object> getResponseComponentDataMap() {
- return responseComponentDataMap;
- }
-
- /**
- * Gives back the writer of a Response object.
- *
- * @param extContext The external context.
- * @return The writer of the response.
- * @throws FacesException If the response object has no getWriter() method.
- */
- protected PrintWriter getWriter(ExternalContext extContext) throws FacesException {
- PrintWriter writer = null;
- Object response = extContext.getResponse();
-
- try {
- Method gW = response.getClass().getMethod("getWriter", new Class[0]);
-
- writer = (PrintWriter) gW.invoke(response, new Object[0]);
- } catch (Exception e) {
- throw new FacesException(e);
- }
-
- return writer;
- }
-
- public String getAjaxActionURL(FacesContext context) {
-
- // Check arguments
- if (null == context) {
- throw new NullPointerException("Faces context for build AJAX Action URL is null");
- }
-
- UIViewRoot viewRoot = context.getViewRoot();
-
- if (null == viewRoot) {
- throw new NullPointerException("Faces view tree for build AJAX Action URL is null");
- }
-
- String viewId = viewRoot.getViewId();
-
- if (null == viewId) {
- throw new NullPointerException("View id for build AJAX Action URL is null");
- }
-
- if (!viewId.startsWith("/")) {
- throw new IllegalArgumentException("Illegal view Id for build AJAX Action URL: " + viewId);
- }
-
- ViewHandler viewHandler = context.getApplication().getViewHandler();
- String actionURL = viewHandler.getActionURL(context, viewId);
-
- // HACK - check for a Jboss PortletBridge implementation. If present, append DirectLink attribute to url.
- // TODO - how to detect portlet application ?
- if (null != context.getExternalContext().getApplicationMap().get(
- "org.jboss.portletbridge.application.PortletStateHolder")) {
-
- // Mark Ajax action url as transparent with jsf-portlet bridge.
- actionURL = actionURL + ((actionURL.lastIndexOf('?') > 0) ? "&" : "?")
- + "javax.portlet.faces.DirectLink=true";
- }
-
- return context.getExternalContext().encodeActionURL(actionURL);
- }
-
- /**
- * @return the commonAjaxParameters
- */
- public Map<String, Object> getCommonAjaxParameters() {
- return commonAjaxParameters;
- }
-
- /**
- * @return the oncomplete
- */
- public Object getOncomplete() {
- return oncomplete;
- }
-
- /**
- * @param oncomplete the oncomplete to set
- */
- public void setOncomplete(Object oncomplete) {
- this.oncomplete = oncomplete;
- }
-
- public void appendOncomplete(Object onComplete) {
- StringBuilder res = new StringBuilder();
- if (this.oncomplete != null) {
- res.append(this.oncomplete);
- res.append(';');
- }
-
- if (onComplete != null) {
- res.append(onComplete).append(';');
- }
-
- this.oncomplete = res.toString();
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.context.AjaxContext#getOnbeforedomupdate()
- */
- @Override
- public Object getOnbeforedomupdate() {
- return onbeforedomupdate;
- }
-
- /* (non-Javadoc)
- * @see org.ajax4jsf.context.AjaxContext#setOnbeforedomupdate(java.lang.Object)
- */
- @Override
- public void setOnbeforedomupdate(Object onbeforedomupdateFunction) {
- this.onbeforedomupdate = onbeforedomupdateFunction;
- }
-}
Copied: branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextFactoryImpl.java (from rev 20842, trunk/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextFactoryImpl.java)
===================================================================
--- branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextFactoryImpl.java (rev 0)
+++ branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextFactoryImpl.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,50 @@
+/**
+ * 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.richfaces.context;
+
+import javax.faces.context.FacesContext;
+import javax.faces.context.PartialViewContext;
+import javax.faces.context.PartialViewContextFactory;
+
+/**
+ * @author Nick Belaevski
+ * @since 4.0
+ */
+public class ExtendedPartialViewContextFactoryImpl extends PartialViewContextFactory {
+
+ private PartialViewContextFactory parentFactory;
+
+ public ExtendedPartialViewContextFactoryImpl(PartialViewContextFactory parentFactory) {
+ super();
+ this.parentFactory = parentFactory;
+ }
+
+ @Override
+ public PartialViewContext getPartialViewContext(final FacesContext context) {
+ return new ExtendedPartialViewContextImpl(parentFactory.getPartialViewContext(context), context);
+ }
+
+ @Override
+ public PartialViewContextFactory getWrapped() {
+ return parentFactory;
+ }
+}
Copied: branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextImpl.java (from rev 20842, trunk/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextImpl.java)
===================================================================
--- branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextImpl.java (rev 0)
+++ branches/RF-9323/core/impl/src/main/java/org/richfaces/context/ExtendedPartialViewContextImpl.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,534 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.context;
+
+import static org.richfaces.renderkit.AjaxConstants.AJAX_COMPONENT_ID_PARAMETER;
+import static org.richfaces.renderkit.AjaxConstants.ALL;
+import static org.richfaces.renderkit.AjaxConstants.BEHAVIOR_EVENT_PARAMETER;
+
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.Set;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.visit.VisitCallback;
+import javax.faces.component.visit.VisitContext;
+import javax.faces.component.visit.VisitHint;
+import javax.faces.component.visit.VisitResult;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.PartialResponseWriter;
+import javax.faces.context.PartialViewContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.event.PhaseId;
+
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.richfaces.application.ServiceTracker;
+import org.richfaces.component.MetaComponentEncoder;
+import org.richfaces.javascript.JavaScriptService;
+import org.richfaces.javascript.ScriptsHolder;
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
+import org.richfaces.renderkit.util.CoreAjaxRendererUtils;
+
+/**
+ * @author Nick Belaevski
+ * @since 4.0
+ */
+public class ExtendedPartialViewContextImpl extends ExtendedPartialViewContext {
+
+ private static final Logger LOG = RichfacesLogger.CONTEXT.getLogger();
+
+ private static final String ORIGINAL_WRITER = "org.richfaces.PartialViewContextImpl.ORIGINAL_WRITER";
+
+ private enum ContextMode {
+ WRAPPED, DIRECT
+ }
+
+ private ContextMode contextMode = null;
+
+ private Collection<String> executeIds = null;
+
+ private Collection<String> renderIds = null;
+
+ private Collection<String> componentRenderIds = null;
+
+ private Boolean renderAll = null;
+
+ private String activatorComponentId = null;
+ private String behaviorEvent = null;
+
+ private boolean released = false;
+
+ private boolean limitRender = false;
+
+ private PartialViewContext wrappedViewContext;
+
+ private String onbeforedomupdate;
+
+ private String oncomplete;
+
+ private Object responseData;
+
+ public ExtendedPartialViewContextImpl(PartialViewContext wrappedViewContext, FacesContext facesContext) {
+ super(facesContext);
+
+ this.wrappedViewContext = wrappedViewContext;
+ }
+
+ @Override
+ public Collection<String> getExecuteIds() {
+ assertNotReleased();
+
+ if (detectContextMode() == ContextMode.DIRECT) {
+ if (executeIds == null) {
+ executeIds = new LinkedHashSet<String>();
+ visitActivatorAtExecute();
+ }
+
+ return executeIds;
+ } else {
+ return wrappedViewContext.getExecuteIds();
+ }
+ }
+
+ @Override
+ public Collection<String> getRenderIds() {
+ assertNotReleased();
+
+ if (detectContextMode() == ContextMode.DIRECT) {
+ if (renderIds == null) {
+ renderIds = new LinkedHashSet<String>();
+ }
+
+ return renderIds;
+ } else {
+ return wrappedViewContext.getRenderIds();
+ }
+ }
+
+ @Override
+ public boolean isAjaxRequest() {
+ assertNotReleased();
+
+ return wrappedViewContext.isAjaxRequest();
+ }
+
+ @Override
+ public boolean isPartialRequest() {
+ assertNotReleased();
+
+ return wrappedViewContext.isPartialRequest();
+ }
+
+ @Override
+ public void setPartialRequest(boolean isPartialRequest) {
+ assertNotReleased();
+
+ wrappedViewContext.setPartialRequest(isPartialRequest);
+ }
+
+ @Override
+ public boolean isExecuteAll() {
+ assertNotReleased();
+
+ if (detectContextMode() == ContextMode.DIRECT) {
+ return getExecuteIds().contains(ALL);
+ } else {
+ return wrappedViewContext.isExecuteAll();
+ }
+ }
+
+ @Override
+ public boolean isRenderAll() {
+ assertNotReleased();
+
+ if (detectContextMode() == ContextMode.DIRECT) {
+ if (renderAll != null) {
+ return renderAll.booleanValue();
+ }
+
+ return getRenderIds().contains(ALL);
+ } else {
+ return wrappedViewContext.isRenderAll();
+ }
+ }
+
+ @Override
+ public void setRenderAll(boolean isRenderAll) {
+ assertNotReleased();
+
+ if (detectContextMode() == ContextMode.DIRECT) {
+ renderAll = isRenderAll;
+ } else {
+ wrappedViewContext.setRenderAll(isRenderAll);
+ }
+ }
+
+ @Override
+ public PartialResponseWriter getPartialResponseWriter() {
+ return wrappedViewContext.getPartialResponseWriter();
+ }
+
+ private boolean isProcessedExecutePhase(PhaseId phaseId) {
+ return phaseId == PhaseId.APPLY_REQUEST_VALUES || phaseId == PhaseId.PROCESS_VALIDATIONS
+ || phaseId == PhaseId.UPDATE_MODEL_VALUES;
+ }
+
+ @Override
+ public void processPartial(PhaseId phaseId) {
+ if (detectContextMode() == ContextMode.DIRECT) {
+ if (phaseId == PhaseId.RENDER_RESPONSE) {
+ processPartialRenderPhase();
+ } else if (isProcessedExecutePhase(phaseId)) {
+ processPartialExecutePhase(phaseId);
+ }
+ } else {
+ wrappedViewContext.processPartial(phaseId);
+ }
+ }
+
+ protected void processPartialExecutePhase(PhaseId phaseId) {
+ FacesContext facesContext = getFacesContext();
+ PartialViewContext pvc = facesContext.getPartialViewContext();
+ Collection <String> executeIds = pvc.getExecuteIds();
+
+ if (executeIds == null || executeIds.isEmpty()) {
+ if (phaseId == PhaseId.APPLY_REQUEST_VALUES) {
+ LOG.warn("Partial execute won't happen - executeIds were not specified");
+ }
+ return;
+ }
+
+ try {
+ executeComponents(phaseId, executeIds);
+ } catch (Exception e) {
+ LOG.error(e.getMessage(), e);
+ }
+
+ if (phaseId == PhaseId.APPLY_REQUEST_VALUES) {
+ //fix for MyFaces
+ ExternalContext externalContext = facesContext.getExternalContext();
+ externalContext.setResponseCharacterEncoding(externalContext.getRequestCharacterEncoding());
+
+ PartialResponseWriter writer = pvc.getPartialResponseWriter();
+ facesContext.setResponseWriter(writer);
+ }
+ }
+
+ protected void executeComponents(PhaseId phaseId, Collection<String> executeIds) {
+ FacesContext facesContext = getFacesContext();
+ EnumSet<VisitHint> hints = EnumSet.of(VisitHint.SKIP_UNRENDERED);
+ VisitContext visitContext = new ExecuteExtendedVisitContext(facesContext, executeIds, hints);
+ PartialViewExecuteVisitCallback callback = new PartialViewExecuteVisitCallback(facesContext, phaseId);
+ facesContext.getViewRoot().visitTree(visitContext, callback);
+ }
+
+ protected void processPartialRenderPhase() {
+ FacesContext facesContext = getFacesContext();
+ PartialViewContext pvc = facesContext.getPartialViewContext();
+ UIViewRoot viewRoot = facesContext.getViewRoot();
+ Collection<String> phaseIds = pvc.getRenderIds();
+ visitActivatorAtRender(phaseIds);
+
+ try {
+ PartialResponseWriter writer = pvc.getPartialResponseWriter();
+ ResponseWriter orig = facesContext.getResponseWriter();
+ facesContext.getAttributes().put(ORIGINAL_WRITER, orig);
+ facesContext.setResponseWriter(writer);
+
+ ExternalContext exContext = facesContext.getExternalContext();
+ exContext.setResponseContentType("text/xml");
+ exContext.addResponseHeader("Cache-Control", "no-cache");
+ writer.startDocument();
+ if (isRenderAll()) {
+ renderAll(facesContext, viewRoot);
+ renderState(facesContext);
+ writer.endDocument();
+ return;
+ }
+
+ // Skip this processing if "none" is specified in the render list,
+ // or there were no render phase client ids.
+ if ((phaseIds != null && !phaseIds.isEmpty()) ||
+ (!limitRender && PartialViewContextAjaxOutputTracker.hasNestedAjaxOutputs(viewRoot))) {
+
+ EnumSet<VisitHint> hints = EnumSet.of(VisitHint.SKIP_UNRENDERED);
+ VisitContext visitContext = new RenderExtendedVisitContext(facesContext, phaseIds, hints, limitRender);
+ VisitCallback visitCallback = new RenderVisitCallback(facesContext);
+ viewRoot.visitTree(visitContext, visitCallback);
+ }
+
+ renderState(facesContext);
+
+ //TODO - render extensions for renderAll?
+ renderExtensions(facesContext, viewRoot);
+
+ writer.endDocument();
+ } catch (IOException ex) {
+ this.cleanupAfterView();
+ //TODO - review?
+ ex.printStackTrace();
+ } catch (RuntimeException ex) {
+ //TODO - review?
+ this.cleanupAfterView();
+ // Throw the exception
+ throw ex;
+ }
+ }
+
+ private void setupExecuteCallbackData(ExecuteComponentCallback callback) {
+ executeIds.addAll(callback.getExecuteIds());
+
+ setupRenderCallbackData(callback);
+ }
+
+ private void setupRenderCallbackData(RenderComponentCallback callback) {
+ componentRenderIds = callback.getRenderIds();
+ onbeforedomupdate = callback.getOnbeforedomupdate();
+ oncomplete = callback.getOncomplete();
+ responseData = callback.getData();
+ limitRender = callback.isLimitRender();
+ }
+
+ private void visitActivatorAtExecute() {
+ ExecuteComponentCallback callback = new ExecuteComponentCallback(getFacesContext(), behaviorEvent);
+
+ if (visitActivatorComponent(activatorComponentId, callback, EnumSet.of(VisitHint.SKIP_UNRENDERED))) {
+ setupExecuteCallbackData(callback);
+
+ if (!executeIds.contains(ALL)) {
+ addImplicitExecuteIds(executeIds);
+ }
+ } else {
+ //TODO - log or exception?
+ //TODO - process default execute value
+ }
+ }
+
+ private void visitActivatorAtRender(Collection<String> ids) {
+ if (!isRenderAll()) {
+ RenderComponentCallback callback = new RenderComponentCallback(getFacesContext(), behaviorEvent);
+
+ if (visitActivatorComponent(activatorComponentId, callback, EnumSet.noneOf(VisitHint.class))) {
+ setupRenderCallbackData(callback);
+ } else {
+ //TODO - the same as for "execute"
+ }
+
+ //take collection value stored during execute
+ if (componentRenderIds != null) {
+ ids.addAll(componentRenderIds);
+ }
+
+ if (!Boolean.TRUE.equals(renderAll) && !ids.contains(ALL)) {
+ addImplicitRenderIds(ids, limitRender);
+
+ appendOnbeforedomupdate(onbeforedomupdate);
+ appendOncomplete(oncomplete);
+ setResponseData(responseData);
+ }
+ }
+ }
+
+ private void renderAll(FacesContext context, UIViewRoot viewRoot) throws IOException {
+ // If this is a "render all via ajax" request,
+ // make sure to wrap the entire page in a <render> elemnt
+ // with the special id of VIEW_ROOT_ID. This is how the client
+ // JavaScript knows how to replace the entire document with
+ // this response.
+ PartialViewContext pvc = context.getPartialViewContext();
+ PartialResponseWriter writer = pvc.getPartialResponseWriter();
+ writer.startUpdate(PartialResponseWriter.RENDER_ALL_MARKER);
+
+ if (viewRoot.getChildCount() > 0) {
+ for (UIComponent child : viewRoot.getChildren()) {
+ child.encodeAll(context);
+ }
+ }
+
+ writer.endUpdate();
+ }
+
+ private void renderState(FacesContext context) throws IOException {
+ if (!context.getViewRoot().isTransient()) {
+ // Get the view state and write it to the response..
+ PartialViewContext pvc = context.getPartialViewContext();
+ PartialResponseWriter writer = pvc.getPartialResponseWriter();
+ writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
+ String state = context.getApplication().getStateManager().getViewState(context);
+ writer.write(state);
+ writer.endUpdate();
+ }
+ }
+
+ @Override
+ public void release() {
+ super.release();
+
+ assertNotReleased();
+
+ released = true;
+
+ wrappedViewContext.release();
+ wrappedViewContext = null;
+
+ renderAll = null;
+ executeIds = null;
+ renderIds = null;
+
+ limitRender = false;
+
+ activatorComponentId = null;
+ behaviorEvent = null;
+ contextMode = null;
+ }
+
+ protected void addImplicitExecuteIds(Collection<String> ids) {
+ if (!ids.isEmpty()) {
+ UIViewRoot root = getFacesContext().getViewRoot();
+ if (root.getFacetCount() > 0) {
+ if (root.getFacet(UIViewRoot.METADATA_FACET_NAME) != null) {
+ //TODO nick - does ordering matter?
+ ids.add(UIViewRoot.METADATA_FACET_NAME);
+ //ids.add(0, UIViewRoot.METADATA_FACET_NAME);
+ }
+ }
+ }
+ }
+
+ protected void addImplicitRenderIds(Collection<String> ids, boolean limitRender) {
+ }
+
+ protected void renderExtensions(FacesContext context, UIComponent component) throws IOException {
+ // ADD deffered scripts
+ ScriptsHolder scriptsHolder = ServiceTracker.getService(JavaScriptService.class).getScriptsHolder(context);
+ for (Object script : scriptsHolder.getScripts()) {
+ appendOncomplete(ScriptUtils.toScript(script));
+ }
+ for (Object script : scriptsHolder.getPageReadyScripts()) {
+ appendOncomplete(ScriptUtils.toScript(script));
+ }
+ CoreAjaxRendererUtils.renderAjaxExtensions(context, component);
+ }
+
+ private void assertNotReleased() {
+ if (released) {
+ throw new IllegalStateException("PartialViewContext already released!");
+ }
+ }
+
+ private boolean visitActivatorComponent(String componentActivatorId, VisitCallback visitCallback, Set<VisitHint> visitHints) {
+ FacesContext facesContext = getFacesContext();
+
+ Set<String> idsToVisit = Collections.singleton(componentActivatorId);
+ VisitContext visitContext = new ExecuteExtendedVisitContext(facesContext, idsToVisit, visitHints);
+
+ boolean visitResult = facesContext.getViewRoot().visitTree(visitContext, visitCallback);
+ return visitResult;
+ }
+
+ private void cleanupAfterView() {
+ FacesContext facesContext = getFacesContext();
+
+ ResponseWriter orig = (ResponseWriter) facesContext.getAttributes().get(ORIGINAL_WRITER);
+ assert null != orig;
+ // move aside the PartialResponseWriter
+ facesContext.setResponseWriter(orig);
+ }
+
+ protected ContextMode detectContextMode() {
+ if (contextMode == null) {
+ Map<String, String> requestParameterMap = getFacesContext().getExternalContext().getRequestParameterMap();
+ activatorComponentId = requestParameterMap.get(AJAX_COMPONENT_ID_PARAMETER);
+
+ if (activatorComponentId != null) {
+ contextMode = ContextMode.DIRECT;
+ behaviorEvent = requestParameterMap.get(BEHAVIOR_EVENT_PARAMETER);
+ } else {
+ contextMode = ContextMode.WRAPPED;
+ }
+ }
+
+ return contextMode;
+ }
+
+ private static final class RenderVisitCallback implements VisitCallback {
+
+ private FacesContext ctx;
+
+ private RenderVisitCallback(FacesContext ctx) {
+ this.ctx = ctx;
+ }
+
+ private void logException(Exception e) {
+ if (LOG.isErrorEnabled()) {
+ LOG.error(e.getMessage());
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug(e.getMessage(), e);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see javax.faces.component.visit.VisitCallback#visit(javax.faces.component.visit.VisitContext, javax.faces.component.UIComponent)
+ */
+ public VisitResult visit(VisitContext context, UIComponent target) {
+ String metaComponentId = (String) ctx.getAttributes().get(ExtendedVisitContext.META_COMPONENT_ID);
+ if (metaComponentId != null) {
+ MetaComponentEncoder encoder = (MetaComponentEncoder) target;
+ try {
+ encoder.encodeMetaComponent(ctx, metaComponentId);
+ } catch (Exception e) {
+ logException(e);
+ }
+ } else {
+ PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
+
+ try {
+ writer.startUpdate(target.getClientId(ctx));
+ try {
+ // do the default behavior...
+ target.encodeAll(ctx);
+ } catch (Exception ce) {
+ logException(ce);
+ }
+
+ writer.endUpdate();
+ } catch (IOException e) {
+ logException(e);
+ }
+ }
+
+ // Once we visit a component, there is no need to visit
+ // its children, since processDecodes/Validators/Updates and
+ // encodeAll() already traverse the subtree. We return
+ // VisitResult.REJECT to supress the subtree visit.
+ return VisitResult.REJECT;
+ }
+ }
+}
Deleted: branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java
===================================================================
--- branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextFactoryImpl.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,50 +0,0 @@
-/**
- * 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.richfaces.context;
-
-import javax.faces.context.FacesContext;
-import javax.faces.context.PartialViewContext;
-import javax.faces.context.PartialViewContextFactory;
-
-/**
- * @author Nick Belaevski
- * @since 4.0
- */
-public class PartialViewContextFactoryImpl extends PartialViewContextFactory {
-
- private PartialViewContextFactory parentFactory;
-
- public PartialViewContextFactoryImpl(PartialViewContextFactory parentFactory) {
- super();
- this.parentFactory = parentFactory;
- }
-
- @Override
- public PartialViewContext getPartialViewContext(final FacesContext context) {
- return new PartialViewContextImpl(parentFactory.getPartialViewContext(context), context);
- }
-
- @Override
- public PartialViewContextFactory getWrapped() {
- return parentFactory;
- }
-}
Deleted: branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java
===================================================================
--- branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/impl/src/main/java/org/richfaces/context/PartialViewContextImpl.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,540 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat, Inc. and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.richfaces.context;
-
-import static org.richfaces.renderkit.AjaxConstants.AJAX_COMPONENT_ID_PARAMETER;
-import static org.richfaces.renderkit.AjaxConstants.ALL;
-import static org.richfaces.renderkit.AjaxConstants.BEHAVIOR_EVENT_PARAMETER;
-
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIViewRoot;
-import javax.faces.component.visit.VisitCallback;
-import javax.faces.component.visit.VisitContext;
-import javax.faces.component.visit.VisitHint;
-import javax.faces.component.visit.VisitResult;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.context.PartialResponseWriter;
-import javax.faces.context.PartialViewContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.event.PhaseId;
-
-import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.javascript.ScriptUtils;
-import org.richfaces.application.ServiceTracker;
-import org.richfaces.component.MetaComponentEncoder;
-import org.richfaces.javascript.JavaScriptService;
-import org.richfaces.javascript.ScriptsHolder;
-import org.richfaces.log.Logger;
-import org.richfaces.log.RichfacesLogger;
-import org.richfaces.renderkit.util.CoreAjaxRendererUtils;
-
-/**
- * @author Nick Belaevski
- * @since 4.0
- */
-public class PartialViewContextImpl extends PartialViewContext {
-
- private static final Logger LOG = RichfacesLogger.CONTEXT.getLogger();
-
- private static final String ORIGINAL_WRITER = "org.richfaces.PartialViewContextImpl.ORIGINAL_WRITER";
-
- private enum ContextMode {
- WRAPPED, DIRECT
- }
-
- private ContextMode contextMode = null;
-
- private FacesContext facesContext;
-
- private Collection<String> executeIds = null;
-
- private Collection<String> renderIds = null;
-
- private Collection<String> componentRenderIds = null;
-
- private Boolean renderAll = null;
-
- private String activatorComponentId = null;
- private String behaviorEvent = null;
-
- private boolean released = false;
-
- private boolean limitRender = false;
-
- private PartialViewContext wrappedViewContext;
-
- private String onbeforedomupdate;
-
- private String oncomplete;
-
- private Object responseData;
-
- public PartialViewContextImpl(PartialViewContext wrappedViewContext, FacesContext facesContext) {
- super();
-
- this.wrappedViewContext = wrappedViewContext;
- this.facesContext = facesContext;
- }
-
- @Override
- public Collection<String> getExecuteIds() {
- assertNotReleased();
-
- if (detectContextMode() == ContextMode.DIRECT) {
- if (executeIds == null) {
- executeIds = new LinkedHashSet<String>();
- visitActivatorAtExecute();
- }
-
- return executeIds;
- } else {
- return wrappedViewContext.getExecuteIds();
- }
- }
-
- @Override
- public Collection<String> getRenderIds() {
- assertNotReleased();
-
- if (detectContextMode() == ContextMode.DIRECT) {
- if (renderIds == null) {
- renderIds = new LinkedHashSet<String>();
- }
-
- return renderIds;
- } else {
- return wrappedViewContext.getRenderIds();
- }
- }
-
- @Override
- public boolean isAjaxRequest() {
- assertNotReleased();
-
- return wrappedViewContext.isAjaxRequest();
- }
-
- @Override
- public boolean isPartialRequest() {
- assertNotReleased();
-
- return wrappedViewContext.isPartialRequest();
- }
-
- @Override
- public void setPartialRequest(boolean isPartialRequest) {
- assertNotReleased();
-
- wrappedViewContext.setPartialRequest(isPartialRequest);
- }
-
- @Override
- public boolean isExecuteAll() {
- assertNotReleased();
-
- if (detectContextMode() == ContextMode.DIRECT) {
- return getExecuteIds().contains(ALL);
- } else {
- return wrappedViewContext.isExecuteAll();
- }
- }
-
- @Override
- public boolean isRenderAll() {
- assertNotReleased();
-
- if (detectContextMode() == ContextMode.DIRECT) {
- if (renderAll != null) {
- return renderAll.booleanValue();
- }
-
- return getRenderIds().contains(ALL);
- } else {
- return wrappedViewContext.isRenderAll();
- }
- }
-
- @Override
- public void setRenderAll(boolean isRenderAll) {
- assertNotReleased();
-
- if (detectContextMode() == ContextMode.DIRECT) {
- renderAll = isRenderAll;
- } else {
- wrappedViewContext.setRenderAll(isRenderAll);
- }
- }
-
- @Override
- public PartialResponseWriter getPartialResponseWriter() {
- return wrappedViewContext.getPartialResponseWriter();
- }
-
- private boolean isProcessedExecutePhase(PhaseId phaseId) {
- return phaseId == PhaseId.APPLY_REQUEST_VALUES || phaseId == PhaseId.PROCESS_VALIDATIONS
- || phaseId == PhaseId.UPDATE_MODEL_VALUES;
- }
-
- @Override
- public void processPartial(PhaseId phaseId) {
- if (detectContextMode() == ContextMode.DIRECT) {
- if (phaseId == PhaseId.RENDER_RESPONSE) {
- processPartialRenderPhase();
- } else if (isProcessedExecutePhase(phaseId)) {
- processPartialExecutePhase(phaseId);
- }
- } else {
- wrappedViewContext.processPartial(phaseId);
- }
- }
-
- protected void processPartialExecutePhase(PhaseId phaseId) {
- PartialViewContext pvc = facesContext.getPartialViewContext();
- Collection <String> executeIds = pvc.getExecuteIds();
-
- if (executeIds == null || executeIds.isEmpty()) {
- if (phaseId == PhaseId.APPLY_REQUEST_VALUES) {
- LOG.warn("Partial execute won't happen - executeIds were not specified");
- }
- return;
- }
-
- try {
- executeComponents(phaseId, executeIds);
- } catch (Exception e) {
- LOG.error(e.getMessage(), e);
- }
-
- if (phaseId == PhaseId.APPLY_REQUEST_VALUES) {
- //fix for MyFaces
- ExternalContext externalContext = facesContext.getExternalContext();
- externalContext.setResponseCharacterEncoding(externalContext.getRequestCharacterEncoding());
-
- PartialResponseWriter writer = pvc.getPartialResponseWriter();
- facesContext.setResponseWriter(writer);
- }
- }
-
- protected void executeComponents(PhaseId phaseId, Collection<String> executeIds) {
- EnumSet<VisitHint> hints = EnumSet.of(VisitHint.SKIP_UNRENDERED);
- VisitContext visitContext = new ExecuteExtendedVisitContext(facesContext, executeIds, hints);
- PartialViewExecuteVisitCallback callback = new PartialViewExecuteVisitCallback(facesContext, phaseId);
- facesContext.getViewRoot().visitTree(visitContext, callback);
- }
-
- protected void processPartialRenderPhase() {
- PartialViewContext pvc = facesContext.getPartialViewContext();
- UIViewRoot viewRoot = facesContext.getViewRoot();
- Collection<String> phaseIds = pvc.getRenderIds();
- visitActivatorAtRender(phaseIds);
-
- try {
- PartialResponseWriter writer = pvc.getPartialResponseWriter();
- ResponseWriter orig = facesContext.getResponseWriter();
- facesContext.getAttributes().put(ORIGINAL_WRITER, orig);
- facesContext.setResponseWriter(writer);
-
- ExternalContext exContext = facesContext.getExternalContext();
- exContext.setResponseContentType("text/xml");
- exContext.addResponseHeader("Cache-Control", "no-cache");
- writer.startDocument();
- if (isRenderAll()) {
- renderAll(facesContext, viewRoot);
- renderState(facesContext);
- writer.endDocument();
- return;
- }
-
- // Skip this processing if "none" is specified in the render list,
- // or there were no render phase client ids.
- if ((phaseIds != null && !phaseIds.isEmpty()) ||
- (!limitRender && PartialViewContextAjaxOutputTracker.hasNestedAjaxOutputs(viewRoot))) {
-
- EnumSet<VisitHint> hints = EnumSet.of(VisitHint.SKIP_UNRENDERED);
- VisitContext visitContext = new RenderExtendedVisitContext(facesContext, phaseIds, hints, limitRender);
- VisitCallback visitCallback = new RenderVisitCallback(facesContext);
- viewRoot.visitTree(visitContext, visitCallback);
- }
-
- renderState(facesContext);
-
- //TODO - render extensions for renderAll?
- renderExtensions(facesContext, viewRoot);
-
- writer.endDocument();
- } catch (IOException ex) {
- this.cleanupAfterView();
- //TODO - review?
- ex.printStackTrace();
- } catch (RuntimeException ex) {
- //TODO - review?
- this.cleanupAfterView();
- // Throw the exception
- throw ex;
- }
- }
-
- private void setupExecuteCallbackData(ExecuteComponentCallback callback) {
- executeIds.addAll(callback.getExecuteIds());
-
- setupRenderCallbackData(callback);
- }
-
- private void setupRenderCallbackData(RenderComponentCallback callback) {
- componentRenderIds = callback.getRenderIds();
- onbeforedomupdate = callback.getOnbeforedomupdate();
- oncomplete = callback.getOncomplete();
- responseData = callback.getData();
- limitRender = callback.isLimitRender();
- }
-
- private void visitActivatorAtExecute() {
- ExecuteComponentCallback callback = new ExecuteComponentCallback(facesContext, behaviorEvent);
-
- if (visitActivatorComponent(activatorComponentId, callback, EnumSet.of(VisitHint.SKIP_UNRENDERED))) {
- setupExecuteCallbackData(callback);
-
- if (!executeIds.contains(ALL)) {
- addImplicitExecuteIds(executeIds);
- }
- } else {
- //TODO - log or exception?
- //TODO - process default execute value
- }
- }
-
- private void visitActivatorAtRender(Collection<String> ids) {
- if (!isRenderAll()) {
- RenderComponentCallback callback = new RenderComponentCallback(facesContext, behaviorEvent);
-
- if (visitActivatorComponent(activatorComponentId, callback, EnumSet.noneOf(VisitHint.class))) {
- setupRenderCallbackData(callback);
- } else {
- //TODO - the same as for "execute"
- }
-
- //take collection value stored during execute
- if (componentRenderIds != null) {
- ids.addAll(componentRenderIds);
- }
-
- if (!Boolean.TRUE.equals(renderAll) && !ids.contains(ALL)) {
- addImplicitRenderIds(ids, limitRender);
-
- //TODO - review
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
- ajaxContext.setOnbeforedomupdate(onbeforedomupdate);
- ajaxContext.appendOncomplete(oncomplete);
- ajaxContext.setResponseData(responseData);
- }
- }
- }
-
- private void renderAll(FacesContext context, UIViewRoot viewRoot) throws IOException {
- // If this is a "render all via ajax" request,
- // make sure to wrap the entire page in a <render> elemnt
- // with the special id of VIEW_ROOT_ID. This is how the client
- // JavaScript knows how to replace the entire document with
- // this response.
- PartialViewContext pvc = context.getPartialViewContext();
- PartialResponseWriter writer = pvc.getPartialResponseWriter();
- writer.startUpdate(PartialResponseWriter.RENDER_ALL_MARKER);
-
- if (viewRoot.getChildCount() > 0) {
- for (UIComponent child : viewRoot.getChildren()) {
- child.encodeAll(context);
- }
- }
-
- writer.endUpdate();
- }
-
- private void renderState(FacesContext context) throws IOException {
- if (!context.getViewRoot().isTransient()) {
- // Get the view state and write it to the response..
- PartialViewContext pvc = context.getPartialViewContext();
- PartialResponseWriter writer = pvc.getPartialResponseWriter();
- writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
- String state = context.getApplication().getStateManager().getViewState(context);
- writer.write(state);
- writer.endUpdate();
- }
- }
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.context.PartialViewContext#release()
- */
- @Override
- public void release() {
- assertNotReleased();
-
- released = true;
-
- wrappedViewContext.release();
- wrappedViewContext = null;
-
- facesContext = null;
-
- renderAll = null;
- executeIds = null;
- renderIds = null;
-
- limitRender = false;
-
- activatorComponentId = null;
- behaviorEvent = null;
- contextMode = null;
- }
-
- protected void addImplicitExecuteIds(Collection<String> ids) {
- if (!ids.isEmpty()) {
- UIViewRoot root = facesContext.getViewRoot();
- if (root.getFacetCount() > 0) {
- if (root.getFacet(UIViewRoot.METADATA_FACET_NAME) != null) {
- //TODO nick - does ordering matter?
- ids.add(UIViewRoot.METADATA_FACET_NAME);
- //ids.add(0, UIViewRoot.METADATA_FACET_NAME);
- }
- }
- }
- }
-
- protected void addImplicitRenderIds(Collection<String> ids, boolean limitRender) {
- }
-
- protected void renderExtensions(FacesContext context, UIComponent component) throws IOException {
- // ADD deffered scripts
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance();
- ScriptsHolder scriptsHolder = ServiceTracker.getService(JavaScriptService.class).getScriptsHolder(context);
- for (Object script : scriptsHolder.getScripts()) {
- ajaxContext.appendOncomplete(ScriptUtils.toScript(script));
- }
- for (Object script : scriptsHolder.getPageReadyScripts()) {
- ajaxContext.appendOncomplete(ScriptUtils.toScript(script));
- }
- CoreAjaxRendererUtils.renderAjaxExtensions(context, component);
- }
-
- private void assertNotReleased() {
- if (released) {
- throw new IllegalStateException("PartialViewContext already released!");
- }
- }
-
- private boolean visitActivatorComponent(String componentActivatorId, VisitCallback visitCallback, Set<VisitHint> visitHints) {
-
- Set<String> idsToVisit = Collections.singleton(componentActivatorId);
- VisitContext visitContext = new ExecuteExtendedVisitContext(facesContext, idsToVisit, visitHints);
-
- boolean visitResult = facesContext.getViewRoot().visitTree(visitContext, visitCallback);
- return visitResult;
- }
-
- private void cleanupAfterView() {
- ResponseWriter orig = (ResponseWriter) facesContext.getAttributes().get(ORIGINAL_WRITER);
- assert null != orig;
- // move aside the PartialResponseWriter
- facesContext.setResponseWriter(orig);
- }
-
- protected ContextMode detectContextMode() {
- if (contextMode == null) {
- Map<String, String> requestParameterMap = facesContext.getExternalContext().getRequestParameterMap();
- activatorComponentId = requestParameterMap.get(AJAX_COMPONENT_ID_PARAMETER);
-
- if (activatorComponentId != null) {
- contextMode = ContextMode.DIRECT;
- behaviorEvent = requestParameterMap.get(BEHAVIOR_EVENT_PARAMETER);
- } else {
- contextMode = ContextMode.WRAPPED;
- }
- }
-
- return contextMode;
- }
-
- private static final class RenderVisitCallback implements VisitCallback {
-
- private FacesContext ctx;
-
- private RenderVisitCallback(FacesContext ctx) {
- this.ctx = ctx;
- }
-
- private void logException(Exception e) {
- if (LOG.isErrorEnabled()) {
- LOG.error(e.getMessage());
- }
- if (LOG.isDebugEnabled()) {
- LOG.debug(e.getMessage(), e);
- }
- }
-
- /* (non-Javadoc)
- * @see javax.faces.component.visit.VisitCallback#visit(javax.faces.component.visit.VisitContext, javax.faces.component.UIComponent)
- */
- public VisitResult visit(VisitContext context, UIComponent target) {
- String metaComponentId = (String) ctx.getAttributes().get(ExtendedVisitContext.META_COMPONENT_ID);
- if (metaComponentId != null) {
- MetaComponentEncoder encoder = (MetaComponentEncoder) target;
- try {
- encoder.encodeMetaComponent(ctx, metaComponentId);
- } catch (Exception e) {
- logException(e);
- }
- } else {
- PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();
-
- try {
- writer.startUpdate(target.getClientId(ctx));
- try {
- // do the default behavior...
- target.encodeAll(ctx);
- } catch (Exception ce) {
- logException(ce);
- }
-
- writer.endUpdate();
- } catch (IOException e) {
- logException(e);
- }
- }
-
- // Once we visit a component, there is no need to visit
- // its children, since processDecodes/Validators/Updates and
- // encodeAll() already traverse the subtree. We return
- // VisitResult.REJECT to supress the subtree visit.
- return VisitResult.REJECT;
- }
- }
-}
Modified: branches/RF-9323/core/impl/src/main/java/org/richfaces/util/Util.java
===================================================================
--- branches/RF-9323/core/impl/src/main/java/org/richfaces/util/Util.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/impl/src/main/java/org/richfaces/util/Util.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -624,9 +624,11 @@
public static Charset getCharsetFromContentType(String contentType) {
String charsetName = null;
- Matcher matcher = CHARSET_IN_CONTENT_TYPE_PATTERN.matcher(contentType);
- if (matcher.find()) {
- charsetName = matcher.group(1);
+ if (contentType != null) {
+ Matcher matcher = CHARSET_IN_CONTENT_TYPE_PATTERN.matcher(contentType);
+ if (matcher.find()) {
+ charsetName = matcher.group(1);
+ }
}
return Strings.isNullOrEmpty(charsetName) ? Charset.defaultCharset() : Charset.forName(charsetName);
Modified: branches/RF-9323/core/impl/src/main/resources/META-INF/components.faces-config.xml
===================================================================
--- branches/RF-9323/core/impl/src/main/resources/META-INF/components.faces-config.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/impl/src/main/resources/META-INF/components.faces-config.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -2,8 +2,8 @@
<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
<factory>
- <external-context-factory>org.richfaces.context.SkinningExternalContextFactory</external-context-factory>
- <partial-view-context-factory>org.richfaces.context.PartialViewContextFactoryImpl</partial-view-context-factory>
+ <external-context-factory>org.richfaces.context.SkinningExternalContextFactory</external-context-factory>
+ <partial-view-context-factory>org.richfaces.context.ExtendedPartialViewContextFactoryImpl</partial-view-context-factory>
</factory>
<application>
Modified: branches/RF-9323/core/impl/src/main/resources/META-INF/faces-config.xml
===================================================================
--- branches/RF-9323/core/impl/src/main/resources/META-INF/faces-config.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/impl/src/main/resources/META-INF/faces-config.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -33,11 +33,6 @@
<managed-bean-class>org.richfaces.skin.SkinBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
</managed-bean>
- <managed-bean>
- <managed-bean-name>ajaxContext</managed-bean-name>
- <managed-bean-class>org.ajax4jsf.context.AjaxContextImpl</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- </managed-bean>
<!-- component>
<component-type>javax.faces.ViewRoot</component-type>
Modified: branches/RF-9323/core/impl/src/main/resources/META-INF/resources/richfaces.js
===================================================================
--- branches/RF-9323/core/impl/src/main/resources/META-INF/resources/richfaces.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/core/impl/src/main/resources/META-INF/resources/richfaces.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -288,9 +288,9 @@
//
var pollTracker = {};
- richfaces.startPoll = function(options) {
+ richfaces.startPoll = function(options) {
var pollId = options.pollId;
- var interval = options.pollinterval;
+ var interval = options.interval || 1000;
var ontimer = options.ontimer;
richfaces.stopPoll(pollId);
Modified: branches/RF-9323/examples/core-demo/src/main/webapp/mediaOutput.xhtml
===================================================================
--- branches/RF-9323/examples/core-demo/src/main/webapp/mediaOutput.xhtml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/core-demo/src/main/webapp/mediaOutput.xhtml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -13,7 +13,7 @@
element="img" /><br />
<h:form>
<a4j:mediaOutput createContent="#{mediaOutputBean.createContent}" value="richfaces-twitter.jpg"
- element="img" >
+ element="img" cacheable="true" fileName="richfaces-twitter.jpg">
<f:ajax event="dblclick" listener="#{commandBean.listener}" />
</a4j:mediaOutput><br />
</h:form>
Modified: branches/RF-9323/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java
===================================================================
--- branches/RF-9323/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/input-demo/src/main/java/org/richfaces/demo/FileUploadBean.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -39,7 +39,7 @@
public class FileUploadBean {
private String acceptedTypes;
- private boolean enabled = true;
+ private boolean disabled = false;
private boolean noDuplicate = false;
private UploadedFile file;
@@ -55,12 +55,12 @@
file = event.getUploadedFile();
}
- public void setEnabled(boolean enabled) {
- this.enabled = enabled;
+ public void setDisabled(boolean disabled) {
+ this.disabled = disabled;
}
- public boolean isEnabled() {
- return enabled;
+ public boolean isDisabled() {
+ return disabled;
}
public void setNoDuplicate(boolean noDuplicate) {
Modified: branches/RF-9323/examples/input-demo/src/main/webapp/examples/calendar.xhtml
===================================================================
--- branches/RF-9323/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -72,6 +72,8 @@
style="width:200px;border:10px solid #000000"
styleClass="hello"
boundaryDatesMode = "scroll"
+ defaultLabel = "bla-bla-bla"
+ enableManualInput="false"
>
</calendar:calendar>
Modified: branches/RF-9323/examples/input-demo/src/main/webapp/examples/fileupload.xhtml
===================================================================
--- branches/RF-9323/examples/input-demo/src/main/webapp/examples/fileupload.xhtml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/input-demo/src/main/webapp/examples/fileupload.xhtml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -65,7 +65,7 @@
};
//-->
</script>
- <fu:fileUpload id="fu" acceptedTypes="#{fileUploadBean.acceptedTypes}" enabled="#{fileUploadBean.enabled}"
+ <fu:fileUpload id="fu" acceptedTypes="#{fileUploadBean.acceptedTypes}" disabled="#{fileUploadBean.disabled}"
fileUploadListener="#{fileUploadBean.listener}" noDuplicate="#{fileUploadBean.noDuplicate}"
onfilesubmit="onfilesubmit(event)" onuploadcomplete="onuploadcomplete(event)"/>
<h:outputText value="File name:" />
@@ -84,8 +84,8 @@
<f:ajax render="fu"/>
</h:inputText>
<br />
- <h:outputText value="Enabled: " />
- <h:selectBooleanCheckbox value="#{fileUploadBean.enabled}">
+ <h:outputText value="Disabled: " />
+ <h:selectBooleanCheckbox value="#{fileUploadBean.disabled}">
<f:ajax render="fu"/>
</h:selectBooleanCheckbox>
<br />
Modified: branches/RF-9323/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js
===================================================================
--- branches/RF-9323/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/input-demo/src/main/webapp/resources/tests/autocomplete-qunit.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -35,8 +35,8 @@
equals(c.name, "Autocomplete", "name");
equals(c.id, AUTOCOMPLETE_ID+'Default', "id");
// test default options
- equals(c.options.selectedItemClass, 'rf-au-sel', "options.selectedItemClass");
- equals(c.options.itemClass, 'rf-au-opt', "options.itemClass");
+ equals(c.options.selectedItemClass, 'rf-au-itm-sel', "options.selectedItemClass");
+ equals(c.options.itemClass, 'rf-au-itm', "options.itemClass");
equals(c.options.autofill, true, "options.autofill");
equals(c.options.minChars, 1, "options.minChars");
equals(c.options.selectFirst, true, "options.selectFirst");
Modified: branches/RF-9323/examples/output-demo/src/main/webapp/examples/tooltip.xhtml
===================================================================
--- branches/RF-9323/examples/output-demo/src/main/webapp/examples/tooltip.xhtml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/output-demo/src/main/webapp/examples/tooltip.xhtml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -28,7 +28,8 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:pn="http://richfaces.org/pn"
- xmlns:rich="http://richfaces.org/output">
+ xmlns:rich="http://richfaces.org/output"
+ xmlns:a4j="http://richfaces.org/a4j">
<body>
<ui:composition template="/templates/template.xhtml">
@@ -47,7 +48,7 @@
<p>Here you can see <b>default client-side</b> tool-tip</p>
<pn:tooltip id="tt1" styleClass="tooltip">
<span style="white-space: nowrap"> This tool-tip content was
- <strong>pre-rendered</strong> to the page.<br/>
+ <strong>pre-rendered</strong> to the page.\n
Also the tooltip following mouse by default </span>
</pn:tooltip>
</rich:panel>
@@ -58,7 +59,7 @@
<pn:tooltip followMouse="false" showDelay="1500"
styleClass="tooltip-custom-body">
<span style="white-space: nowrap"> This tool-tip content also
- <strong>pre-rendered</strong> to the page.<br/>
+ <strong>pre-rendered</strong> to the page.
</span>
</pn:tooltip>
</rich:panel>
@@ -95,13 +96,55 @@
<h:panelGrid columns="2">
<h:outputText style="white-space:nowrap"
value="tooltips requested:"/>
- <h:outputText value="#{tooltipData.tooltipCounter}"
+ <h:outputText value="#{tooltipBean.tooltipCounter}"
styleClass="tooltipData"/>
</h:panelGrid>
</pn:tooltip>
</rich:panel>
</h:form>
- </h:panelGrid>
+ </h:panelGrid>
+ <br /><br />
+ <h:form>
+ <rich:panel id="tooltip" styleClass="tooltip-text"
+ bodyClass="rich-laguna-panel-no-header">
+ <p>This tool-tip rendered on server <b>in separate request</b>.
+ </p>
+ <pn:tooltip styleClass="tooltip" layout="block"
+ jointPoint="#{tooltipBean.jointPoint}"
+ direction="#{tooltipBean.direction}"
+ horizontalOffset="#{tooltipBean.horizontalOffset}"
+ verticalOffset="#{tooltipBean.verticalOffset}">
+ Sample tooltip to test attributes:
+ <ul>
+ <li>jointPoint</li>
+ <li>direction</li>
+ <li>horizontalOffset</li>
+ <li>verticalOffset</li>
+ </ul>
+ </pn:tooltip>
+ </rich:panel>
+ <h:panelGrid columns="2">
+ <h:outputText value="Select joint point:" />
+ <h:selectOneMenu value="#{tooltipBean.jointPoint}">
+ <a4j:ajax execute="@form" event="change" render="tooltip @this" />
+ <f:selectItems value="#{tooltipBean.positioningValues}" var="v" itemLabel="#{v}" itemValue="#{v}"/>
+ </h:selectOneMenu>
+ <h:outputText value="Select direction:" />
+ <h:selectOneMenu value="#{tooltipBean.direction}">
+ <f:ajax execute="@form" event="change" render="tooltip @this" />
+ <f:selectItems value="#{tooltipBean.positioningValues}" var="v" itemLabel="#{v}" itemValue="#{v}"/>
+ </h:selectOneMenu>
+ <h:outputText value="Horisontal offset:" />
+ <h:inputText value="#{tooltipBean.horizontalOffset}">
+ <a4j:ajax execute="@form" event="change" render="tooltip @this" />
+ </h:inputText>
+ <h:outputText value="Vertical offset:" />
+ <h:inputText value="#{tooltipBean.verticalOffset}">
+ <f:ajax execute="@form" event="change" render="tooltip @this" />
+ </h:inputText>
+ </h:panelGrid>
+ <a4j:outputPanel ajaxRendered="true"><h:messages></h:messages></a4j:outputPanel>
+ </h:form>
</ui:define>
</ui:composition>
</body>
Modified: branches/RF-9323/examples/output-demo/src/main/webapp/qunit/tooltip.xhtml
===================================================================
--- branches/RF-9323/examples/output-demo/src/main/webapp/qunit/tooltip.xhtml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/output-demo/src/main/webapp/qunit/tooltip.xhtml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -49,7 +49,7 @@
<div id="myRectangle" style="border: 2px solid red; background-color: #adff2f; width:300px; height:300px">
Tooltip apeared under green rectangle.
- <pn:tooltip id="tooltip" target="myRectangle" mode="ajax" showDelay="500">
+ <pn:tooltip id="tooltip" target="myRectangle" mode="client" showDelay="500">
New Tooltip Yo!!!
</pn:tooltip>
</div>
@@ -63,7 +63,7 @@
<div id="testDiv" style="margin-top:10px; border:1px solid #a0a0a0">Main Test Div</div>
</div>
- <!--<h:outputScript name="tests/richfaces-tooltip-qunit.js" />-->
+ <h:outputScript name="tests/richfaces-tooltip-qunit.js" />
</ui:define>
</ui:composition>
</body>
Modified: branches/RF-9323/examples/output-demo/src/main/webapp/resources/tests/richfaces-tooltip-qunit.js
===================================================================
--- branches/RF-9323/examples/output-demo/src/main/webapp/resources/tests/richfaces-tooltip-qunit.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/output-demo/src/main/webapp/resources/tests/richfaces-tooltip-qunit.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -43,15 +43,15 @@
equals(c.id, TOOLTIP_ID, "id");
// test default options
- same(c.options.direction, RichFaces.ui.TooltipDirection.DEFAULT, "Direction");
+ same(c.options.direction, "AA", "Direction");
same(c.options.attached, true, "Attached");
- same(c.options.offset, {}, "Offset");
+ same(c.options.offset, [10,10], "Offset");
same(c.options.mode, RichFaces.ui.TooltipMode.DEFAULT, "Mode");
same(c.options.disabled, false, "Disabled");
same(c.options.hideDelay, 0, "Hide Delay");
- same(c.options.hideEvent, "leave", "Hide Event");
- same(c.options.showDelay, 0, "Show Delay");
- same(c.options.showEvent, "enter", "Show Event");
+ same(c.options.hideEvent, "mouseleave", "Hide Event");
+ same(c.options.showDelay, 500, "Show Delay");
+ same(c.options.showEvent, "mouseenter", "Show Event");
same(c.options.followMouse, true, "Follow Mouse");
});
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/message.xhtml
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/message.xhtml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/message.xhtml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -20,7 +20,7 @@
<composite:implementation>
<h:outputStylesheet library="org.richfaces.showcase" name="message.css" />
- <a4j:outputPanel ajaxRendered="true" layout="none">
+ <a4j:outputPanel ajaxRendered="true">
<h:message for="#{cc.attrs.for}" showDetail="#{cc.attrs.showDetails}"
showSummary="#{cc.attrs.showSummary}" style="#{cc.attrs.style}"
styleClass="rich-message #{cc.attrs.styleClass}" />
Modified: branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/messages.xhtml
===================================================================
--- branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/messages.xhtml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/examples/richfaces-showcase/src/main/webapp/resources/org.richfaces.showcase/messages.xhtml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -19,7 +19,7 @@
<composite:implementation>
<h:outputStylesheet library="org.richfaces.showcase" name="messages.css" />
- <a4j:outputPanel ajaxRendered="true" layout="none">
+ <a4j:outputPanel ajaxRendered="true">
<h:messages layout="#{cc.attrs.layout}"
showSummary="true" style="color:red; #{cc.attrs.style}"
styleClass="rich-message #{cc.attrs.styleClass}" />
Copied: branches/RF-9323/ui/common/api/src/main/java/org/richfaces/component/Positioning.java (from rev 20842, trunk/ui/common/api/src/main/java/org/richfaces/component/Positioning.java)
===================================================================
--- branches/RF-9323/ui/common/api/src/main/java/org/richfaces/component/Positioning.java (rev 0)
+++ branches/RF-9323/ui/common/api/src/main/java/org/richfaces/component/Positioning.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,29 @@
+package org.richfaces.component;
+
+/**
+ * @author amarkhel
+ */
+public enum Positioning {
+ auto("AA"),
+ topLeft("LT"),
+ topRight("RT"),
+ bottomLeft("LB"),
+ bottomRight("RB"),
+
+ autoLeft("LA"),
+ autoRight("RA"),
+ topAuto("AT"),
+ bottomAuto("AB");
+
+ public static final Positioning DEFAULT = auto;
+
+ String value;
+
+ Positioning(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+}
Modified: branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java
===================================================================
--- branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/AjaxRendererUtils.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -28,7 +28,6 @@
import javax.faces.context.FacesContext;
import org.ajax4jsf.component.AjaxClientBehavior;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.renderkit.AjaxConstants;
@@ -591,25 +590,4 @@
return (String) component.getAttributes().get(ONBEGIN_ATTR_NAME);
}
- protected static String getAjaxActionUrl(FacesContext facesContext) {
- return AjaxContext.getCurrentInstance(facesContext).getAjaxActionURL(facesContext);
- }
-
- /**
- * @param facesContext
- * @return
- */
- public static boolean isAjaxRequest(FacesContext facesContext) {
- return AjaxContext.getCurrentInstance(facesContext).isAjaxRequest();
- }
-
- /**
- * @param facesContext
- * @param component
- */
- public static void addRegionsFromComponent(UIComponent component, FacesContext facesContext) {
- AjaxContext.getCurrentInstance(facesContext).addRegionsFromComponent(component);
- }
-
-
}
Modified: branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/RendererUtils.java
===================================================================
--- branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/RendererUtils.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/common/ui/src/main/java/org/richfaces/renderkit/util/RendererUtils.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -146,6 +146,33 @@
}
}
+ /**
+ * Returns value of the parameter. If parameter is instance of
+ * <code>JavaScriptParameter</code>, <code>NoEcape</code> attribute is applied.
+ * @param parameter instance of <code>UIParameter</code>
+ * @return <code>Object</code> parameter value
+ */
+ public Object createParameterValue(UIParameter parameter) {
+ Object value = parameter.getValue();
+ boolean escape = true;
+
+ if (parameter instanceof JavaScriptParameter) {
+ JavaScriptParameter actionParam = (JavaScriptParameter) parameter;
+
+ escape = !actionParam.isNoEscape();
+ }
+
+ if (escape) {
+ if (value == null) {
+ value = "";
+ }
+ } else {
+ value = new JSReference(value.toString());
+ }
+
+ return value;
+ }
+
public Map<String, Object> createParametersMap(FacesContext context, UIComponent component) {
Map<String, Object> parameters = new LinkedHashMap<String, Object>();
@@ -154,33 +181,12 @@
if (child instanceof UIParameter) {
UIParameter parameter = (UIParameter) child;
String name = parameter.getName();
- Object value = parameter.getValue();
+ Object value = createParameterValue(parameter);
if (null == name) {
throw new IllegalArgumentException(Messages.getMessage(Messages.UNNAMED_PARAMETER_ERROR,
component.getClientId(context)));
}
-
- boolean escape = true;
-
- if (child instanceof JavaScriptParameter) {
- JavaScriptParameter actionParam = (JavaScriptParameter) child;
-
- escape = !actionParam.isNoEscape();
- }
-
- if (escape) {
- if (value == null) {
- value = "";
- }
- } else {
- value = new JSReference(value.toString());
-
- // if(it.hasNext()){onEvent.append(',');};
- // renderAjaxLinkParameter( name,
- // value, onClick, jsForm, nestingForm);
- }
-
parameters.put(name, value);
}
}
Modified: branches/RF-9323/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js
===================================================================
--- branches/RF-9323/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/common/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -25,15 +25,17 @@
rf.ui = rf.ui || {};
rf.ui.Popup = function(id, options) {
- this.id = id;
+ $super.constructor.call(this, id);
+ this.options = $.extend({}, defaultOptions, options);
+ this.positionOptions = {type: this.options.positionType, from:this.options.jointPoint, to:this.options.direction, offset: this.options.positionOffset};
+
this.popup = $(document.getElementById(id));
- var mergedOptions = $.extend({}, defaultOptions, options);
- this.visible = mergedOptions.visible;
- this.attachTo = mergedOptions.attachTo;
- this.attachToBody = mergedOptions.attachToBody;
- this.positionType = mergedOptions.positionType;
- this.positionOffset = mergedOptions.positionOffset;
+ this.visible = this.options.visible;
+ this.attachTo = this.options.attachTo;
+ this.attachToBody = this.options.attachToBody;
+ this.positionType = this.options.positionType;
+ this.positionOffset = this.options.positionOffset;
};
rf.BaseComponent.extend(rf.ui.Popup);
@@ -56,7 +58,7 @@
this.visible = true;
}
- this.popup.setPosition(event || {id: this.attachTo}, {type: this.positionType , offset: this.positionOffset}).show();
+ this.popup.setPosition(event || {id: this.attachTo}, this.positionOptions).show();
},
hide: function() {
Copied: branches/RF-9323/ui/core/api/src/main/java/org/richfaces/component/OutputPanelLayout.java (from rev 20842, trunk/ui/core/api/src/main/java/org/richfaces/component/OutputPanelLayout.java)
===================================================================
--- branches/RF-9323/ui/core/api/src/main/java/org/richfaces/component/OutputPanelLayout.java (rev 0)
+++ branches/RF-9323/ui/core/api/src/main/java/org/richfaces/component/OutputPanelLayout.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.component;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public enum OutputPanelLayout {
+
+ inline, block;
+
+ public static final OutputPanelLayout DEFAULT = inline;
+
+}
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractAjaxLog.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -52,16 +52,16 @@
public static final String COMPONENT_FAMILY = "org.richfaces.AjaxLog";
- @Attribute(defaultValue = "")
+ @Attribute
public abstract String getStyle();
- @Attribute(defaultValue = "")
+ @Attribute
public abstract String getLevel();
- @Attribute(defaultValue = "")
+ @Attribute
public abstract String getStyleClass();
- @Attribute(defaultValue = "LogMode.DEFAULT")
+ @Attribute
public abstract LogMode getMode();
// public abstract String getHotkey();
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractMediaOutput.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractMediaOutput.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractMediaOutput.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -164,6 +164,9 @@
@Attribute
public abstract String getVspace();
+ @Attribute
+ public abstract String getFileName();
+
@Attribute(events = @EventName("blur"))
public abstract String getOnblur();
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractOutputPanel.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractOutputPanel.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractOutputPanel.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -51,8 +51,8 @@
@Attribute
public abstract boolean isKeepTransient();
- @Attribute(defaultValue = "inline")
- public abstract String getLayout();
+ @Attribute
+ public abstract OutputPanelLayout getLayout();
@Attribute(events = @EventName("click"))
public abstract String getOnclick();
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/component/AbstractPoll.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -61,7 +61,7 @@
public static final String ON_BEFOREDOMUPDATE = "onbeforedomupdate";
- @Attribute(defaultValue = "1000")
+ @Attribute
public abstract int getInterval();
@Attribute(defaultValue = "true")
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/LogRendererBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -31,7 +31,7 @@
protected boolean isInline(Object attributeValue) {
LogMode mode = (LogMode) attributeValue;
- return mode == LogMode.inline;
+ return mode == null || mode == LogMode.inline;
}
}
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxOutputPanelRenderer.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxOutputPanelRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxOutputPanelRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -23,15 +23,14 @@
import java.io.IOException;
import java.util.Iterator;
-import java.util.Set;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.context.AjaxContext;
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.component.AbstractOutputPanel;
+import org.richfaces.component.OutputPanelLayout;
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.RendererBase;
@@ -46,7 +45,7 @@
private boolean hasNoneLayout(UIComponent component) {
//TODO - A1 won't support 'none' layout
- return false; //"none".equals(component.getAttributes().get("layout"));
+ return false;
}
/* (non-Javadoc)
@@ -56,33 +55,7 @@
@Override
public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
//
- AbstractOutputPanel panel = (AbstractOutputPanel) component;
- if (hasNoneLayout(panel)) {
- if (component.getChildCount() > 0) {
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- boolean ajaxRequest = ajaxContext.isAjaxRequest();
- Set<String> ajaxRenderedAreas = ajaxContext.getAjaxRenderedAreas();
- for (UIComponent child : component.getChildren()) {
- String childId = child.getClientId(context);
- if (child.isRendered()) {
- child.encodeAll(context);
- } else {
- // Render "dummy" span.
- ResponseWriter out = context.getResponseWriter();
- out.startElement(HtmlConstants.SPAN_ELEM, child);
- out.writeAttribute(HtmlConstants.ID_ATTRIBUTE, childId, HtmlConstants.ID_ATTRIBUTE);
- out.writeAttribute(HtmlConstants.STYLE_ATTRIBUTE, "display: none;", "style");
- out.endElement(HtmlConstants.SPAN_ELEM);
- }
- // register child as rendered
- if (ajaxRequest && null != ajaxRenderedAreas) {
- ajaxRenderedAreas.add(childId);
- }
- }
- }
- } else {
- renderChildren(context, component);
- }
+ renderChildren(context, component);
}
/* (non-Javadoc)
@@ -124,7 +97,7 @@
*/
private String getTag(AbstractOutputPanel panel) {
Object layout = panel.getAttributes().get("layout");
- return "block".equals(layout) ? HtmlConstants.DIV_ELEM : HtmlConstants.SPAN_ELEM;
+ return OutputPanelLayout.block.equals(layout) ? HtmlConstants.DIV_ELEM : HtmlConstants.SPAN_ELEM;
}
/* (non-Javadoc)
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/renderkit/html/AjaxPollRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -38,6 +38,7 @@
import org.richfaces.cdk.annotations.JsfRenderer;
import org.richfaces.component.AbstractPoll;
import org.richfaces.renderkit.HtmlConstants;
+import org.richfaces.renderkit.RenderKitUtils;
import org.richfaces.renderkit.RendererBase;
import org.richfaces.renderkit.util.HandlersChain;
@@ -89,9 +90,9 @@
if (poll.isEnabled()) {
JSFunction function = new JSFunction(AJAX_POLL_FUNCTION);
Map<String, Object> options = new HashMap<String, Object>();
- Integer interval = new Integer(poll.getInterval());
- options.put("pollinterval", interval);
- options.put("pollId", component.getClientId(context));
+
+ RenderKitUtils.addToScriptHash(options, "interval", poll.getInterval(), "1000");
+ RenderKitUtils.addToScriptHash(options, "pollId", component.getClientId(context));
HandlersChain handlersChain = new HandlersChain(context, poll);
handlersChain.addInlineHandlerFromAttribute(AbstractPoll.ON_TIMER);
handlersChain.addBehaviors(AbstractPoll.TIMER);
Modified: branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/resource/MediaOutputResource.java
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/resource/MediaOutputResource.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/java/org/richfaces/resource/MediaOutputResource.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -26,6 +26,8 @@
import java.io.IOException;
import java.io.OutputStream;
import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
import javax.el.MethodExpression;
import javax.el.ValueExpression;
@@ -36,6 +38,8 @@
import org.richfaces.component.AbstractMediaOutput;
+import com.google.common.base.Strings;
+
/**
* @author Nick Belaevski
* @since 4.0
@@ -60,6 +64,8 @@
private ValueExpression timeToLiveExpression;
private Object userData;
+ private String fileName;
+
public void encode(FacesContext facesContext) throws IOException {
OutputStream outStream = facesContext.getExternalContext().getResponseOutputStream();
contentProducer.invoke(facesContext.getELContext(), new Object[] {outStream, userData});
@@ -74,13 +80,14 @@
}
public Object saveState(FacesContext context) {
- Object[] state = new Object[4];
+ Object[] state = new Object[5];
// parent fields state saving
state[0] = isCacheable(context) ? Boolean.TRUE : Boolean.FALSE;
state[1] = getContentType();
state[2] = UIComponentBase.saveAttachedState(context, userData);
state[3] = UIComponentBase.saveAttachedState(context, contentProducer);
+ state[4] = fileName;
return state;
}
@@ -92,6 +99,7 @@
setContentType((String) state[1]);
userData = UIComponentBase.restoreAttachedState(context, state[2]);
contentProducer = (MethodExpression) UIComponentBase.restoreAttachedState(context, state[3]);
+ fileName = (String) state[4];
}
/**
@@ -109,6 +117,7 @@
this.lastModifiedExpression = uiMediaOutput.getValueExpression("lastModfied");
this.expiresExpression = uiMediaOutput.getValueExpression("expires");
this.timeToLiveExpression = uiMediaOutput.getValueExpression("timeToLive");
+ this.fileName = uiMediaOutput.getFileName();
}
public boolean isCacheable(FacesContext context) {
@@ -139,4 +148,14 @@
this.contentType = contentType;
}
+ @Override
+ public Map<String, String> getResponseHeaders() {
+ Map<String, String> headers = new HashMap<String, String>(2);
+
+ if (!Strings.isNullOrEmpty(fileName)) {
+ headers.put("Content-Disposition", "inline; filename=\"" + fileName + "\"");
+ }
+
+ return headers;
+ }
}
Modified: branches/RF-9323/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/resources/META-INF/resources/org.richfaces/log.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -173,6 +173,8 @@
this.attachToDom();
richfaces.setLog(this);
+ options = options || {};
+
this.level = options.level;
this.hotkey = options.hotkey;
this.mode = (options.mode || 'inline');
Modified: branches/RF-9323/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/log.template.xml
===================================================================
--- branches/RF-9323/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/log.template.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/core/ui/src/main/templates/org/ajax4jsf/renderkit/html/log.template.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -9,17 +9,20 @@
<cdk:superclass>org.richfaces.renderkit.LogRendererBase</cdk:superclass>
<cdk:component-family>org.richfaces.AjaxLog</cdk:component-family>
<cdk:renderer-type>org.richfaces.AjaxLogRenderer</cdk:renderer-type>
+
+ <cdk:import package="org.richfaces.component" names="LogMode" />
</cc:interface>
<cc:implementation>
- <div id="richfaces.log" class="rf-log #{isInline(component.attributes['mode']) ? 'rf-log-inline' : 'rf-log-popup rf-log-popup-cnt'} #{component.attributes['styleClass']}">
+ <div id="richfaces.log" class="#{concatClasses('rf-log', isInline(component.attributes['mode']) ? 'rf-log-inline' : 'rf-log-popup rf-log-popup-cnt', component.attributes['styleClass'])}"
+ cdk:passThroughWithExclusions="">
+ <cdk:scriptObject name="options">
+ <cdk:scriptOption attributes="level hotkey" />
+ <cdk:scriptOption attributes="mode" defaultValue="LogMode.DEFAULT" />
+ <!-- TODO: pass styleClass in -->
+ </cdk:scriptObject>
<script type="text/javascript">
- new RichFaces.HtmlLog({
- level: "#{component.attributes['level']}",
- hotkey: "#{component.attributes['hotkey']}",
- mode: "#{component.attributes['mode']}"
- /* TODO: pass styleClass in */
- });
+ new RichFaces.HtmlLog(#{toScriptArgs(options)});
</script>
</div>
</cc:implementation>
Modified: branches/RF-9323/ui/input/ui/src/main/config/faces-config.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/config/faces-config.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/config/faces-config.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -236,7 +236,7 @@
</property>
<component-extension>
<cdk:generate>true</cdk:generate>
- <cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
+ <cdk:base-class>org.richfaces.component.UIInputNumber</cdk:base-class>
<cdk:component-family>javax.faces.Input</cdk:component-family>
<cdk:renderer-type>org.richfaces.InputNumberSliderRenderer</cdk:renderer-type>
<cdk:tag>
@@ -534,7 +534,7 @@
</property>
<component-extension>
<cdk:generate>true</cdk:generate>
- <cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
+ <cdk:base-class>org.richfaces.component.UIInputNumber</cdk:base-class>
<cdk:component-family>javax.faces.Input</cdk:component-family>
<cdk:renderer-type>org.richfaces.InputNumberSpinnerRenderer</cdk:renderer-type>
<cdk:tag>
Modified: branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -43,8 +43,6 @@
import javax.faces.component.visit.VisitResult;
import javax.faces.context.FacesContext;
import javax.faces.convert.DateTimeConverter;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
import org.richfaces.cdk.annotations.Attribute;
@@ -88,13 +86,15 @@
protected enum PropertyKeys {
locale
- };
+ }
public enum Modes {
- CLIENT,
- AJAX
- }
+ client,
+ ajax
+ }
+ private Object submittedCurrentDate = null;
+
@Attribute(defaultValue = "MMM d, yyyy")
public abstract String getDatePattern();
@@ -165,7 +165,10 @@
public abstract int getZindex();
@Attribute(defaultValue = "client")
- public abstract String getMode();
+ public abstract String getMode();
+
+ @Attribute
+ public abstract String getDefaultLabel();
@Attribute
public abstract String getStyle();
@@ -311,7 +314,6 @@
@Attribute(events = @EventName("clean"))
public abstract String getOnclean();
-
@Attribute
public Object getLocale() {
@@ -330,8 +332,49 @@
getStateHelper().put(PropertyKeys.locale, locale);
}
+ public Object getSubmittedCurrentDate() {
+ return submittedCurrentDate;
+ }
+
+ public void setSubmittedCurrentDate(Object submittedCurrentDate) {
+ this.submittedCurrentDate = submittedCurrentDate;
+ }
+
+ @Override
+ public void validate(FacesContext context) {
+ super.validate(context);
+
+ try {
+ // we should use datePattern attribute-based converter only for
+ // selectedDate
+ // current date string always has predefined format: m/y
+ String submittedCurrentDateString = (String) this.getSubmittedCurrentDate();
+ Date currentDate = CalendarHelper.getAsDate(context, this, getCurrentDate());
+ Date submittedCurrentDate = CalendarHelper.convertCurrentDate(submittedCurrentDateString);
+
+ if (!submittedCurrentDate.equals(currentDate)) {
+ updateCurrentDate(context, submittedCurrentDate);
+ }
+
+ CurrentDateChangeEvent currentDateChangeEvent = new CurrentDateChangeEvent(this, submittedCurrentDateString);
+ currentDateChangeEvent.setCurrentDate(submittedCurrentDate);
+ currentDateChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ queueEvent(currentDateChangeEvent);
+
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.debug(" currentDate convertion fails with following exception: " + e.toString(), e);
+ }
+ setValid(false);
+ String messageString = e.toString();
+ FacesMessage message = new FacesMessage(messageString);
+ message.setSeverity(FacesMessage.SEVERITY_ERROR);
+ context.addMessage(getClientId(context), message);
+ context.renderResponse();
+ }
+
+ }
-
public void updateCurrentDate(FacesContext facesContext, Object currentDate) {
if (facesContext == null) {
throw new NullPointerException();
@@ -435,48 +478,6 @@
}
}
}
-
- public void broadcast(FacesEvent event) throws AbortProcessingException {
- if (event instanceof CurrentDateChangeEvent) {
- FacesContext facesContext = getFacesContext();
- CurrentDateChangeEvent currentDateChangeEvent = (CurrentDateChangeEvent) event;
- String currentDateString = currentDateChangeEvent.getCurrentDateString();
-
- try {
- // we should use datePattern attribute-based converter only for
- // selectedDate
- // current date string always has predefined format: m/y
- Date currentDate = CalendarHelper.getAsDate(facesContext, this, getCurrentDate());
- Date submittedCurrentDate = CalendarHelper.convertCurrentDate(currentDateString);
- currentDateChangeEvent.setCurrentDate(submittedCurrentDate);
-
- if (!submittedCurrentDate.equals(currentDate)) {
- updateCurrentDate(facesContext, submittedCurrentDate);
- }
-
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.debug(" currentDate convertion fails with following exception: " + e.toString(), e);
- }
- setValid(false);
- String messageString = e.toString();
- FacesMessage message = new FacesMessage(messageString);
- message.setSeverity(FacesMessage.SEVERITY_ERROR);
- facesContext.addMessage(getClientId(facesContext), message);
- facesContext.renderResponse();
- }
- }
-
- super.broadcast(event);
- }
-
- @Override
- public void queueEvent(FacesEvent event) {
- super.queueEvent(event);
- if (event instanceof CurrentDateChangeEvent) {
- event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
- }
- }
public String resolveClientId(FacesContext facesContext, UIComponent contextComponent, String metaComponentId) {
if (DAYSDATA_META_COMPONENT_ID.equals(metaComponentId)) {
@@ -591,7 +592,7 @@
Date dateRangeBegin = null;
Date dateRangeEnd = null;
- if (Modes.AJAX.toString().equalsIgnoreCase(getMode())) {
+ if (Modes.ajax.toString().equalsIgnoreCase(getMode())) {
dateRangeBegin = CalendarHelper.getAsDate(facesContext, this,
getDefaultPreloadBegin((Date) getCurrentDateOrDefault()));
dateRangeEnd = CalendarHelper.getAsDate(facesContext, this,
Modified: branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/AbstractFileUpload.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -53,8 +53,8 @@
@Attribute
public abstract String getAcceptedTypes();
- @Attribute(defaultValue = "true")
- public abstract boolean isEnabled();
+ @Attribute(defaultValue = "false")
+ public abstract boolean isDisabled();
@Attribute(defaultValue = "false")
public abstract boolean isNoDuplicate();
Copied: branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java (from rev 20842, trunk/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java)
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java (rev 0)
+++ branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.richfaces.component;
+
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.DoubleRangeValidator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class UIInputNumber extends UIInput {
+
+ @Override
+ protected void validateValue(FacesContext context, Object newValue) {
+ Map<String, Object> attributes = getAttributes();
+ DoubleRangeValidator validator = new DoubleRangeValidator(doubleValue(attributes.get("maxValue")),
+ doubleValue(attributes.get("minValue"))) {
+ @Override
+ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ super.validate(context, component, UIInputNumber.this.getSubmittedValue());
+ }
+ };
+ addValidator(validator);
+ super.validateValue(context, newValue);
+ removeValidator(validator);
+ }
+
+ private static double doubleValue(Object value) {
+ if (value instanceof Number) {
+ return ((Number) value).doubleValue();
+ } else {
+ return Double.parseDouble(value.toString());
+ }
+ }
+
+}
Modified: branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/AutocompleteRendererBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -29,7 +29,9 @@
import java.util.Map;
import javax.el.ELException;
+import javax.el.ExpressionFactory;
import javax.el.MethodExpression;
+import javax.el.MethodNotFoundException;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
@@ -44,13 +46,15 @@
import javax.faces.model.ResultSetDataModel;
import javax.servlet.jsp.jstl.sql.Result;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSObject;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractAutocomplete;
import org.richfaces.component.AutocompleteLayout;
import org.richfaces.component.MetaComponentResolver;
import org.richfaces.component.util.InputUtils;
+import org.richfaces.context.ExtendedPartialViewContext;
+import org.richfaces.log.Logger;
+import org.richfaces.log.RichfacesLogger;
/**
* @author Nick Belaevski
@@ -67,6 +71,8 @@
})
public abstract class AutocompleteRendererBase extends InputRendererBase implements MetaComponentRenderer {
+ private static final Logger LOGGER = RichfacesLogger.RENDERKIT.getLogger();
+
public JSReference getClientFilterFunction(UIComponent component) {
AbstractAutocomplete autocomplete = (AbstractAutocomplete) component;
String clientFilter = (String) autocomplete.getAttributes().get("clientFilterFunction");
@@ -88,22 +94,19 @@
Map<String, String> requestParameters = facesContext.getExternalContext().getRequestParameterMap();
String value = requestParameters.get(component.getClientId(facesContext) + "Value");
try {
- // String value = getInputValue(facesContext, component);
-
- itemsObject = autocompleteMethod.invoke(facesContext.getELContext(), new Object[]{facesContext,
- component, value});
- } catch (ELException e) {
try {
- autocompleteMethod = facesContext
- .getApplication()
- .getExpressionFactory()
- .createMethodExpression(facesContext.getELContext(), autocompleteMethod.getExpressionString(),
- Void.class, new Class[]{String.class});
+ // String value = getInputValue(facesContext, component);
+ itemsObject = autocompleteMethod.invoke(facesContext.getELContext(), new Object[]{facesContext,
+ component, value});
+ } catch (MethodNotFoundException e) {
+ ExpressionFactory expressionFactory = facesContext.getApplication().getExpressionFactory();
+ autocompleteMethod = expressionFactory.createMethodExpression(facesContext.getELContext(),
+ autocompleteMethod.getExpressionString(),
+ Object.class, new Class[]{String.class});
itemsObject = autocompleteMethod.invoke(facesContext.getELContext(), new Object[]{value});
- } catch (ELException ee) {
- ee.printStackTrace();
}
-
+ } catch (ELException ee) {
+ LOGGER.error(ee.getMessage(), ee);
}
} else {
itemsObject = component.getAutocompleteList();
@@ -293,7 +296,7 @@
partialWriter.endUpdate();
if (!fetchValues.isEmpty()) {
- Map<String, Object> dataMap = AjaxContext.getCurrentInstance(context).getResponseComponentDataMap();
+ Map<String, Object> dataMap = ExtendedPartialViewContext.getInstance(context).getResponseComponentDataMap();
dataMap.put(component.getClientId(context), fetchValues);
}
} else {
Modified: branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -45,7 +45,6 @@
import javax.faces.convert.ConverterException;
import javax.faces.convert.DateTimeConverter;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractCalendar;
@@ -53,7 +52,7 @@
import org.richfaces.component.util.HtmlUtil;
import org.richfaces.component.util.MessageUtil;
import org.richfaces.component.util.SelectUtils;
-import org.richfaces.event.CurrentDateChangeEvent;
+import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.utils.CalendarHelper;
/**
@@ -164,9 +163,7 @@
String clientId = calendar.getClientId(context);
String currentDateString = (String) requestParameterMap.get(clientId + CURRENT_DATE_INPUT);
- if (currentDateString != null) {
- calendar.queueEvent(new CurrentDateChangeEvent(calendar, currentDateString));
- }
+ calendar.setSubmittedCurrentDate(currentDateString);
String selectedDateString = (String) requestParameterMap.get(clientId + "InputDate");
if (selectedDateString != null) {
@@ -178,8 +175,6 @@
pvc.getRenderIds().add(
component.getClientId(context) + MetaComponentResolver.META_COMPONENT_SEPARATOR_CHAR
+ AbstractCalendar.DAYSDATA_META_COMPONENT_ID);
-
- context.renderResponse();
}
}
@@ -558,7 +553,7 @@
if (AbstractCalendar.DAYSDATA_META_COMPONENT_ID.equals(metaComponentId)) {
Object preload = ((AbstractCalendar) component).getPreload();
if (preload != null) {
- Map<String, Object> dataMap = AjaxContext.getCurrentInstance(context).getResponseComponentDataMap();
+ Map<String, Object> dataMap = ExtendedPartialViewContext.getInstance(context).getResponseComponentDataMap();
dataMap.put(component.getClientId(context), preload);
}
} else {
@@ -568,5 +563,5 @@
public void decodeMetaComponent(FacesContext context, UIComponent component, String metaComponentId) {
throw new UnsupportedOperationException();
- }
+ }
}
\ No newline at end of file
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/Autocomplete.ecss 2010-12-29 22:21:20 UTC (rev 20843)
@@ -36,15 +36,20 @@
position: absolute;
top: 0px;
right: 0px;
- height: 200px;
- padding-top: 1px
+ height: 15px;
+ padding-top: 1px;
+ cursor: pointer;
}
+.rf-au-btn-dis{
+ background-color: '#{richSkin.headerBackgroundColor}';
+ cursor: default;
+}
+
.rf-au-btn-arrow{
background-position: center;
background-repeat: no-repeat;
background-image: "url(#{resource['org.richfaces:combo_down_button.gif']})";
- cursor: pointer;
width: 15px;
height: 15px;
}
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,11 +1,11 @@
-.rf-ca-extr{
+.rf-cal-extr{
border : 1px solid;
border-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-btn{
+.rf-cal-btn{
cursor : pointer;
}
-.rf-ca-hdr-optnl{
+.rf-cal-hdr-optnl{
border-bottom : 1px solid;
border-bottom-color : '#{richSkin.panelBorderColor}';
background-color : '#{richSkin.additionalBackgroundColor}';
@@ -16,7 +16,7 @@
font-weight: bold;
}
-.rf-ca-hdr{
+.rf-cal-hdr{
border-right : 0px solid;
border-bottom : 1px solid;
border-bottom-color : '#{richSkin.panelBorderColor}';
@@ -25,16 +25,16 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-ca-c-size{
+.rf-cal-c-cnt-overflow{
width : 25px;
height : 22px;
}
-.rf-ca-c-div{
+.rf-cal-c-cnt{
overflow: hidden;
}
-.rf-ca-c{
+.rf-cal-c{
border-bottom : 1px solid;
border-right : 1px solid;
padding : 0px;
@@ -47,7 +47,7 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-ca-month{
+.rf-cal-hdr-month{
vertical-align : middle;
text-align : center;
height : 22px;
@@ -59,7 +59,7 @@
color : '#{richSkin.headerTextColor}';
}
-.rf-ca-tl{
+.rf-cal-tl{
vertical-align : middle;
text-align : center;
width: 20px;
@@ -71,7 +71,7 @@
color : '#{richSkin.headerTextColor}';
}
-.rf-ca-days{
+.rf-cal-day-lbl{
border-bottom : 1px solid;
border-right : 0px solid;
vertical-align : middle;
@@ -84,7 +84,7 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-ca-week{
+.rf-cal-week{
border-bottom : 1px solid;
border-right : 1px solid;
vertical-align : middle;
@@ -98,7 +98,7 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-rgh-c{
+.rf-cal-right-c{
border-right : 0px;
}
@@ -106,7 +106,7 @@
border-bottom : 0px;
}
-.rf-ca-tl-ftr{
+.rf-cal-tl-ftr{
height : 22px;
padding : 1px 2px 1px 1px;
background: '#{richSkin.additionalBackgroundColor}';
@@ -117,7 +117,7 @@
background-position: right center;
}
-.rf-ca-ftr-optnl{
+.rf-cal-ftr-optnl{
border-top : 1px solid;
border-right : 0px solid;
padding : 7px;
@@ -130,7 +130,7 @@
font-family: '#{richSkin.generalFamilyFont}';
}
-.rf-ca-ftr{
+.rf-cal-ftr{
border-top: 1px solid;
border-right: 0px solid;
font-size: '#{richSkin.generalSizeFont}';
@@ -140,7 +140,7 @@
border-right-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-sp-inp {
+.rf-cal-sp-inp {
border: 0px;
padding: 0px 0px 0px 3px;
background: none transparent scroll repeat 0% 0%;
@@ -149,7 +149,7 @@
width: 18px;
}
-.rf-ca-sp-inp-cntr {
+.rf-cal-sp-inp-cntr {
background-position: left top;
background-repeat: repeat-x;
border: 1px solid;
@@ -160,7 +160,7 @@
border-right-color: '#{richSkin.subBorderColor}';
}
-.rf-ca-sp-btn {
+.rf-cal-sp-btn {
border-width: 1px;
border-style: solid;
background-position: left top;
@@ -172,59 +172,49 @@
}
-.rf-ca-spec {
+.rf-cal-spec {
background-color: '#{richSkin.calendarSpecBackgroundColor}';
}
-.calendarSpecBackgroundColo {
- color: red;
-}
-
-.rf-ca-holly {
+.rf-cal-holiday {
background-color: '#{richSkin.calendarHolidaysBackgroundColor}';
color: '#{richSkin.calendarHolidaysTextColor}';
}
-.rf-ca-boundary-dates {
+.rf-cal-boundary-day {
color: #A0A0A0;
}
-.rf-ca-today {
+.rf-cal-today {
background-color: '#{richSkin.calendarCurrentBackgroundColor}';
color: '#{richSkin.calendarCurrentTextColor}';
font-weight: bold;
}
-.rf-ca-today {
- background-color: '#{richSkin.calendarCurrentBackgroundColor}';
- color: '#{richSkin.calendarCurrentTextColor}';
- font-weight: bold;
-}
-
-.rf-ca-sel {
+.rf-cal-sel {
background-color: '#{richSkin.headerBackgroundColor}';
color: '#{richSkin.headerTextColor}';
font-weight: '#{richSkin.headerWeightFont}';
}
-.rf-ca-hov {
+.rf-cal-hov {
background-color: '#{richSkin.calendarSpecBackgroundColor}';
background-color: '#{richSkin.calendarSpecTextColor}';
}
-.rf-ca-tl-btn {
+.rf-cal-tl-btn {
cursor: pointer;
padding: 2px 3px 2px 3px;
white-space: nowrap;
}
-.rf-ca-tl-btn-dis {
+.rf-cal-tl-btn-dis {
cursor: pointer;
padding: 2px 3px 2px 3px;
}
-.rf-ca-tl-btn-hov {
+.rf-cal-tl-btn-hov {
background-color: '#{richSkin.calendarWeekBackgroundColor}';
color: '#{richSkin.generalTextColor}';
border: 1px solid;
@@ -234,86 +224,86 @@
padding: 1px 2px 1px 2px;
}
-.rf-ca-tl-btn-press {
+.rf-cal-btn-press {
border-color: '#{richSkin.panelBorderColor}';
border-right-color: '#{richSkin.tableBackgroundColor}';
border-bottom-color: '#{richSkin.tableBackgroundColor}';
}
-.rf-ca-tl-close {
+.rf-cal-btn-close {
padding: 2px 2px 2px 4px;
background-image: "url(#{resource['org.richfaces.images:calendarSeparator.png']})";
background-repeat: no-repeat;
background-position: left center;
}
-.rf-ca-btn {
+.rf-cal-btn {
cursor: pointer;
vertical-align: middle;
}
-.rf-ca-edtr-shdw {
+.rf-cal-edtr-shdw {
background: '#{richSkin.tableBackgroundColor}';
opacity: 0.5;
filter: 'alpha(opacity=50)';
}
-.rf-ca-time-layout {
+.rf-cal-timepicker-cnt {
background: '#{richSkin.additionalBackgroundColor}';
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
position: relative;
}
-.rf-ca-date-layout {
+.rf-cal-monthpicker-cnt {
background: '#{richSkin.tableBackgroundColor}';
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
position: relative;
}
-.rf-ca-edtr-cntr {
+.rf-cal-edtr-cntr {
}
-.rf-ca-time-layout, .rf-ca-date-layout, .rf-ca-time-layout input {
+.rf-cal-timepicker-cnt, .rf-cal-monthpicker-cnt, .rf-cal-timepicker-cnt input {
font-size: '#{richSkin.generalSizeFont}';
font-family: '#{richSkin.generalFamilyFont}';
}
-.rf-ca-time-layout-fld {
+.rf-cal-timepicker-inp {
padding: 7px 7px 5px 7px;
white-space: nowrap;
}
-.rf-ca-time-layout-cancel {
+.rf-cal-timepicker-cancel {
padding: 0px 7px 7px 1px;
}
-.rf-ca-time-layout-ok {
+.rf-cal-timepicker-ok {
padding: 0px 1px 7px 7px;
}
-.rf-ca-date-layout-cancel {
+.rf-cal-monthpicker-cancel {
background: '#{richSkin.additionalBackgroundColor}';
border-top: 1px solid;
border-top-color: '#{richSkin.panelBorderColor}';
padding: 5px 5px 5px 1px;
}
-.rf-ca-date-layout-ok {
+.rf-cal-monthpicker-ok {
background: '#{richSkin.additionalBackgroundColor}';
border-top: 1px solid;
border-top-color: '#{richSkin.panelBorderColor}';
padding: 5px 1px 5px 5px;
}
-.rf-ca-date-layout-split {
+.rf-cal-monthpicker-split {
border-right: 1px solid;
border-right-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-time-btn {
+.rf-cal-time-btn {
width: 45px;
border: 1px solid;
border-color: '#{richSkin.tableBackgroundColor}';
@@ -327,7 +317,7 @@
cursor: pointer;
}
-.rf-ca-time-btn-press {
+.rf-cal-time-btn-press {
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
border-right-color: '#{richSkin.tableBackgroundColor}';
@@ -335,12 +325,12 @@
background-color: '#{richSkin.calendarWeekBackgroundColor}';
}
-.rf-ca-time-inp {
+.rf-cal-time-inp {
width: 22px;
margin: 0px 2px;
}
-.rf-ca-sp-up, .rf-ca-sp-down {
+.rf-cal-sp-up, .rf-cal-sp-down {
background-repeat: no-repeat;
background-position: 50% 40%;
height: 7px;
@@ -348,32 +338,32 @@
margin: 0px 1px 1px 0px;
}
-.rf-ca-sp-up {
+.rf-cal-sp-up {
background-image: "url(#{resource['org.richfaces.renderkit.html.images.SpinnerArrowTop']})";
}
-.rf-ca-sp-down {
+.rf-cal-sp-down {
background-image: "url(#{resource['org.richfaces.renderkit.html.images.SpinnerArrowBottom']})";
}
-.rf-ca-sp-press {
+.rf-cal-sp-press {
margin: 1px 0px 0px 1px;
}
-.rf-ca-sp-btn {
+.rf-cal-sp-btn {
background-color: '#{richSkin.headerBackgroundColor}';
border-color: '#{richSkin.headerBackgroundColor}';
background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
}
-.rf-ca-edtr-layout-shdw {
+.rf-cal-edtr-layout-shdw {
background-color: '#{richSkin.shadowBackgroundColor}';
position: absolute;
opacity: 0.3;
filter: 'alpha(opacity=30)';
}
-.rf-ca-edtr-btn {
+.rf-cal-edtr-btn {
width: 36px;
padding: 2px;
margin: 2px;
@@ -381,14 +371,14 @@
cursor: pointer;
}
-.rf-ca-edtr-btn-over {
+.rf-cal-edtr-btn-over {
padding: 1px;
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
background: '#{richSkin.calendarSpecBackgroundColor}';
}
-.rf-ca-edtr-btn-sel {
+.rf-cal-edtr-btn-sel {
background-color: '#{richSkin.calendarCurrentBackgroundColor}';
padding: 2px;
border: 0px;
@@ -397,7 +387,7 @@
cursor: default;
}
-.rf-ca-edtr-tl-over {
+.rf-cal-edtr-tl-over {
padding: 1px;
border: 1px solid;
background: '#{richSkin.additionalBackgroundColor}';
@@ -406,7 +396,7 @@
border-bottom-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-edtr-tl-press {
+.rf-cal-edtr-tl-press {
padding: 1px;
border: 1px solid;
background: '#{richSkin.additionalBackgroundColor}';
Modified: branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -24,8 +24,8 @@
var text = rf.calendarUtils.formatDate(calendar.selectedDate,(calendar.timeType ? calendar.datePattern : calendar.options.datePattern), calendar.options.monthLabels, calendar.options.monthLabelsShort);
var onclick = "RichFaces.$$('Calendar',this).showSelectedDate(); return true;"
var markup = ( calendar.options.disabled ?
- new E('div', {'class': 'rf-ca-tl-btn-dis'}, [new ET(text)]) :
- new E('div', {'class': 'rf-ca-tl-btn', 'onclick': onclick}, [new ET(text)]) );
+ new E('div', {'class': 'rf-cal-tl-btn-dis'}, [new ET(text)]) :
+ new E('div', {'class': 'rf-cal-tl-btn', 'onclick': onclick}, [new ET(text)]) );
return markup;
},
@@ -36,19 +36,19 @@
var text = rf.calendarUtils.formatDate(calendar.selectedDate, calendar.timePattern, calendar.options.monthLabels, calendar.options.monthLabelsShort);
- var onmouseover = "jQuery(this).removeClass('rf-ca-tl-btn-press');";
- var onmouseout = "jQuery(this).addClass('rf-ca-tl-btn-press');";
+ var onmouseover = "jQuery(this).removeClass('rf-cal-btn-press');";
+ var onmouseout = "jQuery(this).addClass('rf-cal-btn-press');";
var onclick = "RichFaces.$$('Calendar',this).showTimeEditor();return true;";
var markup = calendar.options.disabled || calendar.options.readonly ?
- new E('div', {'class': 'rf-ca-tl-btn-btn-dis'}, [new ET(text)]) :
- new E('div', {'class': 'rf-ca-tl-btn rf-ca-tl-btn-hov rf-ca-tl-btn-press', 'onclick': onclick,
+ new E('div', {'class': 'rf-cal-tl-btn-btn-dis'}, [new ET(text)]) :
+ new E('div', {'class': 'rf-cal-tl-btn rf-cal-tl-btn-hov rf-cal-btn-press', 'onclick': onclick,
'onmouseover': + onmouseover ,
'onmouseout' : + onmouseout}, [new ET(text)]);
return markup;
},
- toolButtonAttributes: {className: "rf-ca-tl-btn", onmouseover:"this.className='rf-ca-tl-btn rf-ca-tl-btn-hov'", onmouseout:"this.className='rf-ca-tl-btn'", onmousedown:"this.className='rf-ca-tl-btn rf-ca-tl-btn-hov rf-ca-tl-btn-btn-press'", onmouseup:"this.className='rf-ca-tl-btn rf-ca-tl-btn-hov'"},
+ toolButtonAttributes: {className: "rf-cal-tl-btn", onmouseover:"this.className='rf-cal-tl-btn rf-cal-tl-btn-hov'", onmouseout:"this.className='rf-cal-tl-btn'", onmousedown:"this.className='rf-cal-tl-btn rf-cal-tl-btn-hov rf-cal-tl-btn-btn-press'", onmouseup:"this.className='rf-cal-tl-btn rf-cal-tl-btn-hov'"},
nextYearControl: function (context) {
return (!context.calendar.options.disabled ? CalendarView.getControl(">>", CalendarView.toolButtonAttributes, "nextYear") : "");
},
@@ -64,7 +64,7 @@
currentMonthControl: function (context) {
var text = rf.calendarUtils.formatDate(context.calendar.getCurrentDate(), "MMMM, yyyy", context.monthLabels, context.monthLabelsShort);
var markup = context.calendar.options.disabled ?
- new E('div',{className: "rf-ca-tl-btn-dis"},[new T(text)]) :
+ new E('div',{className: "rf-cal-tl-btn-dis"},[new T(text)]) :
CalendarView.getControl(text, CalendarView.toolButtonAttributes, "showDateEditor");
return markup;
},
@@ -92,27 +92,27 @@
[
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("previousYearControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("previousMonthControl", context)})
]),
- new E('td',{'class': 'rf-ca-month'},
+ new E('td',{'class': 'rf-cal-hdr-month'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("currentMonthControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("nextMonthControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("nextYearControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl rf-ca-tl-close', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl rf-cal-btn-close', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("closeControl", context)})
])
@@ -128,24 +128,24 @@
[
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("selectedDateControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("cleanControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("timeControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style': 'background-image:none;', 'width': '100%'}, []),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+(context.calendar.options.disabled || context.calendar.options.readonly || !context.calendar.options.showApplyButton ? 'background-image:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style': 'background-image:none;', 'width': '100%'}, []),
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+(context.calendar.options.disabled || context.calendar.options.readonly || !context.calendar.options.showApplyButton ? 'background-image:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("todayControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+'background-image:none;';}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+'background-image:none;';}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("applyControl", context)})
])
@@ -156,22 +156,22 @@
timeEditorLayout: [
- new E('table',{'id': function(context){return context.calendar.TIME_EDITOR_LAYOUT_ID}, 'border': '0', 'cellpadding': '0', 'cellspacing': '0', 'class': 'rf-ca-time-layout'},
+ new E('table',{'id': function(context){return context.calendar.TIME_EDITOR_LAYOUT_ID}, 'border': '0', 'cellpadding': '0', 'cellspacing': '0', 'class': 'rf-cal-timepicker-cnt'},
[
new E('tbody',{},
[
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-time-layout-fld', 'colspan': '2', 'align': 'center'},
+ new E('td',{'class': 'rf-cal-timepicker-inp', 'colspan': '2', 'align': 'center'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("timeEditorFields", context)})
])
]),
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-time-layout-ok'},
+ new E('td',{'class': 'rf-cal-timepicker-ok'},
[
- new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_OK}, 'class': 'rf-ca-time-btn', 'style': 'float:right;', 'onmousedown': "jQuery(this).addClass('rf-ca-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(true)";}},
+ new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_OK}, 'class': 'rf-cal-time-btn', 'style': 'float:right;', 'onmousedown': "jQuery(this).addClass('rf-cal-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(true)";}},
[
new E('span',{},
[
@@ -180,9 +180,9 @@
])
])
,
- new E('td',{'class': 'rf-ca-time-layout-cancel'},
+ new E('td',{'class': 'rf-cal-timepicker-cancel'},
[
- new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_CANCEL}, 'class': 'rf-ca-time-btn', 'style': 'float:left;', 'onmousedown': "jQuery(this).addClass('rf-ca-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(false)";}},
+ new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_CANCEL}, 'class': 'rf-cal-time-btn', 'style': 'float:left;', 'onmousedown': "jQuery(this).addClass('rf-cal-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(false)";}},
[
new E('span',{},
[
@@ -262,15 +262,29 @@
currentDate: null,
defaultTime: {hours:12,minutes:0, seconds:0},
mode: "client",
- hidePopupOnScroll: true
+ hidePopupOnScroll: true,
+ defaultLabel:""
};
var defaultLabels = {apply:'Apply', today:'Today', clean:'Clean', ok:'OK', cancel:'Cancel', close:'x'};
var eventHandlerNames = ["change", "dateselect", "beforedateselect", "currentdateselect",
"beforecurrentdateselect", "currentdateselect", "clean", "complete", "collapse",
- "datemouseout", "datemouseover", "show", "hide", "timeselect", "beforetimeselect"];
+ "datemouseout", "datemouseover", "show", "hide", "timeselect", "beforetimeselect"];
+ var updateDefaultLabel = function (value) {
+ if (!this.selectedDate) {
+ var field = rf.getDomElement(this.INPUT_DATE_ID);
+ field.value = value;
+ }
+ }
+
+ var onFocusBlur = function (event) {
+ this.isFocused = event.type=="focus";
+ if (!this.isFocused && this.isVisible) return;
+ updateDefaultLabel.call(this, (event.type=="focus" ? "" : this.options.defaultLabel));
+ }
+
// Constructor definition
rf.ui.Calendar = function(componentId, locale, options, markups) {
@@ -318,7 +332,7 @@
// isDayEnabled - end-developer JS function
// dayStyleClass - end-developer JS function that provide style class for day's cells.
- // dayCellClass - add div to day cell with class 'rf-ca-c-div' and add this class to TD if defined
+ // dayCellClass - add div to day cell with class 'rf-cal-c-cnt' and add this class to TD if defined
// style - table style
// styleClass - table class
@@ -411,12 +425,12 @@
var tempStr = "RichFaces.$('"+this.id+"').";
- var htmlTextHeader = '<table id="'+this.CALENDAR_CONTENT+'" border="0" cellpadding="0" cellspacing="0" class="rf-ca-extr rf-ca-popup '+this.options.styleClass+'" style="'+popupStyles+this.options.style+'" onclick="'+tempStr+'skipEventOnCollapse=true;"><tbody>';
+ var htmlTextHeader = '<table id="'+this.CALENDAR_CONTENT+'" border="0" cellpadding="0" cellspacing="0" class="rf-cal-extr rf-cal-popup '+this.options.styleClass+'" style="'+popupStyles+this.options.style+'" onclick="'+tempStr+'skipEventOnCollapse=true;"><tbody>';
var colspan = (this.options.showWeeksBar ? "8" : "7");
- var htmlHeaderOptional = (this.options.optionalHeaderMarkup) ? '<tr><td class="rf-ca-hdr-optnl" colspan="'+colspan+'" id="'+this.id+'HeaderOptional"></td></tr>' : '';
- var htmlFooterOptional = (this.options.optionalFooterMarkup) ? '<tr><td class="rf-ca-ftr-optl" colspan="'+colspan+'" id="'+this.id+'FooterOptional"></td></tr>' : '';
- var htmlControlsHeader = (this.options.showHeader ? '<tr><td class="rf-ca-hdr" colspan="'+colspan+'" id="'+this.id+'Header"></td></tr>' : '');
- var htmlControlsFooter = (this.options.showFooter ? '<tr><td class="rf-ca-ftr" colspan="'+colspan+'" id="'+this.id+'Footer"></td></tr>' : '');
+ var htmlHeaderOptional = (this.options.optionalHeaderMarkup) ? '<tr><td class="rf-cal-hdr-optnl" colspan="'+colspan+'" id="'+this.id+'HeaderOptional"></td></tr>' : '';
+ var htmlFooterOptional = (this.options.optionalFooterMarkup) ? '<tr><td class="rf-cal-ftr-optl" colspan="'+colspan+'" id="'+this.id+'FooterOptional"></td></tr>' : '';
+ var htmlControlsHeader = (this.options.showHeader ? '<tr><td class="rf-cal-hdr" colspan="'+colspan+'" id="'+this.id+'Header"></td></tr>' : '');
+ var htmlControlsFooter = (this.options.showFooter ? '<tr><td class="rf-cal-ftr" colspan="'+colspan+'" id="'+this.id+'Footer"></td></tr>' : '');
var htmlTextFooter = '</tbody></table>'
// days bar creation
@@ -429,7 +443,7 @@
if (this.options.showWeekDaysBar)
{
htmlTextWeekDayBar.push('<tr id="'+this.WEEKDAY_BAR_ID+'">');
- if (this.options.showWeeksBar) htmlTextWeekDayBar.push('<td class="rf-ca-days"><br/></td>');
+ if (this.options.showWeeksBar) htmlTextWeekDayBar.push('<td class="rf-cal-day-lbl"><br/></td>');
var weekDayCounter = this.options.firstWeekDay;
for (var i=0;i<7;i++)
{
@@ -437,12 +451,12 @@
var weekDayHtml = this.evaluateMarkup(this.options.weekDayMarkup, context );
if (weekDayCounter==6) weekDayCounter=0; else weekDayCounter++;
- styleClass = "rf-ca-days";
+ styleClass = "rf-cal-day-lbl";
if (context.isWeekend)
{
- styleClass += " rf-ca-weekends";
+ styleClass += " rf-cal-holliday-lbl";
}
- if (i==6) styleClass += " rf-rgh-cell";
+ if (i==6) styleClass += " rf-cal-right-c";
htmlTextWeekDayBar.push('<td class="'+styleClass+'" id="'+context.elementId+'">'+weekDayHtml+'</td>');
}
htmlTextWeekDayBar.push('</tr>\n');
@@ -461,20 +475,20 @@
{
context = {weekNumber: k, elementId:this.WEEKNUMBER_ELEMENT_ID+k, component:this};
var weekNumberHtml = this.evaluateMarkup(this.options.weekNumberMarkup, context );
- htmlTextWeek.push('<td class="rf-ca-week '+bottomStyleClass+'" id="'+context.elementId+'">'+weekNumberHtml+'</td>');
+ htmlTextWeek.push('<td class="rf-cal-week '+bottomStyleClass+'" id="'+context.elementId+'">'+weekNumberHtml+'</td>');
}
// day cells creation
for (var i=0;i<7;i++)
{
- styleClass = bottomStyleClass+(!this.options.dayCellClass ? "rf-ca-c-size" : (!this.customDayListMarkup ? this.options.dayCellClass : ""))+" rf-ca-c";
- if (i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber) styleClass+=" rf-ca-holly";
- if (i==6) styleClass+=" rf-rgh-c";
+ styleClass = bottomStyleClass+(!this.options.dayCellClass ? "rf-cal-c-cnt-overflow" : (!this.customDayListMarkup ? this.options.dayCellClass : ""))+" rf-cal-c";
+ if (i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber) styleClass+=" rf-cal-holiday";
+ if (i==6) styleClass+=" rf-cal-right-c";
this.dayCellClassName.push(styleClass);
htmlTextWeek.push('<td class="'+styleClass+'" id="'+this.DATE_ELEMENT_ID+p+'" '+
eventsStr+
- '>'+(this.customDayListMarkup ? '<div class="rf-ca-c-div'+(this.options.dayCellClass ? ' '+this.options.dayCellClass : '')+'"></div>' : '')+'</td>');
+ '>'+(this.customDayListMarkup ? '<div class="rf-cal-c-cnt'+(this.options.dayCellClass ? ' '+this.options.dayCellClass : '')+'"></div>' : '')+'</td>');
p++;
}
htmlTextWeek.push('</tr>');
@@ -496,22 +510,18 @@
{
rf.Event.bindById(this.INPUT_DATE_ID, "click"+this.namespace, handler, this);
}
+ if (this.options.defaultLabel) {
+ updateDefaultLabel.call(this, this.options.defaultLabel);
+ rf.Event.bindById(this.INPUT_DATE_ID, "focus"+this.namespace+" blur"+this.namespace, onFocusBlur, this);
+ }
}
this.scrollElements = null;
- //alert(new Date().getTime()-_d.getTime());
-
//define isAjaxMode variable
- "ajax" == this.options.mode ? this.isAjaxMode = true : this.isAjaxMode = false;
+ this.isAjaxMode = this.options.mode == "ajax";
- /*
- //events handler binding
- for (var i in eventHandlerNames) {
- var handler = this.options["on"+eventHandlerNames[i]];
- if (handler) rf.Event.bindById(this.id, eventHandlerNames[i], handler, this);
- }
- */
+ //alert(new Date().getTime()-_d.getTime());
};
// Extend component class and add protected methods from parent class to our container
@@ -549,19 +559,19 @@
{
if (this.dateEditorYearID)
{
- $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-cal-edtr-btn-sel');
}
this.dateEditorYear = this.dateEditorStartYear + value;
this.dateEditorYearID = this.DATE_EDITOR_LAYOUT_ID+'Y'+value;
- $(rf.getDomElement(this.dateEditorYearID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorYearID)).addClass('rf-cal-edtr-btn-sel');
},
dateEditorSelectMonth: function(value)
{
this.dateEditorMonth = value;
- $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-cal-edtr-btn-sel');
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+value;
- $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-cal-edtr-btn-sel');
},
scrollEditorYear: function(value)
@@ -570,7 +580,7 @@
if (this.dateEditorYearID)
{
- $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-cal-edtr-btn-sel');
this.dateEditorYearID='';
}
@@ -580,9 +590,9 @@
if (this.dateEditorMonth != this.getCurrentMonth())
{
this.dateEditorMonth = this.getCurrentMonth();
- $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-cal-edtr-btn-sel');
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+this.dateEditorMonth;
- $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-cal-edtr-btn-sel');
}
}
@@ -597,14 +607,14 @@
div.firstChild.innerHTML=year;
if (year == this.dateEditorYear)
{
- $(div.firstChild).addClass('rf-ca-edtr-btn-sel');
+ $(div.firstChild).addClass('rf-cal-edtr-btn-sel');
this.dateEditorYearID = div.firstChild.id;
}
div = div.nextSibling;
div.firstChild.innerHTML=year+5;
if (year+5 == this.dateEditorYear)
{
- $(div.firstChild).addClass('rf-ca-edtr-btn-sel');
+ $(div.firstChild).addClass('rf-cal-edtr-btn-sel');
this.dateEditorYearID = div.firstChild.id;
}
year++;
@@ -648,8 +658,8 @@
{
var element = $(rf.getDomElement(this.CALENDAR_CONTENT));
var zindex = parseInt(element.css('z-index'), 10);
- var htmlBegin = '<div id="'+this.EDITOR_SHADOW_ID+'" class="rf-ca-edtr-shdw" style="position:absolute; display:none;z-index:'+zindex+'"></div><table border="0" cellpadding="0" cellspacing="0" id="'+this.EDITOR_ID+'" style="position:absolute; display:none;z-index:'+(zindex+1)+'" onclick="RichFaces.$(\''+this.id+'\').skipEventOnCollapse=true;"><tbody><tr><td class="rf-ca-edtr-cntr" align="center"><div style="position:relative; width:100%">';
- var htmlContent = '<div id="'+this.EDITOR_LAYOUT_SHADOW_ID+'" class="rf-ca-edtr-layout-shdw"></div>';
+ var htmlBegin = '<div id="'+this.EDITOR_SHADOW_ID+'" class="rf-cal-edtr-shdw" style="position:absolute; display:none;z-index:'+zindex+'"></div><table border="0" cellpadding="0" cellspacing="0" id="'+this.EDITOR_ID+'" style="position:absolute; display:none;z-index:'+(zindex+1)+'" onclick="RichFaces.$(\''+this.id+'\').skipEventOnCollapse=true;"><tbody><tr><td class="rf-cal-edtr-cntr" align="center"><div style="position:relative; width:100%">';
+ var htmlContent = '<div id="'+this.EDITOR_LAYOUT_SHADOW_ID+'" class="rf-cal-edtr-layout-shdw"></div>';
var htmlEnd = '</div></td></tr></tbody></table>';
element.after(htmlBegin+htmlContent+htmlEnd);
@@ -708,27 +718,27 @@
{
if (buttonType==0)
{
- return '<div id="'+id+'" class="rf-ca-edtr-btn'+(className ? ' '+className : '')+
- '" onmouseover="this.className=\'rf-ca-edtr-btn rf-ca-edtr-tl-over\';" onmouseout="this.className=\'rf-ca-edtr-btn\';" onmousedown="this.className=\'rf-ca-edtr-btn rf-ca-edtr-tl-press\';" onmouseup="this.className=\'rf-ca-edtr-btn rf-ca-edtr-tl-over\';" onclick="RichFaces.$(\''+this.id+'\').scrollEditorYear('+param+');">'+value+'</div>';
+ return '<div id="'+id+'" class="rf-cal-edtr-btn'+(className ? ' '+className : '')+
+ '" onmouseover="this.className=\'rf-cal-edtr-btn rf-cal-edtr-tl-over\';" onmouseout="this.className=\'rf-cal-edtr-btn\';" onmousedown="this.className=\'rf-cal-edtr-btn rf-cal-edtr-tl-press\';" onmouseup="this.className=\'rf-cal-edtr-btn rf-cal-edtr-tl-over\';" onclick="RichFaces.$(\''+this.id+'\').scrollEditorYear('+param+');">'+value+'</div>';
}
else
{
var onclick = (buttonType==1 ? 'RichFaces.$(\''+this.id+'\').dateEditorSelectMonth('+param+');':
'RichFaces.$(\''+this.id+'\').dateEditorSelectYear('+param+');' );
- return '<div id="'+id+'" class="rf-ca-edtr-btn'+(className ? ' '+className : '')+
- '" onmouseover="jQuery(this).addClass(\'rf-ca-edtr-btn-over\');" onmouseout="$(this).removeClass(\'rf-ca-edtr-btn-over\');" onclick="'+onclick+'">'+value+'</div>';
+ return '<div id="'+id+'" class="rf-cal-edtr-btn'+(className ? ' '+className : '')+
+ '" onmouseover="jQuery(this).addClass(\'rf-cal-edtr-btn-over\');" onmouseout="$(this).removeClass(\'rf-cal-edtr-btn-over\');" onclick="'+onclick+'">'+value+'</div>';
}
},
createDateEditorLayout: function(editor)
{
- var htmlBegin = '<table id="'+this.DATE_EDITOR_LAYOUT_ID+'" class="rf-ca-date-layout" border="0" cellpadding="0" cellspacing="0"><tbody><tr id="'+this.DATE_EDITOR_LAYOUT_ID+'TR">';
+ var htmlBegin = '<table id="'+this.DATE_EDITOR_LAYOUT_ID+'" class="rf-cal-monthpicker-cnt" border="0" cellpadding="0" cellspacing="0"><tbody><tr id="'+this.DATE_EDITOR_LAYOUT_ID+'TR">';
var htmlEnd = '</tr></tbody></table>';
var month = 0;
this.dateEditorYear = this.getCurrentYear();
var year = this.dateEditorStartYear = this.dateEditorYear-4;
var htmlContent = '<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.options.monthLabelsShort[month], 1, month)+'</td>'
- +'<td align="center" class="rf-ca-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td align="center" class="rf-cal-monthpicker-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
+'<td align="center">'+this.createDECell('','<', 0, -1)+'</td>'
+'<td align="center">'+this.createDECell('','>', 0, 1)+'</td>';
month++;
@@ -736,8 +746,8 @@
for (var i=0;i<5;i++)
{
htmlContent+='</tr><tr><td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.options.monthLabelsShort[month], 1, month)+'</td>'
- +'<td align="center" class="rf-ca-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
- +'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rf-ca-edtr-btn-sel' : ''))+'</td>'
+ +'<td align="center" class="rf-cal-monthpicker-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rf-cal-edtr-btn-sel' : ''))+'</td>'
+'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+(i+5), year+5, 2, i+5)+'</td>';
month++;
year++;
@@ -746,16 +756,16 @@
this.dateEditorMonth = this.getCurrentMonth();
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+this.dateEditorMonth;
- htmlContent+='</tr><tr><td colspan="2" class="rf-ca-date-layout-ok">'+
- '<div id="'+this.DATE_EDITOR_BUTTON_OK+'" class="rf-ca-time-btn" style="float:right;" onmousedown="jQuery(this).addClass(\'rf-ca-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-ca-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-ca-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(true);"><span>'+this.options.labels.ok+'</span></div>'+
- '</td><td colspan="2" class="rf-ca-date-layout-cancel">'+
- '<div id="'+this.DATE_EDITOR_BUTTON_CANCEL+'" class="rf-ca-time-btn" style="float:left;" onmousedown="jQuery(this).addClass(\'rf-ca-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-ca-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-ca-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(false);"><span>'+this.options.labels.cancel+'</span></div>'+
+ htmlContent+='</tr><tr><td colspan="2" class="rf-cal-monthpicker-ok">'+
+ '<div id="'+this.DATE_EDITOR_BUTTON_OK+'" class="rf-cal-time-btn" style="float:right;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(true);"><span>'+this.options.labels.ok+'</span></div>'+
+ '</td><td colspan="2" class="rf-cal-monthpicker-cancel">'+
+ '<div id="'+this.DATE_EDITOR_BUTTON_CANCEL+'" class="rf-cal-time-btn" style="float:left;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(false);"><span>'+this.options.labels.cancel+'</span></div>'+
'</td>';
$(rf.getDomElement(this.EDITOR_LAYOUT_SHADOW_ID)).after(htmlBegin+htmlContent+htmlEnd);
- $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-cal-edtr-btn-sel');
this.correctEditorButtons(editor, this.DATE_EDITOR_BUTTON_OK, this.DATE_EDITOR_BUTTON_CANCEL);
@@ -764,22 +774,22 @@
createSpinnerTable: function(id) {
return '<table cellspacing="0" cellpadding="0" border="0"><tbody><tr>'+
- '<td class="rf-ca-sp-inp-ctnr">'+
- '<input id="' + id + '" name="' + id + '" class="rf-ca-sp-inp" type="text" />'+
+ '<td class="rf-cal-sp-inp-ctnr">'+
+ '<input id="' + id + '" name="' + id + '" class="rf-cal-sp-inp" type="text" />'+
'</td>'+
- '<td class="rf-ca-sp-btn">'+
+ '<td class="rf-cal-sp-btn">'+
'<table border="0" cellspacing="0" cellpadding="0"><tbody>'+
'<tr><td>'+
- '<div id="'+id+'BtnUp" class="rf-ca-sp-up"'+
- ' onmousedown="this.className=\'rf-ca-sp-up rf-ca-sp-press\'"'+
- ' onmouseup="this.className=\'rf-ca-sp-up\'"'+
- ' onmouseout="this.className=\'rf-ca-sp-up\'"><span></span></div>'+
+ '<div id="'+id+'BtnUp" class="rf-cal-sp-up"'+
+ ' onmousedown="this.className=\'rf-cal-sp-up rf-cal-sp-press\'"'+
+ ' onmouseup="this.className=\'rf-cal-sp-up\'"'+
+ ' onmouseout="this.className=\'rf-cal-sp-up\'"><span></span></div>'+
'</td></tr>'+
'<tr><td>'+
- '<div id="'+id+'BtnDown" class="rf-ca-sp-down"'+
- ' onmousedown="this.className=\'rf-ca-sp-down rf-ca-sp-press\'"'+
- ' onmouseup="this.className=\'rf-ca-sp-down\'"'+
- ' onmouseout="this.className=\'rf-ca-sp-down\'"><span></span></div>'+
+ '<div id="'+id+'BtnDown" class="rf-cal-sp-down"'+
+ ' onmousedown="this.className=\'rf-cal-sp-down rf-cal-sp-press\'"'+
+ ' onmouseup="this.className=\'rf-cal-sp-down\'"'+
+ ' onmouseout="this.className=\'rf-cal-sp-down\'"><span></span></div>'+
'</td></tr>'+
'</tbody></table>'+
'</td>'+
@@ -892,7 +902,9 @@
$(rf.getDomElement(this.CALENDAR_CONTENT)).hide();
this.isVisible = false;
-
+ if (this.options.defaultLabel && !this.isFocused) {
+ updateDefaultLabel.call(this, this.options.defaultLabel);
+ }
}
},
@@ -917,7 +929,9 @@
var baseInput = base.firstChild;
var baseButton = baseInput.nextSibling;
- if (baseInput && baseInput.value!=undefined)
+ if (this.options.defaultLabel) {
+ if (!this.isFocused) updateDefaultLabel.call(this, "");
+ } else if (baseInput.value!=undefined)
{
this.selectDate(baseInput.value, false, {event:e, element:element});
}
@@ -1089,7 +1103,7 @@
if (this.invokeEvent("datemouseover", obj, e, daydata.date) && daydata.enabled)
{
if (daydata._month==0 && obj.id!=this.selectedDateCellId && obj.id!=this.todayCellId) {
- $(obj).addClass('rf-ca-hov');
+ $(obj).addClass('rf-cal-hov');
}
}
},
@@ -1099,7 +1113,7 @@
if (this.invokeEvent("datemouseout", obj, e, daydata.date) && daydata.enabled)
{
if (daydata._month==0 && obj.id!=this.selectedDateCellId && obj.id!=this.todayCellId) {
- $(obj).removeClass('rf-ca-hov');
+ $(obj).removeClass('rf-cal-hov');
}
}
},
@@ -1330,10 +1344,10 @@
// class styles
if (dataobj._month!=0)
{
- classNames+=' rf-ca-boundary-dates';
+ classNames+=' rf-cal-boundary-day';
if (!this.options.disabled && !this.options.readonly && boundaryDatesModeFlag)
{
- classNames+=' rf-ca-btn';
+ classNames+=' rf-cal-btn';
}
}
else
@@ -1342,16 +1356,16 @@
{
this.todayCellId = element.id;
this.todayCellColor = this.getCellBackgroundColor(element);
- classNames+=" rf-ca-today";
+ classNames+=" rf-cal-today";
}
if (selectedflag && dataobj.day==selecteddate)
{
this.selectedDateCellId = element.id;
this.selectedDateCellColor = this.getCellBackgroundColor(element);
- classNames+=" rf-ca-sel";
+ classNames+=" rf-cal-sel";
}
- else if (!this.options.disabled && !this.options.readonly && dataobj.enabled) classNames+=' rf-ca-btn';
+ else if (!this.options.disabled && !this.options.readonly && dataobj.enabled) classNames+=' rf-cal-btn';
// add custom style class
if (dataobj.customStyleClass)
@@ -1608,13 +1622,13 @@
// find cell and change style class
var e = $(rf.getDomElement(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1)));
- this.clearEffect(this.selectedDateCellId, "rf-ca-sel", (this.options.disabled || this.options.readonly ? null : "rf-ca-btn"));
+ this.clearEffect(this.selectedDateCellId, "rf-cal-sel", (this.options.disabled || this.options.readonly ? null : "rf-cal-btn"));
this.selectedDateCellId = e.attr('id');
this.selectedDateCellColor = this.getCellBackgroundColor(e);
- e.removeClass("rf-ca-btn");
- e.removeClass("rf-ca-hov");
- e.addClass("rf-ca-sel");
+ e.removeClass("rf-cal-btn");
+ e.removeClass("rf-cal-hov");
+ e.addClass("rf-cal-sel");
this.renderHF();
}
@@ -1639,7 +1653,7 @@
{
this.selectedDate = null;
- this.clearEffect(this.selectedDateCellId, "rf-ca-sel", (this.options.disabled || this.options.readonly ? null : "rf-ca-btn"));
+ this.clearEffect(this.selectedDateCellId, "rf-cal-sel", (this.options.disabled || this.options.readonly ? null : "rf-cal-btn"));
if (this.selectedDateCellId)
{
@@ -1681,7 +1695,7 @@
this.selectedDate = null;
this.invokeEvent("dateselect", null, null, null);
- this.selectedDateCellId = this.clearEffect(this.selectedDateCellId, "rf-ca-sel", (this.options.disabled || this.options.readonly ? null : "rf-ca-btn"));
+ this.selectedDateCellId = this.clearEffect(this.selectedDateCellId, "rf-cal-sel", (this.options.disabled || this.options.readonly ? null : "rf-cal-btn"));
this.invokeEvent("clean", null, null, null);
this.renderHF();
if (!this.options.showApplyButton)
Modified: branches/RF-9323/ui/input/ui/src/main/templates/autocomplete.template.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/templates/autocomplete.template.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/templates/autocomplete.template.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -16,7 +16,7 @@
<cc:implementation>
<cdk:object type="java.lang.Object" name="disabled" value="#{component.attributes['disabled']}" />
<div id="#{clientId}" class="rf-au-fld">
- <input id="#{clientId}Value" name="#{clientId}Value" type="hidden" class="rf-au-fnt rf-au-inp" />
+ <input id="#{clientId}Value" name="#{clientId}Value" type="hidden" class="rf-au-fnt rf-au-inp" />
<div style="position : relative; overflow : hidden; text-align : left; padding-right : 21px;">
<input onclick="#{component.attributes['onclick']}"
ondblclick="#{component.attributes['ondblclick']}"
@@ -30,7 +30,7 @@
onkeypress="#{component.attributes['onkeypress']}" id="#{clientId}Input" value="#{component.attributes['value']}" disabled="#{disabled}" name="#{clientId}" type="text" class="rf-au-fnt rf-au-inp" autocomplete="off"/>
<c:if test="#{component.attributes['showButton']}">
<c:if test="#{component.attributes['disabled']}">
- <div id="#{clientId}Button" class="rf-au-btn">
+ <div id="#{clientId}Button" class="rf-au-btn rf-au-btn-dis">
<div class="rf-au-btn-arrow"></div>
</div>
</c:if>
@@ -69,6 +69,7 @@
</div>
</div>
</div>
+ <c:if test="#{!component.attributes['disabled']}">
<script type="text/javascript">
<cdk:object name="mode" type="Object" value="#{component.attributes['mode']}" />
<cdk:scriptObject name="options">
@@ -84,6 +85,7 @@
"#{clientId}Input", #{toScriptArgs(options)}
);
</script>
+ </c:if>
</div>
</cc:implementation>
Modified: branches/RF-9323/ui/input/ui/src/main/templates/calendar.template.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/templates/calendar.template.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/templates/calendar.template.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -37,7 +37,7 @@
disabled="#{component.attributes['disabled']}" accesskey="#{component.attributes['accesskey']}"
maxlength="#{component.attributes['maxlength']}" size="#{component.attributes['inputSize']}"
style="vertical-align: middle; #{component.attributes['inputStyle']}"
- class="rf-ca-inp #{component.attributes['inputClass']}"
+ class="rf-cal-inp #{component.attributes['inputClass']}"
tabindex="#{component.attributes['tabindex']}"
readonly="#{(!component.attributes['enableManualInput'] || component.attributes['readonly']) ? 'readonly' : ''}">
<cdk:call expression="renderInputHandlers(facesContext, component);" />
@@ -45,14 +45,14 @@
<c:choose>
<c:when test="#{isUseIcons(facesContext, component)}">
<img id="#{clientId}PopupButton" alt=""
- class="rf-ca-btn #{component.attributes['buttonClass']}"
+ class="rf-cal-btn #{component.attributes['buttonClass']}"
accesskey="#{component.attributes['accesskey']}" style="vertical-align: middle"
tabindex="#{component.attributes['tabindex']}" src="#{getButtonIcon(facesContext, component)}" />
</c:when>
<c:otherwise>
<button type="button" id="#{clientId}PopupButton" name="#{clientId}PopupButton"
style="vertical-align: middle"
- class="rf-ca-btn #{component.attributes['buttonClass']}"
+ class="rf-cal-btn #{component.attributes['buttonClass']}"
tabindex="#{component.attributes['tabindex']}" disabled="#{component.attributes['disabled']}">
#{component.attributes['buttonLabel']}
</button>
@@ -69,7 +69,7 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <cdk:scriptOption attributes="enableManualInput disabled readonly resetTimeOnDateSelect showApplyButton popup showInput showHeader showFooter showWeeksBar todayControlMode datePattern jointPoint direction boundaryDatesMode horizontalOffset verticalOffset hidePopupOnScrol showWeekDaysBar styleClass mode" />
+ <cdk:scriptOption attributes="enableManualInput disabled readonly resetTimeOnDateSelect showApplyButton popup showInput showHeader showFooter showWeeksBar todayControlMode datePattern jointPoint direction boundaryDatesMode horizontalOffset verticalOffset hidePopupOnScrol showWeekDaysBar styleClass mode defaultLabel" />
<cdk:scriptOption attributes="onchange ondateselect onbeforedateselect onbeforecurrentdateselect onhide onshow ondatemouseover ondatemouseout onclean ontimeselect onbeforetimeselect" wrapper="eventHandler" />
<cdk:scriptOption name="currentDate" value="#{getCurrentDate(facesContext, component)}" />
<cdk:scriptOption name="selectedDate" value="#{getSelectedDate(facesContext, component)}" />
Modified: branches/RF-9323/ui/input/ui/src/main/templates/fileupload.template.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/templates/fileupload.template.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/templates/fileupload.template.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -39,14 +39,14 @@
</cc:interface>
<cc:implementation>
<cdk:object name="attributes" value="#{component.attributes}"/>
- <cdk:object name="enabled" value="#{attributes['enabled']}"/>
+ <cdk:object name="disabled" value="#{attributes['disabled']}"/>
<div id="#{clientId}" class="rf-fu #{attributes['styleClass']}"
cdk:passThroughWithExclusions="">
<div class="rf-fu-hdr">
<span class="rf-fu-btns-lft">
- <span class="rf-fu-btn-add#{enabled ? '' : '-dis'}">
- <span class="rf-fu-btn-cnt-add#{enabled ? '' : '-dis'}">
- <c:if test="#{enabled}">
+ <span class="rf-fu-btn-add#{disabled ? '-dis' : ''}">
+ <span class="rf-fu-btn-cnt-add#{disabled ? '-dis' : ''}">
+ <c:if test="#{!disabled}">
<span class="rf-fu-inp-cntr"> <!-- This span is needed for IE7 only. -->
<input type="file" class="rf-fu-inp"/>
</span>
@@ -55,14 +55,14 @@
#{addLabel != null ? addLabel : 'Add...'}
</span>
</span>
- <c:if test="#{enabled}">
+ <c:if test="#{!disabled}">
<span class="rf-fu-btn-upl">
<cdk:object name="uploadLabel" value="#{attributes['uploadLabel']}"/>
<span class="rf-fu-btn-cnt-upl">#{uploadLabel != null ? uploadLabel : 'Upload'}</span>
</span>
</c:if>
</span>
- <c:if test="#{enabled}">
+ <c:if test="#{!disabled}">
<span class="rf-fu-btns-rgh">
<span class="rf-fu-btn-clr">
<cdk:object name="clearAllLabel" value="#{attributes['clearAllLabel']}"/>
@@ -72,7 +72,7 @@
</c:if>
</div>
<div class="rf-fu-lst"/>
- <c:if test="#{enabled}">
+ <c:if test="#{!disabled}">
<div class="rf-fu-cntr-hdn">
<iframe name="#{clientId}"/>
<cdk:object name="progressBar" value="#{component.facets['progress']}"/>
Modified: branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/main/templates/inputnumberspinner.template.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -40,7 +40,7 @@
<span id="#{clientId}" class="rf-insp #{component.attributes['styleClass']}" cdk:passThroughWithExclusions="id class" >
<input name="#{clientId}" type="text"
class="rf-insp-inp #{component.attributes['inputClass']}" value="#{getInputValue(facesContext, component)}"
- cdk:passThrough="accesskey disabled maxlength onblur onfocus onclick:oninputclick ondblclick:ondblinputclick onkeydown:oninputkeydown
+ cdk:passThrough="accesskey disabled maxlength onblur onfocus onclick:oninputclick ondblclick:oninputdblclick onkeydown:oninputkeydown
onkeypress:oninputkeypress onkeyup:oninputkeyup onmousedown:oninputmousedown onmousemove:oninputmousemove onmouseout:oninputmouseout
onmouseover:oninputmouseover onmouseup:oninputmouseup onselect size:inputSize tabindex"
readonly="#{!component.attributes['enableManualInput']}" autocomplete="#{component.attributes['disableBrowserAutoComplete'] ? 'off' : ''}" />
Modified: branches/RF-9323/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml
===================================================================
--- branches/RF-9323/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,108 +1,108 @@
-<table id="form:calendarContent" border="0" cellpadding="0" cellspacing="0" class="rf-ca-extr rf-ca-popup undefined" style="display:none; position:absolute;z-index: 3;width:200px" onclick="RichFaces.$('form:calendar').skipEventOnCollapse=true;">
+<table id="form:calendarContent" border="0" cellpadding="0" cellspacing="0" class="rf-cal-extr rf-cal-popup undefined" style="display:none; position:absolute;z-index: 3;width:200px" onclick="RichFaces.$('form:calendar').skipEventOnCollapse=true;">
<tbody>
<tr>
- <td class="rf-ca-hdr" colspan="8" id="form:calendarHeader"/>
+ <td class="rf-cal-hdr" colspan="8" id="form:calendarHeader"/>
</tr>
<tr id="form:calendarWeekDay">
- <td class="rf-ca-days">
+ <td class="rf-cal-day-lbl">
<br/>
</td>
- <td class="rf-ca-days rf-ca-weekends" id="form:calendarWeekDayCell0">
+ <td class="rf-cal-day-lbl rf-cal-holliday-lbl" id="form:calendarWeekDayCell0">
Sun
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell1">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell1">
Mon
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell2">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell2">
Tue
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell3">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell3">
Wed
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell4">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell4">
Thu
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell5">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell5">
Fri
</td>
- <td class="rf-ca-days rf-ca-weekends rf-rgh-cell" id="form:calendarWeekDayCell6">
+ <td class="rf-cal-day-lbl rf-cal-holliday-lbl rf-cal-right-c" id="form:calendarWeekDayCell6">
Sat
</td>
</tr>
<tr id="form:calendarWeekNum1">
- <td class="rf-ca-week " id="form:calendarWeekNumCell1">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell1">
1
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell0" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell1" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell2" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell3" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell4" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell5" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell6" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell0" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell1" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell2" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell3" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell4" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell5" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell6" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum2">
- <td class="rf-ca-week " id="form:calendarWeekNumCell2">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell2">
2
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell7" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell8" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell9" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell10" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell11" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell12" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell13" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell7" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell8" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell9" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell10" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell11" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell12" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell13" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum3">
- <td class="rf-ca-week " id="form:calendarWeekNumCell3">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell3">
3
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell14" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell15" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell16" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell17" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell18" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell19" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell20" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell14" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell15" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell16" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell17" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell18" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell19" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell20" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum4">
- <td class="rf-ca-week " id="form:calendarWeekNumCell4">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell4">
4
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell21" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell22" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell23" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell24" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell25" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell26" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell27" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell21" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell22" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell23" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell24" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell25" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell26" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell27" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum5">
- <td class="rf-ca-week " id="form:calendarWeekNumCell5">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell5">
5
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell28" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell29" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell30" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell31" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell32" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell33" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell34" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell28" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell29" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell30" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell31" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell32" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell33" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell34" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum6">
- <td class="rf-ca-week rf-btm-c " id="form:calendarWeekNumCell6">
+ <td class="rf-cal-week rf-btm-c " id="form:calendarWeekNumCell6">
6
</td>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell35" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell36" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell37" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell38" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell39" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell40" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell41" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell35" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell36" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell37" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell38" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell39" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell40" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell41" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr>
- <td class="rf-ca-ftr" colspan="8" id="form:calendarFooter"/>
+ <td class="rf-cal-ftr" colspan="8" id="form:calendarFooter"/>
</tr>
</tbody>
</table>
\ No newline at end of file
Copied: branches/RF-9323/ui/iteration/api/src/main/java/org/richfaces/component/DataScrollerControlsMode.java (from rev 20842, trunk/ui/iteration/api/src/main/java/org/richfaces/component/DataScrollerControlsMode.java)
===================================================================
--- branches/RF-9323/ui/iteration/api/src/main/java/org/richfaces/component/DataScrollerControlsMode.java (rev 0)
+++ branches/RF-9323/ui/iteration/api/src/main/java/org/richfaces/component/DataScrollerControlsMode.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.richfaces.component;
+
+/**
+ * @author Nick Belaevski
+ *
+ */
+public enum DataScrollerControlsMode {
+
+ show, auto, hide;
+
+ public static final DataScrollerControlsMode DEFAULT = show;
+
+}
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTable.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -78,7 +78,7 @@
getStateHelper().put(PropertyKeys.expanded, expanded);
}
- @Attribute(defaultValue = MODE_CLIENT)
+ @Attribute
public abstract String getExpandMode();
public void broadcast(FacesEvent event) throws AbortProcessingException {
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTableToggler.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTableToggler.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractCollapsibleSubTableToggler.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -60,7 +60,7 @@
@Attribute
public abstract String getCollapseIcon();
- @Attribute(defaultValue = DEFAULT_EVENT)
+ @Attribute
public abstract String getEvent();
@Attribute
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractColumn.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -53,7 +53,7 @@
@Attribute
public abstract boolean isBreakRowBefore();
- @Attribute(defaultValue="SortOrder.unsorted")
+ @Attribute
public abstract SortOrder getSortOrder();
@Attribute
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractDataScroller.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -91,21 +91,38 @@
@Attribute
public abstract String getLastPageMode();
- @Attribute(defaultValue="10")
+ @Attribute
public abstract int getMaxPages();
- @Attribute(defaultValue="show")
- public abstract String getBoundaryControls();
+ public int getMaxPagesOrDefault() {
+ int maxPages = getMaxPages();
+ if (maxPages <= 0) {
+ maxPages = 10;
+ }
+
+ return maxPages;
+ }
- @Attribute(defaultValue="show")
- public abstract String getFastControls();
+ @Attribute
+ public abstract DataScrollerControlsMode getBoundaryControls();
+
+ @Attribute
+ public abstract DataScrollerControlsMode getFastControls();
- @Attribute(defaultValue="show")
- public abstract String getStepControls();
+ @Attribute
+ public abstract DataScrollerControlsMode getStepControls();
- @Attribute(defaultValue="1")
+ @Attribute
public abstract int getFastStep();
+ public int getFastStepOrDefault() {
+ int fastStep = getFastStep();
+ if (fastStep <= 0) {
+ fastStep = 1;
+ }
+ return fastStep;
+ }
+
@Attribute
public String getFor() {
return (String)getStateHelper().eval("for");
@@ -191,9 +208,9 @@
} else if (NEXT_FACET_NAME.equals(facetName)) {
newPage = getPage() + 1;
} else if (FAST_FORWARD_FACET_NAME.equals(facetName)) {
- newPage = getPage() + getFastStep();
+ newPage = getPage() + getFastStepOrDefault();
} else if (FAST_REWIND_FACET_NAME.equals(facetName)) {
- newPage = getPage() - getFastStep();
+ newPage = getPage() - getFastStepOrDefault();
} else {
try {
newPage = Integer.parseInt(facetName.toString());
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractExtendedDataTable.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -39,8 +39,8 @@
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.context.ExtendedVisitContext;
import org.richfaces.context.ExtendedVisitContextMode;
+import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
-import org.richfaces.log.Logger;
/**
@@ -74,7 +74,7 @@
clientFirst, clientRows
}
- @Attribute(defaultValue = "0")
+ @Attribute
public abstract int getFrozenColumns();
@Attribute(events=@EventName(value="selectionchange", defaultEvent=true))
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTree.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -195,10 +195,10 @@
@Attribute(events = @EventName("beforeselectionchange"))
public abstract String getOnbeforeselectionchange();
- @Attribute(defaultValue = "SwitchType.DEFAULT")
+ @Attribute
public abstract SwitchType getToggleType();
- @Attribute(defaultValue = "SwitchType.client")
+ @Attribute
public abstract SwitchType getSelectionType();
public abstract String getNodeType();
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/AbstractTreeNode.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -84,7 +84,7 @@
return COMPONENT_FAMILY;
}
- @Attribute(defaultValue = "findTreeComponent().isImmediate()")
+ @Attribute
public abstract boolean isImmediate();
public abstract String getType();
@@ -151,7 +151,7 @@
public void queueEvent(FacesEvent event) {
if (this.equals(event.getComponent())) {
if (event instanceof TreeToggleEvent) {
- PhaseId targetPhase = isImmediate() ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.PROCESS_VALIDATIONS;
+ PhaseId targetPhase = (isImmediate() || findTreeComponent().isImmediate()) ? PhaseId.APPLY_REQUEST_VALUES : PhaseId.PROCESS_VALIDATIONS;
event.setPhaseId(targetPhase);
}
}
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/component/UIDataTableBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -104,7 +104,7 @@
return getFacet(NODATA_FACET_NAME);
}
- @Attribute(defaultValue="Integer.MIN_VALUE")
+ @Attribute
public abstract int getColumns();
@Attribute
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/AbstractTableRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -110,7 +110,7 @@
protected int getColumnsCount(UIDataTableBase table) {
int columns = table.getColumns();
- return (columns != Integer.MIN_VALUE) ? columns : getColumnsCount(table.columns());
+ return (columns > 0) ? columns : getColumnsCount(table.columns());
}
public void encodeTableStructure(ResponseWriter writer, FacesContext context, UIDataTableBase dataTable) throws IOException {
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/CollapsibleSubTableTogglerRendererBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -38,6 +38,8 @@
import org.richfaces.component.AbstractCollapsibleSubTableToggler;
import org.richfaces.renderkit.util.RendererUtils;
+import com.google.common.base.Strings;
+
/**
* @author Anton Belevich
*/
@@ -77,12 +79,11 @@
AbstractCollapsibleSubTable subTable = findComponent(context, toggleControl);
if (subTable != null) {
- String switchType = subTable.getExpandMode();
boolean expanded = subTable.isExpanded();
ResponseWriter writer = context.getResponseWriter();
- encodeControl(context, writer, toggleControl, switchType, expanded, false);
- encodeControl(context, writer, toggleControl, switchType, !expanded, true);
+ encodeControl(context, writer, toggleControl, expanded, false);
+ encodeControl(context, writer, toggleControl, !expanded, true);
JSFunction jsFunction = new JSFunction("new RichFaces.ui.CollapsibleSubTableToggler");
String toggleId = toggleControl.getClientId(context);
@@ -97,7 +98,7 @@
}
protected void encodeControl(FacesContext context, ResponseWriter writer, AbstractCollapsibleSubTableToggler control,
- String switchType, boolean expanded, boolean visible) throws IOException {
+ boolean expanded, boolean visible) throws IOException {
String state = getState(expanded);
String styleClass = getStyleClass(context, control);
String style = getStyle(context, control);
@@ -177,6 +178,11 @@
options.put("collapseControl", toggleControlId + ":collapse");
String eventName = toggleControl.getEvent();
+
+ if (Strings.isNullOrEmpty(eventName)) {
+ eventName = AbstractCollapsibleSubTableToggler.DEFAULT_EVENT;
+ }
+
eventName = eventName.trim().startsWith("on") ? eventName.substring(2) : eventName;
options.put("eventName", eventName);
return options;
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataGridRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -70,7 +70,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-h-c", null);
int columns = (Integer)component.getAttributes().get("columns");
- if(columns != Integer.MIN_VALUE) {
+ if (columns > 0) {
writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
}
}
@@ -109,7 +109,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-f-c", null);
int columns = (Integer)component.getAttributes().get("columns");
- if(columns != Integer.MIN_VALUE) {
+ if (columns > 0) {
writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
}
}
@@ -149,7 +149,7 @@
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-dg-nd-c", null);
int columns = (Integer)component.getAttributes().get("columns");
- if(columns != Integer.MIN_VALUE) {
+ if (columns > 0) {
writer.writeAttribute(HtmlConstants.COLSPAN_ATTRIBUTE, columns, null);
}
}
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/DataScrollerBaseRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -23,6 +23,9 @@
package org.richfaces.renderkit;
+import static org.richfaces.component.DataScrollerControlsMode.auto;
+import static org.richfaces.component.DataScrollerControlsMode.show;
+
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@@ -38,6 +41,7 @@
import org.ajax4jsf.javascript.JSLiteral;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractDataScroller;
+import org.richfaces.component.DataScrollerControlsMode;
import org.richfaces.event.DataScrollerEvent;
import org.richfaces.renderkit.util.AjaxRendererUtils;
@@ -69,19 +73,23 @@
}
}
+ private DataScrollerControlsMode getModeOrDefault(UIComponent component, String attributeName) {
+ DataScrollerControlsMode mode = (DataScrollerControlsMode) component.getAttributes().get(attributeName);
+ if (mode == null) {
+ mode = DataScrollerControlsMode.DEFAULT;
+ }
+ return mode;
+ }
+
public ControlsState getControlsState(FacesContext context, UIComponent component) {
- int fastStep = (Integer) component.getAttributes().get("fastStep");
+ int fastStep = (Integer) component.getAttributes().get("fastStepOrDefault");
int pageIndex = (Integer) component.getAttributes().get("page");
int pageCount = (Integer) component.getAttributes().get("pageCount");
int minPageIdx = 1;
int maxPageIdx = pageCount;
- if (fastStep <= 1) {
- fastStep = 1;
- }
-
boolean useFirst = true;
boolean useLast = true;
@@ -106,12 +114,12 @@
useForwFast = false;
}
- String boundaryControls = (String) component.getAttributes().get("boundaryControls");
- String stepControls = (String) component.getAttributes().get("stepControls");
- String fastControls = (String) component.getAttributes().get("fastControls");
+ DataScrollerControlsMode boundaryControls = getModeOrDefault(component, "boundaryControls");
+ DataScrollerControlsMode stepControls = getModeOrDefault(component, "stepControls");
+ DataScrollerControlsMode fastControls = getModeOrDefault(component, "fastControls");
- boolean isAuto = "auto".equals(boundaryControls);
- if (isAuto || "show".equals(boundaryControls)) {
+ boolean isAuto = auto.equals(boundaryControls);
+ if (isAuto || show.equals(boundaryControls)) {
if (isAuto) {
controlsState.setFirstRendered(useFirst);
controlsState.setLastRendered(useLast);
@@ -124,8 +132,8 @@
controlsState.setLastRendered(false);
}
- isAuto = "auto".equals(stepControls);
- if (isAuto || "show".equals(stepControls)) {
+ isAuto = auto.equals(stepControls);
+ if (isAuto || show.equals(stepControls)) {
if (isAuto) {
controlsState.setPreviousRendered(useFirst);
controlsState.setNextRendered(useLast);
@@ -138,8 +146,8 @@
controlsState.setNextRendered(false);
}
- isAuto = "auto".equals(fastControls);
- if (isAuto || "show".equals(fastControls)) {
+ isAuto = auto.equals(fastControls);
+ if (isAuto || show.equals(fastControls)) {
if (isAuto) {
controlsState.setFastForwardRendered(useForwFast);
controlsState.setFastRewindRendered(useBackFast);
@@ -164,7 +172,7 @@
throws IOException {
int currentPage = (Integer) component.getAttributes().get("page");
- int maxPages = (Integer) component.getAttributes().get("maxPages");
+ int maxPages = (Integer) component.getAttributes().get("maxPagesOrDefault");
int pageCount = (Integer) component.getAttributes().get("pageCount");
Map<String, String> digital = new HashMap<String, String>();
@@ -173,10 +181,6 @@
return digital;
}
- if (maxPages <= 1) {
- maxPages = 1;
- }
-
int delta = maxPages / 2;
int pages;
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/ExtendedDataTableRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -145,7 +145,13 @@
for (; iterator.hasNext();) {
columns.add(iterator.next());
}
- int count = Math.min(((Integer) table.getAttributes().get("frozenColumns")).intValue(), columns.size());
+
+ int frozenColumnsAttribute = (Integer) table.getAttributes().get("frozenColumns");
+ if (frozenColumnsAttribute < 0) {
+ frozenColumnsAttribute = 0;
+ }
+
+ int count = Math.min(frozenColumnsAttribute, columns.size());
frozenColumns = columns.subList(0, count);
columns = columns.subList(count, columns.size());
parts = new ArrayList<Part>(PartName.values().length);
@@ -808,46 +814,7 @@
}
decodeSortingFiltering(context, component);
-
- /*
- if (map.get(component.getClientId(context)) != null) {
- decodeFiltering(context, component, map.get("rich:filterString"));
- }
- if (map.get(component.getClientId(context)) != null) {
- decodeSorting(context, component, map.get("rich:sortString"));
- } */
}
- /*
- private void updateAttribute(FacesContext context, UIComponent component, String attribute, Object value) {
- Object oldValue = component.getAttributes().get(attribute);
- if ((oldValue != null && !oldValue.equals(value)) || (oldValue == null && value != null)) {
- ELContext elContext = context.getELContext();
- ValueExpression ve = component.getValueExpression(attribute);
- if (ve != null && !ve.isReadOnly(elContext)) {
- component.getAttributes().put(attribute, null);
- try {
- ve.setValue(elContext, value);
- } catch (ELException e) {
- throw new FacesException(e);
- }
- } else {
- component.getAttributes().put(attribute, value);
- }
- }
- }
-
- private void updateSortOrder(FacesContext context, UIComponent component, String value) {
- SortOrder sortOrder = SortOrder.ascending;
- try {
- sortOrder = SortOrder.valueOf(value);
- } catch (IllegalArgumentException e) {
- // If value isn't name of enum constant of SortOrder, toggle sortOrder of column.
- if (SortOrder.ascending.equals(component.getAttributes().get("sortOrder"))) {
- sortOrder = SortOrder.descending;
- }
- }
- updateAttribute(context, component, "sortOrder", sortOrder);
- }*/
private void updateWidthOfColumns(FacesContext context, UIComponent component, String widthString) {
if (widthString != null && widthString.length() > 0) {
@@ -879,57 +846,7 @@
}
}
}
-
- /*
- private void decodeFiltering(FacesContext context, UIComponent component, String value) {
- if (value != null && value.length() > 0) {
- String[] values = value.split(":");
- if (Boolean.parseBoolean(values[2])) {
- UIDataTableBase table = (UIDataTableBase) component;
- for (Iterator<UIComponent> iterator = table.columns(); iterator.hasNext();) {
- UIComponent column = iterator.next();
- if (values[0].equals(column.getId())) {
- updateAttribute(context, column, "filterValue", values[1]);
- } else {
- updateAttribute(context, column, "filterValue", null);
- }
- }
- } else {
- updateAttribute(context, component.findComponent(values[0]), "filterValue", values[1]);
- }
- context.getPartialViewContext().getRenderIds().add(component.getClientId(context)); // TODO Use partial re-rendering here.
- }
- }
- *
- private void decodeSorting(FacesContext context, UIComponent component, String value) {
- if (value != null && value.length() > 0) {
- UIDataTableBase table = (UIDataTableBase) component;
- List<Object> sortPriority = new LinkedList<Object>();
- String[] values = value.split(":");
- if (Boolean.parseBoolean(values[2]) || SortMode.single.equals(table.getSortMode())) {
- for (Iterator<UIComponent> iterator = table.columns(); iterator.hasNext();) {
- UIComponent column = iterator.next();
- if (values[0].equals(column.getId())) {
- updateSortOrder(context, column, values[1]);
- sortPriority.add(values[0]);
- } else {
- updateAttribute(context, column, "sortOrder", SortOrder.UNSORTED);
- }
- }
- } else {
- updateSortOrder(context, component.findComponent(values[0]), values[1]);
- Collection<?> priority = table.getSortPriority();
- if (priority != null) {
- priority.remove(values[0]);
- sortPriority.addAll(priority);
- }
- sortPriority.add(values[0]);
- }
- updateAttribute(context, component, "sortPriority", sortPriority);
- context.getPartialViewContext().getRenderIds().add(component.getClientId(context)); // TODO Use partial re-rendering here.
- }
- } */
-
+
/**
* @deprecated
* TODO Remove this method when width in relative units in columns will be implemented.
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeEncoderBase.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeEncoderBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeEncoderBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -28,11 +28,11 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
import org.richfaces.component.AbstractTree;
import org.richfaces.component.AbstractTreeNode;
import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.model.TreeDataModelTuple;
import org.richfaces.model.TreeDataVisitor;
@@ -191,8 +191,8 @@
TreeNodeState initialState = (TreeNodeState) context.getAttributes().get(TreeNodeRendererBase.AJAX_TOGGLED_NODE_STATE_ATTRIBUTE);
if (initialState.isDifferentThan(nodeState)) {
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- ajaxContext.appendOncomplete(new JSFunction("RichFaces.ui.TreeNode.emitToggleEvent", treeNode.getClientId(context)));
+ ExtendedPartialViewContext partialContext = ExtendedPartialViewContext.getInstance(context);
+ partialContext.appendOncomplete(new JSFunction("RichFaces.ui.TreeNode.emitToggleEvent", treeNode.getClientId(context)));
}
}
}
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -22,6 +22,7 @@
package org.richfaces.renderkit;
import static org.richfaces.renderkit.RenderKitUtils.getFirstNonEmptyAttribute;
+import static org.richfaces.renderkit.TreeRendererBase.getToggleTypeOrDefault;
import java.io.IOException;
import java.util.Map;
@@ -139,7 +140,7 @@
if (Strings.isNullOrEmpty(iconCollapsed) && Strings.isNullOrEmpty(iconExpanded)) {
encodeIconForNodeState(context, tree, treeNode, nodeState, null);
} else {
- SwitchType toggleType = treeNode.findTreeComponent().getToggleType();
+ SwitchType toggleType = getToggleTypeOrDefault(treeNode.findTreeComponent());
if (toggleType == SwitchType.client || nodeState == TreeNodeState.collapsed) {
encodeIconForNodeState(context, tree, treeNode, TreeNodeState.collapsed, iconCollapsed);
@@ -176,7 +177,7 @@
AbstractTree tree = treeNode.findTreeComponent();
- if (tree.getToggleType() != SwitchType.ajax) {
+ if (getToggleTypeOrDefault(tree) != SwitchType.ajax) {
return null;
}
@@ -191,4 +192,5 @@
return null;
}
+
}
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -36,13 +36,13 @@
import javax.faces.context.PartialViewContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractTree;
import org.richfaces.component.AbstractTreeNode;
import org.richfaces.component.MetaComponentResolver;
import org.richfaces.component.SwitchType;
+import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.event.TreeSelectionChangeEvent;
import org.richfaces.log.Logger;
import org.richfaces.log.RichfacesLogger;
@@ -95,7 +95,7 @@
protected String getAjaxSubmitFunction(FacesContext context, UIComponent component) {
AbstractTree tree = (AbstractTree) component;
- if (tree.getToggleType() != SwitchType.ajax && tree.getSelectionType() != SwitchType.ajax) {
+ if (getToggleTypeOrDefault(tree) != SwitchType.ajax && getSelectionTypeOrDefault(tree) != SwitchType.ajax) {
return null;
}
@@ -155,11 +155,11 @@
return component.getClientId(context) + SELECTION_STATE;
}
- protected SwitchType getSelectionMode(FacesContext context, UIComponent component) {
+ protected SwitchType getSelectionType(FacesContext context, UIComponent component) {
AbstractTree tree = (AbstractTree) component;
- SwitchType selectionType = tree.getSelectionType();
- if (selectionType != null && selectionType != SwitchType.ajax && selectionType != SwitchType.client) {
+ SwitchType selectionType = getSelectionTypeOrDefault(tree);
+ if (selectionType != SwitchType.ajax && selectionType != SwitchType.client) {
//TODO - better message
throw new IllegalArgumentException(String.valueOf(selectionType));
}
@@ -179,8 +179,8 @@
JSFunction function = new JSFunction("RichFaces.$", component.getClientId(context));
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- ajaxContext.appendOncomplete(function.toScript() + ".__updateSelectionFromInput();");
+ ExtendedPartialViewContext partialContext = ExtendedPartialViewContext.getInstance(context);
+ partialContext.appendOncomplete(function.toScript() + ".__updateSelectionFromInput();");
} else {
throw new IllegalArgumentException(metaComponentId);
}
@@ -246,4 +246,20 @@
protected void deleteTreeRenderingContext(FacesContext context) {
TreeRenderingContext.delete(context);
}
+
+ static SwitchType getSelectionTypeOrDefault(AbstractTree tree) {
+ SwitchType selectionType = tree.getSelectionType();
+ if (selectionType == null) {
+ selectionType = SwitchType.client;
+ }
+ return selectionType;
+ }
+
+ static SwitchType getToggleTypeOrDefault(AbstractTree tree) {
+ SwitchType toggleType = tree.getToggleType();
+ if (toggleType == null) {
+ toggleType = SwitchType.DEFAULT;
+ }
+ return toggleType;
+ }
}
Modified: branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRenderingContext.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRenderingContext.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeRenderingContext.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -22,6 +22,7 @@
package org.richfaces.renderkit;
import static com.google.common.base.Strings.isNullOrEmpty;
+import static org.richfaces.renderkit.TreeRendererBase.getToggleTypeOrDefault;
import java.io.IOException;
import java.util.HashMap;
@@ -179,7 +180,7 @@
String relativeClientId = clientId.substring(baseClientId.length());
- if (tree.getToggleType() != SwitchType.server) {
+ if (getToggleTypeOrDefault(tree) != SwitchType.server) {
String toggleHandler = (String) RenderKitUtils.getAttributeAndBehaviorsValue(context, treeNode, ONTOGGLE_ATTRIBUTE);
if (!isNullOrEmpty(toggleHandler)) {
getOrCreateHandlers(relativeClientId).setToggleHandler(toggleHandler);
Copied: branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/cdk (from rev 20842, trunk/ui/iteration/ui/src/main/resources/META-INF/cdk)
Copied: branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes (from rev 20842, trunk/ui/iteration/ui/src/main/resources/META-INF/cdk/attributes)
Modified: branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/collapsible-subtable.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -6,7 +6,7 @@
this.id = id;
this.stateInput = options.stateInput;
this.optionsInput = options.optionsInput;
- this.expandMode = options.expandMode;
+ this.expandMode = options.expandMode || richfaces.ui.CollapsibleSubTable.MODE_CLNT;
this.eventOptions = options.eventOptions;
this.formId = f;
Modified: branches/RF-9323/ui/iteration/ui/src/main/templates/tree.template.xml
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/main/templates/tree.template.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/main/templates/tree.template.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -42,7 +42,7 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
<cdk:scriptOption attributes="toggleType" defaultValue="SwitchType.DEFAULT" />
- <cdk:scriptOption name="selectionType" value="#{getSelectionMode(facesContext, component)}" defaultValue="SwitchType.client" />
+ <cdk:scriptOption name="selectionType" value="#{getSelectionType(facesContext, component)}" defaultValue="SwitchType.client" />
<cdk:scriptOption name="ajaxSubmitFunction" value="#{getAjaxSubmitFunction(facesContext, component)}" />
<cdk:scriptOption attributes="onselectionchange onbeforeselectionchange toggleNodeEvent" />
<cdk:scriptOption variables="clientEventHandlers" />
Modified: branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/component/UIColumnTest.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/component/UIColumnTest.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/component/UIColumnTest.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -71,7 +71,7 @@
*/
@Test
public final void testSortOrder() {
- Assert.assertEquals(SortOrder.unsorted, column.getSortOrder());
+ Assert.assertNull(column.getSortOrder());
column.setSortOrder(SortOrder.ascending);
Assert.assertEquals(SortOrder.ascending, column.getSortOrder());
environment.replay();
Modified: branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java
===================================================================
--- branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/iteration/ui/src/test/java/org/richfaces/renderkit/ExtendedDataTableRendererTest.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -287,7 +287,7 @@
Map<String, Object> column1Attributes = component.findComponent("column1").getAttributes();
Map<String, Object> column2Attributes = component.findComponent("column2").getAttributes();
String clientId = component.getClientId(facesContext);
- assertEquals(SortOrder.unsorted, column1Attributes.get("sortOrder"));
+ assertNull(column1Attributes.get("sortOrder"));
assertEquals(SortOrder.ascending, column2Attributes.get("sortOrder"));
facesRequest.withParameter(clientId, clientId);
facesRequest.withParameter(clientId + "rich:sorting", "column1:null:null");
@@ -308,7 +308,7 @@
Map<String, Object> column1Attributes = component.findComponent("column1").getAttributes();
Map<String, Object> column2Attributes = component.findComponent("column2").getAttributes();
String clientId = component.getClientId(facesContext);
- assertEquals(SortOrder.unsorted, column1Attributes.get("sortOrder"));
+ assertNull(column1Attributes.get("sortOrder"));
assertEquals(SortOrder.ascending, column2Attributes.get("sortOrder"));
facesRequest.withParameter(clientId, clientId);
facesRequest.withParameter(clientId + "rich:sorting", "column1:descending:true");
Modified: branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/component/AbstractJQuery.java
===================================================================
--- branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/component/AbstractJQuery.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/component/AbstractJQuery.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -59,10 +59,10 @@
@Attribute
public abstract String getQuery();
- @Attribute(defaultValue = "JQueryAttachType.DEFAULT")
+ @Attribute
public abstract JQueryAttachType getAttachType();
- @Attribute(defaultValue = "JQueryTiming.DEFAULT")
+ @Attribute
public abstract JQueryTiming getTiming();
}
Modified: branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java
===================================================================
--- branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/renderkit/ComponentControlBehaviorRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -125,8 +125,8 @@
for (UIComponent child : children) {
if (child instanceof UIParameter) {
UIParameter parameter = (UIParameter) child;
- Object value = parameter.getValue();
-
+ Object value = RendererUtils.getInstance().createParameterValue(parameter);
+
if (value != null) {
elements.add(value);
}
@@ -135,7 +135,9 @@
if (child instanceof UIHashParameter) {
UIHashParameter parameter = (UIHashParameter) child;
String name = parameter.getName();
- Map<String, Object> value = parameter.getValue();
+
+ Map<String, Object> value =
+ RendererUtils.getInstance().createParametersMap(FacesContext.getCurrentInstance(), child);
if (value != null) {
if (name != null) {
Modified: branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java
===================================================================
--- branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/misc/ui/src/main/java/org/richfaces/taglib/ComponentControlHandler.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -38,6 +38,7 @@
import javax.faces.view.facelets.FaceletContext;
import javax.faces.view.facelets.FaceletHandler;
+import org.richfaces.component.AbstractParameter;
import org.richfaces.component.UIHashParameter;
import org.richfaces.component.behavior.ComponentControlBehavior;
import org.richfaces.view.facelets.html.CustomBehaviorHandler;
@@ -108,7 +109,9 @@
}
private boolean isUIParameter(String type) {
- return (UIParameter.COMPONENT_TYPE.equals(type) || UIHashParameter.COMPONENT_TYPE.equals(type));
+ return (UIParameter.COMPONENT_TYPE.equals(type) ||
+ UIHashParameter.COMPONENT_TYPE.equals(type) ||
+ AbstractParameter.COMPONENT_TYPE.equals(type));
}
@Override
Modified: branches/RF-9323/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js
===================================================================
--- branches/RF-9323/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/misc/ui/src/main/resources/META-INF/resources/org.richfaces/jquery.component.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -60,10 +60,10 @@
};
var query = function(options) {
- if (options.timing == 'domready') {
+ if (options.timing == 'immediate') {
+ createQueryFunction(options).call(this);
+ } else {
jquery(document).ready(createQueryFunction(options));
- } else {
- createQueryFunction(options).call(this);
}
};
Deleted: branches/RF-9323/ui/output/api/src/main/java/org/richfaces/TooltipDirection.java
===================================================================
--- branches/RF-9323/ui/output/api/src/main/java/org/richfaces/TooltipDirection.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/api/src/main/java/org/richfaces/TooltipDirection.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,10 +0,0 @@
-package org.richfaces;
-
-/**
- * @author amarkhel
- */
-public enum TooltipDirection {
- topRight, topLeft, bottomRight, bottomLeft, auto;
-
- public static final TooltipDirection DEFAULT = bottomRight;
-}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/AbstractTooltip.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -65,7 +65,7 @@
public abstract boolean isAttached();
- public abstract TooltipDirection getDirection();
+ public abstract Positioning getDirection();
public abstract boolean isDisabled();
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/UITooltip.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/UITooltip.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/UITooltip.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -37,6 +37,7 @@
value,
layout,
attached,
+ jointPoint,
direction,
disabled,
followMouse,
@@ -86,12 +87,20 @@
public void setAttached(boolean attached) {
getStateHelper().put(PropertyKeys.attached, attached);
}
+
+ public Positioning getJointPoint() {
+ return (Positioning) getStateHelper().eval(PropertyKeys.jointPoint, Positioning.DEFAULT);
+ }
- public TooltipDirection getDirection() {
- return (TooltipDirection) getStateHelper().eval(PropertyKeys.direction, TooltipDirection.DEFAULT);
+ public void setJointPoint(Positioning jointPoint) {
+ getStateHelper().put(PropertyKeys.jointPoint, jointPoint);
}
- public void setDirection(TooltipDirection direction) {
+ public Positioning getDirection() {
+ return (Positioning) getStateHelper().eval(PropertyKeys.direction, Positioning.DEFAULT);
+ }
+
+ public void setDirection(Positioning direction) {
getStateHelper().put(PropertyKeys.direction, direction);
}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlCollapsiblePanel.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlCollapsiblePanel.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/component/html/HtmlCollapsiblePanel.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -23,8 +23,8 @@
package org.richfaces.component.html;
import org.richfaces.component.UICollapsiblePanel;
+
import javax.faces.component.behavior.ClientBehaviorHolder;
-
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@@ -53,6 +53,11 @@
public enum PropertyKeys {
+ leftCollapsedIcon,
+ leftExpandedIcon,
+ rightCollapsedIcon,
+ rightExpandedIcon,
+
bodyClass,
headerClass,
headerControlClass,
@@ -83,6 +88,38 @@
return COMPONENT_FAMILY;
}
+ public String getLeftCollapsedIcon() {
+ return (String) getStateHelper().eval(PropertyKeys.leftCollapsedIcon);
+ }
+
+ public void setLeftCollapsedIcon(String leftCollapsedIcon) {
+ getStateHelper().put(PropertyKeys.leftCollapsedIcon, leftCollapsedIcon);
+ }
+
+ public String getLeftExpandedIcon() {
+ return (String) getStateHelper().eval(PropertyKeys.leftExpandedIcon);
+ }
+
+ public void setLeftExpandedIcon(String leftExpandedIcon) {
+ getStateHelper().put(PropertyKeys.leftExpandedIcon, leftExpandedIcon);
+ }
+
+ public String getRightCollapsedIcon() {
+ return (String) getStateHelper().eval(PropertyKeys.rightCollapsedIcon);
+ }
+
+ public void setRightCollapsedIcon(String rightCollapsedIcon) {
+ getStateHelper().put(PropertyKeys.rightCollapsedIcon, rightCollapsedIcon);
+ }
+
+ public String getRightExpandedIcon() {
+ return (String) getStateHelper().eval(PropertyKeys.rightExpandedIcon);
+ }
+
+ public void setRightExpandedIcon(String rightExpandedIcon) {
+ getStateHelper().put(PropertyKeys.rightExpandedIcon, rightExpandedIcon);
+ }
+
public String getBodyClass() {
return (String) getStateHelper().eval(PropertyKeys.bodyClass);
}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/CollapsiblePanelRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -22,24 +22,28 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.renderkit.HtmlConstants.*;
+import static org.richfaces.component.AbstractCollapsiblePanel.States.collapsed;
+import static org.richfaces.component.AbstractCollapsiblePanel.States.expanded;
+import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
+import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.STYLE_ATTRIBUTE;
-import org.ajax4jsf.javascript.JSObject;
-import org.richfaces.component.AbstractCollapsiblePanel;
-import org.richfaces.component.AbstractTogglePanel;
-import org.richfaces.component.AbstractTogglePanelTitledItem;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import static org.richfaces.component.AbstractCollapsiblePanel.States.*;
+import org.ajax4jsf.javascript.JSObject;
+import org.richfaces.component.AbstractCollapsiblePanel;
+import org.richfaces.component.AbstractTogglePanel;
+import org.richfaces.component.AbstractTogglePanelTitledItem;
/**
* @author akolonitsky
@@ -80,7 +84,7 @@
context.getPartialViewContext().getRenderIds().add(clientId);
//TODO nick - this should be done on encode, not on decode
- addOnCompleteParam(newValue, panel.getClientId());
+ addOnCompleteParam(context, newValue, panel.getClientId());
}
}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuGroupRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -23,23 +23,39 @@
package org.richfaces.renderkit.html;
+import static org.richfaces.renderkit.HtmlConstants.ALT_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.DIV_ELEM;
+import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.IMG_ELEMENT;
+import static org.richfaces.renderkit.HtmlConstants.INPUT_ELEM;
+import static org.richfaces.renderkit.HtmlConstants.INPUT_TYPE_HIDDEN;
+import static org.richfaces.renderkit.HtmlConstants.NAME_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.SRC_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.STYLE_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.TABLE_ELEMENT;
+import static org.richfaces.renderkit.HtmlConstants.TBODY_ELEMENT;
+import static org.richfaces.renderkit.HtmlConstants.TD_ELEM;
+import static org.richfaces.renderkit.HtmlConstants.TR_ELEMENT;
+import static org.richfaces.renderkit.HtmlConstants.TYPE_ATTR;
+import static org.richfaces.renderkit.HtmlConstants.VALUE_ATTRIBUTE;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.component.AbstractPanelMenuGroup;
import org.richfaces.component.AbstractPanelMenuItem;
import org.richfaces.component.html.HtmlPanelMenuGroup;
import org.richfaces.renderkit.RenderKitUtils;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-
-import static org.richfaces.renderkit.HtmlConstants.*;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
-
/**
* @author akolonitsky
* @since 2010-10-25
@@ -76,7 +92,7 @@
context.getPartialViewContext().getRenderIds().add(clientId);
//TODO nick - this should be done on encode, not on decode
- PanelMenuRenderer.addOnCompleteParam(clientId);
+ PanelMenuRenderer.addOnCompleteParam(context, clientId);
}
}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PanelMenuRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -23,25 +23,26 @@
package org.richfaces.renderkit.html;
-import org.ajax4jsf.context.AjaxContext;
-import org.ajax4jsf.javascript.JSObject;
-import org.richfaces.component.AbstractPanelMenu;
-import org.richfaces.component.AbstractPanelMenuItem;
-import org.richfaces.component.html.HtmlPanelMenu;
-import org.richfaces.renderkit.HtmlConstants;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
+import static org.richfaces.renderkit.html.TogglePanelRenderer.getValueRequestParamName;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
import javax.faces.application.ResourceDependencies;
import javax.faces.application.ResourceDependency;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.event.ActionEvent;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
-import static org.richfaces.renderkit.html.TogglePanelRenderer.getValueRequestParamName;
+import org.ajax4jsf.javascript.JSObject;
+import org.richfaces.component.AbstractPanelMenu;
+import org.richfaces.component.AbstractPanelMenuItem;
+import org.richfaces.component.html.HtmlPanelMenu;
+import org.richfaces.context.ExtendedPartialViewContext;
+import org.richfaces.renderkit.HtmlConstants;
/**
* @author akolonitsky
@@ -81,13 +82,13 @@
context.getPartialViewContext().getRenderIds().add(panelItem.getClientId(context));
//TODO nick - this should be done on encode, not on decode
- addOnCompleteParam(panelItem.getClientId(context));
+ addOnCompleteParam(context, panelItem.getClientId(context));
}
}
}
- protected static void addOnCompleteParam(String itemId) {
- AjaxContext.getCurrentInstance().appendOncomplete(new StringBuilder()
+ protected static void addOnCompleteParam(FacesContext context, String itemId) {
+ ExtendedPartialViewContext.getInstance(context).appendOncomplete(new StringBuilder()
.append("RichFaces.$('").append(itemId).append("').onCompleteHandler();").toString());
}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/PopupPanelBaseRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,6 +1,5 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.renderkit.RenderKitUtils.addToScriptHash;
import java.io.IOException;
import java.util.HashMap;
@@ -17,7 +16,6 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.javascript.ScriptUtils;
import org.richfaces.component.AbstractPopupPanel;
import org.richfaces.json.JSONException;
import org.richfaces.json.JSONMap;
@@ -164,53 +162,10 @@
public String getStyleIfTrimmed(UIComponent panel){
if (panel.getAttributes().get("trimOverlayedElements").equals(Boolean.TRUE)) {
- return "position: relative; z-index : 0;";
+ return "position: relative; z-index : 0";
}
return "";
}
-
- public String buildScript(FacesContext context, UIComponent component) throws IOException {
- AbstractPopupPanel panel = (AbstractPopupPanel) component;
- StringBuilder result = new StringBuilder();
- result.append("new RichFaces.ui.PopupPanel('");
- result.append(panel.getClientId());
- result.append("',");
- Map<String, Object> attributes = component.getAttributes();
- Map<String, Object> options = new HashMap<String, Object>();
- addToScriptHash(options, "width", panel.getWidth(), "-1");
- addToScriptHash(options, "height", panel.getHeight(), "-1");
- addToScriptHash(options, "minWidth", panel.getMinWidth(), "-1");
- addToScriptHash(options, "minHeight", panel.getMinHeight(), "-1");
- addToScriptHash(options, "maxWidth", panel.getMaxWidth(), "" +Integer.MAX_VALUE);
- addToScriptHash(options, "maxHeight", panel.getMaxHeight(), "" +Integer.MAX_VALUE);
- addToScriptHash(options, "moveable", panel.isMoveable(), "true");
- addToScriptHash(options, "followByScroll", panel.isFollowByScroll(), "true");
- addToScriptHash(options, "left", panel.getLeft(), "auto");
- addToScriptHash(options, "top", panel.getTop(), "auto");
- addToScriptHash(options, "zindex", panel.getZindex(), "100");
- addToScriptHash(options, "shadowDepth", panel.getShadowDepth(), "2");
- addToScriptHash(options, "shadowOpacity", panel.getShadowOpacity(), "0.1");
- addToScriptHash(options, "domElementAttachment", panel.getDomElementAttachment());
-
- addToScriptHash(options, "keepVisualState", panel.isKeepVisualState(), "false");
- addToScriptHash(options, "show", panel.isShow(), "false");
- addToScriptHash(options, "modal", panel.isModal(), "true");
- addToScriptHash(options, "autosized", panel.isAutosized(), "false");
- addToScriptHash(options, "resizeable", panel.isResizeable(), "false");
- addToScriptHash(options, "overlapEmbedObjects", panel.isOverlapEmbedObjects(), "false");
- addToScriptHash(options, "visualOptions", writeVisualOptions(context, panel));
- addToScriptHash(options, "onresize", buildEventFunction(attributes.get("onresize")));
- addToScriptHash(options, "onmove", buildEventFunction(attributes.get("onmove")));
- addToScriptHash(options, "onshow", buildEventFunction(attributes.get("onshow")));
- addToScriptHash(options, "onhide", buildEventFunction(attributes.get("onhide")));
- addToScriptHash(options, "onbeforeshow", buildEventFunction(attributes.get("onbeforeshow")));
- addToScriptHash(options, "onbeforehide", buildEventFunction(attributes.get("onbeforehide")));
-
- ScriptUtils.appendScript(result, options);
- result.append(");");
- return result.toString();
- }
-
private Object buildEventFunction(Object eventFunction) {
if(eventFunction != null && eventFunction.toString().length() > 0) {
return "new Function(\"" + eventFunction.toString() + "\");";
@@ -218,7 +173,8 @@
return null;
}
- public Map<String, Object> getHandledVisualOptions(AbstractPopupPanel panel) {
+ public Map<String, Object> getHandledVisualOptions(UIComponent component) {
+ AbstractPopupPanel panel = (AbstractPopupPanel) component;
String options = panel.getVisualOptions();
Map<String, Object> result;
result = prepareVisualOptions(options, panel);
@@ -229,24 +185,7 @@
return result;
}
- private String writeVisualOptions(FacesContext context, AbstractPopupPanel panel) throws IOException {
- StringBuffer result = new StringBuffer();
-
- Iterator<Map.Entry<String, Object>> it = ((Map<String, Object>) getHandledVisualOptions(panel)).entrySet()
- .iterator();
- if (it.hasNext()) {
- result.append(",\n");
- }
- while (it.hasNext()) {
- Map.Entry<String, Object> entry = it.next();
-
- result.append(entry.getKey() + ": '" + entry.getValue() + "'");
- if (it.hasNext()) {
- result.append(",");
- }
- }
- return result.toString();
- }
+
private Map<String, Object> prepareVisualOptions(Object value, AbstractPopupPanel panel) {
if (null == value) {
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/ProgressBarBaseRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -37,12 +37,12 @@
import javax.faces.context.PartialResponseWriter;
import javax.faces.context.PartialViewContext;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractProgressBar;
import org.richfaces.component.MetaComponentResolver;
import org.richfaces.component.NumberUtils;
import org.richfaces.component.SwitchType;
+import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.renderkit.AjaxFunction;
import org.richfaces.renderkit.AjaxOptions;
import org.richfaces.renderkit.MetaComponentRenderer;
@@ -169,8 +169,8 @@
if (AbstractProgressBar.STATE_META_COMPONENT_ID.equals(metaComponentId)) {
ProgressBarState state = getCurrentState(context, component);
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- ajaxContext.getResponseComponentDataMap().put(component.getClientId(context), NumberUtils.getNumber(component.getAttributes().get("value")));
+ ExtendedPartialViewContext partialContext = ExtendedPartialViewContext.getInstance(context);
+ partialContext.getResponseComponentDataMap().put(component.getClientId(context), NumberUtils.getNumber(component.getAttributes().get("value")));
PartialResponseWriter partialResponseWriter = context.getPartialViewContext().getPartialResponseWriter();
partialResponseWriter.startUpdate(state.getStateClientId(context, component));
Copied: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java (from rev 20842, trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java)
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java (rev 0)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -0,0 +1,112 @@
+package org.richfaces.renderkit.html;
+
+import org.richfaces.component.html.HtmlPanelMenuGroup;
+import org.richfaces.renderkit.RenderKitUtils;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import java.io.IOException;
+
+import static org.richfaces.component.util.HtmlUtil.concatClasses;
+import static org.richfaces.renderkit.HtmlConstants.*;
+import static org.richfaces.renderkit.html.DivPanelRenderer.styleElement;
+
+public class TableIconsRendererHelper {
+
+ public void encodeHeaderGroup(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuItem, String classPrefix) throws IOException {
+ writer.startElement(TABLE_ELEMENT, null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix + "-gr", null);
+ writer.startElement(TBODY_ELEMENT, null);
+ writer.startElement(TR_ELEMENT, null);
+
+ encodeHeaderGroupIconLeft(writer, context, menuItem, classPrefix);
+
+ writer.startElement(TD_ELEM, null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, classPrefix + "-lbl", null);
+
+ UIComponent headerFacet = menuItem.getFacet("label");
+ if (headerFacet != null && headerFacet.isRendered()) {
+ headerFacet.encodeAll(context);
+ } else {
+ Object label = menuItem.getLabel();
+ if (label != null && !label.equals("")) {
+ writer.writeText(label, null);
+ }
+ }
+
+ writer.endElement(TD_ELEM);
+
+ encodeHeaderGroupIconRight(writer, context, menuItem, classPrefix);
+
+ writer.endElement(TR_ELEMENT);
+ writer.endElement(TBODY_ELEMENT);
+ writer.endElement(TABLE_ELEMENT);
+ }
+
+ public void encodeHeaderGroupIconLeft(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuGroup, String classPrefix) throws IOException {
+ String iconCollapsed = menuGroup.isDisabled() ? menuGroup.getIconLeftDisabled() : menuGroup.getIconLeftCollapsed();
+ String iconExpanded = menuGroup.isDisabled() ? menuGroup.getIconLeftDisabled() : menuGroup.getIconLeftExpanded();
+
+ encodeTdIcon(writer, context, classPrefix + "-ico", menuGroup.isExpanded(), iconCollapsed, iconExpanded);
+ }
+
+ public void encodeHeaderGroupIconRight(ResponseWriter writer, FacesContext context, HtmlPanelMenuGroup menuItem, String classPrefix) throws IOException {
+ String iconCollapsed = menuItem.isDisabled() ? menuItem.getIconRightDisabled() : menuItem.getIconRightCollapsed();
+ String iconExpanded = menuItem.isDisabled() ? menuItem.getIconRightDisabled() : menuItem.getIconRightExpanded();
+
+ //TODO nick - should this be "-ico-exp"? also why expanded icon state is connected with right icon alignment?
+ encodeTdIcon(writer, context, classPrefix + "-exp-ico", menuItem.isExpanded(), iconCollapsed, iconExpanded);
+ }
+
+ public void encodeTdIcon(ResponseWriter writer, FacesContext context, String cssClass, boolean isExpanded, String attrIconCollapsedValue, String attrIconExpandedValue) throws IOException {
+ writer.startElement(TD_ELEM, null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, cssClass, null);
+
+ encodeIdIcon(writer, context, isExpanded, attrIconCollapsedValue, "rf-pm-ico-colps");
+ encodeIdIcon(writer, context, !isExpanded, attrIconExpandedValue, "rf-pm-ico-exp");
+
+ writer.endElement(TD_ELEM);
+ }
+
+ public void encodeIdIcon(ResponseWriter writer, FacesContext context, boolean isExpanded, String attrIconValue, String styleClass) throws IOException {
+ if (attrIconValue == null || attrIconValue.trim().length() <= 0) {
+ encodeDivIcon(writer, isExpanded, PanelMenuIcons.none, styleClass);
+ } else {
+ PanelMenuIcons icon = getIcon(attrIconValue);
+ if (icon != null) {
+ encodeDivIcon(writer, isExpanded, icon, styleClass);
+ } else {
+ encodeImage(writer, context, attrIconValue);
+ }
+ }
+ }
+
+ public PanelMenuIcons getIcon(String attrIconCollapsedValue) {
+ if (attrIconCollapsedValue == null) {
+ return null;
+ }
+
+ try {
+ return PanelMenuIcons.valueOf(attrIconCollapsedValue);
+ } catch (IllegalArgumentException e) {
+ return null;
+ }
+ }
+
+ public void encodeDivIcon(ResponseWriter writer, boolean isDisplay, PanelMenuIcons icon, String styleClass) throws IOException {
+ writer.startElement(DIV_ELEM, null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, concatClasses(styleClass, icon.cssClass()), null);
+ writer.writeAttribute(STYLE_ATTRIBUTE, styleElement("display", isDisplay ? "none" : "block"), null);
+ writer.endElement(DIV_ELEM);
+ }
+
+ public void encodeImage(ResponseWriter writer, FacesContext context, String attrIconValue) throws IOException {
+ writer.startElement(IMG_ELEMENT, null);
+ writer.writeAttribute(ALT_ATTRIBUTE, "", null);
+ writer.writeURIAttribute(SRC_ATTRIBUTE, RenderKitUtils.getResourceURL(attrIconValue, context), null);
+ writer.endElement(IMG_ELEMENT);
+ }
+
+
+}
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TogglePanelRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -34,13 +34,13 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSFunctionDefinition;
import org.ajax4jsf.javascript.JSObject;
import org.ajax4jsf.javascript.JSReference;
import org.richfaces.component.AbstractTogglePanel;
import org.richfaces.component.AbstractTogglePanelItem;
import org.richfaces.component.util.HtmlUtil;
+import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.renderkit.AjaxOptions;
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.util.AjaxRendererUtils;
@@ -87,17 +87,17 @@
context.getPartialViewContext().getRenderIds().add(panelItem.getClientId(context));
//TODO nick - this should be done on encode, not on decode
- addOnCompleteParam(newValue, panel.getClientId());
+ addOnCompleteParam(context, newValue, panel.getClientId());
}
}
}
- protected static void addOnCompleteParam(String newValue, String panelId) {
+ protected static void addOnCompleteParam(FacesContext context, String newValue, String panelId) {
StringBuilder onComplete = new StringBuilder();
onComplete.append("RichFaces.$('").append(panelId)
.append("').onCompleteHandler('").append(newValue).append("');");
- AjaxContext.getCurrentInstance().appendOncomplete(onComplete.toString());
+ ExtendedPartialViewContext.getInstance(context).appendOncomplete(onComplete.toString());
}
static String getValueRequestParamName(FacesContext context, UIComponent component) {
Modified: branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TooltipRenderer.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -23,7 +23,8 @@
package org.richfaces.renderkit.html;
-import static org.richfaces.renderkit.HtmlConstants.*;
+import static org.richfaces.renderkit.HtmlConstants.CLASS_ATTRIBUTE;
+import static org.richfaces.renderkit.HtmlConstants.ID_ATTRIBUTE;
import static org.richfaces.renderkit.RenderKitUtils.renderPassThroughAttributes;
import static org.richfaces.renderkit.html.TogglePanelRenderer.addEventOption;
import static org.richfaces.renderkit.html.TogglePanelRenderer.getAjaxOptions;
@@ -39,11 +40,11 @@
import javax.faces.context.PartialResponseWriter;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.javascript.JSObject;
import org.richfaces.TooltipMode;
import org.richfaces.component.AbstractTooltip;
import org.richfaces.component.html.HtmlTooltip;
+import org.richfaces.context.ExtendedPartialViewContext;
import org.richfaces.renderkit.HtmlConstants;
import org.richfaces.renderkit.MetaComponentRenderer;
@@ -81,12 +82,12 @@
context.getPartialViewContext().getRenderIds().add(tooltip.getContentClientId(context));
//TODO nick - this should be done on encode, not on decode
- addOnCompleteParam(tooltip.getClientId());
+ addOnCompleteParam(context, tooltip.getClientId());
}
}
- protected static void addOnCompleteParam(String tooltipId) {
- AjaxContext.getCurrentInstance().appendOncomplete(new StringBuilder()
+ protected static void addOnCompleteParam(FacesContext context, String tooltipId) {
+ ExtendedPartialViewContext.getInstance(context).appendOncomplete(new StringBuilder()
.append("RichFaces.$('").append(tooltipId).append("').onCompleteHandler();").toString());
}
@@ -159,7 +160,8 @@
Map<String, Object> options = new HashMap<String, Object>();
options.put("ajax", getAjaxOptions(context, tooltip));
- options.put("direction", tooltip.getDirection());
+ options.put("jointPoint", tooltip.getJointPoint().getValue());
+ options.put("direction", tooltip.getDirection().getValue());
options.put("attached", tooltip.isAttached());
options.put("offset", getOffset(tooltip));
options.put("mode", tooltip.getMode());
@@ -180,7 +182,7 @@
}
public Integer[] getOffset(HtmlTooltip tooltip) {
- return new Integer[] {tooltip.getHorizontalOffset(), tooltip.getHorizontalOffset()};
+ return new Integer[] {tooltip.getHorizontalOffset(), tooltip.getVerticalOffset()};
}
private void encodeContentEnd(ResponseWriter writer, FacesContext context, AbstractTooltip tooltip) throws IOException {
Modified: branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.faces-config.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -855,7 +855,7 @@
<property>
<description></description>
<property-name>direction</property-name>
- <property-class>org.richfaces.component.TooltipDirection</property-class>
+ <property-class>org.richfaces.component.Positioning</property-class>
</property>
<property>
<description></description>
@@ -939,6 +939,22 @@
<component-type>org.richfaces.CollapsiblePanel</component-type>
<component-class>org.richfaces.component.html.HtmlCollapsiblePanel</component-class>
<property>
+ <property-name>leftCollapsedIcon</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>leftExpandedIcon</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>rightExpandedIcon</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
+ <property-name>rightCollapsedIcon</property-name>
+ <property-class>java.lang.String</property-class>
+ </property>
+ <property>
<description></description>
<property-name>switchType</property-name>
<property-class>org.richfaces.component.SwitchType</property-class>
Modified: branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/resources/META-INF/pn.taglib.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -909,7 +909,7 @@
</attribute>
<attribute>
<name>direction</name>
- <type>org.richfaces.component.TooltipDirection</type>
+ <type>org.richfaces.component.Positioning</type>
</attribute>
<attribute>
<name>disabled</name>
@@ -1047,6 +1047,22 @@
<renderer-type>org.richfaces.CollapsiblePanel</renderer-type>
<handler-class>org.richfaces.view.facelets.html.CollapsiblePanelTagHandler</handler-class>
</component>
+ <attribute>
+ <name>leftCollapsedIcon</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>leftExpandedIcon</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>rightExpandedIcon</name>
+ <type>java.lang.String</type>
+ </attribute>
+ <attribute>
+ <name>rightCollapsedIcon</name>
+ <type>java.lang.String</type>
+ </attribute>
<attribute>
<name>switchType</name>
<type>org.richfaces.component.SwitchType</type>
Modified: branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/popupPanel.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -51,7 +51,7 @@
richfaces.ui.PopupPanel = function(id, options) {
- $super.constructor.call(this,id);
+ $super.constructor.call(this,id);
this.markerId = id;
this.attachToDom(this.markerId);
this.options = $.extend(this.options, defaultOptions, options || {});
@@ -499,9 +499,9 @@
var event = {};
event.parameters = opts || {};
- if (this.options && this.options.onhide) {
- this.options.onhide(event);
- }
+// if (this.options && this.options.onhide) {
+// this.options.onhide(event);
+// }
var forms = $("form", element);
if (this.options.keepVisualState && forms) {
@@ -754,12 +754,11 @@
$.extend(richfaces.ui.PopupPanel, {
showPopupPanel : function (id, opts, event) {
-
- $(document).ready(richfaces.$(id).show());
+ richface.Event.ready(richfaces.$(id).show());
},
hidePopupPanel : function (id, opts, event) {
- $(document).ready(richfaces.$(id).hide());
+ richface.Event.ready(richfaces.$(id).hide());
}
});
Modified: branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/tooltip.js 2010-12-29 22:21:20 UTC (rev 20843)
@@ -25,17 +25,6 @@
rf.ui = rf.ui || {};
- rf.ui.TooltipDirection = {
- topRight : "topRight",
- topLeft : "topLeft",
- bottomRight : "bottomRight",
- bottomLeft : "bottomLeft",
- auto : "auto",
-
- DEFAULT: "bottomRight"
- };
- var TooltipDirection = rf.ui.TooltipDirection;
-
rf.ui.TooltipMode = {
client : "client",
ajax : "ajax",
@@ -45,7 +34,9 @@
var TooltipMode = rf.ui.TooltipMode;
var DEFAULT_OPTIONS = {
- direction : TooltipDirection.DEFAULT,
+ jointPoint : "AA",
+ direction : "AA",
+ offset: [0,0],
attached : true,
offset : [10, 10],
mode : TooltipMode.DEFAULT,
@@ -132,7 +123,9 @@
attachTo: this.target,
attachToBody: false,
positionType: "TOOLTIP",
- positionOffset: this.options.offset
+ positionOffset: this.options.offset,
+ jointPoint: this.options.jointPoint,
+ direction: this.options.direction
});
var tooltip = this;
Modified: branches/RF-9323/ui/output/ui/src/main/templates/popupPanel.template.xml
===================================================================
--- branches/RF-9323/ui/output/ui/src/main/templates/popupPanel.template.xml 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/output/ui/src/main/templates/popupPanel.template.xml 2010-12-29 22:21:20 UTC (rev 20843)
@@ -72,16 +72,17 @@
</c:if>
</div>
- <cdk:object type="java.lang.String" name="script" value="#{buildScript(facesContext, component)}" />
- <cdk:object type="java.lang.String" name="showScript" value="#{buildShowScript(facesContext, component)}" />
+ <cdk:scriptObject name="options">
+ <cdk:scriptOption attributes="width height minWidth minHeight maxWidth maxHeight moveable followByScroll left top zindex shadowDepth shadowOpacity domElementAttachment show keepVisualState autosized resizeable modal overlapEmbedObjects visualOptions " />
+ <cdk:scriptOption attributes="onshow onhide onresize onmove onbeforeshow onbeforehide" wrapper="eventHandler"/>
+ </cdk:scriptObject>
+
<script type="text/javascript">
- #{script}
- </script>
- <c:if test="#{showScript != null}">
- <script type="text/javascript">
- #{showScript}
- </script>
- </c:if>
+ new RichFaces.ui.PopupPanel(#{toScriptArgs(clientId, options)});
+ <c:if test="#{component.attributes['show'] != false}">
+ RichFaces.ui.PopupPanel.showPopupPanel(#{toScriptArgs(clientId, getHandledVisualOptions(component))});
+ </c:if>
+ </script>
</div>
Modified: branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIAjaxValidator.java
===================================================================
--- branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIAjaxValidator.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIAjaxValidator.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -39,7 +39,6 @@
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
-import org.ajax4jsf.context.AjaxContext;
import org.richfaces.event.ValidatorEvent;
/**
@@ -126,14 +125,14 @@
}
public void encodeAjax(FacesContext context) throws IOException {
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
- Set<String> renderedAreas = ajaxContext.getAjaxRenderedAreas();
- for (UIComponent message : getMessages(context, this)) {
- if (message.isRendered()) {
- message.encodeAll(context);
- renderedAreas.add(message.getClientId(context));
- }
- }
+// AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
+// Set<String> renderedAreas = ajaxContext.getAjaxRenderedAreas();
+// for (UIComponent message : getMessages(context, this)) {
+// if (message.isRendered()) {
+// message.encodeAll(context);
+// renderedAreas.add(message.getClientId(context));
+// }
+// }
// Write information about encoded areas after submission.
// AjaxRendererUtils.encodeAreas(context, this);
}
Deleted: branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIBeanValidator.java
===================================================================
--- branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIBeanValidator.java 2010-12-29 17:25:47 UTC (rev 20842)
+++ branches/RF-9323/ui/validator/ui/src/main/java/org/richfaces/component/UIBeanValidator.java 2010-12-29 22:21:20 UTC (rev 20843)
@@ -1,25 +0,0 @@
-/**
- *
- */
-package org.richfaces.component;
-
-/**
- * Stage class to keep backward compatibility.
- *
- * @author asmirnov
- * @deprecated That class has been renamed, Use {@link UIAjaxValidator} instead
- *
- */
-public abstract class UIBeanValidator extends UIAjaxValidator {
-
- /*
- * (non-Javadoc)
- *
- * @see javax.faces.component.UIComponent#getFamily()
- */
- @Override
- public String getFamily() {
- return COMPONENT_FAMILY;
- }
-
-}
14 years, 1 month
JBoss Rich Faces SVN: r20842 - in trunk/ui/input/ui/src/main: java/org/richfaces/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-12-29 12:25:47 -0500 (Wed, 29 Dec 2010)
New Revision: 20842
Added:
trunk/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java
Modified:
trunk/ui/input/ui/src/main/config/faces-config.xml
Log:
RF-9935
Modified: trunk/ui/input/ui/src/main/config/faces-config.xml
===================================================================
--- trunk/ui/input/ui/src/main/config/faces-config.xml 2010-12-29 16:46:42 UTC (rev 20841)
+++ trunk/ui/input/ui/src/main/config/faces-config.xml 2010-12-29 17:25:47 UTC (rev 20842)
@@ -236,7 +236,7 @@
</property>
<component-extension>
<cdk:generate>true</cdk:generate>
- <cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
+ <cdk:base-class>org.richfaces.component.UIInputNumber</cdk:base-class>
<cdk:component-family>javax.faces.Input</cdk:component-family>
<cdk:renderer-type>org.richfaces.InputNumberSliderRenderer</cdk:renderer-type>
<cdk:tag>
@@ -534,7 +534,7 @@
</property>
<component-extension>
<cdk:generate>true</cdk:generate>
- <cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
+ <cdk:base-class>org.richfaces.component.UIInputNumber</cdk:base-class>
<cdk:component-family>javax.faces.Input</cdk:component-family>
<cdk:renderer-type>org.richfaces.InputNumberSpinnerRenderer</cdk:renderer-type>
<cdk:tag>
Added: trunk/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java (rev 0)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/UIInputNumber.java 2010-12-29 17:25:47 UTC (rev 20842)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.richfaces.component;
+
+import java.util.Map;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIInput;
+import javax.faces.context.FacesContext;
+import javax.faces.validator.DoubleRangeValidator;
+import javax.faces.validator.ValidatorException;
+
+/**
+ * @author Konstantin Mishin
+ *
+ */
+public class UIInputNumber extends UIInput {
+
+ @Override
+ protected void validateValue(FacesContext context, Object newValue) {
+ Map<String, Object> attributes = getAttributes();
+ DoubleRangeValidator validator = new DoubleRangeValidator(doubleValue(attributes.get("maxValue")),
+ doubleValue(attributes.get("minValue"))) {
+ @Override
+ public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException {
+ super.validate(context, component, UIInputNumber.this.getSubmittedValue());
+ }
+ };
+ addValidator(validator);
+ super.validateValue(context, newValue);
+ removeValidator(validator);
+ }
+
+ private static double doubleValue(Object value) {
+ if (value instanceof Number) {
+ return ((Number) value).doubleValue();
+ } else {
+ return Double.parseDouble(value.toString());
+ }
+ }
+
+}
14 years, 1 month
JBoss Rich Faces SVN: r20841 - in trunk: ui/input/ui/src/main/java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2010-12-29 11:46:42 -0500 (Wed, 29 Dec 2010)
New Revision: 20841
Modified:
trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
trunk/ui/input/ui/src/main/templates/calendar.template.xml
Log:
http://jira.jboss.com/jira/browse/RF-4865
Modified: trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml
===================================================================
--- trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2010-12-29 16:31:41 UTC (rev 20840)
+++ trunk/examples/input-demo/src/main/webapp/examples/calendar.xhtml 2010-12-29 16:46:42 UTC (rev 20841)
@@ -72,6 +72,8 @@
style="width:200px;border:10px solid #000000"
styleClass="hello"
boundaryDatesMode = "scroll"
+ defaultLabel = "bla-bla-bla"
+ enableManualInput="false"
>
</calendar:calendar>
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-12-29 16:31:41 UTC (rev 20840)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-12-29 16:46:42 UTC (rev 20841)
@@ -165,7 +165,10 @@
public abstract int getZindex();
@Attribute(defaultValue = "client")
- public abstract String getMode();
+ public abstract String getMode();
+
+ @Attribute
+ public abstract String getDefaultLabel();
@Attribute
public abstract String getStyle();
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-29 16:31:41 UTC (rev 20840)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-29 16:46:42 UTC (rev 20841)
@@ -262,15 +262,29 @@
currentDate: null,
defaultTime: {hours:12,minutes:0, seconds:0},
mode: "client",
- hidePopupOnScroll: true
+ hidePopupOnScroll: true,
+ defaultLabel:""
};
var defaultLabels = {apply:'Apply', today:'Today', clean:'Clean', ok:'OK', cancel:'Cancel', close:'x'};
var eventHandlerNames = ["change", "dateselect", "beforedateselect", "currentdateselect",
"beforecurrentdateselect", "currentdateselect", "clean", "complete", "collapse",
- "datemouseout", "datemouseover", "show", "hide", "timeselect", "beforetimeselect"];
+ "datemouseout", "datemouseover", "show", "hide", "timeselect", "beforetimeselect"];
+ var updateDefaultLabel = function (value) {
+ if (!this.selectedDate) {
+ var field = rf.getDomElement(this.INPUT_DATE_ID);
+ field.value = value;
+ }
+ }
+
+ var onFocusBlur = function (event) {
+ this.isFocused = event.type=="focus";
+ if (!this.isFocused && this.isVisible) return;
+ updateDefaultLabel.call(this, (event.type=="focus" ? "" : this.options.defaultLabel));
+ }
+
// Constructor definition
rf.ui.Calendar = function(componentId, locale, options, markups) {
@@ -496,22 +510,18 @@
{
rf.Event.bindById(this.INPUT_DATE_ID, "click"+this.namespace, handler, this);
}
+ if (this.options.defaultLabel) {
+ updateDefaultLabel.call(this, this.options.defaultLabel);
+ rf.Event.bindById(this.INPUT_DATE_ID, "focus"+this.namespace+" blur"+this.namespace, onFocusBlur, this);
+ }
}
this.scrollElements = null;
- //alert(new Date().getTime()-_d.getTime());
-
//define isAjaxMode variable
- "ajax" == this.options.mode ? this.isAjaxMode = true : this.isAjaxMode = false;
+ this.isAjaxMode = this.options.mode == "ajax";
- /*
- //events handler binding
- for (var i in eventHandlerNames) {
- var handler = this.options["on"+eventHandlerNames[i]];
- if (handler) rf.Event.bindById(this.id, eventHandlerNames[i], handler, this);
- }
- */
+ //alert(new Date().getTime()-_d.getTime());
};
// Extend component class and add protected methods from parent class to our container
@@ -892,7 +902,9 @@
$(rf.getDomElement(this.CALENDAR_CONTENT)).hide();
this.isVisible = false;
-
+ if (this.options.defaultLabel && !this.isFocused) {
+ updateDefaultLabel.call(this, this.options.defaultLabel);
+ }
}
},
@@ -917,7 +929,9 @@
var baseInput = base.firstChild;
var baseButton = baseInput.nextSibling;
- if (baseInput && baseInput.value!=undefined)
+ if (this.options.defaultLabel) {
+ if (!this.isFocused) updateDefaultLabel.call(this, "");
+ } else if (baseInput.value!=undefined)
{
this.selectDate(baseInput.value, false, {event:e, element:element});
}
Modified: trunk/ui/input/ui/src/main/templates/calendar.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/calendar.template.xml 2010-12-29 16:31:41 UTC (rev 20840)
+++ trunk/ui/input/ui/src/main/templates/calendar.template.xml 2010-12-29 16:46:42 UTC (rev 20841)
@@ -69,7 +69,7 @@
<script type="text/javascript">
<cdk:scriptObject name="options">
- <cdk:scriptOption attributes="enableManualInput disabled readonly resetTimeOnDateSelect showApplyButton popup showInput showHeader showFooter showWeeksBar todayControlMode datePattern jointPoint direction boundaryDatesMode horizontalOffset verticalOffset hidePopupOnScrol showWeekDaysBar styleClass mode" />
+ <cdk:scriptOption attributes="enableManualInput disabled readonly resetTimeOnDateSelect showApplyButton popup showInput showHeader showFooter showWeeksBar todayControlMode datePattern jointPoint direction boundaryDatesMode horizontalOffset verticalOffset hidePopupOnScrol showWeekDaysBar styleClass mode defaultLabel" />
<cdk:scriptOption attributes="onchange ondateselect onbeforedateselect onbeforecurrentdateselect onhide onshow ondatemouseover ondatemouseout onclean ontimeselect onbeforetimeselect" wrapper="eventHandler" />
<cdk:scriptOption name="currentDate" value="#{getCurrentDate(facesContext, component)}" />
<cdk:scriptOption name="selectedDate" value="#{getSelectedDate(facesContext, component)}" />
14 years, 1 month
JBoss Rich Faces SVN: r20840 - in trunk/ui/input/ui/src: main/java/org/richfaces/renderkit and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2010-12-29 11:31:41 -0500 (Wed, 29 Dec 2010)
New Revision: 20840
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
trunk/ui/input/ui/src/main/templates/calendar.template.xml
trunk/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml
Log:
RF-9652 Calendar: apply outcome of M4 pre-promotion code review
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-12-29 15:03:28 UTC (rev 20839)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/component/AbstractCalendar.java 2010-12-29 16:31:41 UTC (rev 20840)
@@ -43,8 +43,6 @@
import javax.faces.component.visit.VisitResult;
import javax.faces.context.FacesContext;
import javax.faces.convert.DateTimeConverter;
-import javax.faces.event.AbortProcessingException;
-import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
import org.richfaces.cdk.annotations.Attribute;
@@ -88,13 +86,15 @@
protected enum PropertyKeys {
locale
- };
+ }
public enum Modes {
- CLIENT,
- AJAX
- }
+ client,
+ ajax
+ }
+ private Object submittedCurrentDate = null;
+
@Attribute(defaultValue = "MMM d, yyyy")
public abstract String getDatePattern();
@@ -311,7 +311,6 @@
@Attribute(events = @EventName("clean"))
public abstract String getOnclean();
-
@Attribute
public Object getLocale() {
@@ -330,8 +329,49 @@
getStateHelper().put(PropertyKeys.locale, locale);
}
-
+ public Object getSubmittedCurrentDate() {
+ return submittedCurrentDate;
+ }
+ public void setSubmittedCurrentDate(Object submittedCurrentDate) {
+ this.submittedCurrentDate = submittedCurrentDate;
+ }
+
+ @Override
+ public void validate(FacesContext context) {
+ super.validate(context);
+
+ try {
+ // we should use datePattern attribute-based converter only for
+ // selectedDate
+ // current date string always has predefined format: m/y
+ String submittedCurrentDateString = (String) this.getSubmittedCurrentDate();
+ Date currentDate = CalendarHelper.getAsDate(context, this, getCurrentDate());
+ Date submittedCurrentDate = CalendarHelper.convertCurrentDate(submittedCurrentDateString);
+
+ if (!submittedCurrentDate.equals(currentDate)) {
+ updateCurrentDate(context, submittedCurrentDate);
+ }
+
+ CurrentDateChangeEvent currentDateChangeEvent = new CurrentDateChangeEvent(this, submittedCurrentDateString);
+ currentDateChangeEvent.setCurrentDate(submittedCurrentDate);
+ currentDateChangeEvent.setPhaseId(PhaseId.INVOKE_APPLICATION);
+ queueEvent(currentDateChangeEvent);
+
+ } catch (Exception e) {
+ if (log.isDebugEnabled()) {
+ log.debug(" currentDate convertion fails with following exception: " + e.toString(), e);
+ }
+ setValid(false);
+ String messageString = e.toString();
+ FacesMessage message = new FacesMessage(messageString);
+ message.setSeverity(FacesMessage.SEVERITY_ERROR);
+ context.addMessage(getClientId(context), message);
+ context.renderResponse();
+ }
+
+ }
+
public void updateCurrentDate(FacesContext facesContext, Object currentDate) {
if (facesContext == null) {
throw new NullPointerException();
@@ -435,48 +475,6 @@
}
}
}
-
- public void broadcast(FacesEvent event) throws AbortProcessingException {
- if (event instanceof CurrentDateChangeEvent) {
- FacesContext facesContext = getFacesContext();
- CurrentDateChangeEvent currentDateChangeEvent = (CurrentDateChangeEvent) event;
- String currentDateString = currentDateChangeEvent.getCurrentDateString();
-
- try {
- // we should use datePattern attribute-based converter only for
- // selectedDate
- // current date string always has predefined format: m/y
- Date currentDate = CalendarHelper.getAsDate(facesContext, this, getCurrentDate());
- Date submittedCurrentDate = CalendarHelper.convertCurrentDate(currentDateString);
- currentDateChangeEvent.setCurrentDate(submittedCurrentDate);
-
- if (!submittedCurrentDate.equals(currentDate)) {
- updateCurrentDate(facesContext, submittedCurrentDate);
- }
-
- } catch (Exception e) {
- if (log.isDebugEnabled()) {
- log.debug(" currentDate convertion fails with following exception: " + e.toString(), e);
- }
- setValid(false);
- String messageString = e.toString();
- FacesMessage message = new FacesMessage(messageString);
- message.setSeverity(FacesMessage.SEVERITY_ERROR);
- facesContext.addMessage(getClientId(facesContext), message);
- facesContext.renderResponse();
- }
- }
-
- super.broadcast(event);
- }
-
- @Override
- public void queueEvent(FacesEvent event) {
- super.queueEvent(event);
- if (event instanceof CurrentDateChangeEvent) {
- event.setPhaseId(PhaseId.PROCESS_VALIDATIONS);
- }
- }
public String resolveClientId(FacesContext facesContext, UIComponent contextComponent, String metaComponentId) {
if (DAYSDATA_META_COMPONENT_ID.equals(metaComponentId)) {
@@ -591,7 +589,7 @@
Date dateRangeBegin = null;
Date dateRangeEnd = null;
- if (Modes.AJAX.toString().equalsIgnoreCase(getMode())) {
+ if (Modes.ajax.toString().equalsIgnoreCase(getMode())) {
dateRangeBegin = CalendarHelper.getAsDate(facesContext, this,
getDefaultPreloadBegin((Date) getCurrentDateOrDefault()));
dateRangeEnd = CalendarHelper.getAsDate(facesContext, this,
Modified: trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-12-29 15:03:28 UTC (rev 20839)
+++ trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2010-12-29 16:31:41 UTC (rev 20840)
@@ -53,7 +53,6 @@
import org.richfaces.component.util.MessageUtil;
import org.richfaces.component.util.SelectUtils;
import org.richfaces.context.ExtendedPartialViewContext;
-import org.richfaces.event.CurrentDateChangeEvent;
import org.richfaces.utils.CalendarHelper;
/**
@@ -164,9 +163,7 @@
String clientId = calendar.getClientId(context);
String currentDateString = (String) requestParameterMap.get(clientId + CURRENT_DATE_INPUT);
- if (currentDateString != null) {
- calendar.queueEvent(new CurrentDateChangeEvent(calendar, currentDateString));
- }
+ calendar.setSubmittedCurrentDate(currentDateString);
String selectedDateString = (String) requestParameterMap.get(clientId + "InputDate");
if (selectedDateString != null) {
@@ -178,8 +175,6 @@
pvc.getRenderIds().add(
component.getClientId(context) + MetaComponentResolver.META_COMPONENT_SEPARATOR_CHAR
+ AbstractCalendar.DAYSDATA_META_COMPONENT_ID);
-
- context.renderResponse();
}
}
@@ -568,5 +563,5 @@
public void decodeMetaComponent(FacesContext context, UIComponent component, String metaComponentId) {
throw new UnsupportedOperationException();
- }
+ }
}
\ No newline at end of file
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss 2010-12-29 15:03:28 UTC (rev 20839)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.ecss 2010-12-29 16:31:41 UTC (rev 20840)
@@ -1,11 +1,11 @@
-.rf-ca-extr{
+.rf-cal-extr{
border : 1px solid;
border-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-btn{
+.rf-cal-btn{
cursor : pointer;
}
-.rf-ca-hdr-optnl{
+.rf-cal-hdr-optnl{
border-bottom : 1px solid;
border-bottom-color : '#{richSkin.panelBorderColor}';
background-color : '#{richSkin.additionalBackgroundColor}';
@@ -16,7 +16,7 @@
font-weight: bold;
}
-.rf-ca-hdr{
+.rf-cal-hdr{
border-right : 0px solid;
border-bottom : 1px solid;
border-bottom-color : '#{richSkin.panelBorderColor}';
@@ -25,16 +25,16 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-ca-c-size{
+.rf-cal-c-cnt-overflow{
width : 25px;
height : 22px;
}
-.rf-ca-c-div{
+.rf-cal-c-cnt{
overflow: hidden;
}
-.rf-ca-c{
+.rf-cal-c{
border-bottom : 1px solid;
border-right : 1px solid;
padding : 0px;
@@ -47,7 +47,7 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-ca-month{
+.rf-cal-hdr-month{
vertical-align : middle;
text-align : center;
height : 22px;
@@ -59,7 +59,7 @@
color : '#{richSkin.headerTextColor}';
}
-.rf-ca-tl{
+.rf-cal-tl{
vertical-align : middle;
text-align : center;
width: 20px;
@@ -71,7 +71,7 @@
color : '#{richSkin.headerTextColor}';
}
-.rf-ca-days{
+.rf-cal-day-lbl{
border-bottom : 1px solid;
border-right : 0px solid;
vertical-align : middle;
@@ -84,7 +84,7 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-ca-week{
+.rf-cal-week{
border-bottom : 1px solid;
border-right : 1px solid;
vertical-align : middle;
@@ -98,7 +98,7 @@
font-family : '#{richSkin.generalFamilyFont}';
}
-.rf-rgh-c{
+.rf-cal-right-c{
border-right : 0px;
}
@@ -106,7 +106,7 @@
border-bottom : 0px;
}
-.rf-ca-tl-ftr{
+.rf-cal-tl-ftr{
height : 22px;
padding : 1px 2px 1px 1px;
background: '#{richSkin.additionalBackgroundColor}';
@@ -117,7 +117,7 @@
background-position: right center;
}
-.rf-ca-ftr-optnl{
+.rf-cal-ftr-optnl{
border-top : 1px solid;
border-right : 0px solid;
padding : 7px;
@@ -130,7 +130,7 @@
font-family: '#{richSkin.generalFamilyFont}';
}
-.rf-ca-ftr{
+.rf-cal-ftr{
border-top: 1px solid;
border-right: 0px solid;
font-size: '#{richSkin.generalSizeFont}';
@@ -140,7 +140,7 @@
border-right-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-sp-inp {
+.rf-cal-sp-inp {
border: 0px;
padding: 0px 0px 0px 3px;
background: none transparent scroll repeat 0% 0%;
@@ -149,7 +149,7 @@
width: 18px;
}
-.rf-ca-sp-inp-cntr {
+.rf-cal-sp-inp-cntr {
background-position: left top;
background-repeat: repeat-x;
border: 1px solid;
@@ -160,7 +160,7 @@
border-right-color: '#{richSkin.subBorderColor}';
}
-.rf-ca-sp-btn {
+.rf-cal-sp-btn {
border-width: 1px;
border-style: solid;
background-position: left top;
@@ -172,59 +172,49 @@
}
-.rf-ca-spec {
+.rf-cal-spec {
background-color: '#{richSkin.calendarSpecBackgroundColor}';
}
-.calendarSpecBackgroundColo {
- color: red;
-}
-
-.rf-ca-holly {
+.rf-cal-holiday {
background-color: '#{richSkin.calendarHolidaysBackgroundColor}';
color: '#{richSkin.calendarHolidaysTextColor}';
}
-.rf-ca-boundary-dates {
+.rf-cal-boundary-day {
color: #A0A0A0;
}
-.rf-ca-today {
+.rf-cal-today {
background-color: '#{richSkin.calendarCurrentBackgroundColor}';
color: '#{richSkin.calendarCurrentTextColor}';
font-weight: bold;
}
-.rf-ca-today {
- background-color: '#{richSkin.calendarCurrentBackgroundColor}';
- color: '#{richSkin.calendarCurrentTextColor}';
- font-weight: bold;
-}
-
-.rf-ca-sel {
+.rf-cal-sel {
background-color: '#{richSkin.headerBackgroundColor}';
color: '#{richSkin.headerTextColor}';
font-weight: '#{richSkin.headerWeightFont}';
}
-.rf-ca-hov {
+.rf-cal-hov {
background-color: '#{richSkin.calendarSpecBackgroundColor}';
background-color: '#{richSkin.calendarSpecTextColor}';
}
-.rf-ca-tl-btn {
+.rf-cal-tl-btn {
cursor: pointer;
padding: 2px 3px 2px 3px;
white-space: nowrap;
}
-.rf-ca-tl-btn-dis {
+.rf-cal-tl-btn-dis {
cursor: pointer;
padding: 2px 3px 2px 3px;
}
-.rf-ca-tl-btn-hov {
+.rf-cal-tl-btn-hov {
background-color: '#{richSkin.calendarWeekBackgroundColor}';
color: '#{richSkin.generalTextColor}';
border: 1px solid;
@@ -234,86 +224,86 @@
padding: 1px 2px 1px 2px;
}
-.rf-ca-tl-btn-press {
+.rf-cal-btn-press {
border-color: '#{richSkin.panelBorderColor}';
border-right-color: '#{richSkin.tableBackgroundColor}';
border-bottom-color: '#{richSkin.tableBackgroundColor}';
}
-.rf-ca-tl-close {
+.rf-cal-btn-close {
padding: 2px 2px 2px 4px;
background-image: "url(#{resource['org.richfaces.images:calendarSeparator.png']})";
background-repeat: no-repeat;
background-position: left center;
}
-.rf-ca-btn {
+.rf-cal-btn {
cursor: pointer;
vertical-align: middle;
}
-.rf-ca-edtr-shdw {
+.rf-cal-edtr-shdw {
background: '#{richSkin.tableBackgroundColor}';
opacity: 0.5;
filter: 'alpha(opacity=50)';
}
-.rf-ca-time-layout {
+.rf-cal-timepicker-cnt {
background: '#{richSkin.additionalBackgroundColor}';
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
position: relative;
}
-.rf-ca-date-layout {
+.rf-cal-monthpicker-cnt {
background: '#{richSkin.tableBackgroundColor}';
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
position: relative;
}
-.rf-ca-edtr-cntr {
+.rf-cal-edtr-cntr {
}
-.rf-ca-time-layout, .rf-ca-date-layout, .rf-ca-time-layout input {
+.rf-cal-timepicker-cnt, .rf-cal-monthpicker-cnt, .rf-cal-timepicker-cnt input {
font-size: '#{richSkin.generalSizeFont}';
font-family: '#{richSkin.generalFamilyFont}';
}
-.rf-ca-time-layout-fld {
+.rf-cal-timepicker-inp {
padding: 7px 7px 5px 7px;
white-space: nowrap;
}
-.rf-ca-time-layout-cancel {
+.rf-cal-timepicker-cancel {
padding: 0px 7px 7px 1px;
}
-.rf-ca-time-layout-ok {
+.rf-cal-timepicker-ok {
padding: 0px 1px 7px 7px;
}
-.rf-ca-date-layout-cancel {
+.rf-cal-monthpicker-cancel {
background: '#{richSkin.additionalBackgroundColor}';
border-top: 1px solid;
border-top-color: '#{richSkin.panelBorderColor}';
padding: 5px 5px 5px 1px;
}
-.rf-ca-date-layout-ok {
+.rf-cal-monthpicker-ok {
background: '#{richSkin.additionalBackgroundColor}';
border-top: 1px solid;
border-top-color: '#{richSkin.panelBorderColor}';
padding: 5px 1px 5px 5px;
}
-.rf-ca-date-layout-split {
+.rf-cal-monthpicker-split {
border-right: 1px solid;
border-right-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-time-btn {
+.rf-cal-time-btn {
width: 45px;
border: 1px solid;
border-color: '#{richSkin.tableBackgroundColor}';
@@ -327,7 +317,7 @@
cursor: pointer;
}
-.rf-ca-time-btn-press {
+.rf-cal-time-btn-press {
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
border-right-color: '#{richSkin.tableBackgroundColor}';
@@ -335,12 +325,12 @@
background-color: '#{richSkin.calendarWeekBackgroundColor}';
}
-.rf-ca-time-inp {
+.rf-cal-time-inp {
width: 22px;
margin: 0px 2px;
}
-.rf-ca-sp-up, .rf-ca-sp-down {
+.rf-cal-sp-up, .rf-cal-sp-down {
background-repeat: no-repeat;
background-position: 50% 40%;
height: 7px;
@@ -348,32 +338,32 @@
margin: 0px 1px 1px 0px;
}
-.rf-ca-sp-up {
+.rf-cal-sp-up {
background-image: "url(#{resource['org.richfaces.renderkit.html.images.SpinnerArrowTop']})";
}
-.rf-ca-sp-down {
+.rf-cal-sp-down {
background-image: "url(#{resource['org.richfaces.renderkit.html.images.SpinnerArrowBottom']})";
}
-.rf-ca-sp-press {
+.rf-cal-sp-press {
margin: 1px 0px 0px 1px;
}
-.rf-ca-sp-btn {
+.rf-cal-sp-btn {
background-color: '#{richSkin.headerBackgroundColor}';
border-color: '#{richSkin.headerBackgroundColor}';
background-image: "url(#{resource['org.richfaces.renderkit.html.images.ButtonBackgroundImage']})";
}
-.rf-ca-edtr-layout-shdw {
+.rf-cal-edtr-layout-shdw {
background-color: '#{richSkin.shadowBackgroundColor}';
position: absolute;
opacity: 0.3;
filter: 'alpha(opacity=30)';
}
-.rf-ca-edtr-btn {
+.rf-cal-edtr-btn {
width: 36px;
padding: 2px;
margin: 2px;
@@ -381,14 +371,14 @@
cursor: pointer;
}
-.rf-ca-edtr-btn-over {
+.rf-cal-edtr-btn-over {
padding: 1px;
border: 1px solid;
border-color: '#{richSkin.panelBorderColor}';
background: '#{richSkin.calendarSpecBackgroundColor}';
}
-.rf-ca-edtr-btn-sel {
+.rf-cal-edtr-btn-sel {
background-color: '#{richSkin.calendarCurrentBackgroundColor}';
padding: 2px;
border: 0px;
@@ -397,7 +387,7 @@
cursor: default;
}
-.rf-ca-edtr-tl-over {
+.rf-cal-edtr-tl-over {
padding: 1px;
border: 1px solid;
background: '#{richSkin.additionalBackgroundColor}';
@@ -406,7 +396,7 @@
border-bottom-color: '#{richSkin.panelBorderColor}';
}
-.rf-ca-edtr-tl-press {
+.rf-cal-edtr-tl-press {
padding: 1px;
border: 1px solid;
background: '#{richSkin.additionalBackgroundColor}';
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-29 15:03:28 UTC (rev 20839)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/calendar.js 2010-12-29 16:31:41 UTC (rev 20840)
@@ -24,8 +24,8 @@
var text = rf.calendarUtils.formatDate(calendar.selectedDate,(calendar.timeType ? calendar.datePattern : calendar.options.datePattern), calendar.options.monthLabels, calendar.options.monthLabelsShort);
var onclick = "RichFaces.$$('Calendar',this).showSelectedDate(); return true;"
var markup = ( calendar.options.disabled ?
- new E('div', {'class': 'rf-ca-tl-btn-dis'}, [new ET(text)]) :
- new E('div', {'class': 'rf-ca-tl-btn', 'onclick': onclick}, [new ET(text)]) );
+ new E('div', {'class': 'rf-cal-tl-btn-dis'}, [new ET(text)]) :
+ new E('div', {'class': 'rf-cal-tl-btn', 'onclick': onclick}, [new ET(text)]) );
return markup;
},
@@ -36,19 +36,19 @@
var text = rf.calendarUtils.formatDate(calendar.selectedDate, calendar.timePattern, calendar.options.monthLabels, calendar.options.monthLabelsShort);
- var onmouseover = "jQuery(this).removeClass('rf-ca-tl-btn-press');";
- var onmouseout = "jQuery(this).addClass('rf-ca-tl-btn-press');";
+ var onmouseover = "jQuery(this).removeClass('rf-cal-btn-press');";
+ var onmouseout = "jQuery(this).addClass('rf-cal-btn-press');";
var onclick = "RichFaces.$$('Calendar',this).showTimeEditor();return true;";
var markup = calendar.options.disabled || calendar.options.readonly ?
- new E('div', {'class': 'rf-ca-tl-btn-btn-dis'}, [new ET(text)]) :
- new E('div', {'class': 'rf-ca-tl-btn rf-ca-tl-btn-hov rf-ca-tl-btn-press', 'onclick': onclick,
+ new E('div', {'class': 'rf-cal-tl-btn-btn-dis'}, [new ET(text)]) :
+ new E('div', {'class': 'rf-cal-tl-btn rf-cal-tl-btn-hov rf-cal-btn-press', 'onclick': onclick,
'onmouseover': + onmouseover ,
'onmouseout' : + onmouseout}, [new ET(text)]);
return markup;
},
- toolButtonAttributes: {className: "rf-ca-tl-btn", onmouseover:"this.className='rf-ca-tl-btn rf-ca-tl-btn-hov'", onmouseout:"this.className='rf-ca-tl-btn'", onmousedown:"this.className='rf-ca-tl-btn rf-ca-tl-btn-hov rf-ca-tl-btn-btn-press'", onmouseup:"this.className='rf-ca-tl-btn rf-ca-tl-btn-hov'"},
+ toolButtonAttributes: {className: "rf-cal-tl-btn", onmouseover:"this.className='rf-cal-tl-btn rf-cal-tl-btn-hov'", onmouseout:"this.className='rf-cal-tl-btn'", onmousedown:"this.className='rf-cal-tl-btn rf-cal-tl-btn-hov rf-cal-tl-btn-btn-press'", onmouseup:"this.className='rf-cal-tl-btn rf-cal-tl-btn-hov'"},
nextYearControl: function (context) {
return (!context.calendar.options.disabled ? CalendarView.getControl(">>", CalendarView.toolButtonAttributes, "nextYear") : "");
},
@@ -64,7 +64,7 @@
currentMonthControl: function (context) {
var text = rf.calendarUtils.formatDate(context.calendar.getCurrentDate(), "MMMM, yyyy", context.monthLabels, context.monthLabelsShort);
var markup = context.calendar.options.disabled ?
- new E('div',{className: "rf-ca-tl-btn-dis"},[new T(text)]) :
+ new E('div',{className: "rf-cal-tl-btn-dis"},[new T(text)]) :
CalendarView.getControl(text, CalendarView.toolButtonAttributes, "showDateEditor");
return markup;
},
@@ -92,27 +92,27 @@
[
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("previousYearControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("previousMonthControl", context)})
]),
- new E('td',{'class': 'rf-ca-month'},
+ new E('td',{'class': 'rf-cal-hdr-month'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("currentMonthControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("nextMonthControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl'},
+ new E('td',{'class': 'rf-cal-tl'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("nextYearControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl rf-ca-tl-close', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl rf-cal-btn-close', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("closeControl", context)})
])
@@ -128,24 +128,24 @@
[
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("selectedDateControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("cleanControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("timeControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style': 'background-image:none;', 'width': '100%'}, []),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+(context.calendar.options.disabled || context.calendar.options.readonly || !context.calendar.options.showApplyButton ? 'background-image:none;' : '');}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style': 'background-image:none;', 'width': '100%'}, []),
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+(context.calendar.options.disabled || context.calendar.options.readonly || !context.calendar.options.showApplyButton ? 'background-image:none;' : '');}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("todayControl", context)})
]),
- new E('td',{'class': 'rf-ca-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+'background-image:none;';}},
+ new E('td',{'class': 'rf-cal-tl-ftr', 'style':function(context){return (this.isEmpty ? 'display:none;' : '')+'background-image:none;';}},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("applyControl", context)})
])
@@ -156,22 +156,22 @@
timeEditorLayout: [
- new E('table',{'id': function(context){return context.calendar.TIME_EDITOR_LAYOUT_ID}, 'border': '0', 'cellpadding': '0', 'cellspacing': '0', 'class': 'rf-ca-time-layout'},
+ new E('table',{'id': function(context){return context.calendar.TIME_EDITOR_LAYOUT_ID}, 'border': '0', 'cellpadding': '0', 'cellspacing': '0', 'class': 'rf-cal-timepicker-cnt'},
[
new E('tbody',{},
[
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-time-layout-fld', 'colspan': '2', 'align': 'center'},
+ new E('td',{'class': 'rf-cal-timepicker-inp', 'colspan': '2', 'align': 'center'},
[
new ET(function (context) { return rf.calendarTemplates.evalMacro("timeEditorFields", context)})
])
]),
new E('tr',{},
[
- new E('td',{'class': 'rf-ca-time-layout-ok'},
+ new E('td',{'class': 'rf-cal-timepicker-ok'},
[
- new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_OK}, 'class': 'rf-ca-time-btn', 'style': 'float:right;', 'onmousedown': "jQuery(this).addClass('rf-ca-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(true)";}},
+ new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_OK}, 'class': 'rf-cal-time-btn', 'style': 'float:right;', 'onmousedown': "jQuery(this).addClass('rf-cal-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(true)";}},
[
new E('span',{},
[
@@ -180,9 +180,9 @@
])
])
,
- new E('td',{'class': 'rf-ca-time-layout-cancel'},
+ new E('td',{'class': 'rf-cal-timepicker-cancel'},
[
- new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_CANCEL}, 'class': 'rf-ca-time-btn', 'style': 'float:left;', 'onmousedown': "jQuery(this).addClass('rf-ca-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-ca-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(false)";}},
+ new E('div',{'id': function(context){return context.calendar.TIME_EDITOR_BUTTON_CANCEL}, 'class': 'rf-cal-time-btn', 'style': 'float:left;', 'onmousedown': "jQuery(this).addClass('rf-cal-time-btn-press');", 'onmouseout': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onmouseup': "jQuery(this).removeClass('rf-cal-time-btn-press');", 'onclick': function(context){return "RichFaces.$('"+context.calendar.id+"').hideTimeEditor(false)";}},
[
new E('span',{},
[
@@ -318,7 +318,7 @@
// isDayEnabled - end-developer JS function
// dayStyleClass - end-developer JS function that provide style class for day's cells.
- // dayCellClass - add div to day cell with class 'rf-ca-c-div' and add this class to TD if defined
+ // dayCellClass - add div to day cell with class 'rf-cal-c-cnt' and add this class to TD if defined
// style - table style
// styleClass - table class
@@ -411,12 +411,12 @@
var tempStr = "RichFaces.$('"+this.id+"').";
- var htmlTextHeader = '<table id="'+this.CALENDAR_CONTENT+'" border="0" cellpadding="0" cellspacing="0" class="rf-ca-extr rf-ca-popup '+this.options.styleClass+'" style="'+popupStyles+this.options.style+'" onclick="'+tempStr+'skipEventOnCollapse=true;"><tbody>';
+ var htmlTextHeader = '<table id="'+this.CALENDAR_CONTENT+'" border="0" cellpadding="0" cellspacing="0" class="rf-cal-extr rf-cal-popup '+this.options.styleClass+'" style="'+popupStyles+this.options.style+'" onclick="'+tempStr+'skipEventOnCollapse=true;"><tbody>';
var colspan = (this.options.showWeeksBar ? "8" : "7");
- var htmlHeaderOptional = (this.options.optionalHeaderMarkup) ? '<tr><td class="rf-ca-hdr-optnl" colspan="'+colspan+'" id="'+this.id+'HeaderOptional"></td></tr>' : '';
- var htmlFooterOptional = (this.options.optionalFooterMarkup) ? '<tr><td class="rf-ca-ftr-optl" colspan="'+colspan+'" id="'+this.id+'FooterOptional"></td></tr>' : '';
- var htmlControlsHeader = (this.options.showHeader ? '<tr><td class="rf-ca-hdr" colspan="'+colspan+'" id="'+this.id+'Header"></td></tr>' : '');
- var htmlControlsFooter = (this.options.showFooter ? '<tr><td class="rf-ca-ftr" colspan="'+colspan+'" id="'+this.id+'Footer"></td></tr>' : '');
+ var htmlHeaderOptional = (this.options.optionalHeaderMarkup) ? '<tr><td class="rf-cal-hdr-optnl" colspan="'+colspan+'" id="'+this.id+'HeaderOptional"></td></tr>' : '';
+ var htmlFooterOptional = (this.options.optionalFooterMarkup) ? '<tr><td class="rf-cal-ftr-optl" colspan="'+colspan+'" id="'+this.id+'FooterOptional"></td></tr>' : '';
+ var htmlControlsHeader = (this.options.showHeader ? '<tr><td class="rf-cal-hdr" colspan="'+colspan+'" id="'+this.id+'Header"></td></tr>' : '');
+ var htmlControlsFooter = (this.options.showFooter ? '<tr><td class="rf-cal-ftr" colspan="'+colspan+'" id="'+this.id+'Footer"></td></tr>' : '');
var htmlTextFooter = '</tbody></table>'
// days bar creation
@@ -429,7 +429,7 @@
if (this.options.showWeekDaysBar)
{
htmlTextWeekDayBar.push('<tr id="'+this.WEEKDAY_BAR_ID+'">');
- if (this.options.showWeeksBar) htmlTextWeekDayBar.push('<td class="rf-ca-days"><br/></td>');
+ if (this.options.showWeeksBar) htmlTextWeekDayBar.push('<td class="rf-cal-day-lbl"><br/></td>');
var weekDayCounter = this.options.firstWeekDay;
for (var i=0;i<7;i++)
{
@@ -437,12 +437,12 @@
var weekDayHtml = this.evaluateMarkup(this.options.weekDayMarkup, context );
if (weekDayCounter==6) weekDayCounter=0; else weekDayCounter++;
- styleClass = "rf-ca-days";
+ styleClass = "rf-cal-day-lbl";
if (context.isWeekend)
{
- styleClass += " rf-ca-weekends";
+ styleClass += " rf-cal-holliday-lbl";
}
- if (i==6) styleClass += " rf-rgh-cell";
+ if (i==6) styleClass += " rf-cal-right-c";
htmlTextWeekDayBar.push('<td class="'+styleClass+'" id="'+context.elementId+'">'+weekDayHtml+'</td>');
}
htmlTextWeekDayBar.push('</tr>\n');
@@ -461,20 +461,20 @@
{
context = {weekNumber: k, elementId:this.WEEKNUMBER_ELEMENT_ID+k, component:this};
var weekNumberHtml = this.evaluateMarkup(this.options.weekNumberMarkup, context );
- htmlTextWeek.push('<td class="rf-ca-week '+bottomStyleClass+'" id="'+context.elementId+'">'+weekNumberHtml+'</td>');
+ htmlTextWeek.push('<td class="rf-cal-week '+bottomStyleClass+'" id="'+context.elementId+'">'+weekNumberHtml+'</td>');
}
// day cells creation
for (var i=0;i<7;i++)
{
- styleClass = bottomStyleClass+(!this.options.dayCellClass ? "rf-ca-c-size" : (!this.customDayListMarkup ? this.options.dayCellClass : ""))+" rf-ca-c";
- if (i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber) styleClass+=" rf-ca-holly";
- if (i==6) styleClass+=" rf-rgh-c";
+ styleClass = bottomStyleClass+(!this.options.dayCellClass ? "rf-cal-c-cnt-overflow" : (!this.customDayListMarkup ? this.options.dayCellClass : ""))+" rf-cal-c";
+ if (i==this.firstWeekendDayNumber || i==this.secondWeekendDayNumber) styleClass+=" rf-cal-holiday";
+ if (i==6) styleClass+=" rf-cal-right-c";
this.dayCellClassName.push(styleClass);
htmlTextWeek.push('<td class="'+styleClass+'" id="'+this.DATE_ELEMENT_ID+p+'" '+
eventsStr+
- '>'+(this.customDayListMarkup ? '<div class="rf-ca-c-div'+(this.options.dayCellClass ? ' '+this.options.dayCellClass : '')+'"></div>' : '')+'</td>');
+ '>'+(this.customDayListMarkup ? '<div class="rf-cal-c-cnt'+(this.options.dayCellClass ? ' '+this.options.dayCellClass : '')+'"></div>' : '')+'</td>');
p++;
}
htmlTextWeek.push('</tr>');
@@ -549,19 +549,19 @@
{
if (this.dateEditorYearID)
{
- $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-cal-edtr-btn-sel');
}
this.dateEditorYear = this.dateEditorStartYear + value;
this.dateEditorYearID = this.DATE_EDITOR_LAYOUT_ID+'Y'+value;
- $(rf.getDomElement(this.dateEditorYearID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorYearID)).addClass('rf-cal-edtr-btn-sel');
},
dateEditorSelectMonth: function(value)
{
this.dateEditorMonth = value;
- $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-cal-edtr-btn-sel');
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+value;
- $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-cal-edtr-btn-sel');
},
scrollEditorYear: function(value)
@@ -570,7 +570,7 @@
if (this.dateEditorYearID)
{
- $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorYearID)).removeClass('rf-cal-edtr-btn-sel');
this.dateEditorYearID='';
}
@@ -580,9 +580,9 @@
if (this.dateEditorMonth != this.getCurrentMonth())
{
this.dateEditorMonth = this.getCurrentMonth();
- $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).removeClass('rf-cal-edtr-btn-sel');
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+this.dateEditorMonth;
- $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-cal-edtr-btn-sel');
}
}
@@ -597,14 +597,14 @@
div.firstChild.innerHTML=year;
if (year == this.dateEditorYear)
{
- $(div.firstChild).addClass('rf-ca-edtr-btn-sel');
+ $(div.firstChild).addClass('rf-cal-edtr-btn-sel');
this.dateEditorYearID = div.firstChild.id;
}
div = div.nextSibling;
div.firstChild.innerHTML=year+5;
if (year+5 == this.dateEditorYear)
{
- $(div.firstChild).addClass('rf-ca-edtr-btn-sel');
+ $(div.firstChild).addClass('rf-cal-edtr-btn-sel');
this.dateEditorYearID = div.firstChild.id;
}
year++;
@@ -648,8 +648,8 @@
{
var element = $(rf.getDomElement(this.CALENDAR_CONTENT));
var zindex = parseInt(element.css('z-index'), 10);
- var htmlBegin = '<div id="'+this.EDITOR_SHADOW_ID+'" class="rf-ca-edtr-shdw" style="position:absolute; display:none;z-index:'+zindex+'"></div><table border="0" cellpadding="0" cellspacing="0" id="'+this.EDITOR_ID+'" style="position:absolute; display:none;z-index:'+(zindex+1)+'" onclick="RichFaces.$(\''+this.id+'\').skipEventOnCollapse=true;"><tbody><tr><td class="rf-ca-edtr-cntr" align="center"><div style="position:relative; width:100%">';
- var htmlContent = '<div id="'+this.EDITOR_LAYOUT_SHADOW_ID+'" class="rf-ca-edtr-layout-shdw"></div>';
+ var htmlBegin = '<div id="'+this.EDITOR_SHADOW_ID+'" class="rf-cal-edtr-shdw" style="position:absolute; display:none;z-index:'+zindex+'"></div><table border="0" cellpadding="0" cellspacing="0" id="'+this.EDITOR_ID+'" style="position:absolute; display:none;z-index:'+(zindex+1)+'" onclick="RichFaces.$(\''+this.id+'\').skipEventOnCollapse=true;"><tbody><tr><td class="rf-cal-edtr-cntr" align="center"><div style="position:relative; width:100%">';
+ var htmlContent = '<div id="'+this.EDITOR_LAYOUT_SHADOW_ID+'" class="rf-cal-edtr-layout-shdw"></div>';
var htmlEnd = '</div></td></tr></tbody></table>';
element.after(htmlBegin+htmlContent+htmlEnd);
@@ -708,27 +708,27 @@
{
if (buttonType==0)
{
- return '<div id="'+id+'" class="rf-ca-edtr-btn'+(className ? ' '+className : '')+
- '" onmouseover="this.className=\'rf-ca-edtr-btn rf-ca-edtr-tl-over\';" onmouseout="this.className=\'rf-ca-edtr-btn\';" onmousedown="this.className=\'rf-ca-edtr-btn rf-ca-edtr-tl-press\';" onmouseup="this.className=\'rf-ca-edtr-btn rf-ca-edtr-tl-over\';" onclick="RichFaces.$(\''+this.id+'\').scrollEditorYear('+param+');">'+value+'</div>';
+ return '<div id="'+id+'" class="rf-cal-edtr-btn'+(className ? ' '+className : '')+
+ '" onmouseover="this.className=\'rf-cal-edtr-btn rf-cal-edtr-tl-over\';" onmouseout="this.className=\'rf-cal-edtr-btn\';" onmousedown="this.className=\'rf-cal-edtr-btn rf-cal-edtr-tl-press\';" onmouseup="this.className=\'rf-cal-edtr-btn rf-cal-edtr-tl-over\';" onclick="RichFaces.$(\''+this.id+'\').scrollEditorYear('+param+');">'+value+'</div>';
}
else
{
var onclick = (buttonType==1 ? 'RichFaces.$(\''+this.id+'\').dateEditorSelectMonth('+param+');':
'RichFaces.$(\''+this.id+'\').dateEditorSelectYear('+param+');' );
- return '<div id="'+id+'" class="rf-ca-edtr-btn'+(className ? ' '+className : '')+
- '" onmouseover="jQuery(this).addClass(\'rf-ca-edtr-btn-over\');" onmouseout="$(this).removeClass(\'rf-ca-edtr-btn-over\');" onclick="'+onclick+'">'+value+'</div>';
+ return '<div id="'+id+'" class="rf-cal-edtr-btn'+(className ? ' '+className : '')+
+ '" onmouseover="jQuery(this).addClass(\'rf-cal-edtr-btn-over\');" onmouseout="$(this).removeClass(\'rf-cal-edtr-btn-over\');" onclick="'+onclick+'">'+value+'</div>';
}
},
createDateEditorLayout: function(editor)
{
- var htmlBegin = '<table id="'+this.DATE_EDITOR_LAYOUT_ID+'" class="rf-ca-date-layout" border="0" cellpadding="0" cellspacing="0"><tbody><tr id="'+this.DATE_EDITOR_LAYOUT_ID+'TR">';
+ var htmlBegin = '<table id="'+this.DATE_EDITOR_LAYOUT_ID+'" class="rf-cal-monthpicker-cnt" border="0" cellpadding="0" cellspacing="0"><tbody><tr id="'+this.DATE_EDITOR_LAYOUT_ID+'TR">';
var htmlEnd = '</tr></tbody></table>';
var month = 0;
this.dateEditorYear = this.getCurrentYear();
var year = this.dateEditorStartYear = this.dateEditorYear-4;
var htmlContent = '<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.options.monthLabelsShort[month], 1, month)+'</td>'
- +'<td align="center" class="rf-ca-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td align="center" class="rf-cal-monthpicker-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
+'<td align="center">'+this.createDECell('','<', 0, -1)+'</td>'
+'<td align="center">'+this.createDECell('','>', 0, 1)+'</td>';
month++;
@@ -736,8 +736,8 @@
for (var i=0;i<5;i++)
{
htmlContent+='</tr><tr><td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+month, this.options.monthLabelsShort[month], 1, month)+'</td>'
- +'<td align="center" class="rf-ca-date-layout-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
- +'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rf-ca-edtr-btn-sel' : ''))+'</td>'
+ +'<td align="center" class="rf-cal-monthpicker-split">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'M'+(month+6), this.options.monthLabelsShort[month+6], 1, month+6)+'</td>'
+ +'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+i, year, 2, i, (i==4 ? 'rf-cal-edtr-btn-sel' : ''))+'</td>'
+'<td align="center">'+this.createDECell(this.DATE_EDITOR_LAYOUT_ID+'Y'+(i+5), year+5, 2, i+5)+'</td>';
month++;
year++;
@@ -746,16 +746,16 @@
this.dateEditorMonth = this.getCurrentMonth();
this.dateEditorMonthID = this.DATE_EDITOR_LAYOUT_ID+'M'+this.dateEditorMonth;
- htmlContent+='</tr><tr><td colspan="2" class="rf-ca-date-layout-ok">'+
- '<div id="'+this.DATE_EDITOR_BUTTON_OK+'" class="rf-ca-time-btn" style="float:right;" onmousedown="jQuery(this).addClass(\'rf-ca-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-ca-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-ca-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(true);"><span>'+this.options.labels.ok+'</span></div>'+
- '</td><td colspan="2" class="rf-ca-date-layout-cancel">'+
- '<div id="'+this.DATE_EDITOR_BUTTON_CANCEL+'" class="rf-ca-time-btn" style="float:left;" onmousedown="jQuery(this).addClass(\'rf-ca-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-ca-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-ca-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(false);"><span>'+this.options.labels.cancel+'</span></div>'+
+ htmlContent+='</tr><tr><td colspan="2" class="rf-cal-monthpicker-ok">'+
+ '<div id="'+this.DATE_EDITOR_BUTTON_OK+'" class="rf-cal-time-btn" style="float:right;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(true);"><span>'+this.options.labels.ok+'</span></div>'+
+ '</td><td colspan="2" class="rf-cal-monthpicker-cancel">'+
+ '<div id="'+this.DATE_EDITOR_BUTTON_CANCEL+'" class="rf-cal-time-btn" style="float:left;" onmousedown="jQuery(this).addClass(\'rf-cal-time-btn-press\');" onmouseout="$(this).removeClass(\'rf-cal-time-btn-press\');" onmouseup="$(this).removeClass(\'rf-cal-time-btn-press\');" onclick="RichFaces.$(\''+this.id+'\').hideDateEditor(false);"><span>'+this.options.labels.cancel+'</span></div>'+
'</td>';
$(rf.getDomElement(this.EDITOR_LAYOUT_SHADOW_ID)).after(htmlBegin+htmlContent+htmlEnd);
- $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-ca-edtr-btn-sel');
+ $(rf.getDomElement(this.dateEditorMonthID)).addClass('rf-cal-edtr-btn-sel');
this.correctEditorButtons(editor, this.DATE_EDITOR_BUTTON_OK, this.DATE_EDITOR_BUTTON_CANCEL);
@@ -764,22 +764,22 @@
createSpinnerTable: function(id) {
return '<table cellspacing="0" cellpadding="0" border="0"><tbody><tr>'+
- '<td class="rf-ca-sp-inp-ctnr">'+
- '<input id="' + id + '" name="' + id + '" class="rf-ca-sp-inp" type="text" />'+
+ '<td class="rf-cal-sp-inp-ctnr">'+
+ '<input id="' + id + '" name="' + id + '" class="rf-cal-sp-inp" type="text" />'+
'</td>'+
- '<td class="rf-ca-sp-btn">'+
+ '<td class="rf-cal-sp-btn">'+
'<table border="0" cellspacing="0" cellpadding="0"><tbody>'+
'<tr><td>'+
- '<div id="'+id+'BtnUp" class="rf-ca-sp-up"'+
- ' onmousedown="this.className=\'rf-ca-sp-up rf-ca-sp-press\'"'+
- ' onmouseup="this.className=\'rf-ca-sp-up\'"'+
- ' onmouseout="this.className=\'rf-ca-sp-up\'"><span></span></div>'+
+ '<div id="'+id+'BtnUp" class="rf-cal-sp-up"'+
+ ' onmousedown="this.className=\'rf-cal-sp-up rf-cal-sp-press\'"'+
+ ' onmouseup="this.className=\'rf-cal-sp-up\'"'+
+ ' onmouseout="this.className=\'rf-cal-sp-up\'"><span></span></div>'+
'</td></tr>'+
'<tr><td>'+
- '<div id="'+id+'BtnDown" class="rf-ca-sp-down"'+
- ' onmousedown="this.className=\'rf-ca-sp-down rf-ca-sp-press\'"'+
- ' onmouseup="this.className=\'rf-ca-sp-down\'"'+
- ' onmouseout="this.className=\'rf-ca-sp-down\'"><span></span></div>'+
+ '<div id="'+id+'BtnDown" class="rf-cal-sp-down"'+
+ ' onmousedown="this.className=\'rf-cal-sp-down rf-cal-sp-press\'"'+
+ ' onmouseup="this.className=\'rf-cal-sp-down\'"'+
+ ' onmouseout="this.className=\'rf-cal-sp-down\'"><span></span></div>'+
'</td></tr>'+
'</tbody></table>'+
'</td>'+
@@ -1089,7 +1089,7 @@
if (this.invokeEvent("datemouseover", obj, e, daydata.date) && daydata.enabled)
{
if (daydata._month==0 && obj.id!=this.selectedDateCellId && obj.id!=this.todayCellId) {
- $(obj).addClass('rf-ca-hov');
+ $(obj).addClass('rf-cal-hov');
}
}
},
@@ -1099,7 +1099,7 @@
if (this.invokeEvent("datemouseout", obj, e, daydata.date) && daydata.enabled)
{
if (daydata._month==0 && obj.id!=this.selectedDateCellId && obj.id!=this.todayCellId) {
- $(obj).removeClass('rf-ca-hov');
+ $(obj).removeClass('rf-cal-hov');
}
}
},
@@ -1330,10 +1330,10 @@
// class styles
if (dataobj._month!=0)
{
- classNames+=' rf-ca-boundary-dates';
+ classNames+=' rf-cal-boundary-day';
if (!this.options.disabled && !this.options.readonly && boundaryDatesModeFlag)
{
- classNames+=' rf-ca-btn';
+ classNames+=' rf-cal-btn';
}
}
else
@@ -1342,16 +1342,16 @@
{
this.todayCellId = element.id;
this.todayCellColor = this.getCellBackgroundColor(element);
- classNames+=" rf-ca-today";
+ classNames+=" rf-cal-today";
}
if (selectedflag && dataobj.day==selecteddate)
{
this.selectedDateCellId = element.id;
this.selectedDateCellColor = this.getCellBackgroundColor(element);
- classNames+=" rf-ca-sel";
+ classNames+=" rf-cal-sel";
}
- else if (!this.options.disabled && !this.options.readonly && dataobj.enabled) classNames+=' rf-ca-btn';
+ else if (!this.options.disabled && !this.options.readonly && dataobj.enabled) classNames+=' rf-cal-btn';
// add custom style class
if (dataobj.customStyleClass)
@@ -1608,13 +1608,13 @@
// find cell and change style class
var e = $(rf.getDomElement(this.DATE_ELEMENT_ID+(this.firstDateIndex + this.selectedDate.getDate()-1)));
- this.clearEffect(this.selectedDateCellId, "rf-ca-sel", (this.options.disabled || this.options.readonly ? null : "rf-ca-btn"));
+ this.clearEffect(this.selectedDateCellId, "rf-cal-sel", (this.options.disabled || this.options.readonly ? null : "rf-cal-btn"));
this.selectedDateCellId = e.attr('id');
this.selectedDateCellColor = this.getCellBackgroundColor(e);
- e.removeClass("rf-ca-btn");
- e.removeClass("rf-ca-hov");
- e.addClass("rf-ca-sel");
+ e.removeClass("rf-cal-btn");
+ e.removeClass("rf-cal-hov");
+ e.addClass("rf-cal-sel");
this.renderHF();
}
@@ -1639,7 +1639,7 @@
{
this.selectedDate = null;
- this.clearEffect(this.selectedDateCellId, "rf-ca-sel", (this.options.disabled || this.options.readonly ? null : "rf-ca-btn"));
+ this.clearEffect(this.selectedDateCellId, "rf-cal-sel", (this.options.disabled || this.options.readonly ? null : "rf-cal-btn"));
if (this.selectedDateCellId)
{
@@ -1681,7 +1681,7 @@
this.selectedDate = null;
this.invokeEvent("dateselect", null, null, null);
- this.selectedDateCellId = this.clearEffect(this.selectedDateCellId, "rf-ca-sel", (this.options.disabled || this.options.readonly ? null : "rf-ca-btn"));
+ this.selectedDateCellId = this.clearEffect(this.selectedDateCellId, "rf-cal-sel", (this.options.disabled || this.options.readonly ? null : "rf-cal-btn"));
this.invokeEvent("clean", null, null, null);
this.renderHF();
if (!this.options.showApplyButton)
Modified: trunk/ui/input/ui/src/main/templates/calendar.template.xml
===================================================================
--- trunk/ui/input/ui/src/main/templates/calendar.template.xml 2010-12-29 15:03:28 UTC (rev 20839)
+++ trunk/ui/input/ui/src/main/templates/calendar.template.xml 2010-12-29 16:31:41 UTC (rev 20840)
@@ -37,7 +37,7 @@
disabled="#{component.attributes['disabled']}" accesskey="#{component.attributes['accesskey']}"
maxlength="#{component.attributes['maxlength']}" size="#{component.attributes['inputSize']}"
style="vertical-align: middle; #{component.attributes['inputStyle']}"
- class="rf-ca-inp #{component.attributes['inputClass']}"
+ class="rf-cal-inp #{component.attributes['inputClass']}"
tabindex="#{component.attributes['tabindex']}"
readonly="#{(!component.attributes['enableManualInput'] || component.attributes['readonly']) ? 'readonly' : ''}">
<cdk:call expression="renderInputHandlers(facesContext, component);" />
@@ -45,14 +45,14 @@
<c:choose>
<c:when test="#{isUseIcons(facesContext, component)}">
<img id="#{clientId}PopupButton" alt=""
- class="rf-ca-btn #{component.attributes['buttonClass']}"
+ class="rf-cal-btn #{component.attributes['buttonClass']}"
accesskey="#{component.attributes['accesskey']}" style="vertical-align: middle"
tabindex="#{component.attributes['tabindex']}" src="#{getButtonIcon(facesContext, component)}" />
</c:when>
<c:otherwise>
<button type="button" id="#{clientId}PopupButton" name="#{clientId}PopupButton"
style="vertical-align: middle"
- class="rf-ca-btn #{component.attributes['buttonClass']}"
+ class="rf-cal-btn #{component.attributes['buttonClass']}"
tabindex="#{component.attributes['tabindex']}" disabled="#{component.attributes['disabled']}">
#{component.attributes['buttonLabel']}
</button>
Modified: trunk/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml
===================================================================
--- trunk/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml 2010-12-29 15:03:28 UTC (rev 20839)
+++ trunk/ui/input/ui/src/test/resources/org/richfaces/component/calendarContent.xmlunit.xml 2010-12-29 16:31:41 UTC (rev 20840)
@@ -1,108 +1,108 @@
-<table id="form:calendarContent" border="0" cellpadding="0" cellspacing="0" class="rf-ca-extr rf-ca-popup undefined" style="display:none; position:absolute;z-index: 3;width:200px" onclick="RichFaces.$('form:calendar').skipEventOnCollapse=true;">
+<table id="form:calendarContent" border="0" cellpadding="0" cellspacing="0" class="rf-cal-extr rf-cal-popup undefined" style="display:none; position:absolute;z-index: 3;width:200px" onclick="RichFaces.$('form:calendar').skipEventOnCollapse=true;">
<tbody>
<tr>
- <td class="rf-ca-hdr" colspan="8" id="form:calendarHeader"/>
+ <td class="rf-cal-hdr" colspan="8" id="form:calendarHeader"/>
</tr>
<tr id="form:calendarWeekDay">
- <td class="rf-ca-days">
+ <td class="rf-cal-day-lbl">
<br/>
</td>
- <td class="rf-ca-days rf-ca-weekends" id="form:calendarWeekDayCell0">
+ <td class="rf-cal-day-lbl rf-cal-holliday-lbl" id="form:calendarWeekDayCell0">
Sun
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell1">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell1">
Mon
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell2">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell2">
Tue
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell3">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell3">
Wed
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell4">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell4">
Thu
</td>
- <td class="rf-ca-days" id="form:calendarWeekDayCell5">
+ <td class="rf-cal-day-lbl" id="form:calendarWeekDayCell5">
Fri
</td>
- <td class="rf-ca-days rf-ca-weekends rf-rgh-cell" id="form:calendarWeekDayCell6">
+ <td class="rf-cal-day-lbl rf-cal-holliday-lbl rf-cal-right-c" id="form:calendarWeekDayCell6">
Sat
</td>
</tr>
<tr id="form:calendarWeekNum1">
- <td class="rf-ca-week " id="form:calendarWeekNumCell1">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell1">
1
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell0" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell1" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell2" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell3" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell4" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell5" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell6" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell0" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell1" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell2" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell3" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell4" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell5" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell6" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum2">
- <td class="rf-ca-week " id="form:calendarWeekNumCell2">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell2">
2
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell7" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell8" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell9" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell10" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell11" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell12" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell13" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell7" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell8" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell9" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell10" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell11" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell12" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell13" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum3">
- <td class="rf-ca-week " id="form:calendarWeekNumCell3">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell3">
3
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell14" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell15" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell16" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell17" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell18" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell19" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell20" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell14" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell15" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell16" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell17" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell18" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell19" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell20" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum4">
- <td class="rf-ca-week " id="form:calendarWeekNumCell4">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell4">
4
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell21" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell22" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell23" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell24" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell25" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell26" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell27" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell21" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell22" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell23" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell24" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell25" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell26" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell27" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum5">
- <td class="rf-ca-week " id="form:calendarWeekNumCell5">
+ <td class="rf-cal-week " id="form:calendarWeekNumCell5">
5
</td>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell28" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell29" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell30" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell31" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell32" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c" id="form:calendarDayCell33" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell34" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell28" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell29" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell30" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell31" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell32" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell33" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell34" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr id="form:calendarWeekNum6">
- <td class="rf-ca-week rf-btm-c " id="form:calendarWeekNumCell6">
+ <td class="rf-cal-week rf-btm-c " id="form:calendarWeekNumCell6">
6
</td>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c rf-ca-holly" id="form:calendarDayCell35" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell36" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell37" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell38" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell39" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c" id="form:calendarDayCell40" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
- <td class="rf-btm-c rf-ca-c-size rf-ca-c rf-ca-holly rf-rgh-c" id="form:calendarDayCell41" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday" id="form:calendarDayCell35" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell36" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell37" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell38" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell39" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c" id="form:calendarDayCell40" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
+ <td class="rf-btm-c rf-cal-c-cnt-overflow rf-cal-c rf-cal-holiday rf-cal-right-c" id="form:calendarDayCell41" onclick="RichFaces.$('form:calendar').eventCellOnClick(event, this);" onmouseover="RichFaces.$('form:calendar').eventCellOnMouseOver(event, this);" onmouseout="RichFaces.$('form:calendar').eventCellOnMouseOut(event, this);"/>
</tr>
<tr>
- <td class="rf-ca-ftr" colspan="8" id="form:calendarFooter"/>
+ <td class="rf-cal-ftr" colspan="8" id="form:calendarFooter"/>
</tr>
</tbody>
</table>
\ No newline at end of file
14 years, 1 month