Reputation: 561
I am developing an Application with Primefaces 3 and the p:selectOneMenu
just doesn't work.
The first option is always selected and when I press the drop-down button to the right nothing happens. h:selectOneMenu
works just fine, but I want the style of the primefaces component.
<h:form>
<!-- Country-->
<div class="control-group">
<label class="control-label">Country</label>
<div class="controls">
<p:selectOneMenu value="#{userService.sessionBean.currentUser.country}">
<f:selectItem itemLabel="Austria" itemValue="Austria" />
<f:selectItem itemLabel="Germany" itemValue="Germany" />
<f:selectItem itemLabel="Italy" itemValue="Italy" />
</p:selectOneMenu>
</div>
</div>
<div class="form-actions">
<p:commandButton type="submit" id="submitButton" action="#{userService.update()}" value="Update your Profile" styleClass="btn btn-primary btn-large" ajax="false">
<f:param name="update" value="true" />
</p:commandButton>
</div>
</h:form>
I even copied the showcase example from the primefaces homepage but it still does not work. I tested this also at a friends computer and with firefox and chrome on Ubuntu and Mac OS X.
Is this a problem with my Primefaces Version (3.5)?
Upvotes: 2
Views: 4140
Reputation: 2621
I commented on this issue over a year ago, but just ran into the same issue and found this post again when looking for a solution.
The fix in my case was that the page had an import of an older version of jQuery (1.11.2) that was clashing with the jQuery that PrimeFaces uses and imports to the page.
I removed my jQuery import and the p:selectOneMenu now drops down and works as expected.
Upvotes: 2