Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Trouble with facelet
Trouble with facelet [message #215287] Fri, 13 June 2008 13:25 Go to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3198
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

I've got these warnings or errors from Eclipse for some elements in an
XHTML I'm using that I don't know where to begin to resolve. I'm
following a facelets tutorial. I've included a good chunk of context
here without pasting in too much and I've numbered the error lines. In
particular, I have trouble with

1. "jsfc" in the first span tag: whence is this definition anyway? Is
is supposed to be something in one of the xmlns paths in the header?

2. Eclipse says the div tag is in an invalid location (a cascaded error
from #1?)

3. Due probably to the same cause as #1, value, action and action are
undefined on the line of the first anchor tag.


<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<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:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:a4j="http://richfaces.org/a4j">
<body>
<!-- This is the whole qa tag; sort of like a C preprocessor macro
in JSF -->
*1 <span jsfc="ui:component">
*2 <div>
<form jsfc="h:form">
*3 <a jsfc="h:commandLink" value="#{q.questionText}"
action="#{q.toggle}" />
</form>
</div>
..
..
..

Thanks for your help in demystifying this topic. I am a very green
beginner (and, as the comment indicates, a very naive refugee from C).

Russ Bateman
Re: Trouble with facelet [message #215392 is a reply to message #215287] Sat, 14 June 2008 01:56 Go to previous messageGo to next message
Russell Bateman is currently offline Russell Bateman
Messages: 3198
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

Windofkeltia wrote:
> [snip]
> 1. "jsfc" in the first span tag: whence is this definition anyway?
> [snip]
>
> *1 <span jsfc="ui:component">
> [snip]
>
> Russ Bateman

I've looked all over the place for this and can now see that jsfc is a
known thing. So, someone who knows much about facelets probably can say
two or three words about why it generates a yellow triangle and says
"undefined attribute" because it has to be a very fundamental thing in
facelets. And I can't help but think that the other errors are cascades
of this one or closely related.

I hope just the right person stumbles upon this question.

Thanks,

Russ
Re: Trouble with facelet [message #215416 is a reply to message #215287] Sun, 15 June 2008 03:30 Go to previous message
Russell Bateman is currently offline Russell Bateman
Messages: 3198
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

Windofkeltia wrote:
> I've got these warnings or errors from Eclipse for some elements in an
> XHTML I'm using that I don't know where to begin to resolve. I'm
> following a facelets tutorial. I've included a good chunk of context
> here without pasting in too much and I've numbered the error lines. In
> particular, I have trouble with
>
> 1. "jsfc" in the first span tag: whence is this definition anyway? Is
> is supposed to be something in one of the xmlns paths in the header?
>
> 2. Eclipse says the div tag is in an invalid location (a cascaded error
> from #1?)
>
> 3. Due probably to the same cause as #1, value, action and action are
> undefined on the line of the first anchor tag.
>
>
> <!DOCTYPE html PUBLIC
> "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>
> <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:ui="http://java.sun.com/jsf/facelets"
> xmlns:rich="http://richfaces.org/rich"
> xmlns:a4j="http://richfaces.org/a4j">
> <body>
> <!-- This is the whole qa tag; sort of like a C preprocessor macro in
> JSF -->
> *1 <span jsfc="ui:component">
> *2 <div>
> <form jsfc="h:form">
> *3 <a jsfc="h:commandLink" value="#{q.questionText}"
> action="#{q.toggle}" />
> </form>
> </div>
> .
> .
> .
>
> Thanks for your help in demystifying this topic. I am a very green
> beginner (and, as the comment indicates, a very naive refugee from C).
>
> Russ Bateman

So, it appears there's no answer to this. I saw someone else ask this
question in another forum and there was no answer there, either, and the
forum seemed to reject my attempts to register in order to contact that
person (a Maarten D from Netherlands).

My answer, if it is one, was to turn off validation as jsfc isn't in any
namespace. Right-click on project, Preferences...->Validation->Override
Validation Preferences, unclick HTML Syntax Validator.

Ultimately, the code worked, but it's somewhat uncomfortable for me as
in my day job, I write low-level C code that is ported across 20-odd
*nix platforms, so if there's the slightest peep out of a compiler or
other tool, we consider it a national disaster that requires our full
attention.


Thanks,

Russ Bateman
Previous Topic:Missing Sun facelet DTD URL
Next Topic:Adding a row to HTML table with Web Page Editor
Goto Forum:
  


Current Time: Wed Oct 01 20:38:42 GMT 2014

Powered by FUDForum. Page generated in 0.01838 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software