myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r512409 - in /myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component: SelectItemsTag.java SelectItemsTagDeclaration.java
Date Tue, 27 Feb 2007 21:14:04 GMT
Author: bommel
Date: Tue Feb 27 13:14:03 2007
New Revision: 512409

URL: http://svn.apache.org/viewvc?view=rev&rev=512409
Log:
(TOBAGO-307) Create a tc:selectItems tag

Added:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTag.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTagDeclaration.java

Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTag.java?view=auto&rev=512409
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTag.java
(added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTag.java
Tue Feb 27 13:14:03 2007
@@ -0,0 +1,63 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+import org.apache.myfaces.tobago.component.ComponentUtil;
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_VALUE;
+
+import javax.faces.component.UISelectItems;
+import javax.faces.component.UIComponent;
+
+/*
+ * User: bommel
+ * Date: Feb 27, 2007
+ * Time: 9:16:41 PM
+ */
+public class SelectItemsTag extends TobagoTag implements SelectItemsTagDeclaration {
+
+  public String getComponentType() {
+    return UISelectItems.COMPONENT_TYPE;
+  }
+
+  public String getRendererType() {
+    return null;
+  }
+
+  private String value;
+
+  @Override
+  protected void setProperties(UIComponent component) {
+    super.setProperties(component);
+    ComponentUtil.setStringProperty(component, ATTR_VALUE, value);
+  }
+
+  @Override
+  public void release() {
+    super.release();
+    this.value = null;
+  }
+
+  public String getValue() {
+    return value;
+  }
+
+  public void setValue(String value) {
+    this.value = value;
+  }
+
+}

Added: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTagDeclaration.java?view=auto&rev=512409
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTagDeclaration.java
(added)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/component/SelectItemsTagDeclaration.java
Tue Feb 27 13:14:03 2007
@@ -0,0 +1,45 @@
+package org.apache.myfaces.tobago.taglib.component;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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.
+ */
+
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.BodyContent;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.taglib.decl.HasId;
+import org.apache.myfaces.tobago.taglib.decl.HasBinding;
+
+/**
+ * Add a child UISelectItems component to the UIComponent
+ * associated with the closed parent UIComponent custom
+ * action.
+ */
+@Tag(name = "selectItems", bodyContent = BodyContent.EMPTY)
+@UIComponentTag(uiComponent = "javax.faces.component.UISelectItems", isComponentAlreadyDefined
= true)
+public interface SelectItemsTagDeclaration extends TobagoTagDeclaration, HasId, HasBinding
{
+
+  /**
+   * Value binding expression pointing at a List or array of SelectItem instances containing
+   * the information for this option.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute()
+  void setValue(String value);
+
+}



Mime
View raw message