ADF必需消息第一次不显示

时间:2013-09-20 04:26:21

标签: oracle-adf

第一次去页面时我遇到了错误。但是,如果我再次刷新页面,所需的消息工作正常 我为 af:inputText

设置了 require

修订:我设置了showRequired =“ false true”

<af:inputText id="id" styleClass="input-medium" showRequired="true"
                required="true"
                requiredMessageDetail="You Must Insert ID"
                maximumLength="50" autoSubmit="true" simple="true"
                contentStyle="width:25%;"/>

我检查 Chrome 中的控制台得到的错误如下:

Uncaught NotFoundError: An attempt was made to reference a Node in a context where it does not exist. message-11.1.1.5.0-1095.js:162
AdfDhtmlMessagesPeer._messageUpdate message-11.1.1.5.0-1095.js:162
AdfDhtmlMessagesPeer.MessageNotify message-11.1.1.5.0-1095.js:106
AdfRichUIPeer.messageNotify core-11.1.1.5.0-1095.js:15213
AdfDhtmlPage._notifyComponent boot-11.1.1.5.0-1095.js:10917
AdfDhtmlPage.addMessage boot-11.1.1.5.0-1095.js:10705
AdfUIEditableValue._addFacesMessage core-11.1.1.5.0-1095.js:5417
AdfUIEditableValue._addRequiredFacesMessage core-11.1.1.5.0-1095.js:5411
AdfUIEditableValue.ValidateValue core-11.1.1.5.0-1095.js:5370
AdfUIEditableValue.validate core-11.1.1.5.0-1095.js:5295
AdfDhtmlPage._processValidators boot-11.1.1.5.0-1095.js:7551
AdfDhtmlPage.queueEvent boot-11.1.1.5.0-1095.js:7379
AdfUIComponent.queueEvent core-11.1.1.5.0-1095.js:4265
AdfComponentEvent.queue boot-11.1.1.5.0-1095.js:2155
AdfDhtmlCommandLinkPeer.HandleComponentClick core-11.1.1.5.0-1095.js:18885
AdfRichUIPeer.DispatchComponentEvent core-11.1.1.5.0-1095.js:15124
AdfUIComponent._deliverEvent core-11.1.1.5.0-1095.js:4356
AdfUIComponent.broadcast core-11.1.1.5.0-1095.js:4282
AdfDhtmlPage._deliverQueuedEvents boot-11.1.1.5.0-1095.js:7622
AdfDhtmlPage._deliverAllQueuedEvents boot-11.1.1.5.0-1095.js:7604
AdfDhtmlPage._eventLoopDeliverEvents boot-11.1.1.5.0-1095.js:7595
AdfDhtmlPage._redistribute boot-11.1.1.5.0-1095.js:8591
(anonymous function)

2 个答案:

答案 0 :(得分:0)

试过这个并且效果很好。

<af:form id="f1">
        <af:panelStretchLayout id="psl1">
            <f:facet name="center">
                <!-- id="af_one_column_stretched"   -->
                <af:panelGroupLayout layout="scroll" id="pgl1">
                    <af:inputText id="id" styleClass="input-medium" showRequired="false" required="true"
                                  requiredMessageDetail="You Must Insert ID" maximumLength="50" autoSubmit="true"
                                  simple="true" contentStyle="width:25%;" label="Input"/>
                    <af:commandButton text="Submit" id="cb1"/>
                </af:panelGroupLayout>
            </f:facet>
        </af:panelStretchLayout>
    </af:form>

也许您已将其插入导致该行为的其他一些元素中。尝试这个,然后你可以找出真正的问题。 东

答案 1 :(得分:0)

我对此错误的回答,包含xmlns:f="java.sun.com/jsf/core"和标记<f:时不兼容 使用<af:table显示数据<f:facet

尝试删除<f:xmlns:f="java.sun.com/jsf/core",然后就可以了。