【问题标题】:How to get .xhtml code assist for IceFaces 4?如何获得 IceFaces 4 的 .xhtml 代码辅助?
【发布时间】:2016-11-20 15:41:55
【问题描述】:

我正在创建一个具有 JSF+ICEFACES 集成的项目,但在 Eclipse 中,我没有获得 IceFaces 的 .xhtml 代码辅助,但它正在为 jsf 提供代码辅助。我确信它正在发生,因为这里的 jars 是我完整的 maven 依赖项

<dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces</artifactId>
        <version>4.0.0</version>
    </dependency>
    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces-ace</artifactId>
        <version>4.0.0</version>
        <type>pom</type>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.icepush/icepush -->
    <dependency>
        <groupId>org.icepush</groupId>
        <artifactId>icepush</artifactId>
        <version>4.0.0</version>
    </dependency>

当我使用 eclipse mars 时,我的 jar 指向 web-inf/lib。

我在 xhtml 中添加了这些名称空间

<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ace="http://www.icefaces.org/icefaces/components">


</html>

【问题讨论】:

  • 如果您的应用程序本身可以工作,则不会缺少 .jar。
  • 但是为什么它没有给我自动建议?
  • 不知道..我不是icefaces用户。

标签: eclipse jsf icefaces


【解决方案1】:

终于找到了答案,因为我认为是依赖的问题

<dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces</artifactId>
        <version>4.0.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces-ace</artifactId>
        <version>4.0.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>7.0</version>
        <scope>provided</scope>
    </dependency>

【讨论】:

  • 那么只有添加 javaee-web-api 依赖,IceFaces 补全才开始工作?奇怪
  • 是的,因为在此之前,即使将 icefaces-ace 依赖项添加到 maven,我也无法看到添加的 jar,因此它没有为我提供自动建议,但在添加 javaee-web-api 之后我能够看到icefaces-ace jar。很奇怪:)
  • 不,这并不奇怪...这意味着更新失败...您很可能添加了另一个 jar。如果 javaee-web-api 不存在,很可能你有很多编译错误......
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-01-04
  • 1970-01-01
相关资源
最近更新 更多