[jboss-user] [JBoss Seam] - Dynamicaly loaded selectonemenu in table

maumau61 do-not-reply at jboss.com
Thu Aug 2 08:52:07 EDT 2007


Hi,

I'm want to display a table based on a List of specs

In this table, I have a selectonemenu which content depends on a value of each row. (The type of spec)

I tried the following


  | <rich:dataTable id="specs" rows="20" var="spec" value="#{modelMgm.specs}">
  | 
  | 		<h:column>
  | 			<f:facet name="header">Spec:</f:facet>
  | 			<h:outputText value="#{spec.spec.spec}" />
  | 		</h:column>
  | 
  | 		<h:column>
  | 			<f:facet name="header">Value:</f:facet>
  | 				<h:selectOneMenu value="#{spec.specvalue}" required="false">
  | 					<s:selectItems value="#{specvalueListExt.restrictedList(spec.spec)}" var="spec"
  | 						label="#{spec.valuestr}" noSelectionLabel="Select Spec" />
  | 					<s:convertEntity />
  | 				</h:selectOneMenu>
  | 		</h:column>
  | </rich:dataTable>
  | 

using the #{specvalueListExt.restrictedList(spec.spec)}


  | @Name("specvalueListExt")
  | public class SpecvalueListExt extends SpecvalueList {
  | 
  | 	@Logger	Log log ;
  | 	
  | 	public SpecvalueListExt()
  | 	{
  | 		super() ;
  | 	}
  | 
  | 	public List getRestrictedList(Spec spec)
  | 	{
  | //		log.info("*************************** Spec: " + spec.getSpec()) ;
  | 		return super.getResultList() ;
  | 	}
  | 
  | }
  | 

anonymous wrote : SpecvalueList  extends EntityQuery

The error I get is now


anonymous wrote : SEVERE: Error Rendering View[/modules/models/modelsmanagement.xhtml]
  | javax.faces.FacesException: javax.el.ELException: /WEB-INF/facelets/tags/model/editModelSpecs.xhtml @53,65 value="#{specvalueListExt.restrictedList(spec.spec)}": Method not found: ch.is.persistence.ext.SpecvalueListExt at 6053c88e.restrictedList(ch.is.persistence.ejb3.Spec_$$_javassist_24)
  | 	</rich:dataTable>

What am I doing  wrong ?
Or is there a more subtle way to manage this case ?

Thank you in advance for your remarks

Sincerely

Malte

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

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



More information about the jboss-user mailing list