I have a List of items stored in a session bean and i've created a link list on 
the page. When I click on the link, I want to transfer the underlying item to 
the action methode.

I used enhanced EL for that purpose, but the parameter of methode 
selectModule() is always 'null'.


  | <div id="configList">
  |   <ul>
  |     <c:forEach var="module" items="#{configSelector.moduleList}">
  |       <li><s:link value="#{module.name}"
  |                  action="#{configSelector.selectModule(module)}"/></li>
  |      </c:forEach>
  |   </ul>
  | </div>
  | 


  | @Stateful
  | @Name("configSelector")
  | @Scope(ScopeType.SESSION)
  | public class ConfigurationSelectorImpl implements ConfigurationSelector {
  |   
  |   @Logger private Log log;
  |   
  |   private ArrayList<Module> moduleList = new ArrayList<Module>();
  |   
  |   @Out(required=false)
  |   private Module selectedModule;
  |   
  |   @SuppressWarnings("unused")
  |   @Create
  |   public void initModuleList() {
  |     moduleList.add(AdminModule.getInstance());
  |   }
  |   
  |   public ArrayList<Module> getModuleList () {
  |     return this.moduleList;
  |   }
  |   
  |   public void selectModule(Module pModule) {
  |     this.selectedModule = pModule;
  |     log.info("#0 selected", this.selectedModule.getName());
  |   }
  |   
  |   @Destroy @Remove
  |   public void destroy() {}
  | 
  | }
  | 

I can't use <h:dataTable> because I do not want to render the list in a table.

I'm surely missing something. Please help

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4031213
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to