English 中文(简体)
虽然联合武装部队的一些有效人员运作良好,但一些错误信息或可能有一些警告出现在议会。
原标题:Although some validators in JSF are functioning well, some error messages or possibly some warnings appear on the console

在我对法国统计局的网上应用中,一些有效器,如长有效器<f:validateLength></f:validateLength>,定期表述有效器<f:validateRegex></f:validateRegex>, 以及其他一些问题,即使它们运作良好且在联合计算机系统装上页时根本不存在任何问题,也可能出现某种错误警告。

The JSF ManageredBean is necessary here, and the submission button presented in the following Code has no do with, as Ajax is fire on the ValueChange event of the text field given.

后继是简便的联合论坛网页代码。


<?xml version= 1.0  encoding= UTF-8  ?>
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">

<h:head>
    <title>Demo</title>
</h:head>
<h:body>
    <h:form>
        <center><br/><br/><br/>
        <h:inputText id="txtDemo" required="true" requiredMessage="Mandatory." 
            validatorMessage="The field should contain al least 10 digits">

            <f:validateLength id="lenValidator" for="txtDemo" maximum="10" 
            minimum="2"/>

            <f:validateRegex pattern="[0-9]*" for="txtDemo" id="txtPattern"/>

            <f:ajax id="txtAjax" event="valueChange" execute="txtDemo msg" 

            render="txtDemo msg"/>
        </h:inputText><br/>

        <h:message id="msg" for="txtDemo" showDetail="true" style="color:red"/>
        <br/>
        <h:commandButton id="btnSubmit" value="Submit"/>
        </center>
    </h:form>
</h:body>


在上述法典中,虽然有效器<f:validateLength></f:validateLength><f:validateRegex></f:validateRegex> 有效期已满,有效期不超过2倍,超过10个,正式表述有效者确保外地只包含数位数,在联合论坛网页装满时,红外线上出现红色信息。 所展示的信息如下。

SEVERE: /Restricted/TempTags.xhtml @12,93 id="lenValidator" Unhandled by MetaTagHandler for type javax.faces.validator.LengthValidator

SEVERE: /Restricted/TempTags.xhtml @13,82 id="txtPattern" Unhandled by MetaTagHandler for type javax.faces.validator.RegexValidator

为什么这些讯息被展示,如果它们运作良好,没有问题吗?

最佳回答

它只是说,没有处理这些标签的<代码>id属性。 事实上,这些标签不支持<条码>id属性。 删除。

<f:validateLength for="txtDemo" maximum="10" minimum="2"/>
<f:validateRegex for="txtDemo" pattern="[0-9]*" />

The for Depende is by the way necessary in this structure. 你们也可以安全地消除恐怖主义。 <>>属性”只有在针对复合部件内投入的有效装置时才适用。

See also:


<> Unrelated to the specific problem, the <center> content is deprecated since HTML 4.01. 移除。 利用CSSmargin: 0 auto on the including/2005/4 elements with a established width.

问题回答

暂无回答




相关问题
JSF a4j:support with h:selectManyCheckbox

I m having trouble with a JSF selectManyCheckbox and A4J support. The purpose is to run some action when a checkbox is selected. This works perfectly in Firefox. Yet, when testing in any IE (ie6 / ie7 ...

Mojarra for JSF Encoding

Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with

如何拦截要求终止?

在共同基金中,如果用户要求终止,就需要采取一些行动。 我需要某种拦截器,但我不知道如何这样做。 我需要帮助。 增 编

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

Weird behaviour of h:commandLink action (MethodExpression)

I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically. I have showXML.jsp that shows the "XML" column ...

How to correctly use ResultSet with h:dataTable

The problem is, that after displaying the ResultSet with <h:dataTable>, the connection is left open. If I close it, it closes the ResultSet too. I m thinking about copying the ResultSet data ...