eclipse helios 中 jsf 页面的验证问题
自从我重新安装了 Eclipse Helios 后,我的问题视图中出现了很多这样的错误:
Encountered "<EOF>" at line 0, column 0.
Was expecting one of:
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<STRING_LITERAL> ...
"true" ...
"false" ...
"null" ...
"(" ...
"-" ...
"not" ...
"!" ...
"empty" ...
<IDENTIFIER> ...
"not" ...
"!" ...
"-" ...
"empty" ...
"true" ...
"false" ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<STRING_LITERAL> ...
"null" ...
"(" ...
<IDENTIFIER> ...
<IDENTIFIER> ...
我确信我以前从未遇到过这种情况,验证似乎在这样的部分上失败了:
<f:facet name="header">
<ice:outputText value="ID"></ice:outputText>
</f:facet>
#{bean.id} <========= THIS LINE IS MARKED AS INVALID
</ice:column>
为什么会发生这种情况?我能做什么来对抗它?谢谢。
Since I reinstalled Eclipse Helios I have a lot of these errors in my problems view:
Encountered "<EOF>" at line 0, column 0.
Was expecting one of:
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<STRING_LITERAL> ...
"true" ...
"false" ...
"null" ...
"(" ...
"-" ...
"not" ...
"!" ...
"empty" ...
<IDENTIFIER> ...
"not" ...
"!" ...
"-" ...
"empty" ...
"true" ...
"false" ...
<INTEGER_LITERAL> ...
<FLOATING_POINT_LITERAL> ...
<STRING_LITERAL> ...
"null" ...
"(" ...
<IDENTIFIER> ...
<IDENTIFIER> ...
I am sure I never had that before, the validation seems to fail on parts like that:
<f:facet name="header">
<ice:outputText value="ID"></ice:outputText>
</f:facet>
#{bean.id} <========= THIS LINE IS MARKED AS INVALID
</ice:column>
Why does this happen? What I can do against it? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如我所看到的,当您在 JSF 组件外部使用 #{} 语法时,Helios 中就会发生这种情况。将 # 替换为 $,或使用带有 #{bean.id} 的输出文本组件
As I can see, this occurs in Helios when you are using #{} syntax outside a JSF component. Replace # with $, or use outputtext component with #{bean.id}
仅 Facelets 2.0 支持在模板文本中使用 EL,Facelets 2.0 是 JSF 2.0 的一部分。显然,您的动态 Web 项目被错误配置为 JSF 1.x,然后 Eclipse 就会对此进行攻击。
在项目属性中将 JSF 项目构面版本更改为 2.0。
Using EL in template text is only supported in Facelets 2.0 which is part of JSF 2.0. Apparently your dynamic web project is misconfigured as JSF 1.x and Eclipse will then jerk on that.
Change the JSF project facet version to 2.0 in your project's properties.