|
INTERVIEW QUESTIONS
PEOPLESOFT
DETAILS
Question: How does reset() and Validate() method struts work ?
Answer: reset(): reset() method is called by Struts Framework with each request that uses the defined ActionForm. The purpose of this method is to reset all of the ActionForm’s data members prior to the new request values being set. Example: /** * Reset the form. */ public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping,request); this.password = null; this.username = null; this.guest = null; }
validate() : Used to validate properties after they have been populated; Called before FormBean is handed to Action. Returns a collection of ActionError as ActionErrors. Following is the method signature for the validate() method.
Example : /** * Validate the form’s input. */ public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if(username == null){ errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(”error.username.required”)); } return errors; }
|
|
|
Category |
PeopleSoft Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8888 users |
Added on |
8/27/2014 |
Views |
69412 |
Rate it! |
|
|
Question:
How does reset() and Validate() method struts work ?
Answer:
reset(): reset() method is called by Struts Framework with each request that uses the defined ActionForm. The purpose of this method is to reset all of the ActionForm’s data members prior to the new request values being set. Example: /** * Reset the form. */ public void reset(ActionMapping mapping, HttpServletRequest request) {
super.reset(mapping,request); this.password = null; this.username = null; this.guest = null; }
validate() : Used to validate properties after they have been populated; Called before FormBean is handed to Action. Returns a collection of ActionError as ActionErrors. Following is the method signature for the validate() method.
Example : /** * Validate the form’s input. */ public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
if(username == null){ errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(”error.username.required”)); } return errors; } Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
How can a subclass call a method or a constructor defined in a superclass?
|
View Answer
|
|
What are the main differences between versions 8.8 and 8.9.
|
View Answer
|
|
Is there a way from Peoplesoft to automatically trigger a confirmation email for users when they submit a time report? At a minimum, would say that a report had been successfully submitted so they could use the email as an audit history. At best, the email would state the dates for which time has been successfully recorded, whether each segment represents an original report or an amendment of time previously reported, and whether the time report was "complete" (i.e. 8 hours reported per weekday in the period cited). This would help a lot in ensuring that time reports were complete and accurate the first time, and an audit trail available.
Thanks very much for your help!
|
View Answer
|
|
What is ERP and how it is related to SAP?
|
View Answer
|
|
How to create the Department sequrity
with navigations
plz help it
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All PeopleSoft Interview Questions & Answers - Exam Mode /
Learning Mode
|