composite-component

JSF Combine ui:param with composite component

我们两清 提交于 2019-12-04 10:53:36
you have saved me many times ago with this forum, but now I am really stuck and don't now where to search any longer... I always get the following error message (warning level, but method is also not executed correctly): javax.el.PropertyNotFoundException: Target Unreachable, identifier 'editor' resolved to null: javax.faces.FacesException: #{cc.attrs.selectionListener} I have isolated the problem to a few lines of code: This is my main file: <c:forEach items="#{myBean.getEditors()}" var="currentEditor" > <ui:include src="#{currentEditor.getPanel()} > <ui:param name="editor" value="#

How do I pass an attribute from composite component to backing bean by using backing component?

亡梦爱人 提交于 2019-12-04 04:55:56
I have the following code in my facelet page: <hc:rangeChooser1 id="range_chooser" from="#{testBean.from}" to="#{testBean.to}" listener="#{testBean.update}" text="#{testBean.text}"> <f:ajax event="rangeSelected" execute="@this" listener="#{testBean.update}" render=":form:growl range_chooser"/> </hc:rangeChooser1> This is my composite component: <ui:component xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:cc="http://java.sun.com/jsf/composite" xmlns:p="http://primefaces.org/ui">

Inheriting component attributes in a composite component which extends an existing JSF component

可紊 提交于 2019-12-04 03:38:30
问题 I wish to extend the following element: <h:commandButton action="#{menuController.xyz}" value="xyz" image="images/buttons/xyz.png" alt="xyz".....[more attributes]..../> to include code to produce a depressed button: <h:commandButton action="#{menuController.xyz}" value="xyz" image="images/buttons/xyz.png" alt="xyz" onmousedown="[some JS here to change image src]" .....[more attributes]..../> I understand the neatest way to do this is with a JSF component? So I created the following: <!DOCTYPE

JSF cross field validation via postValidate without looking up components by name in backing bean

假装没事ソ 提交于 2019-12-04 01:58:23
问题 I'm building a login form composite component. The page that uses it will pass an event handler that will validate the username and password. Usually (not using composite components) when we perform cross field validation via postValidate , the event handler has to lookup the fields' components by name. It would be preferable for the validator not to do this, because these are inner details of the component that should be abstracted. Any idea how I might get the converted values of the

JSF Iterative composite component with customizable content

霸气de小男生 提交于 2019-12-03 20:50:32
I want to create a composite component where to acutal layout of of iterating elements can be passed to the composite. This is a simplified example and works: <composite:interface> <composite:attribute name="value"/> </composite:interface> <composite:implementation> <ul> <c:forEach var="i" items="#{cc.attrs.value}"> <li> <h:outputText value="Test #{i.name}"/> </li> </c:forEach> </ul> But I don't want the h:outputText to be hardcoded in the component. When using the component I'm trying to have something like this: <my:list var="user" value="#{myBean.userList}"> <h:outputText value="Test #{user

JSF leaking memory through EL and composite components

拥有回忆 提交于 2019-12-03 13:13:14
Note: I'm using mojarra 2.1.20 and rich faces 4.2.2. I've analyzed a heapdump and I've noticed that EL expressions reside in LRUMap in the session. Does anyone know why and what to do to avoid it? The problem I have is related to a composite component containing following line: <rich:select ... valueChangeListener="#{cc.listValuesChangeListener}" with backing bean my.package.MultiComboSelection. Obviously my.package.MultiComboSelection has a method defined named listValuesChangeListener. The problem I see is that LRUMap contains ContextualCompositeMethodExpression (representation of the

Packaging composite component in JSF2 with Netbeans 7.0.1, Maven

爷,独闯天下 提交于 2019-12-03 08:54:29
I've read a lot of things on the Internet about packaging JSF2 composite component in a JAR file. Does somebody know where I can find what MUST be the structure of JAR (specs, official doc, etc, ). Is there a way to do it with Netbeans IDE, or does an archetype exist for Maven ? From the JSF composite tag library documentation summary (emphasis mine): Creating a Composite Component The default implementation must support authoring. A composite component is declared by creating a Facelets2 file inside of a resource library. ( See section JSF.2.6 of the specification prose document for more

Whats the difference between JSF Custom Composite Components vs Custom Classic Components

若如初见. 提交于 2019-12-03 07:54:01
问题 i want to build a custom JSF Component. Now i read some docs from oracle and saw a few code Examples. The problem is i am a bit confused: It seems there are two ways to build a custom component with JSF 2.0+. As far as i understood since JSF 2.0 i can use these Composite Components to build my own component. But do they have any disadvantages compared to the "Classical" Component ? My Component will be rather complex do i loose anything (beside downwards compability) when i use Compisite

Obtaining the clientId of the parent of a JSF2 composite component

梦想与她 提交于 2019-12-02 09:26:29
问题 I've got the following code: <h:dataTable id="dt" value="#{somelist}" var="entry"> <h:column> #{entry.title} </h:column> <h:column> <h:commandLink id="lnk"> <mycomp:doSomething id="dummy" /> </h:commandLink> </h:column> </h:dataTable> My composite component (mycomp:doSomething) looks like this: <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999

UI Repeat varStatus not working in CompositeComponent

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 06:52:17
问题 I use JSF 2.0 (Apache myFaces) on WebSphere Application Server 8. I have a bean which contains a list of charts (data for jquery HighCharts). For each chart I need some JSF components + one Highchart Wrapper written as CompositeCompoent (look here) So I use the ui:repeat function of jsf 2 like this: <?xml version="1.0" encoding="UTF-8" ?> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java