facelets

f:param to composite components

元气小坏坏 提交于 2019-12-11 03:48:39
问题 In JSF2.1 composite component if we try to pass f:param to a composite component (command button) and recieve in the component as editableValueHolder ,It doesn't seems to be working, Any ideas? <mycomp id="button" outcome="newpage" > <f:param name="foo" outcome="bar" for="button"/> </mycomp> compositeComponent.... <cc:interface> <cc:attribute name="action" targets="commandLink" required="true" /> </cc:interface> <cc:implementation> <h:commandLink id="commandLink" action="#{cc.attrs.action}">

JSF error message and program stuck. JSON parsing error and primefaces

空扰寡人 提交于 2019-12-11 03:34:26
问题 I have the following form in facelets: <h:form styleClass="registrationForm"> <h:panelGrid columns="3" cellpadding="5" style="width:600px"> <h:outputLabel for="registerLogin" styleClass="registerLabel" value="Логин: " /> <p:inputText id="registerLogin" styleClass="registerText" value="#{register.login}" required="true" requiredMessage="Введите Логин" /> <h:panelGrid width="200"> <p:message for="registerLogin" /> </h:panelGrid> <h:outputLabel for="registrationPassword" styleClass=

How to use Facelets' ui:repeat tag in JSP?

孤者浪人 提交于 2019-12-11 03:33:29
问题 I am using JSF 2.0 on JSP 2.1. Is there any possibility to use Facelets' <ui:repeat> tag in JSP files? I have imported the Facelets taglib in JSP as <%@ taglib uri="http://java.sun.com/jsf/facelets" prefix="ui"%> But it is not identifying the taglib ui.taglib.xml that comes with jsf-impl.jar and gives an error in render time as org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/facelets cannot be resolved in either web.xml or the jar files deployed with this

TagException … null (File not found) on creating custom Facelets tag [duplicate]

青春壹個敷衍的年華 提交于 2019-12-11 03:28:34
问题 This question already has an answer here : FileNotFoundException when using Facelets tagfile (1 answer) Closed 5 years ago . I am creating an application based on JSF 2.2 (Mojarra). I am using a Java EE EAR project and a Dynamic Web project generated by Eclipse, and the Glassfish server. I created a Facelet tag file as shown in https://stackoverflow.com/a/5716633/2266635 . When I load a page containing the tag I get this error (and a HTTP 500 error): 2014-03-24T00:32:10.904+0100|WARNING:

Getting the co-ordinates of a component

懵懂的女人 提交于 2019-12-11 03:17:16
问题 How to get the co-ordinates of a JSF component after onclick event ? I need to place an overlay just below an icon that was clicked. Is there any such in-built facility provided by JSF rather than manually writing a javascript function for that ? 回答1: In addition to BalusC's answer, here is an example, where a click on a component with id=placeholder (maybe a link or button) will open another component ( id=menu ) directly below the triggering component. If the mouse is moved away from the

setPropertyActionListeners to composite component

故事扮演 提交于 2019-12-11 02:56:07
问题 I need to create composite component containing two h:commandLinks. And i want to pass f:setPropertyActionListeners from the client-code to be applied to both two commandLinks. Is this ever possible? I tried to use cc:insertChildren, but appropriate setters are not being fired. <my:operationLink action="#{cc.attrs.bean.myAction}"> <f:setPropertyActionListener for="<!-- whats here? -->" value="#{cc.attrs.someAttrOne}" target="#{cc.attrs.bean.someAttrTargetOne}"/> <f:setPropertyActionListener

Default output when h:message is empty

喜你入骨 提交于 2019-12-11 02:28:55
问题 I'm looking for a way to achieve the following switch in JSF: ... <div> if empty(<h:message for="x">) <h:outputText value="default value" /> else <h:message for="x" /> endif </div> .... Any ideas? 回答1: This is doable with a little help of a PhaseListener. Here's how the view look like, not shocking, just a <f:ajax> on every input component which hooks on blur event and thus immediately re-renders the message component when the input field loses focus. <!DOCTYPE html> <html lang="en" xmlns:f=

p: dialog is not working as expected?

末鹿安然 提交于 2019-12-11 01:46:55
问题 i have two p:commandLink: <p:commandLink update=":form:livreDetail" oncomplete="PF('livreDialog').show()" title="View Detail"> <h:outputText styleClass="ui-icon ui-icon-search" style="margin:0 auto;" /> <f:setPropertyActionListener value="#{livre}" target="#{livreDataGridView.selectedLivre}" /> </p:commandLink> <p:commandLink update=":form:ajoutPanel" oncomplete="if(#{ empty loginBean.c }){PF('connectDialog').show()}else {PF('ajoutLivrePanier').show()} " title="ajouter au panier"> <h

How can I access the content of something created with <ui:define> programmatically?

梦想的初衷 提交于 2019-12-11 01:45:40
问题 Where in the contexts can I find the information for something built with a <ui:define> ? I want to access a page title that has been defined with <ui:define name="title">Some title</ui:define> in my bean. To illustrate my question, I can access a variable defined with <ui:param name="myVariable" value="This is my variable!"/> by looking at the variable mapper in the EL context, like this VariableMapper variableMapper = elContext.getVariableMapper(); String myVariable = variableMapper

RichFaces 4 autocomplete is not showing suggestions

心不动则不痛 提交于 2019-12-11 01:33:28
问题 I am trying for too long to make an autocomplete custom suggestion demo. The demo is partially working as I can see the suggestions response in f12 debugger, but it is not showing in the drop down box. I am doing the following POM: <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <org.richfaces.version>4.3.3.Final</org.richfaces.version> </properties> <repositories> <repository> <id>org