[jboss-user] [JBoss Seam] - Re: selectOneMenu - NPE

w17chm4n do-not-reply at jboss.com
Tue Nov 20 02:33:34 EST 2007


  | @Stateful
  | @Scope(ScopeType.SESSION)
  | @Name("QuestionCategoryController")
  | public class QuestionCategoryControllerBean implements QuestionCategoryController {
  |     
  |     @Logger
  |     private Log log;
  |     
  |     @In(create = true)
  |     private QuestionCategoryManager questionCategoryManager;
  |     
  |     @DataModel
  |     private List<QuestionCategory> questionCategoryList;
  |     
  |     @In(create = true)
  |     @DataModelSelection
  |     private QuestionCategory questionCategory;
  |     
  |     public void addCategory() {
  |         log.info("Adding category [#{questionCategory.categoryName}]");
  |         questionCategoryManager.addCategory(questionCategory);
  |         getAllQuestionsCategories();
  |     }
  |     
  |     public void removeCategory() {
  |         questionCategoryList.remove(questionCategory);
  |         questionCategoryManager.removeCategory(questionCategory);
  |         questionCategory = null;
  |         getAllQuestionsCategories();
  |     }
  |     
  |     @Factory(value="questionCategoryList")
  |     public void getAllQuestionsCategories() {
  |         questionCategoryList = questionCategoryManager.getAllQuestionCategories();
  |     }
  |     
  |     @Remove @Destroy
  |     public void destroy() {}
  |     }
  | 

Session context

  |  QuestionCategoryController
  | QuestionController
  | facelets.ui.DebugOutput
  | javax.faces.request.charset
  | org.jboss.seam.core.conversationEntries
  | org.jboss.seam.international.localeSelector
  | org.jboss.seam.international.timeZoneSelector
  | org.jboss.seam.security.identity
  | org.jboss.seam.web.session
  | questionCategoryList
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106251#4106251

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106251



More information about the jboss-user mailing list