primefaces

Disable days in the other calendar when a month or a year is changed

大憨熊 提交于 2020-01-06 20:35:21
问题 I have two calendars (startDate and endDate) I have a function to disable all days excepts mondays or enable the next working day to the holiday monday in the startDate calendar. And I have a function to disable all days excepts fridays or enable the previous working day to the holiday friday in the endDate calendar. When I select a date in the startDate calendar it selects automatically some enabled date in the endDate calendar and vice versa. When the user changes the month or the year in

p:dataTable rowEdit doesn't update row object [duplicate]

…衆ロ難τιáo~ 提交于 2020-01-06 19:51:33
问题 This question already has an answer here : How and when should I load the model from database for h:dataTable (1 answer) Closed 4 years ago . I'm trying to edit rows on datatable using rowEdit mode but it doesn't work for me. Here is the rowEdit event : <p:ajax event="rowEdit" listener="#{saisirHeuresForm.updateMyRow}" update=":saisirHeuresForm:messages"/> And the managedBean corresponding method : public void updateMyRow(RowEditEvent event) { event.getObject(); } The event.getObject() method

How to select the <p:dataTable> by CSS?

核能气质少年 提交于 2020-01-06 19:40:54
问题 First I was using <h:dataTable> and I was OK with this but after then I needed some more functionality, So I started using Primefaces and used its <p:dataTable> . Everything is going fine but the CSS that I applied on tables stopped woking. Then I found that <p:dataTable> is first creating a <div> and then inside the <div> , it is creating a <table> . <div id="tcform:tclist" .......> <table role="grid">....</table> </div> But <h:dataTable> creates just HTML <table> . Now I want to know how

PrimeFaces DataTable RowEditor updating cell elements on RowEditInit, but not on RowEdit or RowEditCancel

允我心安 提交于 2020-01-06 15:06:31
问题 I have the following xhtml: <h:form> ... <p:dataTable id="table" value="#{BEAN.rows} var="row" > <p:ajax event="rowEdit" listener="#{BEAN.rowEdit}" /> <p:ajax event="rowEditInit" listener="#{BEAN.rowEditInit}" /> <p:ajax event="rowEditCancel" listener="#{BEAN.rowEditCancel}" /> ... <p:columns id="columnsElement" value="#{BEAN.columns} var="column" > <f:facet name="header" > <h:outputText value="#{column.code}" /> <p:selectBooleanCheckbox id="selectAll" disabled="#{BEAN.rowInEdit}" /> </f

Why can't I set ID for each p:tab in p:accordionPanel

我是研究僧i 提交于 2020-01-06 14:39:53
问题 I am using a p:accordionPanel instead of a p:dataTable . Every time I change a tab, I would like to reset the active tab's entity ID within the controller. IOW, if the tabs in the accordionPanel correspond to entities whose IDs are 1, 2, 3, when I select one, I want the activeEntityID variable in the controller to be reset to the corresponding ID: <p:accordionPanel value="#{litigController.appealsForCase}" var="appeal"> <p:ajax event="tabChange" listener="#{litigController.setSelectedAppeal}"

Primefaces p:ajax listener conditional update

我的梦境 提交于 2020-01-06 14:05:26
问题 JSF Page: <p:commandButton> <p:ajax process="@this" update="name desc msg" listener="#{bean.deleteListener}"/> </p:commandButton> Bean: public void deleteListener() { if (data.size() == 0) { // updates only "msg" setMsg("There is no data to delete"); return; } setMsg("Data deleted."); // and updates the bean values for "name" and "desc" also. ... } Is it possible to conditionally update for an ajax call based on ajax listener logic. I would like to update the client ids "name desc msg"

Primefaces p:ajax listener conditional update

时光怂恿深爱的人放手 提交于 2020-01-06 14:04:23
问题 JSF Page: <p:commandButton> <p:ajax process="@this" update="name desc msg" listener="#{bean.deleteListener}"/> </p:commandButton> Bean: public void deleteListener() { if (data.size() == 0) { // updates only "msg" setMsg("There is no data to delete"); return; } setMsg("Data deleted."); // and updates the bean values for "name" and "desc" also. ... } Is it possible to conditionally update for an ajax call based on ajax listener logic. I would like to update the client ids "name desc msg"

DefaultMenuItem with a value from a .properties file (resource bundle)

萝らか妹 提交于 2020-01-06 12:44:09
问题 Ok so I'm trying to move my project from Primefaces 3.5 to 4.0 and I'm struggling with the new MenuModel API. I'm sure it's something stupid, but I can't display a DefaultMenuItem for my Breadcrumb where the value is from a .properties file (defined in faces-config as resource bundle). What I had with Primefaces 3.5 : MenuItem menuItem; // Where "getPath()" returns all the pages needed to get to the current one for (Page page : currentPage.getPath()) { menuItem = new MenuItem(); // Where

Primefaces calendar picker doesn't work with MMM pattern

大憨熊 提交于 2020-01-06 12:30:29
问题 I'd like to use a Calendar component from the primefaces as shown here: PrimeFaces - ShowCase : Calendar - Time <p:calendar id="startDateSelected" value="#{myBB.dateSelected}" pattern="dd/MMM/yyyy"> dateSelected is just a plain Date() It works fine for the patterns mentioned in the showcase, but I'd like to use the following pattern: dd-MMM-yyyy HH:mm When I use this, the dialog with picker doesn't show up. When I remove the time from the pattern, the picker works(only for date obviously) and

Primefaces fileUpload does not work well on huge number of file

扶醉桌前 提交于 2020-01-06 11:16:28
问题 When I trying to upload more then 1.000 files with fileUpload component (like 5.000), it start having strange behavior. It does not complete the upload (some file remain stuck in the list), the only way to start it over is add a new file. After that it start upload also the previous ones. Some of them are not uploaded at all, randomly. Is there a limit? How can I control that? 回答1: You can try to control limit with fileLimit="" but maybe it won't help you. I think it's really a bad idea to