question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SelectOneMenu - editable="true" - If I delete the value, the value for itemLabel is set by the first and deactivated item | pf 7.0.16

See original GitHub issue

simple code:

<p:selectOneMenu id="ustId" styleClass="editable-dropdown"
                                         value="#{stammdatenAdministrationController.item.umsatzSteuerId}"
                                         editable="true" tabindex="34"
                                         required="#{stammdatenAdministrationController.requiredUmsatzId}"
                                         validator="#{stammdatenAdministrationController.validateUstId}">
                            <f:selectItem itemDisabled="true"
                                          itemLabel="please choosed"
                                          itemValue="#{null}" value="#{null}"/>
                            <f:selectItems value="#{stammdatenAdministrationController.schlUstidEntityList}" var="item"
                                           itemLabel="#{item.name}" itemValue="#{item.name}"/>
                            <p:ajax event="change" process="@this" immediate="true"/>
                        </p:selectOneMenu>

the backend bean has one element in list. when i choosed this element from backend, then is the label corect. when i the inputfield of selectedOneMenu cleared over keyboard and then commited form and reloaded this, then is label from selectOneMenu filled with “please choosed”.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
mellowarecommented, Oct 29, 2020

Unless you are a PRO subscriber and can request it I doubt this will be backported to 7. I don’t work for PrimeTek though…

2reactions
mellowarecommented, Sep 24, 2020

I believe your issue is this: https://github.com/primefaces/primefaces/issues/5299

See this comment specifically: https://github.com/primefaces/primefaces/issues/5299#issuecomment-549492475

Fixed already in 8.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SelectOneMenu passes itemLabel instead of itemValue when ...
However, the problem is, that when editable="true" is present, the selectOneMenu always passes a String to the converter, but not just any ...
Read more >
p:selectOneMenu in md-inputfield : first option not appearing
In fact, if I remove that option altogether, then the first item of MyBean.itemList doesn't appear. It can be pre-selected though, ...
Read more >
Duplicate Values In P:Selectonemenu - ADocLib
SelectOneMenu editabletrue If I delete the value the value for itemLabel is set by the first and deactivated item | pf 7.0.16 #6342....
Read more >
JSF - h:selectOneMenu - Tutorialspoint
JSF - h:selectOneMenu, The h:selectOneMenu tag renders an HTML input element ... value = "#{userData.data}"> <f:selectItem itemValue = "1" itemLabel = "Item ......
Read more >
UI Component (h:selectOneMenu) showing old value not ...
Mojarra 2.1.7-jbossorg-1 I'm out of my wits trying to figure out what is going on here.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found