primefaces

Primefaces datatable onEdit() edits the wrong entry if an entry has been added before refreshing the view

风格不统一 提交于 2019-12-25 06:13:11
问题 i've got a question concerning Primefaces (version 5.0) and their datatable. If I have a p:datatable and I want to edit a cell or row (doesn't matter - behaviour is the same in that case) AND someone added a new entry to that database, I edit the new entry instead of the old. Well. Here are some code-snippets: my index.xhtml: <h:form id="viewChanges"> <p:dataTable id="changeTable" widgetVar="changeTable" value="#{changeController.list}" var="item" selection="#{changeController

How to import Primefaces's into Eclipse as source code

百般思念 提交于 2019-12-25 06:06:17
问题 Recently Primefaces moved from Google Code to GitHub, so theoretically it's possible to fork its repository, make changes and submit a pull requests. I'd tried but I'm stuck. As I understand I should import Primefaces into Eclipse as a separate Java Project and define in my JSF project dependency to it rather then to primefaces.jar . I have tried to download it from GitHub as a zip file and import as maven project into Eclipse but get error that it requires maven-jsf-plugin plugin. Could not

XML namespace http://primefaces.org/ui showing warning that no tagLibrary exists for that namespace

五迷三道 提交于 2019-12-25 05:37:42
问题 I am facing a strange problem with my local workplace in Eclipse. I found out that many people faced the same issue with Maven + Primeface earlier, but unfortunately I didn't get any concrete answer what is the reason of this error. May be I am not going to the right place. That is why posting the same question again Below are my configurations: pom.xml: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema

Unable to show faces message on xhtml page

不羁岁月 提交于 2019-12-25 05:34:16
问题 I am unable to show faces messages using facesMessage Bean code : if(condition){ FacesContext fc=FacesContext.getCurrentInstance(); fc.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL,"Rounding Rule Saved","R Saved")); } View code : <p:messages autoUpdate="true" showDetail="true" globalOnly="true" id="msgId"/> But I am not getting messages, what am I doing wrong? EDIT: My project flow is : User click on edit button on view page Redirect to edit page After submitting return to

primefaces selectitem onclick event

送分小仙女□ 提交于 2019-12-25 05:32:35
问题 I need some help. I'm developing for jsf and primefaces web application and I'm facing a problem when I'm selecting from a drop down list to get the selected value but I'm getting an empty string in the action. This is my xhtml code for selectOneMenu tag <p:selectOneMenu value="#{tanAllot.batchName}" id="batchName"> <f:selectItem itemLabel="Select Batch" itemValue="" /> <f:selectItems value="#{tanAllot.batchList}" /> <p:ajax event="change" listener="#{tanAllot.test}" /> </p:selectOneMenu>

Synchronous dialog invocation from managed bean

佐手、 提交于 2019-12-25 05:31:54
问题 Is there a way to use PrimeFaces RequestContext to call a dialog defined in the JSF from a managed bean, which has a form, but synchronously, meaning that the managed bean wait its thread execution until the user submits the form? Currently, I am successfully invoking a dialog from my managed bean but the call is asynchronous, meaning the dialog is popped open but the managed bean thread continues on without waiting for the user to supply the needed additional data via the dialog. So, in my

Spring MVC Primefaces Ajax Fails when mapping request 404 error code

╄→гoц情女王★ 提交于 2019-12-25 05:28:16
问题 I'm trying to use p:commandButton from Primefaces within my server. Page look ok untill I click on the button and nothing happens. I've checked console and it shows following error: - POST http://localhost:8080/rest_test-0.0.1/WEB-INF/faces/order.xhtml 404 (Not Found) send jquery.js.xhtml:21 bG.extend.ajax jquery.js.xhtml:21 PrimeFaces.ajax.AjaxUtils.send primefaces.js.xhtml:1 PrimeFaces.ajax.Queue.offer primefaces.js.xhtml:1 PrimeFaces.ajax.AjaxRequest primefaces.js.xhtml:1 PrimeFaces.ab

css expression not work for primefaces

て烟熏妆下的殇ゞ 提交于 2019-12-25 05:27:08
问题 Below code not work, but it's work fine for jsf1.2. Now the framework is jsf2.0 and primefaces 3.2 <p:inputText id="pInputText4" disabled="true" value="This is Input Text" style="color: expression((this.disabled==true)?'#0f0':'#f00');"/> I have another question that why <p:selectOneMenu id="roleId" value="#{accessPage.roleId}" required="true"> <f:selectItem itemLabel="#{msg['label.common.selecthere']}" itemValue="#{null}" /> <f:selectItems var="code" value="#{accessPage.roleIdList}" itemLabel

cast error with addCallbackParam in primefaces

社会主义新天地 提交于 2019-12-25 05:25:38
问题 Using the requestContext demo example in my system http://www.primefaces.org/showcase-labs/ui/requestContext.jsf I am getting the following error Caused by: java.lang.ClassCastException: org.primefaces.context.DefaultRequestContext cannot be cast to org.primefaces.context.RequestContext at org.primefaces.context.RequestContext.getCurrentInstance(RequestContext.java:38) [primefaces-3.4.1.jar:] the error occur when the java command running RequestContext context = RequestContext

Primefaces 3.4 in-cell editable table marks inputtext-cell as red after failed validation

坚强是说给别人听的谎言 提交于 2019-12-25 05:25:29
问题 I'm using a in-cell editable datatable in PF 3.4 with Mojarra/Tomcat 7.0.29. My problem is that I'm applying a validation on the inputtext which works great. The only issue I have is that after the validation fails, the cell is marked as red. Even if I close (i.e. click the cancel button) the editable-mode, it remains red next time I try to enter edit-mode. I need to have the red highlighting removed after I close the editable mode. Its mostly a cosmetic issue as everything is working fine.