primefaces

Why can't I update a p:graphicImage twice after upload a file with p:uploadFile

江枫思渺然 提交于 2020-01-02 08:20:28
问题 I have been trying to upload an image with a p:uploadFile and it work fine at first time, but after the first uploaded file it not update the p:graphicImage, but if I reload the page the value of the graphicImage is fine and the image is showed. So, I think that is a problem with the primefaces uploadFile component, but I not sure. My xhtml is this: <h:form id="formNuevo" size="150%" enctype="multipart/form-data"> <h:outputLabel value="Diseño Neumatico: *" /> <p:fileUpload fileUploadListener=

How to get id of current component in EL

空扰寡人 提交于 2020-01-02 08:16:10
问题 I'm working with JSF and PrimeFaces, but I need to get the value of the id of a component. Because I'm building dinamycally panels with diferent id, to show a the panel I need to compare if is the current panel, then show it. For example if I've the next panel <p:outputPanel id="#{bean.getID}" autoUpdate="true" renderer=#{@this.id == bean.currentPanel} > </p:outputPanel> And Bean public class Bean(){ private int numberPanels =0; private int currentPanel = 0; public int getID(){ //...a process

how to pass the parameter during file upload in primefaces [duplicate]

一笑奈何 提交于 2020-01-02 07:41:03
问题 This question already has an answer here : Pass value of another input component when uploading file via p:fileUpload mode=advanced (1 answer) Closed 3 years ago . I am using jsf2.0 with primfaces and using p:fileupload for uploading the photo..Here i need to pass the parameter in backing bean. In that there is no option for passing parameter through p:fileupload.. i was used the binding option also,but it returns the null value on backing bean... here is my fileupload.xhtml <h:form enctype=

how to pass the parameter during file upload in primefaces [duplicate]

寵の児 提交于 2020-01-02 07:40:13
问题 This question already has an answer here : Pass value of another input component when uploading file via p:fileUpload mode=advanced (1 answer) Closed 3 years ago . I am using jsf2.0 with primfaces and using p:fileupload for uploading the photo..Here i need to pass the parameter in backing bean. In that there is no option for passing parameter through p:fileupload.. i was used the binding option also,but it returns the null value on backing bean... here is my fileupload.xhtml <h:form enctype=

Primefaces dataTable applying filter on multiple field in a single column

自古美人都是妖i 提交于 2020-01-02 06:53:29
问题 I have a p:datatable which lists users. One of the column contains the concatenated First Name + Last Name of the user and I'd like to be able to filter on both these values in the same 'filter field' so that it tries to match the filter on the name as well as on the first name. i.e.: users: "Bob Green" and "Steve Ross", if I enter the filter 'o', both users will appear in the filtered list. The dataTable: <p:dataTable id="users" value="#{userCtrl.userList}" filteredValue="#{userCtrl

JSF ViewScoped variable not surviving redirect to same page

倾然丶 夕夏残阳落幕 提交于 2020-01-02 06:33:10
问题 With the code below, i'm using a listener on the selectOneRadio to redirect to the page with a query string in the url. The problem is, when i get redirected, the value of newsTitle and selectedNews are null. Why is this? Is is because i'm doing a redirect using FacesContext? news.xhtml <h:outputLabel for="title" value="Title" style="font-weight: bold;"/> <p:inputText id="title" required="true" value="#{contentEditorBacking.newsTitle}" > <p:ajax event="blur"/> </p:inputText> <h:outputLabel

List<Integer> received List<String>

旧城冷巷雨未停 提交于 2020-01-02 05:18:19
问题 I think that I found a error in runtime of Java with JSF 2.0 (Using Primefaces), in this project I'm using JSF 2.0 Primefaces and CDI. Resuming the problem, I have a method setter in my business class Role that received a List, but the JSF is setting a ArrayList on that. Should the java throw a exception or at least should not find a method that matches? here is: public void setAcl(List<Integer> acl) { this.acl = acl; System.out.println("Received: " + this.acl); for(Object i : this.acl) {

PrimeFaces PickList with OmniFaces validateAll leads to NullPointerException

谁说我不能喝 提交于 2020-01-02 04:16:12
问题 What I actually want is two PrimeFaces <p:pickList>s that get validated with OmniFaces' <o:validateAll> component. Note, that validating a pickList with <o:validateAll> has a problem, which can be solved as described in issue 488 in the OmniFaces issue tracker. So a very simple example of my requirement looks like this: <h:form id="form1"> <p:messages id="messages"> <p:autoUpdate/> </p:messages> <p:pickList id="pick1" value="#{dummy.dualListModel}" var="item" itemLabel="#{item}" itemValue="#

When using lazy dataTable another component does not get updated / 2nd component data is one request behind

五迷三道 提交于 2020-01-02 03:37:07
问题 I have a PrimeFaces p:dataTable and enabled lazy loading by implementing a LazyDataModel . The dataTable holds search results, so when doing a search request the search service only retrieves the required (paginating) data. That works fine. When doing a ajax request with p:commandButton : <p:commandButton id="searchCmdBtn" value="Search" action="#{searchBean.search}" update=":resultForm:resultList :filterForm:filterMenu :resultForm:messages" ajax="true" /> the dataTable gets updated properly,

h:inputText - jsf does not render the placeholder

余生长醉 提交于 2020-01-02 03:15:07
问题 I want to create a landingPage and I want to save the data in my database through jsf 2.0 and Primefaces 3.5 My page *.xhtml page looks like this: However, I want to make it look like my HTML page: Besides the CSS my h:inputText should contain a placeholder. My code looks like this: <h:form class="homepage_invitee_form" action="" method="POST"> <h:inputText name="email" placeholder="Email Address" id="email_address_new" type="text placeholder" /> <br /> <h:inputText name="firstName"