Reputation: 211
I'm facing bug when go to page at first time. But if i refresh again the page, the required message working fine I set the require for af:inputText
revision: i set 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%;"/>
I check console in Chrome got error like this:
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)
Upvotes: 0
Views: 2701
Reputation: 211
my answer for this bug, there is incompatible when include xmlns:f="java.sun.com/jsf/core"
and tag <f:
for display data <af:table
using <f:facet
.
Try to remove <f:
and xmlns:f="java.sun.com/jsf/core"
, then it's work.
Upvotes: 0
Reputation: 1809
Just tried this and works very well.
<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>
Maybe you have inserted it within some other elements that cause that behavior. Try this and then you may figure out the real problem. Tung
Upvotes: 0