Hello everybody,
I develop a web apllication with the following technologies:
- Spring 2.5.6 + Spring Webflow 2.0.6
=> Ajax by dojo 1.2
- JSF: Apache MyFaces 1.2.3
- Facelets 1.1.14
Problem description:
I have a page (xhtml) with a form and different input components inside.
Amongst others I iterate a list by <c:forEach> to generate dynamic
<h:inputText> components. I set the component ids by myself.
Example:
<ui:fragment id="content">
<c:forEach items="#{propertyList}" var="property">
<h:inputText id="#{property.id}" value="#{property.text}" />
</c:forEach}
</ui:fragment>
The rendered result looks like:
<input type="text" id="1" value="Text A for the component with id 1" />
<input type="text" id="2" value="Text B for the component with id 2" />
(o.k.)
Now I send an ajax request by an sf-Tag, e.g. <sf:commandLink> and tell
the webflow only to render the fragment "content"
=> a dojo.xhr-Request will be sent to the server (o.k.)
On the server a third property will be inserted by my business service in the
list at postion 0, so that the propertyList contains the three properties
property 3, property 1, property 2.
When the ajax response is received and the fragment is rendered it looks fine
in the browser, but in the source code of the page the component ids look
like this:
<input type="text" id="1" value="Text C for the component with id 3" />
<input type="text" id="2" value="Text A for the component with id 1" />
<input type="text" id="2" value="Text B for the component with id 2" />
So the id's at position 1 + 2 are not updated and the id at position 3
equals the id at position 2. => it's duplicate...
Perhaps it's a problem that the jsf modell hasn't updated after rendering
the fragment by ajax???
I'm grateful, if anybody has a solution for this problem...


Reply With Quote
anelGrid>, but 'it's always the same problem...
