Hi , Can you explain whether the following approach is good or not.
Here, I need to show drop downs only for 2 JSP pages, but prepare method is
invoked for every request, doing un-necessary fetching of drop down list
from DAO.
public class EmployeeAction extends ActionSupport implements Preparable {
List<LabelValue> skillList;
public void prepare() {
// instead of getting the skillList in prepare method, can we
put this code in getter method,which is like a lazy getter, invoked only
when skillList is given as input <s:select tag.
skillList = lookupManager.getDropDownList(65L);
}
// like as follows.
public List<LabelValue> getSkillList() {
return lookupManager.getDropDownList(65L);
}
}
--
View this message in context:
http://www.nabble.com/Use-of-Preparable-Interface-for-Action-classes.-tp24351903s2369p24351903.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]