jsf-2

Custom renderer for PrimeFaces component works fine in Tomcat, but not in Websphere

爷,独闯天下 提交于 2020-01-14 09:28:28
问题 I'm using MyFaces 2.1.9 and PrimeFaces 3.5. I've implemented a custom renderer for <p:inputText> . This works fine at home with Tomcat. But this does not work at work with Websphere. I've placed breakpoints in the custom renderer class, but they are never hit. I see nothing in my logs as well. However, when I register the very same custom renderer on standard JSF <h:inputText> , then it works fine. I've registered it as follows in faces-config.xml : <render-kit> <renderer> <component-family

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 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="#

Returning Multiple Images to JSF page

梦想与她 提交于 2020-01-14 03:49:09
问题 With this code, I am able to return one image based off of a dropdown selection. Any ideas on how to return multiple images (I have attempted to create an ArrayList with the images and use the UI:Repeat tag to render it back to my view, but I was unsuccessful. Here is my current code now, which works but only returns one image. Any ideas on what approach to take to get more than one image? Java Code: (Person class has attribute: private String theImage;) public String getTheImage(){ if(this

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

Redirect after Realm authentication on Glassfish

◇◆丶佛笑我妖孽 提交于 2020-01-14 01:42:49
问题 I'm currently running a JPA/EJB/JSF application on Glassfish and using the security JDBC realm for authentication. The realm works pretty well, fulfilling the requirements, until the customer asked for a small change on the navigation. Today, if you try to access a protected page, the authentication mechanism will redirect you to a login page specified in the web.xml. Perfect! Once the authentication is successful, you are redirected back to the page you were trying to access. Fair enough.

Apache in front of JSF

帅比萌擦擦* 提交于 2020-01-13 20:41:27
问题 In Jboss AS 7: Putting Apache in front of Jboss with this works fine: ProxyPass / http://localhost:8080 ProxyPassReverse / http://localhost:8080 So app is accessed by domain.com/app . Problem appears when aiming for a clearer URL(Just domain.com ): ProxyPass / http://localhost:8080/app ProxyPassReverse / http://localhost:8080/app All javax.faces.resource are not delivered in the second case, because they don't use the war context URL. Any idea how to get the faces resources in the second case

“PWC3999: Cannot create a session after the response has been committed” [duplicate]

烂漫一生 提交于 2020-01-13 15:31:48
问题 This question already has answers here : Adding <h:form> causes java.lang.IllegalStateException: Cannot create a session after the response has been committed (5 answers) Closed 3 years ago . I'm having this weird problem with one of the pages of my application. It's throwing the error I mention on the title: PWC3999: Cannot create a session after the response has been committed I've checked other posts regarding this subject, but I don't see anything that applies to this situation, because