its a ActionForm controller or model?
Answers were Sorted based on User's Feedback
Answer / ysr
ActionForm not Model component
It is just a View Data Transfer class
so it just part of Controller Even Struts API also
specifing this thing.
Model component nathing but where we are connecting to
database from our appliction
suppose if we are connecting DB from our Action class i.e
Model or if we are Connecting DB from EJB's or DAO i.e the
Model so FormBean is not Model component
Is This Answer Correct ? | 16 Yes | 1 No |
Actually model is designed to handle business logic and
data.
Action Form is basically carrying the data from view to
Action Class,so it is coming under model.
Is This Answer Correct ? | 16 Yes | 8 No |
Answer / sandya
Which one is correct in above two answers????
Please clarify. Iam getting confused
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / ysr
ActionForm not Model component
It is just a View Data Transfer class
so it just part of Controller Even Struts API also
specifing this thing.
Model component nathing but where we are connecting to
database from our appliction
suppose if we are connecting DB from our Action class i.e
Model or if we are Connecting DB from EJB's or DAO i.e the
Model so FormBean is not Model component
Is This Answer Correct ? | 7 Yes | 1 No |
ActionForm is consider as Controller,Because
While ActionForm beans often have properties that
correspond to properties in your Model beans, the form
beans themselves should be considered a Controller
component. As such, they are able to transfer data between
the Model and View layers.
I hope it will helpful
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / mohan
I agree with Ramesh, Actionform is just a bean whr we will
be having setters and setters and some business logic and
validation rules, so its becomes Model, where as a Action
Class consists of ActionServlet, which as an intermediate
between Model and View(JSP), so the Action class becomes
the Controller... hope it helps...
Is This Answer Correct ? | 6 Yes | 4 No |
Answer / raghavendra
Model are the classes that contains the code according to
the businees logic of the company.This logic is called
business logic.
In case of MVC 2 architecture, the contoller is a
combination of ActionServlet, Action classes and formbean
(ActionForm ) classes.
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / saurabh gupta
Action Form is a part of view.....
it is basically a data container which works between view
and controller...for moder interaction we have value
objects and or business object which can be mapped to form
bean.
Acc to Struts Complete Ref. the form bean is a part of View.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / pope
Think of concept MVC. According to the Architecture(I hope
u know about this s***) for controller we have servlet
controller ,model as serve u with the business and
actionForm (think of action submit ) which is used for the
form validation which is far far away from other two
component
:-)
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / rasool
When you send request,request before gng to the Action classes,ActionForm(FormBean) will be executing and just it is just a View Data Transfer class.And it is not a business logic,just it is validating form fields.
Observe once struts config file
<action path="/test" name="formname" type="ActionClass"/>
First check path in actions and check if name attribute there or not if exists gng to the FormBean class not Actionclass.
So it is part of controller..
Is This Answer Correct ? | 0 Yes | 0 No |
What is Custom Type Converter in Struts2?
How does interceptor work in struts2?
What are the applications of struts?
What is interceptor? And life cycle methods of interceptor?
What are the conditions for actionform to work correctly?
who will run the execute method in struts?
What is the purpose of @stringlengthfieldvalidator annotation?
What is meant by portals???
What is difference between interceptors and filters?
Who wrote struts?
Explain about the validation steps which have to be carried during validation of client-side address?
Which components are available using actioncontext map?