Question

I have four lists in my webflow, which I load from my service layer. They look like this one:

<evaluate expression="partyService.getPostalAddresses()" result="viewScope.uiPostalAddresses"
            result-type="java.util.ArrayList" />

In my JSF/Primefaces UI, I have this:

<p:dataTable id="partyAddressTable" widgetVar="partyAddressTable"
        var="address" value="#{viewScope.uiPostalAddresses}" style="width:100%;"
        rows="#{msg.parties_address_table_rows}" styleClass="partyAddressTable"
        paginator="#{msg.parties_address_table_paginator}"
        paginatorPosition="#{msg.parties_address_table_paginatorPosition}"
        paginatorTemplate="#{msg.parties_address_table_paginatorTemplate}"
        lazy="#{msg.parties_address_table_lazy}" selectionMode="single"
        selection="#{viewScope.selectedItem}"
        scrollable="#{msg.parties_address_table_scrollable}">
    [...]
</p:dataTable>

When I open my page, webflow loads the list and JSF/Primefaces shows it correctly. And then, if I press my "addEntry"-Button, the entries in the list all disappear. I saw that webflow is adding one entry to the list correctly.

Webflow "addEntry"-Snippet:

<transition on="addPostal"> 
    <evaluate expression="uiPostalAddresses.add(personService.getEmptyPostalAddress())" />
</transition>

It all happens in the same view-state and the whole application is running in a Portlet on Liferay.

I have no more idea what the problem could be. Could you please help me?

I'm using:

  • JSF: 1.2
  • Primefaces: 1.1
  • Webflow: 2.3
  • Portlet: 2.0 --> JSR286
  • Liferay: 6.0.6
Was it helpful?

Solution

I finally found the solution.

I worked on a pointer to uiPostalAddresses and if I clear the list on party and addAll to party, the list is empty.

So that was my fault ;-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top