JSF%20Interview%20Questions%20and%20Answers
Question: How does JSF depict the MVC (Model View Controller) model?Answer: The data that is manipulated in form or the other is done by model. The data presented to user in one form or the other is done by view. JSF is connects the view and the model. View can be depicted as shown by:<h:inputText value="#{user.name}"/> JSF acts as controller by way of action processing done by the user or triggering of an event. For ex. <h:commandbutton value="Login" action="login"/> this button event will triggered by the user on Button press, which will invoke the login Bean as stated in the faces-config.xml file. Hence, it could be summarized as below: User Button Click -> form submission to server ->; invocation of Bean class ->; result thrown by Bean class caught be navigation rule ->; navigation rule based on action directs to specific page. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is JSF?
- What is required for JSF to get started?
- What is JSF architecture?
- How the components of JSF are rendered? An Example
- How JSF different from conventional JSP / Servlet Model?