Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
10. Apr 2008, 10:33 CET | Link

Hello

I thougt I make better a new tread, as reply to a older one...

We have some problems with iterating over a map which includes a list.

Bean:

@DataModel
private LinkedHashMap<DysfunctionDescription, List<Alert>> groupedActiveAlerts;

View:

<ui:repeat var="map" value="#{groupedActiveAlerts}">
  Label: #{map.key.label}

  <h:form>                                        
    <h:dataTable value="#{map.value}" var="alert">
      <h:column>  
        <h:commandButton action="#{alertAction.testMe}" value="#{alert.ID}" />
      </h:column>
    </h:dataTable>        
  </h:form>                                       
</ui:repeat>              

The iteration itself is not a problem, the buttons are displayed without any problem. The problem now is, that the button inside the datatable doesn't work! The function testMe() isn't called. There is now method call!

If I implement the same scenario with a list instead a map (e.g. a list of objects, that holds a list of other objects) this works, the method is called without any problems!

Is this a bug, or is it not possible to implement it like this?

Regards Daniel

1 Reply:
13. Apr 2008, 17:57 CET | Link

Try using <c:forEach />

 

Read about how to report a bug.