primefaces

how to fix width and height of primefaces dialogbox

流过昼夜 提交于 2020-01-14 07:06:27
问题 In my web application i want to fix height and width of primefaces dialogbox in the way in which the dialogbox appears exactly in the middle of my web page, and if one want to minimize the window then the dialogbox should also be minimised. i mean middle of my one of the frame not whole window. i.e. dynamic sized dialog box like % width and height thanks for any help... 回答1: You can use following code to make it of fixed dimension, <p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true"

how to fix width and height of primefaces dialogbox

不羁岁月 提交于 2020-01-14 07:04:30
问题 In my web application i want to fix height and width of primefaces dialogbox in the way in which the dialogbox appears exactly in the middle of my web page, and if one want to minimize the window then the dialogbox should also be minimised. i mean middle of my one of the frame not whole window. i.e. dynamic sized dialog box like % width and height thanks for any help... 回答1: You can use following code to make it of fixed dimension, <p:dialog header="Modal Dialog" widgetVar="dlg2" modal="true"

Change color of primefaces schedule event for current date

淺唱寂寞╮ 提交于 2020-01-14 06:48:24
问题 How to change color of primefaces schedule event for current date ? Please provide CSS... I am using primefaces(3.5) schedule component. 回答1: .fc-today /* today */ { background-image: linear-gradient(to bottom, #44565F, #0077b3) !important; } I had the same problem. I have tested this on chrome and its working. Change the colors as per your choice 来源: https://stackoverflow.com/questions/19042507/change-color-of-primefaces-schedule-event-for-current-date

p:tree node select event listener method is not invoked

自闭症网瘾萝莉.ら 提交于 2020-01-14 06:15:30
问题 I am using PrimeFaces 3.0.M4. I want to update the contents of PrimeFaces layout unit on tree node selection. I have added the following methods to my backing bean: public void setSelectedNode(TreeNode selectedNode) { this.selectedNode = selectedNode; this.selectedNode.setSelected(true); } public void onNodeSelect(NodeSelectEvent e) { this.setSelectedNode(e.getTreeNode()); } In the view I am using ajax to trigger the onNodeSelect() listener method: <p:tree id="tree" value="#{treeBean.root}"

How to prevent JSF2 injection of hidden javax.faces.ViewState

末鹿安然 提交于 2020-01-14 05:20:33
问题 How can I disallow Mojarra, injecting a javax.faces.ViewState hidden into my <form> s? I have a search <form method='GET'> which works first time my page is loaded (because my view-scoped bean is re-initialized correctly). But after an AJAX pagination in the page (over a PrimeFaces grid), Mojarra (or PrimeFaces?) injects a hidden javax.faces.ViewState into my form. Now when I submit the form it doesn't restart my view-scope bean because of javax.faces.ViewState input. The issue here is: I

How to apply DataTable filter programatically?

孤街浪徒 提交于 2020-01-14 04:43:05
问题 Using the PrimeFaces Demo filtering DataTable (https://www.primefaces.org/showcase/ui/data/datatable/filter.xhtml) as an example, I would like to be able to provide "filtering" links outside of the table for the user to click (say Volvo, Forw, BMW, etc). When the user clicks the link, I would like to switch the selected item in the manufacturer filter dropdown and apply the filter. I haven't been able to figure out how to get to the filter properties to make the change. Can this be done via

How to create Primefaces radioButtons from List?

冷暖自知 提交于 2020-01-14 04:39:09
问题 I want to create a set of Radiobuttons from a List of Objects #{item.items3} and store the selected object into #{cartBean.selectedChoice} . Now I don't really get the difference between the values needed for <f:selectItems> and <ui:repeat> . How does my code look. Any obvious mistakes so far? <p:selectOneRadio id="myRadio" value="#{cartBean.selectedChoice}" layout="custom"> <f:selectItems value="#{item.items3}"/> </p:selectOneRadio> <h:panelGrid columns="1"> <ui:repeat var="choice" value="#

Show progress image while executing JSF managed bean action

匆匆过客 提交于 2020-01-14 04:34:25
问题 My question kind of applies to Prime Faces progress bar but any vanilla jsf implementations(using jquery) would be helpful. My problem is when I start the long mysql query I also render the progress bar. The problem is it starts it's progress after the data query is complete. I'm guessing because the render phase isn't applied until the back end stuff is complete. Would I need to start the progress bar in another thread? The progress bar doesn't necessarily have to show where the query is at

How to configure Primefaces Aristo theme to Twitter Bootstrap theme

浪尽此生 提交于 2020-01-14 03:42:07
问题 Hi I am newbie in this techniques. I download the Primefaces from here. The primefaces.jar have only setup with the aristo theme . but I need to apply the bootstrap theme in my site. I download twitter bootstarp css. How to configure this theme into my JSF primefaces . 回答1: You can not. However PrimeFaces already has a theme named as Twitter Bootstrap. Also they've explained why bootstrap files shouldn't be mixed into PF in that link. If you want to apply that theme to your project, download

primefaces datatable selectionMode multiple not working with mojarra

穿精又带淫゛_ 提交于 2020-01-14 03:18:10
问题 Recently I switched to mojarra from myfaces and noticed that primefaces datatable checkbox multiple row selection is not working. I have tried the exact sample program available at http://www.primefaces.org/showcase/ui/datatableRowSelectionRadioCheckbox.jsf With myfaces both single and multiple selection are working ,but with mojarra multiple selection is not working(selectedCars.length is 0 in setSelectedCars method) I have tried with mojarra 2.0.3 and mojarra 2.1.0 with primefaces 2.2.1 回答1