Primefaces 3.5 + OmniFaces 1.3 SelectItemsIndexConverter issue with SelectOneMenu

前端 未结 1 1731
谎友^
谎友^ 2021-01-21 08:14

I\'m using Primefaces 3.5 5th December 2012 SNAPSHOT, with Mojarra 2.1.14 and Tomcat 7.0.33.

When using the in-cell editing mode (not in-row) for POJO objects with a mod

相关标签:
1条回答
  • 2021-01-21 08:41

    I can reproduce it. It's a bug in PrimeFaces. This problem is not related to the converter. The problem is just caused by PrimeFaces-specific JavaScript code which incorrectly redisplays the value of the selected option instead of the label of the selected option after "unedit".

    This is more easily to be reproduced as follows:

    <p:selectOneMenu value="#{insurancepolicy.branchAsString}">                      
        <f:selectItems value="#{insurancepolicybean.branchMap}" />
    </p:selectOneMenu>
    

    with

    private Map<String, String> branchMap;
    
    @PostConstruct
    public void init() {
        branchMap = new LinkedHashMap<String, String>();
        branchMap.put("branch label 1", "branch value 1");
        branchMap.put("branch label 2", "branch value 2");
        branchMap.put("branch label 3", "branch value 3");
    }
    

    I recommend to report it to PrimeFaces guys.

    0 讨论(0)
提交回复
热议问题