selectonemenu

Change item of p:selectOneMenu using jQuery

三世轮回 提交于 2020-01-03 04:30:09
问题 I have a PrimeFaces 5.1 <p:selectOneMenu> that generates in DOM the following select: <select id="WorkSpace:test:selectYear_input" name="WorkSpace:test:selectYear_input" tabindex="-1"> <option value="" selected="selected">-- Year --</option> <option value="2015">2015</option> <option value="2014">2014</option> <option value="2013">2013</option> <option value="2012">2012</option> <option value="2011">2011</option> <option value="2010">2010</option> <option value="2009">2009</option> </select>

JSF update inputText after selectOneMenu choice

大兔子大兔子 提交于 2020-01-02 07:22:08
问题 I want to change the inputTexts' values when I choose another Skin from my selectOneMenu. Everything is doing well, my Converter gives back the right Object from the menu, but the inputTexts are not updated. <h:form> <h:selectOneMenu id="dropdownSkin" value="#{helloBean.currentSkin}" defaultLabel="Select a skin.." valueChangeListener="#{helloBean.skinValueChanged}" immediate="true" onchange="this.form.submit()" converter="SkinConverter" > <f:selectItems value="#{helloBean.mySkinsSI}" var="c"

SelectOneMenu updates other SelectOneMenu

百般思念 提交于 2019-12-28 16:07:10
问题 I want to update the second SelectOneMenu when I select any item of the first SelectOnMenu. As it is now, I get the values for the SelectOneMenus from a ManagedBean. I guess I've to use AJAX (jquery) to send parameters to the ManagedBean. <h:form> <div class="center"> <h:panelGrid id="editTable" columns="2" styleClass="center"> ... <h:outputText value="#{msg.timetable_list_category}" /> <h:selectOneMenu class="category"> <f:selectItems value="#{categoryBackingBean.categorys}" var="c"

h:selectOneMenu onchange=“submit()” immediate=“true” does not skip validation of other inputs

只愿长相守 提交于 2019-12-28 16:02:17
问题 I can't set my h:selectOneMenu to submit immediately without validating other inputs. Here is the code: <h:selectOneMenu value="#{a.avalue}" onchange="submit()" immediate="true"> <f:selectItems value="#{b.bvalue}" var="k" itemLabel="#{k.asdad}" itemValue="#{k.asdad}"/> </h:selectOneMenu> <h:inputText id="sada" value="#{c.cvalue}" required="true" requiredMessage="*asdadadadasd" validatorMessage="*asdsadadadadad"> <f:validateLength maximum="80"/> </h:inputText> When I change the menu value, the

CustomContent in Primefaces selectOneMenu without persisting object

你说的曾经没有我的故事 提交于 2019-12-24 09:58:59
问题 I am using the Primefaces SelectOneMenu (http://www.primefaces.org/showcase-labs/ui/selectOneMenu.jsf) with the "Custom content" version as described in the demo. The problem is that the columns only work if the actual value of the field, which is bound to the dropdown field, is of the type of the Object used as the value . The following works (if Bean.field is of type SelectObject ): <p:selectOneMenu value="#{bean.field}" var="x"> <f:selectItems value="#{valuesBean.getSelectItems()}" var="bt

Updating text component via selectOneMenu from inside a JSF2/Facelets subview

北战南征 提交于 2019-12-24 07:54:21
问题 I have a Facelets subview called basedata-cpanel.xhtml , which gets its parameters passed via <ui:param> s: <ui:define name="content-top"> <h:form> <ui:include src="/subviews/basedata-cpanel.xhtml"> <ui:param name="customerId" value="#{pqHome.pq.customer.id}" /> <ui:param name="customerName" value="#{pqHome.pq.customer.name}" /> <ui:param name="customers" value="#{organizationManager.allCustomers}" /> <ui:include /> </h:form> </ui:define> In the subview, I simply want a panel below to show

How can I make a right-click behave as a left-click for the purpose of selecting or focusing an object

不打扰是莪最后的温柔 提交于 2019-12-24 03:49:09
问题 Event though a right-click (as far as I know) fires a mousedown event, that mousedown seems to be ignored in most cases. I'm currently working on displaying a custom context menu via a right-click, but I'd also like to be able to select an option from a list while I'm right-clicking. As of right now my recognizes the click from both buttons enough to run some javascript tied to the onmousedown attribute but not enough to select the option the mouse is over when the mousedown comes from the

How can I create a JSF composite component that binds a Collection to both an h:selectOneMenu and h:selectManyListbox?

◇◆丶佛笑我妖孽 提交于 2019-12-23 03:36:11
问题 I'm trying to create a composite component that will allow the user to toggle between a h:singleSelectMenu and h:selectManyListbox. I have it working sort of. It works as long as the value field points to a Collection...it does NOT work if the value field is null. singleMultiSelect.xhtml <?xml version="1.0" encoding="US-ASCII"?> <!DOCTYPE html> <ui:composition xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:cc=

selectOneMenu with complex objects, is a converter necessary? [duplicate]

家住魔仙堡 提交于 2019-12-23 01:12:37
问题 This question already has answers here : Conversion Error setting value for 'null Converter' - Why do I need a Converter in JSF? (2 answers) Closed 4 years ago . Is a Converter necessary for a <h:selectOneMenu> or <p:selectOneMenu> with arbitrary user-created classes as its values? I mean, is the following code supposed to work without a converter? <p:selectOneMenu value="#{bean.language}"> <f:selectItems value="#{bean.allLanguages}" /> </p:selectOneMenu> and @Named(value = "bean")

SelectOneMenu resets and fires change event on ALT press

主宰稳场 提交于 2019-12-23 01:06:29
问题 Using PF 5.1, JSF 2.2.7 on Glassfish 4.1. I have this simple example with a selectOneMenu : <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:f="http://xmlns.jcp.org/jsf/core"> <h:head> <title>Test</title> </h:head> <h:body> <h:form> <p:selectOneMenu value="#{testBean.text}"> <p:ajax listener="#{testBean.test()}" update=