myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Niklas <co...@dniklas.de>
Subject RE: [JSF] how to "enable" facelets for my jsf component
Date Tue, 27 May 2008 13:10:06 GMT

Hi David,

sorry, only know it was possible to look at this/my problem, thanks for your
answer.


Nebinger, David wrote:
> 
> You need more than just the facelet-taglib support.  There's integral
> stuff that has to go into the code before it's usable.
> 
> This message indicates that you are not returning a valid component
> and/or renderer type from the component body tag.  The values returned
> from the getRendererType() and getComponentType() methods are used as
> lookups against the faces-config.xml and taglib.xml files in the
> component jar file.
> 

As i mentioned, the "jps-stuff" works already, the component rendering is
correct and no warnings were printed out. My suspicion was, that there is
something wrong with the "facelets-stuff", but sadly I couldn't see this.

My fault was, that i put the component-type to the renderer-type, as well
(in taglib.xml for facelets).
The correct facelets-configuration for my example must be:

	<tag>
		<tag-name>sayHello</tag-name>
		<component>
			<component-type>
				daniel.test.lab.jsf.mycomponents.hello.SayHelloUI
			</component-type>
			<renderer-type>
				daniel.test.lab.jsf.mycomponents.hello.SayHelloRenderer
			</renderer-type>
		</component>
	</tag>


Nebinger, David wrote:
> 
> Bruno's article talks about both of the files and what needs to go into
> them, but it looks like you're still missing some pieces...
> 
> Personally I didn't use archetype for our JSF/Facelets components.  They
> are really simple to hand-code, and (outside of standard method
> overrides) there's not a whole lot of boilerplate code that I can see
> archetype saving you much time on.
> 
> And I still can't get away from the belief that w/o hand coding things
> like this you'll never make heads or tails out of code generated by a
> tool on your behalf...
> 
You're right, this is my opinion, too. But this was the "best" example i
could find. 
I didn't use the archetype etc. Today i found another "check list" at 
http://blogs.steeplesoft.com/jsf-component-writing-check-list/. I think,
this
is quite helpful.

Best regards
Daniel

-- 
View this message in context: http://www.nabble.com/-JSF--how-to-%22enable%22-facelets-for-my-jsf-component-tp17276563p17490085.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message