facelets

Migrating from facelets 1.1 to faclets 2.0 - FaceletViewHandler

て烟熏妆下的殇ゞ 提交于 2019-12-04 05:47:38
I have read the following post which was very helpful Migrating from JSF 1.2 to JSF 2.0 but I am having a problem with the migration as I have a custom view handler which extends from FaceletViewHandler - this is not part of faclets 2. I am migrating on JBoss 4.2.2 the following: - JSF 1.2 to JSF 2.0 I also want to migrate the faclets - which i have a problem described above. In my application, I am also using Tomahawk - is there any problem with this migration? Thanks in advance. Elico. Right, you need to replace FaceletViewHandler by ViewHandlerWrapper . So the following basic

Dynamic ui:include inside ui:repeat. Is there a simple solution?

混江龙づ霸主 提交于 2019-12-04 05:43:52
I want to dynamically pick a facelet to render some item in my data list. The first try would be: <ui:repeat value="#{panels}" var="panel"> <ui:include src="#{panel.facelet}"> </ui:repeat> But it won't work since src of ui:include is evaluated too early. The facelet information is truly dynamic, so I cannot use c:forEach (not really recommended to mix with facelets either). I guess it all boils down to finding a component based ui:include alternative. Is there such thing or I need to write my own? c:forEach will solve it, why can't you use it? Interesting article regarding that issue: http:/

Cell edit in primefaces is not updating the value

♀尐吖头ヾ 提交于 2019-12-04 05:21:24
问题 I have a datatable in my primefaces application . The code for the frontend has <!-- Start of customer datatable --> <p:dataTable var="customer" value="#{customerBean.customers}" paginator="true" selection="#{customerBean.selectedCustomer}" selectionMode="single" onRowSelectUpdate=":custList" onRowSelectComplete="custTab.show()" id="custList" widgetVar="custList" update=":custList"> <f:facet name="header"> List of Customers <p:outputPanel> <p:commandButton value="+" type="button" onclick=

How can I use '<' in the value attribute of a component [duplicate]

一世执手 提交于 2019-12-04 05:07:09
问题 This question already has an answer here : How to insert special characters like & and < into JSF components' value attribute? (1 answer) Closed 2 years ago . When I try to name my a4j:commandButton by the value << Like that <a4j:commandButton id="myButton" value="<<" render="myGrid" styleClass="style_btn" disabled="false" /> There is an error occure My debugging trace Error Traced[line: 88] The value of attribute "value" associated with an element type "null" must not contain the '<'

Facelet tag parameter not recognized by PrimeFaces p:ajax

谁说胖子不能爱 提交于 2019-12-04 03:34:50
I have a simple Facelet tag: <ui:composition> <ui:insert /> </ui:composition> which is used in order to avoid declaring multiple c:set tags. Let's say I registered it in the facelets taglib library with the name view , and use it like this: <my:view bean="#{myController}"> <p:inputText value="#{bean.value}> <p:ajax event="blur" process="@this" listener="#{bean.handleValueChanged}" /> </p:inputText> </my:view> The attribute value is perfectly resolved by p:inputText , but p:ajax throws this: Target Unreachable, identifier 'bean' resolved to null javax.el.PropertyNotFoundException: Target

primefaces fileupload invalid file type doc, docx

混江龙づ霸主 提交于 2019-12-04 02:33:12
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" /> 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="formcontract" enctype="multipart/form-data" dir="rtl"> <p:fileUpload cancelLabel="#{contenu.annuler}"

Class org.springframework.web.jsf.el.SpringBeanFacesELResolver must extend the type javax.el.ELResolver

风流意气都作罢 提交于 2019-12-04 02:31:22
I am trying to integrate Spring into a JSF application. In faces-config.xml , I have included this: <application> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> but it shows a weird warning which I can't get rid of: Class org.springframework.web.jsf.el.SpringBeanFacesELResolver must extend the type javax.el.ELResolver Any ideas? From the spring documentation , you will see that for org.springframework.web.jsf.el.SpringBeanFacesELResolver: delegates to the Spring's 'business

Setting ui:param conditionally

社会主义新天地 提交于 2019-12-04 00:42:18
问题 I want to set a ui:param depending on a bean value and I thought using c:if was a good idea. So I put in my page the following code: <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.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:wai="http://www.id.ethz.ch/wai/jsf" template="/view/listView.xhtml"> <c:if test="#{subscriptionListController.model.listViewName eq

Ecplise autocomplete primefaces tags [duplicate]

时光毁灭记忆、已成空白 提交于 2019-12-04 00:32:44
问题 This question already has an answer here : EL proposals / autocomplete / code assist in Facelets with Eclipse (1 answer) Closed 3 years ago . I am using Eclipse to work with PrimeFaces like this: <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.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui" template="/template/ui.xhtml"> I saw Bozho question and answer. So it works for me

Difference between ui:composition and ui:decorate in Facelets

不羁的心 提交于 2019-12-03 23:32:35
What are the differences between ui:composition and ui:decorate in Facelets ? Both seem to support ui:define as child tags . In what cases would you use each of these ? BalusC Anything outside <ui:composition> tag is disregarded. This isn't true for <ui:decorate> , which is thus beneficial as "template-in-template". How that makes sense can maybe be better understood by looking at some real world examples in the below answers: What is the real conceptual difference between ui:decorate and ui:include? Is it possible to use template with composite component in JSF 2? Is there a way to run a JSF