JBoss Rich Faces SVN: r5066 - trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-12-28 08:57:16 -0500 (Fri, 28 Dec 2007)
New Revision: 5066
Modified:
trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
Log:
add decode method
Modified: trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java
===================================================================
--- trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2007-12-28 13:01:15 UTC (rev 5065)
+++ trunk/sandbox/ui/pickList/src/main/java/org/richfaces/renderkit/PickListRenderer.java 2007-12-28 13:57:16 UTC (rev 5066)
@@ -6,12 +6,17 @@
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.Set;
+import javax.faces.component.EditableValueHolder;
import javax.faces.component.UIComponent;
+import javax.faces.component.UISelectMany;
+import javax.faces.component.UISelectOne;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.convert.Converter;
+import javax.faces.convert.ConverterException;
import javax.faces.model.SelectItem;
import javax.faces.model.SelectItemGroup;
@@ -60,87 +65,59 @@
return SelectUtils.getSelectItems(context, component);
}
- private void encodeSelect(FacesContext facesContext, UIComponent uiComponent, String clientId, boolean disabled,
- int size, List selectItemsToDisplay, Converter converter, ResponseWriter writer) throws IOException {
+ public void decode(FacesContext context, UIComponent component) {
+
+ UIPickList picklist = (UIPickList)component;
+
+ if (!(picklist instanceof EditableValueHolder)) {
+ throw new IllegalArgumentException("Component " + picklist.getClientId(context) + " is not an EditableValueHolder");
+ }
+
+ String hiddenClientId = picklist.getClientId(context) + HIDDEN_SUFFIX;
+ Map paramValuesMap = context.getExternalContext().getRequestParameterValuesMap();
+
+ if (isDisabledOrReadOnly(picklist)) {
+ return;
+ }
+
+ if (paramValuesMap.containsKey(hiddenClientId)) {
+ String[] valuesInline = (String[]) paramValuesMap.get(hiddenClientId);
+
+ if (valuesInline[0].trim().equals("")) {
+ ((EditableValueHolder) picklist).setSubmittedValue(new String[] {});
+ } else {
+ String[] reqValues = valuesInline[0].split(",");
+ ((EditableValueHolder) picklist).setSubmittedValue(reqValues);
+ }
+ } else {
+ ((EditableValueHolder) picklist).setSubmittedValue(new String[] {});
+ }
+ }
- writer.startElement("select", uiComponent);
- writer.writeAttribute("id", clientId, "id");
- writer.writeAttribute("name", clientId, null);
- writer.writeAttribute("multiple", "true", null);
+ private boolean isDisabledOrReadOnly(UIPickList picklist) {
+ return picklist.isDisplayValueOnly() || isTrue(picklist.getAttributes().get("disabled"));
+ }
- if (size == 0) {
- writer.writeAttribute("size", Integer.toString(selectItemsToDisplay.size()), null);
+ private static boolean isTrue(Object obj) {
+ if (!(obj instanceof Boolean)) {
+ return false;
+ }
+ return ((Boolean) obj).booleanValue();
+ }
+
+ @Override
+ public Object getConvertedValue(FacesContext context, UIComponent component, Object submittedValue)
+ throws ConverterException {
+
+ if ((component instanceof UISelectMany) && (submittedValue instanceof String[])) {
+ return SelectUtils.getConvertedUISelectManyValue(context,(UISelectMany)component, (String [])submittedValue);
+ } else if ((component instanceof UISelectOne) && (submittedValue instanceof String)) {
+ return SelectUtils.getConvertedUIInputValue(context, (UISelectOne)component, (String)submittedValue);
} else {
- writer.writeAttribute("size", Integer.toString(size), null);
- }
- if (disabled) {
- writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
- }
+ throw new IllegalArgumentException("Unsupported component class " + component.getClass().getName());
+ }
- renderSelectOptions(facesContext, uiComponent, converter, Collections.EMPTY_SET, selectItemsToDisplay);
- writer.writeText("", null);
- writer.endElement("select");
}
-
- public void renderSelectOptions(FacesContext context, UIComponent component, Converter converter, Set lookupSet,
- List selectItemList) throws IOException {
- ResponseWriter writer = context.getResponseWriter();
-
- for (Iterator it = selectItemList.iterator(); it.hasNext();) {
- SelectItem selectItem = (SelectItem) it.next();
-
- if (selectItem instanceof SelectItemGroup) {
- writer.startElement("optgroup", component);
- writer.writeAttribute("label", selectItem.getLabel(), null);
- SelectItem[] selectItems = ((SelectItemGroup) selectItem).getSelectItems();
- renderSelectOptions(context, component, converter, lookupSet, Arrays.asList(selectItems));
- writer.endElement("optgroup");
- } else {
- String itemStrValue = PickListUtils.getConvertedStringValue(context, component, converter, selectItem.getValue());
- writer.write('\t');
- writer.startElement("option", component);
-
- if (itemStrValue != null) {
- writer.writeAttribute(HTML.value_ATTRIBUTE, itemStrValue, null);
- }
-
- if (lookupSet.contains(itemStrValue))
- { //TODO/FIX: we always compare the String vales, better fill lookupSet with Strings only when useSubmittedValue==true, else use the real item value Objects
- writer.writeAttribute("selected", "selected", null);
- }
-
- boolean disabled = selectItem.isDisabled();
- if (disabled) {
- writer.writeAttribute(HTML.DISABLED_ATTR, HTML.DISABLED_ATTR, null);
- }
-
- String labelClass;
- boolean componentDisabled = ((Boolean)component.getAttributes().get("disabled")).booleanValue();
-
- if (componentDisabled || disabled) {
- labelClass = (String) component.getAttributes().get("disabledClass");
- } else {
- labelClass = (String) component.getAttributes().get("enabled");
- }
-
- if (labelClass != null) {
- writer.writeAttribute("class", labelClass, "labelClass");
- }
-
- Boolean booleanValue = (Boolean)component.getAttributes().get("escape");
- boolean escape = booleanValue != null ? booleanValue.booleanValue():true; //default is to escape
-
- if (escape) {
- writer.writeText(selectItem.getLabel(), null);
- } else {
- writer.write(selectItem.getLabel());
- }
-
- writer.endElement("option");
- }
- }
- }
-
@Override
protected void doEncodeEnd(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException {
@@ -196,6 +173,84 @@
writer.endElement(HTML.TR_ELEMENT);
writer.endElement("table");
}
+
+ private void encodeSelect(FacesContext facesContext, UIComponent uiComponent, String clientId, boolean disabled,
+ int size, List selectItemsToDisplay, Converter converter, ResponseWriter writer) throws IOException {
+
+ writer.startElement("select", uiComponent);
+ writer.writeAttribute("id", clientId, "id");
+ writer.writeAttribute("name", clientId, null);
+ writer.writeAttribute("multiple", "true", null);
+
+ if (size == 0) {
+ writer.writeAttribute("size", Integer.toString(selectItemsToDisplay.size()), null);
+ } else {
+ writer.writeAttribute("size", Integer.toString(size), null);
+ }
+ if (disabled) {
+ writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
+ }
+
+ renderSelectOptions(facesContext, uiComponent, converter, Collections.EMPTY_SET, selectItemsToDisplay);
+ writer.writeText("", null);
+ writer.endElement("select");
+ }
+
+ public void renderSelectOptions(FacesContext context, UIComponent component, Converter converter, Set lookupSet,
+ List selectItemList) throws IOException {
+ ResponseWriter writer = context.getResponseWriter();
+
+ for (Iterator it = selectItemList.iterator(); it.hasNext();) {
+ SelectItem selectItem = (SelectItem) it.next();
+
+ if (selectItem instanceof SelectItemGroup) {
+ writer.startElement("optgroup", component);
+ writer.writeAttribute("label", selectItem.getLabel(), null);
+ SelectItem[] selectItems = ((SelectItemGroup) selectItem).getSelectItems();
+ renderSelectOptions(context, component, converter, lookupSet, Arrays.asList(selectItems));
+ writer.endElement("optgroup");
+ } else {
+ String itemStrValue = PickListUtils.getConvertedStringValue(context, component, converter, selectItem.getValue());
+ writer.write('\t');
+ writer.startElement("option", component);
+
+ if (itemStrValue != null) {
+ writer.writeAttribute(HTML.value_ATTRIBUTE, itemStrValue, null);
+ }
+
+ if (lookupSet.contains(itemStrValue)) { //TODO/FIX: we always compare the String vales, better fill lookupSet with Strings only when useSubmittedValue==true, else use the real item value Objects
+ writer.writeAttribute("selected", "selected", null);
+ }
+
+ boolean disabled = selectItem.isDisabled();
+ if (disabled) {
+ writer.writeAttribute(HTML.DISABLED_ATTR, HTML.DISABLED_ATTR, null);
+ }
+
+ boolean componentDisabled = isTrue(component.getAttributes().get("disabled"));
+ String labelClass = null;
+ if (componentDisabled || disabled) {
+ labelClass = (String) component.getAttributes().get("disabledClass");
+ } else {
+ labelClass = (String) component.getAttributes().get("enabled");
+ }
+
+ if (labelClass != null) {
+ writer.writeAttribute("class", labelClass, "labelClass");
+ }
+
+ boolean escape = isTrue(component.getAttributes().get("escape"));
+
+ if (escape) {
+ writer.writeText(selectItem.getLabel(), null);
+ } else {
+ writer.write(selectItem.getLabel());
+ }
+
+ writer.endElement("option");
+ }
+ }
+ }
private void encodeSwapButton(FacesContext facesContext, UIComponent uiComponent, String javaScriptFunction,
String text,ResponseWriter writer) throws IOException {
@@ -230,7 +285,7 @@
writer.endElement(HTML.INPUT_ELEM);
}
-
+
protected Class<? extends UIComponent> getComponentClass() {
return UIPickList.class;
}
16 years, 4 months
JBoss Rich Faces SVN: r5065 - management/design/fileUpload.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2007-12-28 08:01:15 -0500 (Fri, 28 Dec 2007)
New Revision: 5065
Modified:
management/design/fileUpload/Func Spec - File Upload Component.doc
Log:
RF-1206 - spec is updated
Modified: management/design/fileUpload/Func Spec - File Upload Component.doc
===================================================================
(Binary files differ)
16 years, 4 months
JBoss Rich Faces SVN: r5064 - trunk/ui/columns/src/main/java/org/richfaces/taglib.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2007-12-28 07:54:38 -0500 (Fri, 28 Dec 2007)
New Revision: 5064
Removed:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java
trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java
trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java
Modified:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java
Log:
delete meta-rules classes
Deleted: trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java 2007-12-28 12:34:21 UTC (rev 5063)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java 2007-12-28 12:54:38 UTC (rev 5064)
@@ -1,138 +0,0 @@
-/**
- * Licensed under the Common Development and Distribution License,
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.sun.com/cddl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.richfaces.taglib;
-
-import javax.faces.component.ActionSource;
-import javax.faces.component.ActionSource2;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.MethodExpressionActionListener;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.el.LegacyMethodBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.util.FacesAPI;
-
-/**
- *
- * @author Jacob Hookom
- * @version $Id: ActionSourceRule.java,v 1.2 2005/08/24 04:38:50 jhook Exp $
- */
-final class ActionSourceRule extends MetaRule {
-
- public final static Class[] ACTION_SIG = new Class[0];
-
- public final static Class[] ACTION_LISTENER_SIG = new Class[] { ActionEvent.class };
-
- final static class ActionMapper extends Metadata {
-
- private final TagAttribute attr;
-
- public ActionMapper(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ActionSource) instance).setAction(new LegacyMethodBinding(
- this.attr.getMethodExpression(ctx, String.class,
- ActionSourceRule.ACTION_SIG)));
- }
- }
-
- final static class ActionMapper2 extends Metadata {
-
- private final TagAttribute attr;
-
- public ActionMapper2(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ActionSource2) instance).setActionExpression(this.attr
- .getMethodExpression(ctx, String.class,
- ActionSourceRule.ACTION_SIG));
- }
-
- }
-
- final static class ActionListenerMapper extends Metadata {
-
- private final TagAttribute attr;
-
- public ActionListenerMapper(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ActionSource) instance)
- .setActionListener(new LegacyMethodBinding(this.attr
- .getMethodExpression(ctx, null,
- ActionSourceRule.ACTION_LISTENER_SIG)));
- }
-
- }
-
- final static class ActionListenerMapper2 extends Metadata {
-
- private final TagAttribute attr;
-
- public ActionListenerMapper2(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ActionSource2) instance)
- .addActionListener(new MethodExpressionActionListener(
- this.attr.getMethodExpression(ctx, null,
- ActionSourceRule.ACTION_LISTENER_SIG)));
-
- }
-
- }
-
- public final static ActionSourceRule Instance = new ActionSourceRule();
-
- public ActionSourceRule() {
- super();
- }
-
- public Metadata applyRule(String name, TagAttribute attribute,
- MetadataTarget meta) {
- if (meta.isTargetInstanceOf(ActionSource.class)) {
-
- boolean elSupport = FacesAPI.getComponentVersion(meta
- .getTargetClass()) >= 12;
-
- if ("action".equals(name)) {
- if (elSupport) {
- return new ActionMapper2(attribute);
- } else {
- return new ActionMapper(attribute);
- }
- }
-
- if ("actionListener".equals(name)) {
- if (elSupport) {
- return new ActionListenerMapper2(attribute);
- } else {
- return new ActionListenerMapper(attribute);
- }
- }
- }
- return null;
- }
-}
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java 2007-12-28 12:34:21 UTC (rev 5063)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java 2007-12-28 12:54:38 UTC (rev 5064)
@@ -253,34 +253,20 @@
return ctx.generateUniqueId(this.tagId);
}
+ /* (non-Javadoc)
+ * @see com.sun.facelets.tag.MetaTagHandler#createMetaRuleset(java.lang.Class)
+ */
protected MetaRuleset createMetaRuleset(Class type) {
- MetaRuleset m = super.createMetaRuleset(type);
+ MetaRuleset ruleset = super.createMetaRuleset(type);
+ ruleset.ignore("var");
+ ruleset.ignore("index");
+ ruleset.ignore("columns");
+ ruleset.ignore("begin");
+ ruleset.ignore("end");
+ ruleset.ignore("value");
+ return ruleset;
- // ignore standard component attributes
- m.ignore("binding").ignore("id");
-
- // add auto wiring for attributes
- m.addRule(ComponentRule.Instance);
-
- // if it's an ActionSource
- if (ActionSource.class.isAssignableFrom(type)) {
- m.addRule(ActionSourceRule.Instance);
- }
-
- // if it's a ValueHolder
- if (ValueHolder.class.isAssignableFrom(type)) {
- m.addRule(ValueHolderRule.Instance);
-
- // if it's an EditableValueHolder
- if (EditableValueHolder.class.isAssignableFrom(type)) {
- m.ignore("submittedValue");
- m.ignore("valid");
- m.addRule(EditableValueHolderRule.Instance);
- }
- }
-
- return m;
- }
+ }
/**
* A hook method for allowing developers to do additional processing once Facelets
Deleted: trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java 2007-12-28 12:34:21 UTC (rev 5063)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java 2007-12-28 12:54:38 UTC (rev 5064)
@@ -1,139 +0,0 @@
-/**
- * Licensed under the Common Development and Distribution License,
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.sun.com/cddl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.richfaces.taglib;
-
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import javax.faces.component.UIComponent;
-import javax.faces.component.UIComponentBase;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.el.LegacyValueBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.util.FacesAPI;
-
-/**
- *
- * @author Jacob Hookom
- * @version $Id: ComponentRule.java,v 1.2 2005/08/24 04:38:50 jhook Exp $
- */
-final class ComponentRule extends MetaRule {
-
- final class LiteralAttributeMetadata extends Metadata {
-
- private final String name;
- private final String value;
-
- public LiteralAttributeMetadata(String name, String value) {
- this.value = value;
- this.name = name;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIComponent) instance).getAttributes().put(this.name, this.value);
- }
- }
-
- final static class ValueExpressionMetadata extends Metadata {
-
- private final String name;
-
- private final TagAttribute attr;
-
- private final Class type;
-
- public ValueExpressionMetadata(String name, Class type,
- TagAttribute attr) {
- this.name = name;
- this.attr = attr;
- this.type = type;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIComponent) instance).setValueExpression(this.name, this.attr
- .getValueExpression(ctx, this.type));
- }
-
- }
-
- final static class ValueBindingMetadata extends Metadata {
-
- private final String name;
-
- private final TagAttribute attr;
-
- private final Class type;
-
- public ValueBindingMetadata(String name, Class type, TagAttribute attr) {
- this.name = name;
- this.attr = attr;
- this.type = type;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIComponent) instance).setValueBinding(this.name,
- new LegacyValueBinding(this.attr.getValueExpression(ctx,
- this.type)));
- }
-
- }
-
- private final static Logger log = Logger
- .getLogger("facelets.tag.component");
-
- public final static ComponentRule Instance = new ComponentRule();
-
- public ComponentRule() {
- super();
- }
-
- public Metadata applyRule(String name, TagAttribute attribute,
- MetadataTarget meta) {
- if (meta.isTargetInstanceOf(UIComponent.class)) {
-
- // if component and dynamic, then must set expression
- if (!attribute.isLiteral()) {
- Class type = meta.getPropertyType(name);
- if (type == null) {
- type = Object.class;
- }
- if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) {
- return new ValueExpressionMetadata(name, type, attribute);
- } else {
- return new ValueBindingMetadata(name, type, attribute);
- }
- } else if (meta.getWriteMethod(name) == null) {
-
- // this was an attribute literal, but not property
- warnAttr(attribute, meta.getTargetClass(), name);
-
- return new LiteralAttributeMetadata(name, attribute.getValue());
- }
- }
- return null;
- }
-
- private static void warnAttr(TagAttribute attr, Class type, String n) {
- if (log.isLoggable(Level.WARNING)) {
- log.warning(attr + " Property '" + n + "' is not on type: "
- + type.getName());
- }
- }
-
-}
Deleted: trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java 2007-12-28 12:34:21 UTC (rev 5063)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java 2007-12-28 12:54:38 UTC (rev 5064)
@@ -1,135 +0,0 @@
-/**
- * Licensed under the Common Development and Distribution License,
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.sun.com/cddl/
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * permissions and limitations under the License.
- */
-
-package org.richfaces.taglib;
-
-import javax.faces.component.UIComponent;
-import javax.faces.component.ValueHolder;
-import javax.faces.convert.Converter;
-
-import com.sun.facelets.FaceletContext;
-import com.sun.facelets.el.LegacyValueBinding;
-import com.sun.facelets.tag.TagAttribute;
-import com.sun.facelets.tag.Metadata;
-import com.sun.facelets.tag.MetaRule;
-import com.sun.facelets.tag.MetadataTarget;
-import com.sun.facelets.util.FacesAPI;
-
-/**
- *
- * @author Jacob Hookom
- * @version $Id: ValueHolderRule.java,v 1.2 2005/08/24 04:38:51 jhook Exp $
- */
-final class ValueHolderRule extends MetaRule {
-
- final static class LiteralConverterMetadata extends Metadata {
-
- private final String converterId;
-
- public LiteralConverterMetadata(String converterId) {
- this.converterId = converterId;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ValueHolder) instance).setConverter(ctx.getFacesContext()
- .getApplication().createConverter(this.converterId));
- }
- }
-
- final static class DynamicConverterMetadata extends Metadata {
-
- private final TagAttribute attr;
-
- public DynamicConverterMetadata(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ValueHolder) instance).setConverter((Converter) this.attr
- .getObject(ctx, Converter.class));
- }
- }
-
- final static class LiteralValueMetadata extends Metadata {
-
- private final String value;
-
- public LiteralValueMetadata(String value) {
- this.value = value;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((ValueHolder) instance).setValue(this.value);
- }
- }
-
- final static class DynamicValueExpressionMetadata extends Metadata {
-
- private final TagAttribute attr;
-
- public DynamicValueExpressionMetadata(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIComponent) instance).setValueExpression("value", attr
- .getValueExpression(ctx, Object.class));
- }
- }
-
- final static class DynamicValueBindingMetadata extends Metadata {
-
- private final TagAttribute attr;
-
- public DynamicValueBindingMetadata(TagAttribute attr) {
- this.attr = attr;
- }
-
- public void applyMetadata(FaceletContext ctx, Object instance) {
- ((UIComponent) instance).setValueBinding("value",
- new LegacyValueBinding(attr.getValueExpression(ctx,
- Object.class)));
- }
- }
-
- public final static ValueHolderRule Instance = new ValueHolderRule();
-
- public Metadata applyRule(String name, TagAttribute attribute,
- MetadataTarget meta) {
- if (meta.isTargetInstanceOf(ValueHolder.class)) {
-
- if ("converter".equals(name)) {
- if (attribute.isLiteral()) {
- return new LiteralConverterMetadata(attribute.getValue());
- } else {
- return new DynamicConverterMetadata(attribute);
- }
- }
-
- if ("value".equals(name)) {
- if (attribute.isLiteral()) {
- return new LiteralValueMetadata(attribute.getValue());
- } else {
- if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) {
- return new DynamicValueExpressionMetadata(attribute);
- } else {
- return new DynamicValueBindingMetadata(attribute);
- }
- }
- }
- }
- return null;
- }
-
-}
16 years, 4 months
JBoss Rich Faces SVN: r5063 - trunk/ui/message/src/main/java/org/richfaces/renderkit/html and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-12-28 07:34:21 -0500 (Fri, 28 Dec 2007)
New Revision: 5063
Modified:
branches/3.1.x/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-1754
Modified: branches/3.1.x/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
--- branches/3.1.x/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28 12:30:26 UTC (rev 5062)
+++ branches/3.1.x/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28 12:34:21 UTC (rev 5063)
@@ -48,7 +48,7 @@
UIRichMessages uiMessages = (UIRichMessages)component;
- boolean isDisplayNone = (!messagesIter.hasNext() && !uiMessages.isPassed()) ? true : false;
+ boolean isDisplayNone = !messagesIter.hasNext();
if(!isDisplayNone){
String [] levels = uiMessages.getLevel().split(",");
@@ -188,25 +188,17 @@
public void renderComponentOuterStyles(UIComponent component, FacesContext context, ResponseWriter writer, boolean isDisplayNone) throws IOException {
UIRichMessages uiMessages = null;
- String displayStyle = null;
-
if(!(component instanceof UIRichMessages)){
return;
}
uiMessages = (UIRichMessages)component;
- if(isDisplayNone){
- displayStyle = "display: none";
- }
-
String parentStyle = (String)uiMessages.getAttributes().get("style");
String parentClass = (String)uiMessages.getAttributes().get("styleClass");
- if(displayStyle != null){
- parentStyle = (displayStyle != null) ? displayStyle + ";" + parentStyle : parentStyle;
- }
+ parentStyle = ((isDisplayNone) ? "display: none; " : "") + parentStyle;
String richMessageClass = "rich-messages";
parentClass = parentClass != null ? (richMessageClass + " " + parentClass) : richMessageClass;
Modified: trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
--- trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28 12:30:26 UTC (rev 5062)
+++ trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28 12:34:21 UTC (rev 5063)
@@ -4,12 +4,9 @@
package org.richfaces.renderkit.html;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Iterator;
-import java.util.List;
import javax.faces.application.FacesMessage;
-import javax.faces.application.FacesMessage.Severity;
import javax.faces.component.UIComponent;
import javax.faces.component.UIMessages;
import javax.faces.context.FacesContext;
16 years, 4 months
JBoss Rich Faces SVN: r5062 - trunk/ui/message/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-12-28 07:30:26 -0500 (Fri, 28 Dec 2007)
New Revision: 5062
Modified:
trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
Log:
http://jira.jboss.com/jira/browse/RF-1375
Modified: trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java
===================================================================
--- trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28 12:12:06 UTC (rev 5061)
+++ trunk/ui/message/src/main/java/org/richfaces/renderkit/html/HtmlRichMessagesRenderer.java 2007-12-28 12:30:26 UTC (rev 5062)
@@ -51,7 +51,7 @@
UIRichMessages uiMessages = (UIRichMessages)component;
- boolean isDisplayNone = (!messagesIter.hasNext() && !uiMessages.isPassed()) ? true : false;
+ boolean isDisplayNone = !messagesIter.hasNext();
if(!isDisplayNone){
String [] levels = uiMessages.getLevel().split(",");
@@ -191,25 +191,17 @@
public void renderComponentOuterStyles(UIComponent component, FacesContext context, ResponseWriter writer, boolean isDisplayNone) throws IOException {
UIRichMessages uiMessages = null;
- String displayStyle = null;
-
if(!(component instanceof UIRichMessages)){
return;
}
uiMessages = (UIRichMessages)component;
- if(isDisplayNone){
- displayStyle = "display: none";
- }
-
String parentStyle = (String)uiMessages.getAttributes().get("style");
String parentClass = (String)uiMessages.getAttributes().get("styleClass");
- if(displayStyle != null){
- parentStyle = (displayStyle != null) ? displayStyle + ";" + parentStyle : parentStyle;
- }
+ parentStyle = ((isDisplayNone) ? "display: none; " : "") + parentStyle;
String richMessageClass = "rich-messages";
parentClass = parentClass != null ? (richMessageClass + " " + parentClass) : richMessageClass;
16 years, 4 months
JBoss Rich Faces SVN: r5061 - trunk/ui/columns/src/main/java/org/richfaces/taglib.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2007-12-28 07:12:06 -0500 (Fri, 28 Dec 2007)
New Revision: 5061
Added:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java
trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java
trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java
trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java
Modified:
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTagHandler.java
Log:
RF-1795
Added: trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java (rev 0)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ActionSourceRule.java 2007-12-28 12:12:06 UTC (rev 5061)
@@ -0,0 +1,138 @@
+/**
+ * Licensed under the Common Development and Distribution License,
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.sun.com/cddl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.richfaces.taglib;
+
+import javax.faces.component.ActionSource;
+import javax.faces.component.ActionSource2;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.MethodExpressionActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.LegacyMethodBinding;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.util.FacesAPI;
+
+/**
+ *
+ * @author Jacob Hookom
+ * @version $Id: ActionSourceRule.java,v 1.2 2005/08/24 04:38:50 jhook Exp $
+ */
+final class ActionSourceRule extends MetaRule {
+
+ public final static Class[] ACTION_SIG = new Class[0];
+
+ public final static Class[] ACTION_LISTENER_SIG = new Class[] { ActionEvent.class };
+
+ final static class ActionMapper extends Metadata {
+
+ private final TagAttribute attr;
+
+ public ActionMapper(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ActionSource) instance).setAction(new LegacyMethodBinding(
+ this.attr.getMethodExpression(ctx, String.class,
+ ActionSourceRule.ACTION_SIG)));
+ }
+ }
+
+ final static class ActionMapper2 extends Metadata {
+
+ private final TagAttribute attr;
+
+ public ActionMapper2(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ActionSource2) instance).setActionExpression(this.attr
+ .getMethodExpression(ctx, String.class,
+ ActionSourceRule.ACTION_SIG));
+ }
+
+ }
+
+ final static class ActionListenerMapper extends Metadata {
+
+ private final TagAttribute attr;
+
+ public ActionListenerMapper(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ActionSource) instance)
+ .setActionListener(new LegacyMethodBinding(this.attr
+ .getMethodExpression(ctx, null,
+ ActionSourceRule.ACTION_LISTENER_SIG)));
+ }
+
+ }
+
+ final static class ActionListenerMapper2 extends Metadata {
+
+ private final TagAttribute attr;
+
+ public ActionListenerMapper2(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ActionSource2) instance)
+ .addActionListener(new MethodExpressionActionListener(
+ this.attr.getMethodExpression(ctx, null,
+ ActionSourceRule.ACTION_LISTENER_SIG)));
+
+ }
+
+ }
+
+ public final static ActionSourceRule Instance = new ActionSourceRule();
+
+ public ActionSourceRule() {
+ super();
+ }
+
+ public Metadata applyRule(String name, TagAttribute attribute,
+ MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(ActionSource.class)) {
+
+ boolean elSupport = FacesAPI.getComponentVersion(meta
+ .getTargetClass()) >= 12;
+
+ if ("action".equals(name)) {
+ if (elSupport) {
+ return new ActionMapper2(attribute);
+ } else {
+ return new ActionMapper(attribute);
+ }
+ }
+
+ if ("actionListener".equals(name)) {
+ if (elSupport) {
+ return new ActionListenerMapper2(attribute);
+ } else {
+ return new ActionListenerMapper(attribute);
+ }
+ }
+ }
+ return null;
+ }
+}
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2007-12-28 10:04:34 UTC (rev 5060)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2007-12-28 12:12:06 UTC (rev 5061)
@@ -502,6 +502,7 @@
}
UIComponent component = createColumn();
pushUIComponentClassicTagBase(this);
+
dataTable.getChildren().add(component);
next();
@@ -564,7 +565,7 @@
prepare();
if (created) {
- //dataTable.getChildren().clear();
+ dataTable.getChildren().clear();
created = false;
}
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTagHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTagHandler.java 2007-12-28 10:04:34 UTC (rev 5060)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTagHandler.java 2007-12-28 12:12:06 UTC (rev 5061)
@@ -26,8 +26,8 @@
import com.sun.facelets.FaceletContext;
import com.sun.facelets.tag.TagAttribute;
import com.sun.facelets.tag.jsf.ComponentConfig;
-import com.sun.facelets.tag.jsf.ComponentHandler;
+
/**
* TODO Class description goes here.
*
@@ -78,12 +78,6 @@
/** Current column counter */
private Integer _index = 0;
- /** Prepared flag */
- private boolean prepared = false;
-
- /** Variables counter */
- private int vCounter;
-
/** Expression for var item */
private IteratedExpression iteratedExpression;
@@ -141,12 +135,6 @@
}
correctFirst(ctx);
-
- if (hasNext()) {
- exposeVariables(ctx, 0);
- next(ctx);
- }
-
}
/**
@@ -227,7 +215,7 @@
if (begin != null) {
try {
_begin = Integer.parseInt((String) begin.getObject(ctx));
- _begin--; // - 1
+ _begin--;
if (_begin < 0) {
_begin = 0; // If end is negative set up zero
}
@@ -287,49 +275,38 @@
}
}
-
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.tag.jsf.ComponentHandler#applyNextHandler(com.sun.facelets.FaceletContext,
- * javax.faces.component.UIComponent)
+
+ /* (non-Javadoc)
+ * @see org.richfaces.taglib.ComponentHandler#apply(com.sun.facelets.FaceletContext, javax.faces.component.UIComponent)
*/
@Override
- protected void applyNextHandler(FaceletContext ctx, UIComponent c)
+ public void apply(FaceletContext ctx, UIComponent parent)
throws IOException, FacesException, ELException {
- // TODO Auto-generated method stub
- super.applyNextHandler(ctx, c);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.tag.jsf.ComponentHandler#onComponentCreated(com.sun.facelets.FaceletContext,
- * javax.faces.component.UIComponent,
- * javax.faces.component.UIComponent)
- */
- @Override
- protected void onComponentCreated(FaceletContext ctx, UIComponent c,
- UIComponent parent) {
- // prepare if did not
- if (!prepared) {
- prepare(ctx);
- prepared = true;
- }
-
- // for each
+
+ prepare(ctx); // prepare data
+
try {
- if (hasNext()) {
- next(ctx);
+ while (hasNext()) { // for each
+ exposeVariables(ctx, _index);
super.apply(ctx, parent);
- } else {
- vCounter = 1;
+ next(ctx);
}
} catch (Exception e) {
// TODO: handle exception
+ } finally {
+ release();
+ unExposeVariables(ctx);
}
+
}
+ protected void applyNextHandler(FaceletContext ctx, UIComponent c)
+ throws IOException, FacesException, ELException {
+ // TODO Auto-generated method stub
+ super.applyNextHandler(ctx, c);
+ }
+
+
/**
* Sets page request variables
*
@@ -344,8 +321,7 @@
if (value != null) {
ValueExpression srcVE = value.getValueExpression(ctx,
Object.class);
- ValueExpression ve = getVarExpression(ctx, srcVE, k
- + _begin);
+ ValueExpression ve = getVarExpression(ctx, srcVE, k);
vm.setVariable(_itemId, ve);
}
}
@@ -408,48 +384,10 @@
}
/**
- * Returns true if this is the first loop of columns tag
- *
- * @return
- */
- private boolean atFirst() {
- return (_index == 0);
- }
-
- /**
* Release iteration variables
*/
private void release() {
this.items = null;
this._index = 0;
- this.prepared = false;
}
-
- /*
- * (non-Javadoc)
- *
- * @see com.sun.facelets.tag.jsf.ComponentHandler#onComponentPopulated(com.sun.facelets.FaceletContext,
- * javax.faces.component.UIComponent,
- * javax.faces.component.UIComponent)
- */
- @Override
- protected void onComponentPopulated(FaceletContext ctx, UIComponent c,
- UIComponent parent) {
-
- // remove created component if columns count is zero
- if (atFirst()) {
- c.setRendered(false);
- }
-
- if ((vCounter == (_index - _begin)) || atFirst()) {
- release();
- unExposeVariables(ctx);
- return;
- }
-
- exposeVariables(ctx, vCounter);
- vCounter++;
-
- }
-
}
Added: trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java (rev 0)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentHandler.java 2007-12-28 12:12:06 UTC (rev 5061)
@@ -0,0 +1,298 @@
+/**
+ * Licensed under the Common Development and Distribution License,
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.sun.com/cddl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.richfaces.taglib;
+
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.el.ELException;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.application.Application;
+import javax.faces.component.ActionSource;
+import javax.faces.component.ActionSource2;
+import javax.faces.component.EditableValueHolder;
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIViewRoot;
+import javax.faces.component.ValueHolder;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.el.ValueBinding;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.MethodExpressionActionListener;
+import javax.faces.event.MethodExpressionValueChangeListener;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.validator.MethodExpressionValidator;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.ELAdaptor;
+import com.sun.facelets.el.LegacyMethodBinding;
+import com.sun.facelets.el.LegacyValueBinding;
+import com.sun.facelets.tag.MetaTagHandler;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+import com.sun.facelets.tag.MetaRuleset;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.jsf.ComponentSupport;
+import com.sun.facelets.tag.jsf.EditableValueHolderRule;
+import com.sun.facelets.util.FacesAPI;
+
+/**
+ * Implementation of the tag logic used in the JSF specification. This is your
+ * golden hammer for wiring UIComponents to Facelets.
+ *
+ * @author Jacob Hookom
+ * @version $Id: ComponentHandler.java,v 1.12 2006/01/11 05:40:56 jhook Exp $
+ */
+public class ComponentHandler extends MetaTagHandler {
+
+ private final static Logger log = Logger
+ .getLogger("facelets.tag.component");
+
+ private final TagAttribute binding;
+
+ private final String componentType;
+
+ private final TagAttribute id;
+
+ private final String rendererType;
+
+ public ComponentHandler(ComponentConfig config) {
+ super(config);
+ this.componentType = config.getComponentType();
+ this.rendererType = config.getRendererType();
+ this.id = this.getAttribute("id");
+ this.binding = this.getAttribute("binding");
+ }
+
+ /**
+ * Method handles UIComponent tree creation in accordance with the JSF 1.2
+ * spec.
+ * <ol>
+ * <li>First determines this UIComponent's id by calling
+ * {@link #getId(FaceletContext) getId(FaceletContext)}.</li>
+ * <li>Search the parent for an existing UIComponent of the id we just
+ * grabbed</li>
+ * <li>If found, {@link #markForDeletion(UIComponent) mark} its children
+ * for deletion.</li>
+ * <li>If <i>not</i> found, call
+ * {@link #createComponent(FaceletContext) createComponent}.
+ * <ol>
+ * <li>Only here do we apply
+ * {@link ObjectHandler#setAttributes(FaceletContext, Object) attributes}</li>
+ * <li>Set the UIComponent's id</li>
+ * <li>Set the RendererType of this instance</li>
+ * </ol>
+ * </li>
+ * <li>Now apply the nextHandler, passing the UIComponent we've
+ * created/found.</li>
+ * <li>Now add the UIComponent to the passed parent</li>
+ * <li>Lastly, if the UIComponent already existed (found), then
+ * {@link #finalizeForDeletion(UIComponent) finalize} for deletion.</li>
+ * </ol>
+ *
+ * @see com.sun.facelets.FaceletHandler#apply(com.sun.facelets.FaceletContext,
+ * javax.faces.component.UIComponent)
+ *
+ * @throws TagException
+ * if the UIComponent parent is null
+ */
+ public void apply(FaceletContext ctx, UIComponent parent)
+ throws IOException, FacesException, ELException {
+ // make sure our parent is not null
+ if (parent == null) {
+ throw new TagException(this.tag, "Parent UIComponent was null");
+ }
+
+ // our id
+ String id = ctx.generateUniqueId(this.tagId);
+
+ // grab our component
+ UIComponent c = ComponentSupport.findChildByTagId(parent, id);
+ boolean componentFound = false;
+ if (c != null) {
+ componentFound = true;
+ // mark all children for cleaning
+ if (log.isLoggable(Level.FINE)) {
+ log.fine(this.tag
+ + " Component["+id+"] Found, marking children for cleanup");
+ }
+ ComponentSupport.markForDeletion(c);
+ } else {
+ c = this.createComponent(ctx);
+ if (log.isLoggable(Level.FINE)) {
+ log.fine(this.tag + " Component["+id+"] Created: "
+ + c.getClass().getName());
+ }
+ this.setAttributes(ctx, c);
+
+ // mark it owned by a facelet instance
+ c.getAttributes().put(ComponentSupport.MARK_CREATED, id);
+
+ // assign our unique id
+ if (this.id != null) {
+ c.setId(ctx.generateUniqueId(this.id.getValue(ctx)));
+ } else {
+ UIViewRoot root = ComponentSupport.getViewRoot(ctx, parent);
+ if (root != null) {
+ c.setId(root.createUniqueId());
+ }
+ }
+
+ if (this.rendererType != null) {
+ c.setRendererType(this.rendererType);
+ }
+
+ // hook method
+ this.onComponentCreated(ctx, c, parent);
+ }
+
+ // first allow c to get populated
+ this.nextHandler.apply(ctx, c);
+
+ // finish cleaning up orphaned children
+ if (componentFound) {
+ ComponentSupport.finalizeForDeletion(c);
+ parent.getChildren().remove(c);
+ }
+
+ // add to the tree afterwards
+ // this allows children to determine if it's
+ // been part of the tree or not yet
+ parent.getChildren().add(c);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.facelets.tag.jsf.ComponentHandler#applyNextHandler(com.sun.facelets.FaceletContext,
+ * javax.faces.component.UIComponent)
+ */
+
+ protected void applyNextHandler(FaceletContext ctx, UIComponent c)
+ throws IOException, FacesException, ELException {
+
+ }
+
+ /**
+ * If the binding attribute was specified, use that in conjuction with our
+ * componentType String variable to call createComponent on the Application,
+ * otherwise just pass the componentType String.
+ * <p />
+ * If the binding was used, then set the ValueExpression "binding" on the
+ * created UIComponent.
+ *
+ * @see Application#createComponent(javax.faces.el.ValueBinding,
+ * javax.faces.context.FacesContext, java.lang.String)
+ * @see Application#createComponent(java.lang.String)
+ * @param ctx
+ * FaceletContext to use in creating a component
+ * @return
+ */
+ protected UIComponent createComponent(FaceletContext ctx) {
+ UIComponent c = null;
+ FacesContext faces = ctx.getFacesContext();
+ Application app = faces.getApplication();
+ if (this.binding != null) {
+ ValueExpression ve = this.binding.getValueExpression(ctx,
+ Object.class);
+ if (FacesAPI.getVersion() >= 12) {
+ c = app.createComponent(ve, faces, this.componentType);
+ if (c != null) {
+ // Make sure the component supports 1.2
+ if (FacesAPI.getComponentVersion(c) >= 12) {
+ c.setValueExpression("binding", ve);
+ } else {
+ ValueBinding vb = new LegacyValueBinding(ve);
+ c.setValueBinding("binding", vb);
+ }
+
+ }
+ } else {
+ ValueBinding vb = new LegacyValueBinding(ve);
+ c = app.createComponent(vb, faces, this.componentType);
+ if (c != null) {
+ c.setValueBinding("binding", vb);
+ }
+ }
+ } else {
+ c = app.createComponent(this.componentType);
+ }
+ return c;
+ }
+
+ /**
+ * If the id TagAttribute was specified, get it's value, otherwise generate
+ * a unique id from our tagId.
+ *
+ * @see TagAttribute#getValue(FaceletContext)
+ * @param ctx
+ * FaceletContext to use
+ * @return what should be a unique Id
+ */
+ protected String getId(FaceletContext ctx) {
+ if (this.id != null) {
+ return this.id.getValue(ctx);
+ }
+ return ctx.generateUniqueId(this.tagId);
+ }
+
+ protected MetaRuleset createMetaRuleset(Class type) {
+ MetaRuleset m = super.createMetaRuleset(type);
+
+ // ignore standard component attributes
+ m.ignore("binding").ignore("id");
+
+ // add auto wiring for attributes
+ m.addRule(ComponentRule.Instance);
+
+ // if it's an ActionSource
+ if (ActionSource.class.isAssignableFrom(type)) {
+ m.addRule(ActionSourceRule.Instance);
+ }
+
+ // if it's a ValueHolder
+ if (ValueHolder.class.isAssignableFrom(type)) {
+ m.addRule(ValueHolderRule.Instance);
+
+ // if it's an EditableValueHolder
+ if (EditableValueHolder.class.isAssignableFrom(type)) {
+ m.ignore("submittedValue");
+ m.ignore("valid");
+ m.addRule(EditableValueHolderRule.Instance);
+ }
+ }
+
+ return m;
+ }
+
+ /**
+ * A hook method for allowing developers to do additional processing once Facelets
+ * creates the component. The 'setAttributes' method is still perferred, but this
+ * method will provide the parent UIComponent before it's been added to the tree and
+ * before any children have been added to the newly created UIComponent.
+ *
+ * @param ctx
+ * @param c
+ * @param parent
+ */
+ protected void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent parent) {
+ // do nothing
+ }
+}
Added: trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java (rev 0)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ComponentRule.java 2007-12-28 12:12:06 UTC (rev 5061)
@@ -0,0 +1,139 @@
+/**
+ * Licensed under the Common Development and Distribution License,
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.sun.com/cddl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.richfaces.taglib;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.UIComponentBase;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.LegacyValueBinding;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.util.FacesAPI;
+
+/**
+ *
+ * @author Jacob Hookom
+ * @version $Id: ComponentRule.java,v 1.2 2005/08/24 04:38:50 jhook Exp $
+ */
+final class ComponentRule extends MetaRule {
+
+ final class LiteralAttributeMetadata extends Metadata {
+
+ private final String name;
+ private final String value;
+
+ public LiteralAttributeMetadata(String name, String value) {
+ this.value = value;
+ this.name = name;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIComponent) instance).getAttributes().put(this.name, this.value);
+ }
+ }
+
+ final static class ValueExpressionMetadata extends Metadata {
+
+ private final String name;
+
+ private final TagAttribute attr;
+
+ private final Class type;
+
+ public ValueExpressionMetadata(String name, Class type,
+ TagAttribute attr) {
+ this.name = name;
+ this.attr = attr;
+ this.type = type;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIComponent) instance).setValueExpression(this.name, this.attr
+ .getValueExpression(ctx, this.type));
+ }
+
+ }
+
+ final static class ValueBindingMetadata extends Metadata {
+
+ private final String name;
+
+ private final TagAttribute attr;
+
+ private final Class type;
+
+ public ValueBindingMetadata(String name, Class type, TagAttribute attr) {
+ this.name = name;
+ this.attr = attr;
+ this.type = type;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIComponent) instance).setValueBinding(this.name,
+ new LegacyValueBinding(this.attr.getValueExpression(ctx,
+ this.type)));
+ }
+
+ }
+
+ private final static Logger log = Logger
+ .getLogger("facelets.tag.component");
+
+ public final static ComponentRule Instance = new ComponentRule();
+
+ public ComponentRule() {
+ super();
+ }
+
+ public Metadata applyRule(String name, TagAttribute attribute,
+ MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(UIComponent.class)) {
+
+ // if component and dynamic, then must set expression
+ if (!attribute.isLiteral()) {
+ Class type = meta.getPropertyType(name);
+ if (type == null) {
+ type = Object.class;
+ }
+ if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) {
+ return new ValueExpressionMetadata(name, type, attribute);
+ } else {
+ return new ValueBindingMetadata(name, type, attribute);
+ }
+ } else if (meta.getWriteMethod(name) == null) {
+
+ // this was an attribute literal, but not property
+ warnAttr(attribute, meta.getTargetClass(), name);
+
+ return new LiteralAttributeMetadata(name, attribute.getValue());
+ }
+ }
+ return null;
+ }
+
+ private static void warnAttr(TagAttribute attr, Class type, String n) {
+ if (log.isLoggable(Level.WARNING)) {
+ log.warning(attr + " Property '" + n + "' is not on type: "
+ + type.getName());
+ }
+ }
+
+}
Added: trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java (rev 0)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ValueHolderRule.java 2007-12-28 12:12:06 UTC (rev 5061)
@@ -0,0 +1,135 @@
+/**
+ * Licensed under the Common Development and Distribution License,
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.sun.com/cddl/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ * implied. See the License for the specific language governing
+ * permissions and limitations under the License.
+ */
+
+package org.richfaces.taglib;
+
+import javax.faces.component.UIComponent;
+import javax.faces.component.ValueHolder;
+import javax.faces.convert.Converter;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.LegacyValueBinding;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.Metadata;
+import com.sun.facelets.tag.MetaRule;
+import com.sun.facelets.tag.MetadataTarget;
+import com.sun.facelets.util.FacesAPI;
+
+/**
+ *
+ * @author Jacob Hookom
+ * @version $Id: ValueHolderRule.java,v 1.2 2005/08/24 04:38:51 jhook Exp $
+ */
+final class ValueHolderRule extends MetaRule {
+
+ final static class LiteralConverterMetadata extends Metadata {
+
+ private final String converterId;
+
+ public LiteralConverterMetadata(String converterId) {
+ this.converterId = converterId;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ValueHolder) instance).setConverter(ctx.getFacesContext()
+ .getApplication().createConverter(this.converterId));
+ }
+ }
+
+ final static class DynamicConverterMetadata extends Metadata {
+
+ private final TagAttribute attr;
+
+ public DynamicConverterMetadata(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ValueHolder) instance).setConverter((Converter) this.attr
+ .getObject(ctx, Converter.class));
+ }
+ }
+
+ final static class LiteralValueMetadata extends Metadata {
+
+ private final String value;
+
+ public LiteralValueMetadata(String value) {
+ this.value = value;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((ValueHolder) instance).setValue(this.value);
+ }
+ }
+
+ final static class DynamicValueExpressionMetadata extends Metadata {
+
+ private final TagAttribute attr;
+
+ public DynamicValueExpressionMetadata(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIComponent) instance).setValueExpression("value", attr
+ .getValueExpression(ctx, Object.class));
+ }
+ }
+
+ final static class DynamicValueBindingMetadata extends Metadata {
+
+ private final TagAttribute attr;
+
+ public DynamicValueBindingMetadata(TagAttribute attr) {
+ this.attr = attr;
+ }
+
+ public void applyMetadata(FaceletContext ctx, Object instance) {
+ ((UIComponent) instance).setValueBinding("value",
+ new LegacyValueBinding(attr.getValueExpression(ctx,
+ Object.class)));
+ }
+ }
+
+ public final static ValueHolderRule Instance = new ValueHolderRule();
+
+ public Metadata applyRule(String name, TagAttribute attribute,
+ MetadataTarget meta) {
+ if (meta.isTargetInstanceOf(ValueHolder.class)) {
+
+ if ("converter".equals(name)) {
+ if (attribute.isLiteral()) {
+ return new LiteralConverterMetadata(attribute.getValue());
+ } else {
+ return new DynamicConverterMetadata(attribute);
+ }
+ }
+
+ if ("value".equals(name)) {
+ if (attribute.isLiteral()) {
+ return new LiteralValueMetadata(attribute.getValue());
+ } else {
+ if (FacesAPI.getComponentVersion(meta.getTargetClass()) >= 12) {
+ return new DynamicValueExpressionMetadata(attribute);
+ } else {
+ return new DynamicValueBindingMetadata(attribute);
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+}
16 years, 4 months
JBoss Rich Faces SVN: r5060 - trunk/test-applications/facelets/src/main/webapp/Columns.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2007-12-28 05:04:34 -0500 (Fri, 28 Dec 2007)
New Revision: 5060
Modified:
trunk/test-applications/facelets/src/main/webapp/Columns/Columns.xhtml
trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml
Log:
Modified: trunk/test-applications/facelets/src/main/webapp/Columns/Columns.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Columns/Columns.xhtml 2007-12-28 08:16:41 UTC (rev 5059)
+++ trunk/test-applications/facelets/src/main/webapp/Columns/Columns.xhtml 2007-12-28 10:04:34 UTC (rev 5060)
@@ -20,7 +20,7 @@
</rich:column>
<rich:columns value="#{columns.data2}" var="d2" breakBefore="#{columns.breakBefore}" colspan="#{columns.colspan}"
- columns="#{columns.columns}" index="index" rowspan="#{columns.rowspan}" sortable="#{columns.sortable}" title="#{columns.title}"
+ columns="#{columns.columns}" index="index" rowspan="#{columns.rowspan}" sortable="#{columns.sortable}"
begin="#{columns.begin}" end="100" width="#{columns.width}">
<f:facet name="header">
<h:outputText value="header #{d2.int0}"></h:outputText>
@@ -44,7 +44,7 @@
</rich:column>
<rich:columns value="#{columns.data2}" var="d2" breakBefore="#{columns.breakBefore}" colspan="#{columns.colspan}"
- columns="#{columns.columns}" index="index" rowspan="#{columns.rowspan}" sortable="#{columns.sortable}" title="#{columns.title}"
+ columns="#{columns.columns}" index="index" rowspan="#{columns.rowspan}" sortable="#{columns.sortable}"
begin="#{columns.begin}" end="100" width="#{columns.width}">
<f:facet name="header">
<h:outputText value="header #{d2.int0}"></h:outputText>
Modified: trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml 2007-12-28 08:16:41 UTC (rev 5059)
+++ trunk/test-applications/facelets/src/main/webapp/Columns/ColumnsProperty.xhtml 2007-12-28 10:04:34 UTC (rev 5060)
@@ -22,10 +22,6 @@
<h:commandButton action="#{columns.addNewItem2}" value="ok" onclick="submit();"></h:commandButton>
</h:panelGroup>
- <h:outputText value="title:"></h:outputText>
- <h:inputText value="#{columns.title}" onchange="submit();">
- </h:inputText>
-
<h:outputText value="columns (*):"></h:outputText>
<h:inputText value="#{columns.columns}" onchange="submit();">
</h:inputText>
16 years, 4 months
JBoss Rich Faces SVN: r5059 - in management/design: calendar and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2007-12-28 03:16:41 -0500 (Fri, 28 Dec 2007)
New Revision: 5059
Added:
management/design/calendar/
management/design/calendar/markup/
management/design/calendar/markup/calendar_div_time_chooser.html
management/design/calendar/markup/calendar_div_year_chooser.html
management/design/calendar/markup/icons/
management/design/calendar/markup/icons/bg_btn.png
management/design/calendar/markup/icons/bg_press.png
management/design/calendar/markup/icons/separator.gif
management/design/fileUpload/markup/images/bg_header.psd
management/design/fileUpload/markup/images/ico_file.gif
Log:
http://jira.jboss.com/jira/browse/RF-1723
Added: management/design/calendar/markup/calendar_div_time_chooser.html
===================================================================
--- management/design/calendar/markup/calendar_div_time_chooser.html (rev 0)
+++ management/design/calendar/markup/calendar_div_time_chooser.html 2007-12-28 08:16:41 UTC (rev 5059)
@@ -0,0 +1,546 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<title>calendar</title>
+<style>
+*{
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+
+}
+.calendar_exterior{
+ border : 1px solid #C0C0C0; /*panelBorderColor*/
+}
+.calendar_btn{
+ cursor : pointer;
+}
+.calendar_header{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 7px;
+ height : 22px;
+}
+
+.cell_size{
+ width : 25px;
+ height : 22px;
+}
+
+.calendar_cell{
+ background-color : #FFFFFF; /*NEW ATTRIBUTE - tableBackgroundColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 0px;
+ vertical-align : middle;
+ text-align : center;
+}
+
+.calendar_tool{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background-color : #224986; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ font-family : verdana; /*headerFamilyFont*/
+ color : #FFFFFF; /*headerTextColor*/
+ font-weight : bold;
+ vertical-align : middle;
+ text-align : center;
+ width : 25px;
+ height : 22px;
+}
+
+.calendar_month{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background-color : #224986; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ font-family : verdana; /*headerFamilyFont*/
+ color : #FFFFFF; /*headerTextColor*/
+ font-weight : bold;
+ vertical-align : middle;
+ text-align : center;
+}
+
+.calendar_days{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 0px solid #C0C0C0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ vertical-align : middle;
+ text-align : center;
+ height : 22px;
+}
+
+.calendar_week{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ background-color : #f5f5f5; /*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ vertical-align : middle;
+ text-align : center;
+ width : 25px;
+}
+
+.calendar_holly{
+ background-color : #ffebda; /*NEW ATTRIBUTE - calendarHolidaysBackgroundColor*/
+ color : #ff7800; /*NEW ATTRIBUTE - calendarHolidaysTextColor*/
+}
+
+.calendar_current{
+ background-color : #ff7800; /*NEW ATTRIBUTE - calendarCurrentBackgroundColor*/
+ color : #ffebda; /*NEW ATTRIBUTE - calendarCurrentTextColor*/
+ font-weight : bold;
+}
+
+.calendar_spec{
+ background-color : #e4f5e2; /*NEW ATTRIBUTE - calendarSpecBackgroundColor*/
+ color : #000000; /*NEW ATTRIBUTE - calendarSpecTextColor*/
+}
+
+.calendar_select{
+ background-color : #224986; /*headerBackgroundColor*/
+ color : #FFFFFF; /*headerTextColor*/
+ font-weight : bold;
+}
+
+
+.right_cell{
+ border-right : 0px;
+}
+
+.bottom_cell{
+ border-bottom : 0px;
+}
+
+.calendar_toolfooter{
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 1px;
+}
+
+.calendar_footer{
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 0px solid #C0C0C0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 0px;
+}
+
+.footer_btn{
+ border : 0px solid #C7D7EC; /*additionalBackgroundColor*/
+ padding : 1px 3px 1px 3px;
+ white-space : nowrap;
+ text-align : center;
+}
+.footer_btn_over{
+ background-color : #f5f5f5;/*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ border-top : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 0px 2px 0px 2px;
+ white-space : nowrap;
+ text-align : center;
+}
+.footer_btn_press{
+ background-color : #f5f5f5; /*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ border-bottom : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 0px 2px 0px 2px;
+ white-space : nowrap;
+ text-align : center;
+}
+
+.header_btn{
+ border : 0px solid #C7D7EC; /*additionalBackgroundColor*/
+ padding : 3px;
+ white-space : nowrap;
+ color : #ffffff;
+ font-weight : bold;
+}
+.header_btn_over{
+ background-color : #224986; /*headerBackgroundColor*/
+ border-top : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;white-space : nowrap;
+ color : #ffffff;
+ font-weight : bold;
+}
+.header_btn_press{
+ background-color : #224986; /*headerBackgroundColor*/
+ border-bottom : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;
+ white-space : nowrap;
+ color : #ffffff;
+ font-weight : bold;
+}
+
+.calendar_closetab{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background : url(icons/separator.gif) center left no-repeat #224986; /*headerBackgroundColor*/
+ padding : 0px 2px 0px 4px;
+ text-align : center;
+}
+
+.time_btn{
+ text-align : center;
+ border-top : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;
+ white-space : nowrap;
+ cursor : hand;
+}
+
+.time_btn_press{
+ background-color : #f5f5f5; /*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ border-bottom : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;
+ white-space : nowrap;
+ text-align : center;
+ cursor : hand;
+}
+
+.time_btn_cancel{
+ width : 45;
+ float : right
+}
+.time_btn_ok{
+ width : 45;
+}
+
+.calendar_time_shadow{
+ position : absolute;
+ background : #FFFFFF; /*tableBackgroundColor*/
+ width : 210px;
+ height : 174px;
+ filter : alpha(opacity=50)
+}
+.calendar_time_position{
+ position : absolute;
+ height : 110px;
+ width: 210px;
+ top : 44px
+}
+.calendar_time_layout{
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ border : 1px solid #c0c0c0; /*panelBorderColor*/
+}
+.calendar_time_layout_fields{
+ padding : 7px 7px 5px 7px;
+ text-align : center;
+ white-space : nowrap;
+}
+.calendar_time_layout_cancel{
+ padding : 0px 1px 7px 7px;
+ text-align : right
+}
+.calendar_time_layout_ok{
+ padding : 0px 7px 7px 1px;
+ text-align : left
+}
+
+</style>
+
+</head>
+
+<body bgcolor="#ffffff" style="padding : 30px">
+
+
+<div style="position : relative">
+<table border="0" cellpadding="0" cellspacing="0" class="calendar_exterior" style="position : absolute">
+
+ <tr>
+ <td colspan="7">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td class="calendar_tool calendar_btn">
+ ««
+ </td>
+ <td class="calendar_tool calendar_btn">
+ «
+ </td>
+ <td class="calendar_month calendar_btn">
+ June, 2007
+ </td>
+ <td class="calendar_tool calendar_btn">
+ »
+ </td>
+ <td class="calendar_tool calendar_btn">
+ »»
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="calendar_closetab calendar_btn">
+ <div class="header_btn" onmouseover="this.className='header_btn_over'" onmouseout="this.className='header_btn'" onmousedown="this.className='header_btn_press'">
+ X<br>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_days">
+ <br>
+ </td>
+ <td class="calendar_days">
+ Sun
+ </td>
+ <td class="calendar_days">
+ Mon
+ </td>
+ <td class="calendar_days">
+ Tue
+ </td>
+ <td class="calendar_days">
+ Wed
+ </td>
+ <td class="calendar_days">
+ Thu
+ </td>
+ <td class="calendar_days">
+ Fri
+ </td>
+ <td class="calendar_days right_cell">
+ Sat
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 1
+ </td>
+ <td class="cell_size calendar_cell calendar_holly">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 1<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 2<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 3<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 4<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 5<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 2
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 6<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 7<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_current calendar_btn">
+ 8<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 9<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 10<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 11<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 12<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 3
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 13<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 14<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 15<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 16<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 17<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 18<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 19<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 4
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 20<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 21<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 22<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 23<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_select calendar_btn">
+ 24<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 25<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 26<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week bottom_cell calendar_btn">
+ 5
+ </td>
+ <td class="cell_size calendar_cell calendar_holly bottom_cell calendar_btn">
+ 27<br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell calendar_btn">
+ 28<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec bottom_cell calendar_btn">
+ 29<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec bottom_cell calendar_btn">
+ 30<br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell bottom_cell">
+ <br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="8" class="calendar_footer">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn'" onmousedown="this.className='footer_btn_press'">
+ Clean<br>
+ </div>
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn_press" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn_press'" onmousedown="this.className='footer_btn_press'">
+ 11:36 AM
+ </div>
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <img src="icons/spacer.gif" width="11" height="1" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter" width="100%">
+
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn'" onmousedown="this.className='footer_btn_press'">
+ Today
+ </div>
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn'" onmousedown="this.className='footer_btn_press'">
+ Apply
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+
+</table>
+<div class="calendar_time_shadow">
+</div>
+<table border="0" cellpadding="0" cellspacing="0" class="calendar_time_position">
+ <tr>
+ <td align="center" valign="middle">
+ <table border="0" cellpadding="0" cellspacing="0" class="calendar_time_layout">
+ <tr>
+ <td class="calendar_time_layout_fields" colspan="2">
+ <input type="Text" value="12^" style="width : 35px"><input type="Text" value="00^" style="width : 35px"><input type="Text" value="AM^" style="width : 35px">
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_time_layout_cancel">
+ <div class="time_btn time_btn_cancel" onmouseover="this.className='time_btn time_btn_cancel'" onmouseout="this.className='time_btn time_btn_cancel'" onmousedown="this.className='time_btn_press time_btn_cancel'" onmouseup="this.className='time_btn time_btn_cancel'">
+ Cancel
+ </div>
+ </td>
+ <td class="calendar_time_layout_ok">
+ <div class="time_btn time_btn_ok" onmouseover="this.className='time_btn time_btn_ok'" onmouseout="this.className='time_btn time_btn_ok'" onmousedown="this.className='time_btn_press time_btn_ok'" onmouseup="this.className='time_btn time_btn_ok'">
+ Ok
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+</table>
+
+</div>
+
+
+
+
+
+
+</body>
+</html>
Added: management/design/calendar/markup/calendar_div_year_chooser.html
===================================================================
--- management/design/calendar/markup/calendar_div_year_chooser.html (rev 0)
+++ management/design/calendar/markup/calendar_div_year_chooser.html 2007-12-28 08:16:41 UTC (rev 5059)
@@ -0,0 +1,687 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+<head>
+<title>calendar</title>
+<style>
+*{
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+
+}
+.calendar_exterior{
+ border : 1px solid #C0C0C0; /*panelBorderColor*/
+}
+.calendar_btn{
+ cursor : pointer;
+}
+.calendar_header{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 7px;
+ height : 22px;
+}
+
+.cell_size{
+ width : 25px;
+ height : 22px;
+}
+
+.calendar_cell{
+ background-color : #FFFFFF; /*NEW ATTRIBUTE - tableBackgroundColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 0px;
+ vertical-align : middle;
+ text-align : center;
+}
+
+.calendar_tool{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background-color : #224986; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ font-family : verdana; /*headerFamilyFont*/
+ color : #FFFFFF; /*headerTextColor*/
+ font-weight : bold;
+ vertical-align : middle;
+ text-align : center;
+ width : 25px;
+ height : 22px;
+}
+
+.calendar_month{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background-color : #224986; /*headerBackgroundColor*/
+ font-size : 11px; /*headerSizeFont*/
+ font-family : verdana; /*headerFamilyFont*/
+ color : #FFFFFF; /*headerTextColor*/
+ font-weight : bold;
+ vertical-align : middle;
+ text-align : center;
+}
+
+.calendar_days{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 0px solid #C0C0C0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ vertical-align : middle;
+ text-align : center;
+ height : 22px;
+}
+
+.calendar_week{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ background-color : #f5f5f5; /*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ vertical-align : middle;
+ text-align : center;
+ width : 25px;
+}
+
+.calendar_holly{
+ background-color : #ffebda; /*NEW ATTRIBUTE - calendarHolidaysBackgroundColor*/
+ color : #ff7800; /*NEW ATTRIBUTE - calendarHolidaysTextColor*/
+}
+
+.calendar_current{
+ background-color : #ff7800; /*NEW ATTRIBUTE - calendarCurrentBackgroundColor*/
+ color : #ffebda; /*NEW ATTRIBUTE - calendarCurrentTextColor*/
+ font-weight : bold;
+}
+
+.calendar_spec{
+ background-color : #e4f5e2; /*NEW ATTRIBUTE - calendarSpecBackgroundColor*/
+ color : #000000; /*NEW ATTRIBUTE - calendarSpecTextColor*/
+}
+
+.calendar_select{
+ background-color : #224986; /*headerBackgroundColor*/
+ color : #FFFFFF; /*headerTextColor*/
+ font-weight : bold;
+}
+
+
+.right_cell{
+ border-right : 0px;
+}
+
+.bottom_cell{
+ border-bottom : 0px;
+}
+
+.calendar_toolfooter{
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 1px;
+}
+
+.calendar_footer{
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-right : 0px solid #C0C0C0; /*panelBorderColor*/
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ font-size : 11px; /*generalSizeFont*/
+ font-family : verdana; /*generalFamilyFont*/
+ padding : 0px;
+}
+
+.footer_btn{
+ border : 0px solid #C7D7EC; /*additionalBackgroundColor*/
+ padding : 1px 3px 1px 3px;
+ white-space : nowrap;
+ text-align : center;
+}
+.footer_btn_over{
+ background-color : #f5f5f5;/*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ border-top : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 0px 2px 0px 2px;
+ white-space : nowrap;
+ text-align : center;
+}
+.footer_btn_press{
+ background-color : #f5f5f5; /*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ border-bottom : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 0px 2px 0px 2px;
+ white-space : nowrap;
+ text-align : center;
+}
+
+.header_btn{
+ border : 0px solid #C7D7EC; /*additionalBackgroundColor*/
+ padding : 3px;
+ white-space : nowrap;
+ color : #ffffff;
+ font-weight : bold;
+}
+.header_btn_over{
+ background-color : #224986; /*headerBackgroundColor*/
+ border-top : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;white-space : nowrap;
+ color : #ffffff;
+ font-weight : bold;
+}
+.header_btn_press{
+ background-color : #224986; /*headerBackgroundColor*/
+ border-bottom : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;
+ white-space : nowrap;
+ color : #ffffff;
+ font-weight : bold;
+}
+
+.calendar_closetab{
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ background : url(icons/separator.gif) center left no-repeat #224986; /*headerBackgroundColor*/
+ padding : 0px 2px 0px 4px;
+ text-align : center;
+}
+
+.time_btn{
+ text-align : center;
+ border-top : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;
+ white-space : nowrap;
+ cursor : hand;
+}
+
+.time_btn_press{
+ background-color : #f5f5f5; /*NEW ATTRIBUTE - calendarwWeekBackgroundColor*/
+ border-bottom : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ padding : 2px;
+ white-space : nowrap;
+ text-align : center;
+ cursor : hand;
+}
+
+.time_btn_cancel{
+ width : 45;
+ float : right
+}
+.time_btn_ok{
+ width : 45;
+}
+
+.calendar_time_shadow{
+ position : absolute;
+ background : #FFFFFF; /*tableBackgroundColor*/
+ width : 210px;
+ height : 174px;
+ filter : alpha(opacity=50)
+}
+.calendar_time_position{
+ position : absolute;
+ height : 110px;
+ width: 210px;
+ top : 44px
+}
+.calendar_time_layout{
+ background : #C7D7EC; /*additionalBackgroundColor*/
+ border : 1px solid #c0c0c0; /*panelBorderColor*/
+}
+.calendar_time_layout_fields{
+ padding : 7px 7px 5px 7px;
+ text-align : center;
+ white-space : nowrap;
+}
+.calendar_time_layout_cancel{
+ padding : 0px 1px 7px 7px;
+ text-align : right
+}
+.calendar_time_layout_ok{
+ padding : 0px 7px 7px 1px;
+ text-align : left
+}
+
+
+.calendar_yc_position{
+ position : absolute;
+ height : 174px;
+ width: 210px;
+ top : 0px
+}
+
+.calendar_yc_layout{
+ background : #FFFFFF; /*tableBackgroundColor*/
+ border : 1px solid #c0c0c0; /*panelBorderColor*/
+}
+
+.calendar_yc_footer{
+ background : #C7D7EC; /*headerBackgroundColor*/
+ border-top : 1px solid #c0c0c0; /*panelBorderColor*/
+ text-align : center;
+ padding : 1px
+}
+
+.calendar_yc_cell{
+ padding : 2px;
+}
+
+.calendar_yc_btn{
+ width : 40px;
+ padding: 2px;
+ text-align : center;
+ border : 0px solid #c0c0c0; /*panelBorderColor*/
+}
+
+.calendar_yc_btn_over{
+ background : #C7D7EC; /*from generalBackgroundColor to tabBackgroundColor*/
+ width : 40px;
+ padding: 1px;
+ text-align : center;
+ border-top : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-bottom : 1px solid #C0C0C0; /*panelBorderColor*/
+ cursor : pointer;
+}
+.calendar_yc_btn_press{
+ background : #C7D7EC; /*from tabBackgroundColor to generalBackgroundColor*/
+ width : 40px;
+ padding: 1px;
+ text-align : center;
+ border-bottom : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-right : 1px solid #FFFFFF; /*tableBackgroundColor*/
+ border-left : 1px solid #C0C0C0; /*panelBorderColor*/
+ border-top : 1px solid #C0C0C0; /*panelBorderColor*/
+ cursor : pointer;
+}
+.calendar_yc_split{
+ border-right : 1px solid #c0c0c0; /*panelBorderColor*/
+}
+</style>
+
+</head>
+
+<body bgcolor="#ffffff" style="padding : 30px">
+
+
+<div style="position : relative">
+<table border="0" cellpadding="0" cellspacing="0" class="calendar_exterior" style="position : absolute">
+
+ <tr>
+ <td colspan="7">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td class="calendar_tool calendar_btn">
+ ««
+ </td>
+ <td class="calendar_tool calendar_btn">
+ «
+ </td>
+ <td class="calendar_month calendar_btn">
+ June, 2007
+ </td>
+ <td class="calendar_tool calendar_btn">
+ »
+ </td>
+ <td class="calendar_tool calendar_btn">
+ »»
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="calendar_closetab calendar_btn">
+ <div class="header_btn" onmouseover="this.className='header_btn_over'" onmouseout="this.className='header_btn'" onmousedown="this.className='header_btn_press'">
+ X<br>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_days">
+ <br>
+ </td>
+ <td class="calendar_days">
+ Sun
+ </td>
+ <td class="calendar_days">
+ Mon
+ </td>
+ <td class="calendar_days">
+ Tue
+ </td>
+ <td class="calendar_days">
+ Wed
+ </td>
+ <td class="calendar_days">
+ Thu
+ </td>
+ <td class="calendar_days">
+ Fri
+ </td>
+ <td class="calendar_days right_cell">
+ Sat
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 1
+ </td>
+ <td class="cell_size calendar_cell calendar_holly">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 1<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 2<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 3<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 4<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 5<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 2
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 6<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 7<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_current calendar_btn">
+ 8<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 9<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 10<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 11<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 12<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 3
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 13<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 14<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 15<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec calendar_btn">
+ 16<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 17<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 18<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 19<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week">
+ 4
+ </td>
+ <td class="cell_size calendar_cell calendar_holly calendar_btn">
+ 20<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 21<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 22<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 23<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_select calendar_btn">
+ 24<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_btn">
+ 25<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell calendar_btn">
+ 26<br>
+ </td>
+ </tr>
+
+ <tr>
+ <td class="calendar_week bottom_cell calendar_btn">
+ 5
+ </td>
+ <td class="cell_size calendar_cell calendar_holly bottom_cell calendar_btn">
+ 27<br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell calendar_btn">
+ 28<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec bottom_cell calendar_btn">
+ 29<br>
+ </td>
+ <td class="cell_size calendar_cell calendar_spec bottom_cell calendar_btn">
+ 30<br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell bottom_cell">
+ <br>
+ </td>
+ <td class="cell_size calendar_cell calendar_holly right_cell bottom_cell">
+ <br>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="8" class="calendar_footer">
+ <table border="0" cellpadding="0" cellspacing="0" width="100%">
+ <tr>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn'" onmousedown="this.className='footer_btn_press'">
+ Clean<br>
+ </div>
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn_press" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn_press'" onmousedown="this.className='footer_btn_press'">
+ 11:36 AM
+ </div>
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <img src="icons/spacer.gif" width="11" height="1" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter" width="100%">
+
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn'" onmousedown="this.className='footer_btn_press'">
+ Today
+ </div>
+ </td>
+ <td>
+ <img src="icons/separator.gif" width="1" height="15" alt="" border="0"><br>
+ </td>
+ <td class="calendar_toolfooter calendar_btn">
+ <div class="footer_btn" onmouseover="this.className='footer_btn_over'" onmouseout="this.className='footer_btn'" onmousedown="this.className='footer_btn_press'">
+ Apply
+ </div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+
+
+
+</table>
+<div class="calendar_time_shadow">
+</div>
+<table border="0" cellpadding="0" cellspacing="0" class="calendar_yc_position">
+ <tr>
+ <td align="center" valign="middle">
+ <span style="position : relative">
+ <div style="background:black; filter : alpha(opacity=50); width : 179; height:152; position : absolute; top:3; left:3; z-index : -1">
+ </div>
+ <table border="0" cellpadding="0" cellspacing="0" class="calendar_yc_layout">
+ <tr>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Jan</div>
+ </td>
+ <td class="calendar_yc_cell calendar_yc_split">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Jul</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">«</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">»</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Feb</div>
+ </td>
+ <td class="calendar_yc_cell calendar_yc_split">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Aug</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2001</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2006</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Mar</div>
+ </td>
+ <td class="calendar_yc_cell calendar_yc_split">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Sep</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2002</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn calendar_current" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn calendar_current'" onmousedown="this.className='calendar_yc_btn_press'">2007</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Apr</div>
+ </td>
+ <td class="calendar_yc_cell calendar_yc_split">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Oct</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2003</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2008</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">May</div>
+ </td>
+ <td class="calendar_yc_cell calendar_yc_split">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Nov</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2004</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2009</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">Jun</div>
+ </td>
+ <td class="calendar_yc_cell calendar_yc_split">
+ <div class="calendar_yc_btn calendar_current" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn calendar_current'" onmousedown="this.className='calendar_yc_btn_press'">Dec</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2005</div>
+ </td>
+ <td class="calendar_yc_cell">
+ <div class="calendar_yc_btn" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn'" onmousedown="this.className='calendar_yc_btn_press'">2010</div>
+ </td>
+ </tr>
+ <tr>
+ <td class="calendar_yc_footer" colspan="4">
+ <table border="0" cellpadding="2" cellspacing="0" align="center">
+ <tr>
+ <td>
+ <div class="calendar_yc_btn_over" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn_over'" onmousedown="this.className='calendar_yc_btn_press'">Ok</div>
+ </td>
+ <td>
+ <div class="calendar_yc_btn_over" onmouseover="this.className='calendar_yc_btn_over'" onmouseout="this.className='calendar_yc_btn_over'" onmousedown="this.className='calendar_yc_btn_press'">Close</div>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+</span>
+ </td>
+ </tr>
+</table>
+
+</div>
+
+
+
+
+
+
+</body>
+</html>
Added: management/design/calendar/markup/icons/bg_btn.png
===================================================================
(Binary files differ)
Property changes on: management/design/calendar/markup/icons/bg_btn.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/calendar/markup/icons/bg_press.png
===================================================================
(Binary files differ)
Property changes on: management/design/calendar/markup/icons/bg_press.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/calendar/markup/icons/separator.gif
===================================================================
(Binary files differ)
Property changes on: management/design/calendar/markup/icons/separator.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/fileUpload/markup/images/bg_header.psd
===================================================================
(Binary files differ)
Property changes on: management/design/fileUpload/markup/images/bg_header.psd
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: management/design/fileUpload/markup/images/ico_file.gif
===================================================================
(Binary files differ)
Property changes on: management/design/fileUpload/markup/images/ico_file.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 4 months
JBoss Rich Faces SVN: r5058 - branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-27 23:59:43 -0500 (Thu, 27 Dec 2007)
New Revision: 5058
Modified:
branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java
Log:
http://jira.jboss.org/jira/browse/RF-1006
Modified: branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java
===================================================================
--- branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java 2007-12-28 03:43:24 UTC (rev 5057)
+++ branches/3.1.x/framework/impl/src/main/java/org/ajax4jsf/webapp/ConfigurableXMLFilter.java 2007-12-28 04:59:43 UTC (rev 5058)
@@ -104,14 +104,18 @@
*/
protected HtmlParser getParser(String mimetype, boolean isAjax,
String viewId) {
- HtmlParser parser = null;
- if (isAjax || isForcexml()) {
- parser = parsers.getParser(viewId, mimetype);
- } else if (mimetype.startsWith(TEXT_HTML)
- || mimetype.startsWith(APPLICATION_XHTML_XML)) {
- parser = new FastHtmlParser();
- }
- return parser;
+
+ HtmlParser parser = null;
+
+ if (isAjax || mimetype.startsWith(TEXT_HTML) || mimetype.startsWith(APPLICATION_XHTML_XML)) {
+ if (isAjax || isForcexml()) {
+ parser = parsers.getParser(viewId, mimetype);
+ } else {
+ parser = new FastHtmlParser();
+ }
+ }
+
+ return parser;
}
/*
16 years, 4 months
JBoss Rich Faces SVN: r5057 - trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-12-27 22:43:24 -0500 (Thu, 27 Dec 2007)
New Revision: 5057
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
Log:
http://jira.jboss.com/jira/browse/RF-1567
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-12-28 03:36:53 UTC (rev 5056)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2007-12-28 03:43:24 UTC (rev 5057)
@@ -726,10 +726,13 @@
} while (obj = obj.nextSibling);
// set content
- var obj=obj.nextSibling;
+ obj=obj.nextSibling;
obj.component = this;
obj.richfacesComponent="richfaces:calendar";
+ obj = null;
+ span = null;
+
if(this.params.submitFunction) this.submitFunction = this.params.submitFunction.bind(this);
this.prepareEvents();
16 years, 4 months