selectonemenu

Skip validation conditionally, when empty f:selectItem in p/h:selectOneMenu is selected

谁都会走 提交于 2019-12-02 02:11:21
Parents : <p:selectOneMenu id="parentList" value="#{bean.selectedParent}" converter="#{parentConverter}" required="true"> <f:selectItem itemLabel="Select" itemValue="#{null}"/> <f:selectItems var="parent" value="#{bean.parentList}" itemLabel="#{parent.parentName}" itemValue="#{parent}"/> <p:ajax update="childrenList" listener="#{bean.setchildren}"/> </p:selectOneMenu> Children : <p:selectOneMenu id="childrenList" value="#{bean.selectedchild}" converter="#{childConverter}" required="true"> <f:selectItem itemLabel="Select" itemValue="#{null}"/> <f:selectItems var="child" value="#{bean

How can I get values out of a selectOneMenu inside a JSF datatable?

依然范特西╮ 提交于 2019-12-01 19:53:46
I have a JSF datatable with a bunch of rows, with each row having a selectOneMenu inside of it like this: <h:form <h:dataTable id="myTable" binding="#{myBean.dataTable}" value="#{myBean.dataTableRows}" var="row" first="0" rows="0" dir="LTR" frame="hsides" rules="all"> <h:column> <f:facet name="header"> <h:outputText value="Sample Name" /> </f:facet> <h:outputText value="#{row.sampleName}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Role" /> </f:facet> <h:selectOneMenu value="#{row.role}" id="roleInput"> <f:selectItems value="#{myBean.allRoles}" /> </h:selectOneMenu>

How can I get values out of a selectOneMenu inside a JSF datatable?

落花浮王杯 提交于 2019-12-01 19:25:25
问题 I have a JSF datatable with a bunch of rows, with each row having a selectOneMenu inside of it like this: <h:form <h:dataTable id="myTable" binding="#{myBean.dataTable}" value="#{myBean.dataTableRows}" var="row" first="0" rows="0" dir="LTR" frame="hsides" rules="all"> <h:column> <f:facet name="header"> <h:outputText value="Sample Name" /> </f:facet> <h:outputText value="#{row.sampleName}" /> </h:column> <h:column> <f:facet name="header"> <h:outputText value="Role" /> </f:facet> <h

p:selectOneMenu dropdown not attached to the component inside a dialog [duplicate]

血红的双手。 提交于 2019-12-01 18:56:56
问题 This question already has answers here : p:selectOneMenu dropdown part scrolls and does not stay in position (3 answers) Closed 3 years ago . I have a p:selectOneMenu inside a p:dialog. Whenever I scroll the page, the dropdown detaches from the p:selectOneMenu label and moves according to the mouse scroll. Is there any way to attach it to the label so that it doesn't move? Here's a screenshot of the problem posted by someone who has the same problem SelectOneMenu panel scrolls with the mouse

p:selectOneMenu preselects previous item when noSelectionOption item is present

杀马特。学长 韩版系。学妹 提交于 2019-12-01 18:13:17
问题 There is a problem with p:selectOneMenu selection when adding a f:selectItem . View: <p:selectOneMenu value="#{selectionTest.selectedName}"> <f:selectItem itemLabel="Select" noSelectionOption="true" /> <f:selectItems value="#{selectionTest.allNames}" var="varName" itemLabel="#{varName}" itemValue="#{varName}" /> </p:selectOneMenu> Model: private List<String> allNames; private String selectedName; public MenuSelectionTestBean(){ allNames = new ArrayList<String>(); allNames.add("Ahmed");

Primefaces Mobile ajax update of selectOneMenu fails

此生再无相见时 提交于 2019-12-01 08:47:02
问题 I want to create a mobile form using Primefaces 5.2 where one selectOneMenu result updates a second selectOneMenu via Ajax, exactly like the showcase example here: http://www.primefaces.org/showcase/ui/ajax/dropdown.xhtml but then a mobile version. My question is very similar to this one: Primefaces Mobile's Ajax does not update a <p:selectOneMenu> but there is no answer. I have created a JSF page and backingbean exactly like the showcase example, and it works. However when I add the mobile

selectonemenu jsf on objects with converter

为君一笑 提交于 2019-12-01 06:24:56
Here is my SelectOneMenu <h:selectOneMenu value="#{bean.myObject}" > <f:ajax render="componentToRender" listener="#{bean.onSelect}"/> <f:converter converterId="myObjectConverter" /> <f:selectItem itemLabel="None" itemValue="#{null}" /> <f:selectItems value="#{bean.objects}" var="object" itemValue="#{object}" itemLabel="#{object.name}" /> </h:selectOneMenu> And my converter @FacesConverter("myObjectConverter") public class MyObjectConverter implements Converter{ private List<MyObject> objects; public MyObjectConverter(){ this.objects = MyController.getAllMyObjects(); } public Object getAsObject

p:selectOneMenu doesn't render custom content via p:column on List<String>

只愿长相守 提交于 2019-12-01 04:05:33
问题 I'm trying to get a Primefaces 5.2 selectOneMenu to display images along with their filenames. This is what my xhtml currently looks like: <h:form> <h:panelGrid id="createPanelGrid" columns="2"> <p:outputLabel value="Service Logo:" /> <p:selectOneMenu value="#{imageBean.selectedImage}" var="l"> <f:selectItem itemLabel="Select a logo" itemValue="" /> <f:selectItems value="#{imageBean.imageList}" var="logo" itemLabel="#{logo}" itemValue="#{logo}" /> <p:column> <p:graphicImage value="#{imageBean

selectonemenu jsf on objects with converter

泄露秘密 提交于 2019-12-01 03:09:35
问题 Here is my SelectOneMenu <h:selectOneMenu value="#{bean.myObject}" > <f:ajax render="componentToRender" listener="#{bean.onSelect}"/> <f:converter converterId="myObjectConverter" /> <f:selectItem itemLabel="None" itemValue="#{null}" /> <f:selectItems value="#{bean.objects}" var="object" itemValue="#{object}" itemLabel="#{object.name}" /> </h:selectOneMenu> And my converter @FacesConverter("myObjectConverter") public class MyObjectConverter implements Converter{ private List<MyObject> objects;

Primefaces dependent selectOneMenu and required=“true”

余生颓废 提交于 2019-11-30 14:01:09
In my application I have three dropdown menu ( p:selectOneMenu ), say A, B, C. Among them two are dependent, say B and C. By changing the value of B I am dynamically loading values to C. Also there is a textbox. The value of the textbox is generating by ajax when the on-change event is firing from these three dropdowns. Here is the xhtml: <p:selectOneMenu id="customerMenu" value="#{adminController.activityDTO.customerId}" required="true" label="Customer Name" style="width: 200px"> <f:selectItem itemLabel="Select One" itemValue="" /> <f:selectItems value="#{adminController.customers}" var=