Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getters and setters  RSS feed

 
James Howerton
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Topic
The topic of this question is: getters&setters of the controller.java.

[icode]
Hello and Thank you in advance for any assistance.
[/icode]
………………………………………………………………………………………………………………………………………………………………………………………………


System:



System info:netbeans6.7.1,jsf1.2


………………………………………………………………………………………………………………………………………………………………………………………………


Purpose:



The purpose of this post is: I am just starting to build an app using jsf. The program I am working with has getters and setters in the controller and there role in the program is not clear.

………………………………………………………………………………………………………………………………………………………………………………………………


Functionality:



The functionality of this code is: I have a page.jsf that directly passes variables to the doSomething() of the controller.java and the controller returns “success”. Then the controller.java calls a method from the model object and it performs a routine using
The received param and returns the result.


………………………………………………………………………………………………………………………………………………………………………………………………


Question:



My question concerning this code is: What is the function of the getters and setter I have in the controller.java? In the early stages of this program I have not used them. Or are the being used for something?

………………………………………………………………………………………………………………………………………………………………………………………………



errors:



The errors related to this code are:

………………………………………………………………………………………………………………………………………………………………………………………………


Description:



Code description:


………………………………………………………………………………………………………………………………………………………………………………………………

Thanks again.
-ceyesuma

………………………………………………………………………………………………………………………………………………………………………………………………


Note:



Note:

………………………………………………………………………………………………………………………………………………………………………………………………


………………………………………………………………………………………………………………………………………………………………………………………………


Description:



Code Description:

………………………………………………………………………………………………………………………………………………………………………………………………




 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can think of two possible reasons.

1) Is the Controller being used as a backing bean to the page.

or

2) You are using something like Spring or Dependency Injection, where objects are being injected into the Controller class by that framework.

Mark
 
James Howerton
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Those sound like logical uses. So for now I do not need to utilize them .

thanks



 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!