- This topic has 5 replies, 2 voices, and was last updated 17 years, 4 months ago by Loyal Water.
-
AuthorPosts
-
RicardMemberHello!
The following code is absolutely correct for Facelets view handler, but MyEclipse HTML editor marks it as invalid:
<f:subview id=”body”
xmlns=”http://www.w3.org/1999/xhtml”
xmlns:ui=”http://java.sun.com/jsf/facelets”
xmlns:h=”http://java.sun.com/jsf/html”
xmlns:f=”http://java.sun.com/jsf/core” xml:lang=”en” lang=”en”><span>hello</span>
</f:subview>
Are you noticed about this issue?
Thanks in advance,
Ricard
Loyal WaterMemberHi Ricard,
What is being marked invalid in the above code ? Are the attributes being marked invalid or the tag ? The only attributes that the subview tag supports are id, binding and rendered.
RicardMemberHi,
Entire tag is marked as invalid. I’m agree that standard f:subview tag only accepts id, binding and rendered attributes, but since version 1.0.6 facelets implements his own f:subview tag, to prevent duplicate id generation.
This tag allows you to declare tag libraries as html tag. You can also use f:view tag in the main template to declare tag libraries instead of html tag.But my problem is: If I have a template like this:
<html xmlns=”http://www.w3.org/1999/xhtml”
xmlns:ui=”http://java.sun.com/jsf/facelets”
xmlns:f=”http://java.sun.com/jsf/core” xml:lang=”en” lang=”en”>
<body>
<ui:include src=”body.xhtml”></ui:include>
</body>
</html>Wich should be the header in body.xhtml page? I have been using <f:subview without any problem, cause If they use html tag in the included page, generated code will add two html tags:
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<body>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<span>hello</span>
</html>
</body>
</html>Using subview tag generated page looks better:
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<body>
<span>hello</span>
</body>
</html>If you knows another way to declare tag libraries in included pages, i’ll appreciate your help.
Regards,
Ricard
Loyal WaterMemberIm going to file this as a bug for my dev team. Ill get back to you with an update ASAP.
RicardMemberThanks a lot Nipun.
Regards,
Loyal WaterMemberYour welcome …
-
AuthorPosts