You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2014/12/17 11:39:14 UTC
svn commit: r1646189 - in
/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago:
facelets/extension/OutExtensionHandler.java
internal/taglib/extension/OutExtensionTag.java
Author: lofwyr
Date: Wed Dec 17 10:39:14 2014
New Revision: 1646189
URL: http://svn.apache.org/r1646189
Log:
TOBAGO-1430: New tag <tx:out> as labeled version of <tc:out>
Added:
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/OutExtensionHandler.java
myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/extension/OutExtensionTag.java
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/OutExtensionHandler.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/OutExtensionHandler.java?rev=1646189&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/OutExtensionHandler.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/extension/OutExtensionHandler.java Wed Dec 17 10:39:14 2014
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.facelets.extension;
+
+import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.component.UIOut;
+
+import javax.faces.view.facelets.ComponentConfig;
+
+public class OutExtensionHandler extends TobagoLabelExtensionHandler {
+
+ public OutExtensionHandler(final ComponentConfig config) {
+ super(config);
+ }
+
+ protected String getSubComponentType() {
+ return UIOut.COMPONENT_TYPE;
+ }
+
+ protected String getSubRendererType() {
+ return RendererTypes.OUT;
+ }
+}
Added: myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/extension/OutExtensionTag.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/extension/OutExtensionTag.java?rev=1646189&view=auto
==============================================================================
--- myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/extension/OutExtensionTag.java (added)
+++ myfaces/tobago/branches/tobago-3.0.x/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/extension/OutExtensionTag.java Wed Dec 17 10:39:14 2014
@@ -0,0 +1,140 @@
+/*
+ * 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.
+ */
+
+package org.apache.myfaces.tobago.internal.taglib.extension;
+
+import org.apache.myfaces.tobago.apt.annotation.DynamicExpression;
+import org.apache.myfaces.tobago.apt.annotation.ExtensionTag;
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+
+import javax.el.ValueExpression;
+
+/**
+ * Renders a text output field with a label.
+ * <br />
+ * Short syntax of:
+ * <p/>
+ * <pre>
+ * <tc:panel>
+ * <f:facet name="layout">
+ * <tc:gridLayout columns="auto;*"/>
+ * </f:facet>
+ * <tc:label value="#{label}" for="@auto"/>
+ * <tc:out value="#{value}">
+ * ...
+ * </tc:out>
+ * </tc:panel>
+ * </pre>
+ */
+
+@Tag(name = "out")
+@ExtensionTag(
+ baseClassName = "org.apache.myfaces.tobago.internal.taglib.OutTag",
+ faceletHandler = "org.apache.myfaces.tobago.facelets.extension.OutExtensionHandler")
+public interface OutExtensionTag {
+
+ /**
+ * Indicate markup of this component.
+ * Possible value is 'none'. But this can be overridden in the theme.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(defaultValue = "none", type = "java.lang.String[]")
+ void setMarkup(final ValueExpression markup);
+
+ /**
+ * The current value of this component.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "java.lang.Object")
+ void setValue(final ValueExpression value);
+
+ /**
+ * Text value to display as label.
+ * If text contains an underscore the next character is used as accesskey.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setLabel(final ValueExpression label);
+
+ /**
+ * The value binding expression linking this
+ * component to a property in a backing bean.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "javax.faces.component.UIComponent")
+ void setBinding(final ValueExpression binding);
+
+ /**
+ * Flag indicating whether or not this component should be rendered
+ * (during Render Response Phase), or processed on any subsequent form submit.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "boolean", defaultValue = "true")
+ void setRendered(final ValueExpression rendered);
+
+ /**
+ * An expression that specifies the Converter for this component.
+ * If the value binding expression is a String,
+ * the String is used as an ID to look up a Converter.
+ * If the value binding expression is a Converter,
+ * uses that instance as the converter.
+ * The value can either be a static value (ID case only)
+ * or an EL expression.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute(type = "javax.faces.convert.Converter",
+ expression = DynamicExpression.VALUE_EXPRESSION)
+ void setConverter(final ValueExpression converter);
+
+ /**
+ * Text value to display as tooltip.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setTip(final ValueExpression tip);
+
+ /**
+ * The width for the label component. Default: 'auto'.
+ * This value is used in the gridLayouts columns attribute.
+ * See gridLayout tag for valid values.
+ */
+ @TagAttribute
+ @UIComponentTagAttribute()
+ void setLabelWidth(final ValueExpression labelWidth);
+
+ /**
+ * The component identifier for the input field component inside of the container.
+ * This value must be unique within the closest parent component that is a naming container.
+ */
+ @TagAttribute(rtexprvalue = true)
+ @UIComponentTagAttribute
+ void setFieldId(final String fieldId);
+
+ /**
+ * The component identifier for this component.
+ * This value must be unique within the closest parent component that is a naming container.
+ * For tx components the id will be set to the container (e. g. the panel).
+ * To set the id of the input field, you have to use the attribute "fieldId".
+ */
+ @TagAttribute(rtexprvalue = true)
+ @UIComponentTagAttribute
+ void setId(final String id);
+}