primefaces

PrimeFaces with big dialogs - how to do this correct? [closed]

家住魔仙堡 提交于 2020-01-02 01:23:59
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . How to use the PrimeFaces big dialogs in correct way? The dialogs in HTML world were first thought to be used only for messages and

Primefaces tabView executes form validation on tab change

守給你的承諾、 提交于 2020-01-01 16:46:40
问题 I am having a serious issue with the p:tabView component. I have set dynamic="true" and cache="false" to the tabView. One of the tabs has some input components which are set required="true" . Now when I am changing the tab each time, the form validation is occurring and the FacesMessages are being displayed in growl. Here is the tab: <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun

When to prefix form id with colon

耗尽温柔 提交于 2020-01-01 11:56:48
问题 I have two datatables in two forms, forma and formg . Inside each form there is a p:dataTable , groupsa and groupsg . In each datatable there is a custom column that displays an image( h:graphicImage ) called fava and favg . When the image is clicked, the images from the other datatable will be updated. <p:ajax event="click" listener="#{agent.toogleFavorite}" update="fava, :formg:groupsg:favg" /> Without the colon I get an exception: javax.faces.FacesException: Cannot find component with

How to retain the sort order of primefaces datatable?

我的未来我决定 提交于 2020-01-01 09:23:11
问题 In my project I am using a ViewScoped bean and I have two pages one is main page and the other details page. In the main page I have a primefaces datatable with sorting and filtering functionality. The datatable has a link in each row. If I sort a column, then it works properly. If I click on a link in the main page, then it will go to the details page showing the details of the corresponding row. In the details page I have a back button. If I click on it, it will take me back to the main

What is the best way to pass data from page1 to page2 using the same backing bean?

谁都会走 提交于 2020-01-01 06:26:08
问题 I'm creating a simple search form on page1 and on page2 i will be showing the results. I'm wondering what the best way to do that with a @ViewScoped backing bean. Previously i've had to use @SessionScope to achieve this. Page1 - search page: <h:form id="documents"> <h4 class="dkblue u-case">Documents Search</h4> <h:outputLabel for="mainNum" value="mainNumber" /> <p:inputText id="mainNum" value="#{documentBacking.document.mainNumber}"/> <h:outputLabel for="secNum" value="secNumber" /> <p

How to validate the maximum amount of checked values of a selectManyCheckbox based on the current selection of a selectOneMenu?

情到浓时终转凉″ 提交于 2020-01-01 05:53:42
问题 I am using JSF 2.0 and PrimeFaces. I have a selectOneMenu and a selectManyCheckbox. I want to achieve this scenario: When an user chooses: option1(PieChart), then the user is allowed to check max one checkbox option2(BarChart), then the user is allowed to check max two checkboxes Here is my attempt so far, the view: <h:selectOneMenu value="#{bean.chartType}"> <f:selectItem itemValue="PieChart" itemLabel="PieChart" /> <f:selectItem itemValue="BarChart" itemLabel="BarChart" /> <p:ajax event=

PRIMEFACES - How to refresh a <p:graphicImage> from clicking a <p:commandButton>?

a 夏天 提交于 2020-01-01 05:06:34
问题 I'm considering this showcase: http://www.primefaces.org/showcase/ui/dynamicImage.jsf in particular the sub-case "GraphicText on-the-fly". My problem is implementing an extended version of this sub case with the addition of a . When the button is pressed i need that the image change dinamically. In the DynamicImageController class I re-writed the getter associeted with the graphicImage: public StreamedContent getGraphicText(){ double random = Math.random();// a double value with a positive

JSF “Error Mac did not verify!” [duplicate]

邮差的信 提交于 2020-01-01 03:35:07
问题 This question already has answers here : Getting ViewExpiredException in clustered environment while state saving method is set to client and user session is valid (2 answers) Closed 2 years ago . I have been trying to implement some basic push functionality with primefaces in jsf. I have used there counter example http://www.primefaces.org/showcase-labs/push/counter.jsf. Essentially its a button that increments a shared counter. When running this example I always get this error: ERROR: MAC

Are JSF/Primefaces AJAX requests really asynchronous?

好久不见. 提交于 2020-01-01 02:57:10
问题 I'm new to JSF so I don't know if the behaviour I'm facing is normal. I have this code: <p:selectBooleanCheckbox id="locationChoice1" value="#{login.locationChoice1}"> <p:ajax listener="#{login.chooseLocationType1}" update="locationChoice1 locationChoice2 positionChoice" /> <p:ajax listener="#{login.retrieveGalaxies}" update="test" /> </p:selectBooleanCheckbox> My login.retrieveGalaxies function has a call to sleep(8000) function to simulate the delay. I expect my componenents locationChoice1

primefaces calendar: wrong date entry

≡放荡痞女 提交于 2020-01-01 02:25:08
问题 Using jsf 2.2.0. For all the date, it seems to remove one day. When I click on 8 nov, it displays 11/08/2011. But then it stores Nov 7, 2011 in my Date field in my managed bean. I live in singapore, wondering if it's an issue with the timezone. 回答1: try adding this to your web.xml <context-param> <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name> <param-value>true</param-value> </context-param> 回答2: If you are using primefaces 5, in your scheduler : <p