[jboss-user] [JBoss Seam] - Multiple DataModels in an SFSB

lightbulb432 do-not-reply at jboss.com
Tue Feb 6 03:23:02 EST 2007


I have multiple DataModels with corresponding DataModelSelections in an SFSB. The problem is that every time one is injected based on a selection, the other seems to get injected into its DataModelSelection as well (a default value of the first in the row of that other DataModel, because no row was actually selected for it).

Has anybody else had this problem? I'm not doing caching or anything in my bean, so am wondering whether this might be a bug?

In the code below, on one page I select a row in the table of "A" entities...however, not only is the DataModelSelection for A injected, but also for B! Totally unexpected... (The injected value for B is always the first element in its list.) The same thing happens in the opposite way when I am on the page for B.

	@DataModelSelection("a")
  | 	@Out(required=false)
  | 	private A a;
  | 
  | 	@DataModelSelection("b")
  | 	@Out(required=false)
  | 	private B b;
  | 
  | 	@DataModel
  | 	@Factory
  | 	@SuppressWarnings("unchecked")
  | 	public List<A> getA() {
  | 		...
  | 	}
  | 	
  | 	@DataModel
  | 	@Factory
  | 	@SuppressWarnings("unchecked")
  | 	public List<B> getB() {
  | 		...
  |                 }

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

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



More information about the jboss-user mailing list