[jboss-user] [JBoss Seam] - Re: two @datamodel in one sessionbean?

oblivion1200 do-not-reply at jboss.com
Sun Sep 16 14:43:23 EDT 2007


Hmm...

So, I have a class myObject

  | ...
  | @DataModel(value="list1")
  | private List<String> list1;
  | 	
  | @DataModelSelection(value="list1")
  | @Out(required=false, value="focusList1")
  | private String focusList1;
  | ...
  | public void select() {
  |   log.info("User selected something!");
  | }
  | ...
  | 
a page, for example

  | <h:dataTable value="#{list1}" var="item">
  | 	<h:column>
  | 		<s:link value="#{item}" view="/page2.xhtml"/>
  | 	</h:column>
  | </h:dataTable>
  | 

then I click on selected item link and page2.xhtml is

  | <h:outputText value="#{focusList1}">
  | 
here I have no focusList1 outjected.

When I use and click:

  | <h:dataTable value="#{list1}" var="item">
  | 	<h:column>
  | 		<s:link value="#{item}" view="/page2.xhtml" action="#{myObject.select()}"  />
  | 	</h:column>
  | </h:dataTable>
  | 

I have focusList1 outjected and all is OK.

Is it possible to have it outjected without using action="#{myObject.select()}" 
Is there better way to do it?
I need sometimes to action property perform diffrent function for example #{secondObject.function()} and can I place both functions in one action property like action="#{secondObject.function()} ,  #{myObject.select()}" or similar?


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

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



More information about the jboss-user mailing list