primefaces

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>

Pass a value from h:outputLink to JSF after onclick event

若如初见. 提交于 2020-01-03 04:19:25
问题 I need to pass an integer to a JSF backing bean after onclick event on h:outputLink . Important : I cannot use f:param to pass value as request parameters to the naviagating page as I am preventing default onclick behaviour of h:outputlink. The control instead of navigating to page defined by href attribute, goes to a javascript function . Using Primefaces 3.0M3 snapshot with JSF 2.0 My code follows: <h:outputLink id="#{item.id}" value="/itemDetails.xhtml" class="itemLink" > #{item.name} </h

Check if username already exists in the register form

落花浮王杯 提交于 2020-01-03 03:12:10
问题 I have the follwing register form: <h:form id="newCustomerForm" > <fieldset> <legend>Register Form</legend> <table border="0" > <tbody > <tr type="text"> <td> <p:outputLabel value="Account Login :" for="pseudo"/> </td> <p:spacer height="5px" /> <td> <p:inputText id="pseudo" value="#{customerMB.login}" title="Pseudo" required="true" requiredMessage="The Pseudo field is required."/> <p:watermark for="pseudo" value="Login" /> <p:message for="pseudo"/> </td> </tr> <p:spacer height="5px" /> <tr

row selection on selection checkbox datatable primefaces

▼魔方 西西 提交于 2020-01-03 03:00:30
问题 we need to fire ajax event on row selection on toggle of checkbox..i tried to find example but they are only doing row selection on click of p:command button.we are using primefaces 2.2 Code <p:dataTable id="insList" var="insured" value="#{policyHandler.insuredList}" paginator="true" rows="#{label.insuredList_defaultNumberOfRows}" paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="#

How to Disable or Enable a group of Components

二次信任 提交于 2020-01-03 01:51:33
问题 Is the any way to Disable or Enable a group of components at once. For example : I want to disable an entire Form, which in turn have couple of InputTexts,Dropdowns,..... I want to be able to Disable or Enable all of them at once. How to do it? Instead of using a boolean variable and adding disable="#{boolean variable} to all components. Is there any other way to put all of them in one component and make it enable or disable?? 回答1: As @Kukeltje has told me in a similar question: "For newer

PrimeFaces ContextMenu on row hover

最后都变了- 提交于 2020-01-02 21:57:25
问题 I am trying to implement a ContextMenu that appears when mouse is over a row. I was able to implement the context menu on selected row, but could not find an event for hover. Do I have to write my own implementation for data table, or is there a way to attach the context menu to a hover event? 回答1: Primefaces's contextMenu doesn't have option to get that, so you can use jquery to do that. If you want to show contextMenu, you have to change contextMenu's position to Mouse's position(page load

Multiple select with checkbox from dropdown in PrimeFaces

不想你离开。 提交于 2020-01-02 20:19:13
问题 In PrimeFaces, can we choose multiple elements from drop down list with the help of checkbox? If my drop down is showing 5 elements, can I choose more than 1 element from the list? I know in primeFaces we have <p:selectOneMenu> which will allow me to choose one element, but do we have something like <p:selectMultipleMenu> ? I was trying to find it out but not able to find something. Can you please let me know whether this is possible or not? 回答1: There is <p:selectCheckboxMenu /> and it seems

Using FontAwesome 5.x with PrimeFaces 6.2+

自作多情 提交于 2020-01-02 11:05:14
问题 I was checking this question: How to use Font Awesome from webjars.org with JSF ant this question: FontAwesome with PrimeFaces with its answer https://stackoverflow.com/a/33070133/5113188 Hi I want to use the new icons of https://fontawesome.com/changelog/latest 5.5 version In my pom.xml file project... <dependency> <groupId>org.primefaces</groupId> <artifactId>primefaces</artifactId> <version>6.2</version> </dependency> <dependency> <groupId>org.primefaces.extensions</groupId> <artifactId

How can a custom-validator know which commandButton was clicked

此生再无相见时 提交于 2020-01-02 10:26:08
问题 my form has several "submit" buttons, and the validation of some of the fields depends on which was pressed. How can I find that out in my custom validator? 回答1: The button's client ID get also generated as name of the <input type="submit"> . The name=value of the pressed <input type="submit"> get also sent as request parameters. So you could just check for that in the request parameter map. E.g. <h:form id="formId"> ... <h:commandButton id="button1" ... /> <h:commandButton id="button2" ... /

Missing artifact org.primefaces.themes:cupertino:jar:1.0.9 [duplicate]

末鹿安然 提交于 2020-01-02 09:08:05
问题 This question already has answers here : jars are missing on `artifactory` server after installing primefaces all-themes (8 answers) Closed 3 days ago . I'm working on a project using liferay 6.1.1 and maven! I have this error message in pom.xml: Missing artifact org.primefaces.themes:cupertino:jar:1.0.9 even if the jar file is already there! When I tried to deploy the project, everything goes well ... but the warning persists even if the project works good. Any idea? pom.xml <?xml version="1