0

我真的不知道这怎么可能。这一定是一个错误的配置...... ice:inputRichText 仅在简单前进后呈现,而不是在表单操作(h:commandButton)后呈现。什么都没有渲染,Firebug 说:ReferenceError: renderEditor is not defined new ActiveXObject('Microsoft.XMLHTTP');

这是我的代码: home.xhtml

    <h:form>
        <h:commandButton action="index2" value="index2"/>
    </h:form>

index2.xhtml

<?xml version='1.0' encoding='UTF-8' ?>
<!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:h="http://java.sun.com/jsf/html"
      xmlns:ice="http://www.icesoft.com/icefaces/component"
      >
    <h:head>
        <title>RDFa test</title>
    </h:head>
    <h:body> 
        <h:form prependId="false">
            <ice:inputRichText/>
        </h:form>
    </h:body>
</html>

pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
    <artifactId>Impetus</artifactId>
    <groupId>com.dusek</groupId>
    <version>1.0-SNAPSHOT</version>
</parent>

<groupId>com.dusek</groupId>
<artifactId>Impetus-web</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>

<name>Impetus-web</name>

<properties>
    <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!--netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server-->
</properties>

<dependencies>
    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces</artifactId>
        <version>3.2.0</version>
    </dependency>
    <dependency>
        <groupId>org.icepush</groupId>
        <artifactId>icepush</artifactId>
        <version>3.2.0</version>
    </dependency>
    <dependency>
        <groupId>org.icefaces</groupId>
        <artifactId>icefaces-compat</artifactId>
        <version>3.2.0</version>
    </dependency>
    <dependency>
        <groupId>com.dusek</groupId>
        <artifactId>Impetus-ejb</artifactId>
        <version>1.0-SNAPSHOT</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>Impetus-ejb</artifactId>
        <version>${project.version}</version>
    </dependency>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-web-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
                <compilerArguments>
                    <endorseddirs>${endorsed.dir}</endorseddirs>
                </compilerArguments>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1.1</version>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>2.1</version>
            <executions>
                <execution>
                    <phase>validate</phase>
                    <goals>
                        <goal>copy</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${endorsed.dir}</outputDirectory>
                        <silent>true</silent>
                        <artifactItems>
                            <artifactItem>
                                <groupId>javax</groupId>
                                <artifactId>javaee-endorsed-api</artifactId>
                                <version>6.0</version>
                                <type>jar</type>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
<repositories>
    <repository>
        <url>http://anonsvn.icefaces.org/repo/maven2/releases/</url>
        <id>icefaces-core</id>
        <layout>default</layout>
        <name>Repository for library ICEfaces Core (3.2.0)</name>
    </repository>
    <repository>
        <id>unknown-jars-temp-repo</id>
        <name>A temporary repository created by NetBeans for libraries and jars it could not identify. Please replace the dependencies in this repository with correct ones and delete this repository.</name>
        <url>file:${project.basedir}/lib</url>
    </repository>
</repositories>

web.xml

<?xml version="1.0" encoding="UTF-8"?>

http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> javax.faces.PROJECT_STAGE 开发 javax.faces.STATE_SAVING_METHOD 服务器 javax.faces.FACELETS_SKIP_COMMENTS true org.icefaces.mandatoryResourceConfiguration org.icefaces。 ace.gmapKey AIzaSyAATyWVqT2qNusNGmcVTyQ0QmymkpU-B5o javax.faces.VALIDATE_EMPTY_FIELDS false com.icesoft.faces.gmapKey AIzaSyAcAbAa7AL1DLU0785OeWn2byf4XOsm7KM Faces Servlet javax.faces.webapp.FacesServlet 1 Resource Servlet com.icesoft.faces.webapp.CompatResourceServlet 1 Faces Servlet .xhtml
资源小服务程序 /xmlhttp/
30 home.xhtml

faces-config.xml:

<?xml version='1.0' encoding='UTF-8'?>

<!-- =========== FULL CONFIGURATION FILE ================================== -->

<faces-config version="2.1"
              xmlns="http://java.sun.com/xml/ns/javaee"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_1.xsd">

    <application>
        <resource-bundle>
            <base-name>text.labels</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>
    <navigation-rule>
        <navigation-case>
            <from-outcome>success</from-outcome>
            <to-view-id>/loggedin.xhtml</to-view-id>  
        </navigation-case>
        <navigation-case>
            <from-outcome>logout</from-outcome>       
            <to-view-id>/logout.xhtml</to-view-id>  
        </navigation-case>
    </navigation-rule>
</faces-config>
4

1 回答 1

0

我找到了解决方案!非常感谢,没有人,您已经发现问题了...

ICEfaces 将 Ajax 功能添加到 JSF(甚至简单地将 icefaces.jar 添加到 JSF 应用程序也会通过影响页面标记中的必要更改来添加 Ajax!)。结果是在表单提交期间与组件的交互会自动触发 Ajax 的使用。

这是完整的描述:http://www.icesoft.org/wiki/display/ICE/Disabling+Ajax 还有一个教程,如何手动禁用 AJAX。

我真的很不爽!我一直在寻找解决方案 3 天...

于 2013-09-06T08:27:57.197 回答