How to set a Map value in h:inputText

前端 未结 1 1415
一向
一向 2020-12-19 12:59

I\'m struggling to implement a fairly trivial functionality with JSF which involves dynamically displaying the content of a nested map on a page and editing capabilities for

相关标签:
1条回答
  • 2020-12-19 13:33

    Basically, what your code is attempting is invoking Map.Entry#setValue(value). This is indeed not possible in EL. Instead, you should be referencing the map value directly on the map itself by key, so that EL can do Map#put(key, value).

    <c:forEach items="#{number.value}" var="case">
        ...
        <h:inputText value="#{number.value[case.key]}" />
    
    0 讨论(0)
提交回复
热议问题