You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2013/08/23 03:20:06 UTC

[26/35] git commit: Rename ControlGroup mixin to FieldGroup

Rename ControlGroup mixin to FieldGroup


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/84893732
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/84893732
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/84893732

Branch: refs/heads/master
Commit: 84893732569f7090a5e6b01c9fda81c5ef53bc37
Parents: 024e44a
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Thu Aug 22 17:42:17 2013 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Thu Aug 22 17:42:17 2013 -0700

----------------------------------------------------------------------
 .../tapestry5/corelib/mixins/ControlGroup.java  | 61 --------------------
 1 file changed, 61 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/84893732/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/ControlGroup.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/ControlGroup.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/ControlGroup.java
deleted file mode 100644
index 5835aa5..0000000
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/mixins/ControlGroup.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2013 The Apache Software Foundation
-//
-// Licensed 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.tapestry5.corelib.mixins;
-
-import org.apache.tapestry5.Field;
-import org.apache.tapestry5.MarkupWriter;
-import org.apache.tapestry5.annotations.HeartbeatDeferred;
-import org.apache.tapestry5.annotations.InjectContainer;
-import org.apache.tapestry5.dom.Element;
-
-/**
- * Applied to a {@link org.apache.tapestry5.Field}, this provides the outer layers of Bootstrap:
- * an outer {@code <div class="control-group">}, a {@code <label class="control-label">}, and a
- * {@code <div class="controls">} around the field itself. This control is not appropriate
- * for radio buttons or check boxes, as those want to have the label element directly around the control.
- * As with the {@link org.apache.tapestry5.corelib.components.Label} component, the {@code for} attribute is set (after the field itself
- * renders).
- *
- * @tapestrydoc
- * @since 5.4
- */
-public class ControlGroup
-{
-
-    @InjectContainer
-    private Field field;
-
-    private Element label;
-
-    void beginRender(MarkupWriter writer)
-    {
-        writer.element("div", "class", "form-group");
-        label = writer.element("label");
-        writer.end();
-        fillInLabelAttributes();
-    }
-
-    @HeartbeatDeferred
-    void fillInLabelAttributes()
-    {
-        label.attribute("for", field.getClientId());
-        label.text(field.getLabel());
-    }
-
-    void afterRender(MarkupWriter writer)
-    {
-        writer.end(); // div.form-group
-    }
-}