[jboss-user] [JBoss Seam] - Re: DataModel using Set does not work

andreigh.ts do-not-reply at jboss.com
Thu Jun 14 12:30:47 EDT 2007


Thank you all for the answers.

Can you please help me out - There still are some problems and searching on the forum seemsto be bugs, but I am not sure. Can you please confirm. 

Here are the problems:

1) Stateful component - Conversation scope; outjecting Set DataModel (defaulting to Conversation scope).
Problem - UI is not refreshed, even though the Factory method is called on the add event.


  | @Stateful
  | @Scope(ScopeType.CONVERSATION)
  | @Name("requestWizardQuestions")
  | public class RequestWizardQuestionsAction implements RequestWizardQuestions {
  | ...
  | 	@DataModel
  | 	public Set<RfqRequestQuestion> requestQuestionsList;
  | 
  | 	@DataModelSelection
  | 	@Out(required=false)
  | 	private RfqRequestQuestion selectedQuestion;
  | 
  | 	@Factory("requestQuestionsList")
  | 	public void initQuestionsList() {
  | 		requestQuestionsList = rfqRequest.getRfqRequestQuestions());
  | 	}
  | 
  |         public void addNewQuestion() {
  | 		rfqRequest.getRfqRequestQuestions().add(new RfqRequestQuestion());
  | 		initQuestionsList();
  | 	}
  | ...
  | }
  | 

Replacing Set with List works.
Is this a bug signaled here: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=106232
?

2) Stateful component - Conversation scope; outjecting DataModel to PAGE scope.
Problem - The @DataModelSelection is null (seems not to be injected) after clicking the item in UI.


  | @Stateful
  | @Scope(ScopeType.CONVERSATION)
  | @Name("requestWizardQuestions")
  | public class RequestWizardQuestionsAction implements RequestWizardQuestions {
  | ...
  | 	@DataModel(scope=ScopeType.PAGE)
  | 	public List<RfqRequestQuestion> requestQuestionsList;
  | 
  | 	@DataModelSelection
  | 	@Out(required=false)
  | 	private RfqRequestQuestion selectedQuestion;
  | 
  | 	@Factory("requestQuestionsList")
  | 	public void initQuestionsList() {
  | 		requestQuestionsList = new ArrayList<RfqRequestQuestion>(rfqRequest.getRfqRequestQuestions());
  | 	}
  | 
  |         public void deleteQuestion() {
  |               rfqRequest.getRfqRequestQuestions().remove(selectedQuestion);			      entityManager.remove(selectedQuestion);
  | 	}
  | 
  | ...
  | }
  | 

deleteQuestion is called when clicking an item in the List, but selectedQuestion is null.

Is this the bug posted here:
http://jira.jboss.com/jira/browse/JBSEAM-308
?

Am I doing something wrong, or are just 2 bugs?

Thanks

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

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



More information about the jboss-user mailing list