Selecting option in p:selectOneMenu using JS
问题 I'm trying to pre-select the country of user in a selectOneMenu using javascript. The problem is that when the page initially loads the list is still on the first element. However if I click on the arrow to expand the list, and then click somewhere else on the page to make the list disappear, then the value is the one set by javascript. <p:selectOneMenu styleClass="inputField selectOneMenuColored" required="true" editable="false" id="country" value="#{subscribeUser.user.countryBean}"