This post gives simple idea on clearing the error message on
adf components. By default af:inputDate
component having issue while showing the error message for invalid input.
For example : If you give invalid date, a popup message will
be shown with error message as shown below. Then again click the datepicker
icon to select the date, the error message in the popup will show multiple
times. If you click the datepicker 10 times, 10 times same error message will
be shown. Look at the below screen,
To clear the message shown multiple times, use the below
javascript,
<af:resource type="javascript">
function
cleardatemsg(evt) {
var comp = evt.getSource();
AdfPage.PAGE.clearMessages(comp.getClientId());
}
</af:resource>
Note:
comp.getClientId() - will give the exact component Id. When your application have Template, the component Id will be like this pt1:id1 where pt1 - template Id and id1 - date component Id
evt.getId() - will give only id1 as component Id even if its inside the template.
Call the javascript method on click event like below,
<af:inputDate label="Label 1"
id="id1">
<af:clientListener method="cleardatemsg"
type="click"/>
</af:inputDate>
Use this line to clear All the error messages in the form
AdfPage.PAGE.clearAllMessages();
ERPTREE Offering Oracle fusion HCM online training, Oracle Fusion SCM Online Training, Oracle fusion financials online
ReplyDeletetraining, Oracle fusion hcm training, Oracle fusion scm training, Oracle fusion financials training,
Oracle fusion dba online training in Hyderabad, Bangalore,Gurgon, Noida, India, Dubai, UAE, USA, Kuwait, UK, Singapore, Saudi Arabia, Canada,
Delhi, Chennai, Kolkata, Pune, Mumbai, Ahmedabad.
Oracle fusion HCM Online Training
Oracle Fusion HCM Training
Im thankful for the article post.Thanks Again. Fantastic.
ReplyDeleteMuleSoft training
MuleSoft online training