facelets

JSF : dynamically loaded page commandButton not working

Deadly 提交于 2019-12-06 08:18:57
I have a page that contains a PrimeFaces accordion panel, in each panel is a PrimeFaces datatable. Below the datatable is a button "Add study" for example and when this button is click I want to dynamically load a page into a <h:panelGroup> using a <ui:include> . When the button is being click I want to dynamically change the src value from the <ui:include> so that my page is loaded in the <h:panelGroup> . Now the problem is the following: My managed bean is set to @RequestScoped and when I click on my button nothing is being rendered. If I set my managed bean to @SessionScoped the <h

JSf tags not being rendered [duplicate]

萝らか妹 提交于 2019-12-06 08:09:41
问题 This question already has an answer here : JSF returns blank/unparsed page with plain/raw XHTML/XML/EL source instead of rendered HTML output (1 answer) Closed 2 years ago . this is a question i've seen here but the solution posted didn't resolve my issue. Again i'm dealing with jsf 2.0 and i have 2 pages: login.xhtml and index.xhtml, i'm also using SpringSecurity for auth purposes. index.xhtml renders ok but login doesn't(page source shows jsf tags un-parsed). I already deactivated

Using EL in attribute of composite component

醉酒当歌 提交于 2019-12-06 06:32:35
My JSF custom component code: <composite:interface name="translation"> <composite:attribute name="fieldName"/> <composite:attribute name="required" default="true" /> </composite:interface> <composite:implementation> <h:inputText required="#{cc.attrs.required}" requiredMessage="Please enter #{cc.attrs.fieldName} in english"/> </composite:implementation> This works fine if I specify the required attribute as follows: <comp:translation fieldName="myTranslation" required="true" /> But does not work if I give EL in required attribute of my composite component: <comp:translation fieldName=

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

蓝咒 提交于 2019-12-05 22:13:42
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 no new Servlet/Filter was added to the application and the error just started after some minor changes

Access raw expression of ValueExpression attribute to taglib component

倖福魔咒の 提交于 2019-12-05 21:49:31
Can I access the expression string of a ValueExpression passed as attribute value to my taglib component? My goal is to programmatically derive missing attribute values from it. In this case I'm trying to avoid having to repeat an attribute as a literal. now: <a:columnText title="name" value="#{entity.name}" sortBy="entity.name" /> desired: <a:columnText title="name" value="#{entity.name}" /> -taglib.xml <tag> <tag-name>columnText</tag-name> <source>column-text.xhtml</source> <attribute> <name>value</name> <required>true</required> </attribute> <attribute> <name>title</name> <required>false<

Quick way to create JSF custom component

眉间皱痕 提交于 2019-12-05 21:08:17
I know of two ways of creating custom JSF components: 1. Native JSF way: creating JSF component class, tag, etc. 2. Facelets way: defining component in a xhtml file and then creating appropriate decrption in facelets taglib. Currently I work on a project in which introducing facelets is unfortunately out of the question. On the other hand, creating custom components the standard JSF way seems like a pain in the ass. Is there maybe a third party library that allows creating custom components in the way similar to facelets but doesn't entail the need of using non-standard renderer? You can do a

PrimeFaces Dialog + appendToBody=true not working

谁说胖子不能爱 提交于 2019-12-05 18:58:07
I'm using PF 3.5 and JSF Mojarra 2.1. I have a dialog which I want to use appendToBody=true. This usually results in "unpredictable behavior" though. Basically what the dialog does is, when I choose an entry (a persn entity) from a datatable, it gives me filled up input boxes which I can edit, thus editing the particular entry (person details). Sometimes the input boxes get filled up properly with the entries data. Sometimes they dont. This behavior does not happen with appendToBody=false. Aside from that I'm pretty sure there are no nested forms. As you will notice I am trying out a "One page

Tags from http://xmlns.jcp.org namespace do not render, while http://java.sun.com/jsf work fine

妖精的绣舞 提交于 2019-12-05 18:16:15
I have this: <html xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://java.sun.com/jsf/html" > <h:selectOneRadio> <f:selectItem value="1" itemValue="1" itemLabel="123"/> <f:selectItem value="2" itemValue="2" itemLabel="321"/> </h:selectOneRadio> And I get this: <f:selectItem value="1" itemValue="1" itemLabel="123"></f:selectItem> <f:selectItem value="2" itemValue="2" itemLabel="321"></f:selectItem> <select name="j_idt5" size="1"></select> Why are xmlns:f="http://xmlns.jcp.org/jsf/core" tags not rendered? I'm using JBoss AS 7 on Netbeans 7.3. BalusC The new XML namespace domain http:/

includeViewParams=true doesn't work in templated pages

僤鯓⒐⒋嵵緔 提交于 2019-12-05 17:43:36
Consider this template: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <f:view contentType="text/html"> <ui:insert name="metadata"/> <h:head> <title></title> </h:head> <h:body> <ui:insert name="content"/> </h:body> </f:view> </html> this page that uses it (/pages/test.xhtml): <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <f:view contentType=

primefaces fileupload invalid file type doc, docx

不打扰是莪最后的温柔 提交于 2019-12-05 15:38:26
问题 I want to upload doc or docx file using primefaces fileUpload,although I specify the type of file it display Invalid file type <p:fileUpload cancelLabel="#{contenu.annuler}" fileUploadListener="#{utilAdminBean.fileUpload}" allowTypes="/(\.|\/)(doc|docx)$/" multiple="false" mode="advanced" sizeLimit="52428800" showButtons="false" /> 回答1: I found the solution,I forgot to add to the fileupload component inside <h:form nctype="multipart/form-data"> functional code is as follows: <h:form id=