Problem with refreshing JSF forms

Hi,

I have some problems with refreshing my forms.

I'm using the tag <h:dataTable> to show the entries of my list in <h:inputText> and <h:inputTextarea>-fields. The special situation is now, that you may change the entries and save them.

In the backing-bean this functionality works fine - my list is really updated and everytime in the right state. But the presentation is incorrect. After saving the changes there are two dataTable-rows instead of one, both with the same values.

So please help me -how can I refresh my presentation?

Here's the code of my update-jsp:

<h:dataTable value="#{backingBeanAction.myList}" var="myListEntry" border="0" cellpadding="10">

<h:column>

<h:outputLabel for="name" value="#{messages.name}" />

<t:htmlTag value="br" />

<h:inputTextarea id="name" value="#{myListEntry.name}" rows="6" cols="35" required="true" />

<h:message for="name" style="color:red" />

</h:column>

<h:column>

<t:htmlTag value="br" />

<h:commandLink id="updateMyListEntry" actionListener="#{backingBeanAction.updateMyListEntry}">

<h:outputText value="#{messages.saveMyListEntry}" />

<f:param id="updateId" name="id" value="#{myListEntry.id}" />

</h:commandLink>

</h:column>

</h:dataTable>

Thanks a lot

Nico

[1947 byte] By [Nico.Collarda] at [2007-11-27 11:55:03]
# 1

This is just due to bad code. Doublecheck your code logic. Maybe you're adding the a new item to the 'myList' property instead of updating the originating item?

BalusCa at 2007-7-29 18:59:40 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...