facebook

Problem with facelets subviews

  1. MyEclipse IDE
  2.  > 
  3. Feature Requests
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #272317 Reply

    Ricard
    Member

    Hello!

    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&#8221;
    xmlns:ui=”http://java.sun.com/jsf/facelets&#8221;
    xmlns:h=”http://java.sun.com/jsf/html&#8221;
    xmlns:f=”http://java.sun.com/jsf/core&#8221; xml:lang=”en” lang=”en”>

    <span>hello</span>

    </f:subview>

    Are you noticed about this issue?

    Thanks in advance,
    Ricard

    #272320 Reply

    Loyal Water
    Member

    Hi 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.

    #272349 Reply

    Ricard
    Member

    Hi,

    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&#8221;
    xmlns:ui=”http://java.sun.com/jsf/facelets&#8221;
    xmlns:f=”http://java.sun.com/jsf/core&#8221; 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&#8221; xml:lang=”en” lang=”en”>
    <body>
    <html xmlns=”http://www.w3.org/1999/xhtml&#8221; 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&#8221; 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

    #272385 Reply

    Loyal Water
    Member

    Im going to file this as a bug for my dev team. Ill get back to you with an update ASAP.

    #272397 Reply

    Ricard
    Member

    Thanks a lot Nipun.

    Regards,

    #272408 Reply

    Loyal Water
    Member

    Your welcome …

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Problem with facelets subviews

You must be logged in to post in the forum log in