如何停止richfaces风格? [英] How stop richfaces style?

查看:70
本文介绍了如何停止richfaces风格?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发此联系表:

<!DOCTYPE html>
<ui:composition
    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:a4j="http://richfaces.org/a4j" 
    xmlns:rich="http://richfaces.org/rich">

    <h:form>

            <h:panelGrid columns="3">
            <h:outputLabel for="name" value="Nome (Obrigatório)" />
            <h:inputText id="name" value="#{contact.client.name}" />
            <h:message for="name" />


            <h:outputLabel for="email" value="E-Mail (Obrigatório)" />
            <h:inputText id="email" value="#{contact.client.email}" />
            <h:message for="email" />


            <h:outputLabel for="website" value="Website (Opcional)" />
            <h:inputText id="website" value="#{contact.client.website}" />
            <h:message for="website" />

            </h:panelGrid>

            <h:outputLabel for="text" value="Mensagem (Obrigatório):" /> <br/>
            <h:inputTextarea id="text" value="#{contact.client.text}" rows="20" cols="80" /><br/>
            <h:message for="text" />
            <br/>


            <h:commandButton value="Enviar" action="#{contact.sendMessage}"  >
                    <f:ajax execute="@form" render="@form" />
            </h:commandButton>

            <h:outputText value="#{contact.messageStatus}" id="out"  />

            <a4j:status>
                <f:facet name="start">
                    <h:graphicImage name="loader.gif" library="image" />
                    <h:outputText value="Enviando ..." />
                </f:facet>
            </a4j:status>
    </h:form>
</ui:composition>

我将此构成导入到我的联系页面中,但是我不知道为什么,它将这些脚本放在<h:head>..</h:head>部分的末尾:

I import this composition in my contact page, but I don't know why, it puts this scripts in the end of the <h:head>..</h:head> section:

<script type="text/javascript" src="/Project/javax.faces.resource/jsf.js.xhtml?ln=javax.faces"></script>
<script type="text/javascript" src="/Project/javax.faces.resource/jquery.js.xhtml"></script>
<script type="text/javascript" src="/Project/javax.faces.resource/richfaces.js.xhtml"></script>
<script type="text/javascript" src="/Project/javax.faces.resource/richfaces-queue.js.xhtml"></script>
<script type="text/javascript" src="/Project/javax.faces.resource/richfaces-base-component.js.xhtml"></script>
<script type="text/javascript" src="/Project/javax.faces.resource/status.js.xhtml?ln=org.richfaces"></script>

我已经尝试在我的web.xml中使用此参数禁用richfaces样式:

I already try to disable richfaces style with this parameters in my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app  //.. configs>
    <display-name>Project</display-name>

    <context-param>
        <param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
        <param-value>true</param-value>
    </context-param>

    <context-param>
        <param-name>org.richfaces.skin</param-name>
        <param-value>plain</param-value>
    </context-param>

    <context-param>
        <param-name>org.richfaces.enableControlSkinning</param-name>
        <param-value>false</param-value>
    </context-param>

    <welcome-file-list>
        <welcome-file>index.xhtml</welcome-file>
    </welcome-file-list>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>
</web-app>

使用这些样式,添加到我的页脚末尾的脚本消失了,我该如何解决?

With these style, scripts that are added in the end of my section my footer just disappeared, how could I fix that ?

有什么主意吗?

推荐答案

我将这些行添加到了web.xml中.这对我有用.

I added these lines to the web.xml. This worked for me.

    <context-param>
    <param-name>org.richfaces.skin</param-name>
    <param-value>plain</param-value>
</context-param>
<context-param>
    <param-name>org.richfaces.LoadStyleStrategy</param-name>
    <param-value>None</param-value>
</context-param>
<context-param>
    <param-name>org.richfaces.enableControlSkinning</param-name>
    <param-value>false</param-value>
</context-param>

这篇关于如何停止richfaces风格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆