|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
Component generation trinidadHi guys,
I hope someone can help me out. I've been working with Myfaces and Trinidad in several projects, but instead of just using it, I would like to learn how to add new components, to in this case Trinidad. I have checked out the snapshot and it builds - so that works fine (I believe). I wanted to start simple by adding a very simple component like a tr:div. But when I generate sources of the trinidad-api project it complains as follows: Missing <component-family> for "org.apache.myfaces.trinidad.component.core.output.CoreDiv", generation of this Component is skipped I've added CoreDiv.xml to 'trinidad-build\src\main\resources\META-INF\maven-faces-plugin\components\trinidad\core', it looks like this: <!-- 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. --> <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:tr="http://myfaces.apache.org/trinidad" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <component> <description> <![CDATA[This is a div!]]> </description> <component-type>org.apache.myfaces.trinidad.CoreDiv</component-type> <component-class>org.apache.myfaces.trinidad.component.core.output.CoreDiv</component-class> <property> <description> <![CDATA[Sexy background color of the div]]> </description> <property-name>bgColor</property-name> <property-class>java.lang.String</property-class> </property> <xi:include href="includes/CommonAttrs.xml" xpointer="/faces-config/component/*"/> <xi:include href="includes/CoreJSEvents.xml" xpointer="/faces-config/component/*"/> <component-extension> <mfp:component-supertype>org.apache.myfaces.trinidad.ComponentBase</mfp:component-supertype> <mfp:renderer-type>org.apache.myfaces.trinidad.Div</mfp:renderer-type> <mfp:tag-name>tr:div</mfp:tag-name> <mfp:tag-class>org.apache.myfaces.trinidadinternal.taglib.core.output.CoreDivTag</mfp:tag-class> <mfp:long-description><![CDATA[Blabla about the div]]> </mfp:long-description> <mfp:example> <mfp:source-code> <![CDATA[ <tr:div></tr:div> ]]> </mfp:source-code> </mfp:example> <mfp:author>Martijn</mfp:author> <mfp:component-metadata> <mfp:accepts-child-components>true</mfp:accepts-child-components> <mfp:favorite-property>id</mfp:favorite-property> <mfp:group>${md:getTranslatedString("PALETTE_OUTPUT")}</mfp:group> </mfp:component-metadata> <mfp:uix2-local-name>div</mfp:uix2-local-name> </component-extension> </component> </faces-config> And as for the renderer I added a CoreDiv.xml to '\trinidad-build\src\main\resources\META-INF\maven-faces-plugin\renderers\trinidad' "<?xml version="1.0" encoding="utf-8"?> <!-- 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. --> <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin"> <render-kit> <render-kit-id>org.apache.myfaces.trinidadinternal.core</render-kit-id> <renderer> <component-family>org.apache.myfaces.trinidad.CoreDiv</component-family> <renderer-type>org.apache.myfaces.trinidad.Div</renderer-type> <renderer-class>org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.CoreDivOutputRenderer</renderer-class> <renderer-extension> <mfp:component-type>org.apache.myfaces.trinidad.CoreDiv</mfp:component-type> </renderer-extension> </renderer> </render-kit> </faces-config> I am not sure what it is complaining about as the renderer file contains the component-family. :/ But maybe it expects something else or something on another place? Does anyone know? I would really appreciate as I am kinda stuck atm. Thanks a lot! Best Regards, Martijn |
| Free Forum Powered by Nabble | Forum Help |