Author: alexsmirnov
Date: 2010-09-28 21:08:39 -0400 (Tue, 28 Sep 2010)
New Revision: 19360
Added:
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java
Modified:
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java
Log:
CODING IN PROGRESS - issue RF-9323: CDK annotation @RendererSpecificComponent.attributes
doesn't work
https://jira.jboss.org/browse/RF-9323
Added: branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java
===================================================================
--- branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java
(rev 0)
+++
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java 2010-09-29
01:08:39 UTC (rev 19360)
@@ -0,0 +1,45 @@
+/*
+ * $Id$
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.richfaces.component;
+
+import org.richfaces.cdk.annotations.Attribute;
+
+/**
+ * <p class="changed_added_4_0">Interface for concrete panel classes
which can render simple text header.</p>
+ * @author asmirnov(a)exadel.com
+ *
+ */
+public interface Panel {
+
+ /**
+ * <p class="changed_added_4_0">Panel header text. "header"
attribute can be used for simple text header.
+ * For more complicated content can be put into "header" facet
instead.</p>
+ * @return
+ */
+ @Attribute
+ String getHeader();
+
+ void setHeader(String header);
+
+}
Property changes on:
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/Panel.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java
===================================================================
---
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java 2010-09-29
00:17:46 UTC (rev 19359)
+++
branches/RF-9309/ui/output/ui/src/main/java/org/richfaces/component/UIPanel.java 2010-09-29
01:08:39 UTC (rev 19360)
@@ -23,8 +23,10 @@
import javax.faces.component.UIComponentBase;
+import org.richfaces.cdk.annotations.Facet;
import org.richfaces.cdk.annotations.JsfComponent;
import org.richfaces.cdk.annotations.JsfRenderer;
+import org.richfaces.cdk.annotations.RendererSpecificComponent;
import org.richfaces.cdk.annotations.Tag;
import org.richfaces.cdk.annotations.TagType;
@@ -32,11 +34,24 @@
* JSF component class
*
*/
-@JsfComponent(tag = @Tag(type = TagType.Facelets),
- renderer = @JsfRenderer(type = "org.richfaces.PanelRenderer")
- )
+@JsfComponent(
+ type="org.richfaces.Panel",
+ family=UIPanel.COMPONENT_FAMILY,
+ components={
+ @RendererSpecificComponent(
+ type = "org.richfaces.HtmlPanel",
+ generate="org.richfaces.components.html.HtmlPanel",
+ tag = @Tag(type = TagType.Facelets,name="panel"),
+ renderer = @JsfRenderer(type = "org.richfaces.PanelRenderer"),
+ facets=@Facet(name="header",generate=false),
+
attributes={"core-props.xml","events-props.xml","i18n-props.xml"},
+ interfaces=Panel.class
+ )
+ }
+)
public class UIPanel extends UIComponentBase {
- private static final String COMPONENT_FAMILY = "org.richfaces.Panel";
+
+ public static final String COMPONENT_FAMILY = "org.richfaces.Panel";
public boolean getRendersChildren() {
return true;