users@woodstock.java.net

Re: Woodstock & Facelet : webuijsf:Frame tag problems

From: Kenneth Suter <Kenneth.Suter_at_Sun.COM>
Date: Wed, 09 Jan 2008 09:25:11 -0600

Hello David,

I have been playing with Facelets and Woodstock a little bit. I haven't
used the frameset tag but I don't declare the <?xml... processing
instructions explicitly in my .xhtml documents. Rather my documents
look like this:

<f:view 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"
        xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
    <webuijsf:page>
        <webuijsf:html>
          ...
        </webuijsf:html>
    </webuijsf:page>
</f:view>

The page tag seems to render correctly for these documents.

-Kenneth

David J. wrote:
> Hi,
> I've create a project with Woodstock and Facelet. I have downloaded
> the Woodstock examples, and I'm able to run them.
> After that, I have tried to convert the Tree with frame example
> (navTree.jsp) in xhtml, but i've met two errors...
>
> The first problem is with the page tag. Like explains in the java doc,
> it add the <!DOCTYPE> attribute, but not in the right place for me,
> and throw an *"XML Parsing Error: not well-formed":*
>
> Result Code:
> <?xml version='1.0' encoding='UTF-8' ?>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
> <head>
>
> Original Code:
> <?xml version='1.0' encoding='UTF-8' ?>
> <html
> xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jstl/core" mlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich" xmlns:webuijsf="http://www.sun.com/webui/webuijsf >
>
> <f:view>
> <webuijsf:page xhtml="true" frame="true">
> ...
>
> I've decided to declare manually the DocType, and to erase the page
> Tag. but then, the second mistake appears...
>
> The second mistake seems to be a bug from the frame component. Like
> explain before, i've erase the page tag, and my code look like this:
>
> Code:
> <?xml version='1.0' encoding='UTF-8' ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" .... >
> <f:view>
>
> <f:loadBundle basename="ch.intrack.resources" var="msgs" />
> <webuijsf:head title="#{msgs['index_headTitle']}"/>
> <!-- Outer frameset containing all components of the page -->
> <webuijsf:frameSet id="outerFrameSet" rows="75,*"
> frameBorder="true" border="2"
> frameSpacing="2">
>
> <!-- Masthead frame-->
> <webuijsf:frame id="mastheadFrame" name="mastheadFrame"
> scrolling="no" noResize="true"
> marginWidth="0" marginHeight="0"
> url="header.jsp" />
>
> ....
>
> But when i build and deploy my application, i see the following error
> message:
>
> *XML Parsing Error: mismatched tag. Expected: </frame>.*
>
> The most strange is the result code:
>
> </head>
> <frameset id="outerFrameSet" rows="75,*" border="2" framespacing="2"
> frameBorder="1">
> <frame id="mastheadFrame" src="header.jsp" name="mastheadFrame"
> scrolling="no" frameborder="0" marginwidth="0" marginheight="0"
> noresize="noresize"*> />*
>
> As you can see in purple, the end of the frame tag
> (automatically generated) is wrong.... I've tried to close manually
> the tag (<frame></frame>), same result...
>
> So my questions are:
>
> - Is is possible to use the page tag on an xhtml page? is it obligatory?
> - Has someone an idea on how to resolve the wrong self-closing tag of
> the frame?
>
>
>
> All proposals are welcome,
>
> Tanks,
>
> David Johannot