[jboss-user] [JBoss Seam] - Re: Select item from table and convertEntity

brachie do-not-reply at jboss.com
Wed Jan 23 03:32:38 EST 2008


"nickarls" wrote : Well, you could have two separate components:
  | 
  | * selectOneMenu rendered when list.count < n
  | 
  | * separate modal window with datatable, paginator, search and filtering
  | 
  | I think you should be able to get both options working with a list of entities in the model. Then there is the question on how you should trigger the modal window. A separate button? An empty selectOneMenu with some sort of "on open trigger"?

I would have a little icon next to the input field which will trigger the popup with the person-selection table.
My main concern is not how to trigger the popup etc, it is how do I set the selected person directly to the entity (pass it to the project.setManager(Person p) method!

What I tried is (this is the person-select table in the popup):


<tr:table styleClass="trTableDiv" id="personss"
  | 		rows="10" columnClasses="col"
  | 		value="#{allPersons}" var="pers">
  | 	<tr:column>
  | 		<f:facet name="header">Name</f:facet>
  | 		<h:outputText
  | 			value="#{pers.vorname} #{pers.nachname}" />
  | 	</tr:column>
  | 	<tr:column>
  | 		<f:facet name="header">select</f:facet>
  | 		<a:commandLink reRender="panelProjekt" action="#{projekt.setManager(pers)}" value="set">
  | 			<s:conversationId />
  | 		</a:commandLink>
  | 	</tr:column>
  | </tr:table>

The problems here are the following:
- only the last person in the table is set to the project if I click a link. Why??
- the project record is immediately updated in the DB after I click the link (maybe here I could use flushMode="manual"?)
- this only works for the first click on the commandLink

Any help would be appreciated.

Alexander

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

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



More information about the jboss-user mailing list