primefaces

Use of p:graphicImage in ui:repeat or p:dataTable

回眸只為那壹抹淺笑 提交于 2019-12-30 10:38:50
问题 I have a Bean which has a List of Objects, containing StreamedContent Objects (Primefaces Type) which represent Images in a Database. Now I want to iterate over this list in a JSF 2.0 Page (with Primefaces), and show the images. Showing only one Image in this way works: <p:graphicImage value="#{ImageLoader.oneImage}" title="aImage" alt="no Img"/> But if I nest this tag in a c:foreach, ui:repeat or p:datatable, the Images aren't loaded! The alternative text is shown instead <ui:repeat value="#

PrimeFaces components are not rendered in browser in spite of dependency being present

删除回忆录丶 提交于 2019-12-30 10:35:39
问题 I'm developing a JSF web application with PrimeFaces 3.5 on Eclipse 4.3. There are no compiletime or runtime errors and the application deploys successfully. However, I cannot get the desired output in browser. The PrimeFaces components do not show up, while the standard JSF components do. I'm not sure if I configured everything right. The PrimeFaces JAR is at least inside /WEB-INF/lib : And the PrimeFaces XML namespace is declared as xmlns:p="http:\\primefaces.org\ui" And I mapped the

How to standardize convertnumber usage in JSF for various components?

允我心安 提交于 2019-12-30 10:30:14
问题 In my project I use lots of h:outputtext with f:convertnumber to apply a pattern to my numeric data. <h:outputText value="#{stock.price}"> <f:convertNumber currencySymbol="" groupingUsed="true" maxFractionDigits="2" type="currency" /> </h:outputText> Copying and pasting this pattern when needed for other data seems to be easy. But it is also unmanageable; when used more, changing the pattern seems to require lots of search/replace operations. How can I make this pattern be reusable and

Where does p:fileUpload save my file?

江枫思渺然 提交于 2019-12-30 09:42:25
问题 I have a p:fileUpload function on my page and every time I upload a file I cannot seem to find it in the folder specified in my web.xml file. I have added the following jars to my library: primefaces-3.2.jar commons-io-2.3.jar commons-fileupload-1.2.2.jar Here is my web.xml file: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun

Where does p:fileUpload save my file?

落爺英雄遲暮 提交于 2019-12-30 09:42:06
问题 I have a p:fileUpload function on my page and every time I upload a file I cannot seem to find it in the folder specified in my web.xml file. I have added the following jars to my library: primefaces-3.2.jar commons-io-2.3.jar commons-fileupload-1.2.2.jar Here is my web.xml file: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun

MonkeyPatching: PrimeFaces widgets extend/override

≯℡__Kan透↙ 提交于 2019-12-30 07:17:11
问题 I'm currently using (it's working fine) PrimeFaces.widget.OverlayPanel.prototype._old_init = PrimeFaces.widget.OverlayPanel.prototype.init; PrimeFaces.widget.OverlayPanel.prototype.init = function(cfg) { this._old_init(cfg); this.align(); } but I'd like to use something more readable and 'jQuery-ish' like this completely invented unrealistic code: PrimeFaces.widget.OverlayPanel.patch( { init: function(cfg) { super.init(cfg); this.align(); }, show: function() { console.log('blah blah blah');

How to mark other components invalid in a custom multi-field validator

青春壹個敷衍的年華 提交于 2019-12-30 06:49:45
问题 I refer to one of BalusC's answers: JSF doesn't support cross-field validation, is there a workaround? I follow the same way, and come out with code as below: in .xhtml <h:form id="form1"> <div> <p:messages globalOnly="true" display="text" /> <h:inputHidden value="true"> <f:validator validatorId="fooValidator" /> <f:attribute name="input1" value="#{input1}" /> <f:attribute name="input2" value="#{input2}" /> <f:attribute name="input3" value="#{input3}" /> </h:inputHidden> <h:panelGrid columns=

How to access the parent Naming Container of Composite?

一世执手 提交于 2019-12-30 06:49:17
问题 I have a JSP 2.0 <ui:component> , within that is a <p:dataTable> with a column that uses a Composite to render a special border about some content. Now I need to identify the <p:dataTabe> in a ajax rendered attribute that is located in the content. <ui:component> <p:dataTable id="dataTable" var="userItem" ... /> <p:column> <my:borderBox id="borderBox"> <p:commandButton action="#{userController.doDelete(userItem.id)}" value="delete" update="?????"/> <!-- How to address the dateTable? --> </my

Primefaces - AjaxStatus - Dialog is behind the overlay

我怕爱的太早我们不能终老 提交于 2019-12-30 06:05:32
问题 I checked the z-index, but the Dialog z-index is higher than the div of overlay. It was to be correct. In the showcase works correctly. Could you help me with this problem? 回答1: Set appendToBody = true and your problem will go away - but be careful to have a form inside if you do some server-side processing. More info when you post more info! 回答2: For primefaces 5.1 you can use appendTo="@(body)" 来源: https://stackoverflow.com/questions/8434639/primefaces-ajaxstatus-dialog-is-behind-the

Value Change listener not working in primefaces calendar

一世执手 提交于 2019-12-30 05:46:47
问题 I am using primefaces 3.2 and JSF 2.0 My scenario is I have file date, last date and next date in my form. When user enters file date I need to update file date value in bean so it's value can be used as minimum date in last date of attribute mindate and so in next date selection. As per my knowledge value change listener can execute at form submission so I can not use it. I have used p:ajax . But still I am not able to set file date. As file date is not set it allows user to select last date