• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Inputfield in ui:repeat

 
Ranch Hand
Posts: 36
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

have a problem here and i am running out of ideads to fix it.

I have a fomular with a dynamic amount of fields (based on a list from the managedbean) and i whould have editing fields for all values.
In general all works: for every element in the list i get an input element in the formular. But on submit NO VALUE will be transfered to the data objects, althought the browser post-command contains all values.
I break down my project to a very little example:

Simple ManagedBean


JSF


Somebody andy idea to solve the problem?

thanks a lot
Dominik

PS: the alternative c:forEach fix the issue in that way that the changed values will be posted to the bean, but isn't an option because of the jsf behaviour of c:forEach (changing the underlying list (or add an elemend for example) will not change the amount of shown elements)
 
Ranch Hand
Posts: 558
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Muler,

Root casue: I think the mapping of input text fields and backing bean is not set.

input text value:
<h:inputText value="#{element}" />

#{element} means #{StringReference}... now with this how JSF can figure out which backing bean and which property it has to set.

solution: I am not into JSF but
you can try something like

Iteration i from 0 to list size
<h:inputText value =#{RepeatHandler.stringList(i)}/>
end Iteration

 
reply
    Bookmark Topic Watch Topic
  • New Topic