composite-component

Getting same instance of `componentType` in composite component on every use

[亡魂溺海] 提交于 2019-12-06 12:56:41
Hi Have this Wierd Issue in which I am using a Composite Component which I wrote and I get values from the previous use of the backing bean of the CC (the componentType bean) I don't know how to describe this better than just show the code. I'll try to be brief about it and cut the redundant parts: This is the Composite Component definition: <cc:interface componentType="dynamicFieldGroupList"> <cc:attribute name="coupletClass" /> <cc:attribute name="form" default="@form"/> <cc:attribute name="list" type="java.util.List" required="true"/> <cc:attribute name="fieldNames" type="java.util.List"

Use an EL expression to pass a component ID to a composite component in JSF

不问归期 提交于 2019-12-06 12:27:22
Problem: I am passing an EL expression to a composite component, but the EL expression is being evaluated from inside the composite component, rather than before. The intention being that the EL expression evaluates to a string with is sent to the composite component. I have a composite component, MenuTable : <cc:interface> <cc:attribute name="model" type="nz.co.tradeintel.web.MenuTable"/> <cc.attribute name="updateId" /> </cc:interface> <cc:implementation> <h:panelGroup id="menuTable"> <table> <ui:repeat id="repeat1" value="#{cc.attrs.model.rows}" var="row"> <tr> <ui:repeat id="repeat2" value

Script is not rendered after postback in a composite component added programmatically

柔情痞子 提交于 2019-12-06 11:14:24
I have this composite component: inputMask.xhtml <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://xmlns.jcp.org/jsf/composite" xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"> <composite:interface> <composite:attribute name="value" /> <composite:attribute name="mask" type="java.lang.String" required="true" /> <composite:attribute name="converterId" type="java.lang.String" default="br.edu.ufca.eventos.visao.inputmask.inputMask" /> </composite:interface> <composite:implementation> <h

How to create a composite component which switches between inputText and inputSecret?

╄→гoц情女王★ 提交于 2019-12-06 09:55:19
问题 I'm writing a Facelets composite component that switches between using inputText and inputSecret based on a parameter: <composite:interface> <composite:attribute name="myId" required="true"/> <composite:attribute name="secret" required="false" default="false" /> </composite:interface> <composite:implementation> <h:inputSecret rendered="#{cc.attrs.secret}" id="#{cc.attrs.myId}" /> <h:inputText rendered="#{!cc.attrs.secret}" id="#{cc.attrs.myId}" /> </composite:implementation> The problem is

Should a composite component really require namingcontainer interface?

为君一笑 提交于 2019-12-06 09:28:05
I want to create a composite componet that can iterate with others. The problem is that composite componet is a namingcontainer and a simple selectOnMenu change and refresh other selectOnMenu do not is possible because "id" given to selectOnMenu is combo1:combo and can't see combo2:combo . The best situation would be form1:combo1 and form1:combo2 , then, combo1 and combo2 uses uinamingcontainer of h:form . This link talks about this but no solution. https://cwiki.apache.org/MYFACES/create-a-non-namingcontainer-composite-component.html Another try but don't works. p:commandbutton can't see id

Thymeleaf composite components

你离开我真会死。 提交于 2019-12-06 07:09:16
Is there any way of making composite components (like in JSF) using Thymeleaf? I found out how to send parameters to fragments that can be retrieved using the expression language. But I haven't figured out how to send markup to fragments like you can in JSF. For example, I have several pages that have very similar menus on the left. I would like to be able to use a single fragment on all my pages, but passing some markup to be displayed at the bottom of the menu. Some pages have to display text at the bottom, some have to display text, for example, it's actually more complicated than that.

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=

JSF Combine ui:param with composite component

这一生的挚爱 提交于 2019-12-06 05:50:40
问题 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=

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

☆樱花仙子☆ 提交于 2019-12-06 01:01:02
问题 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

Adding composite component programmatically

元气小坏坏 提交于 2019-12-06 00:14:23
I would like to include below composite component programmatically: <composite:interface> <composite:attribute name="sampleBean" /> <composite:attribute name="autoCompleteMethod" method-signature="java.util.List autoCompleteMethod(java.lang.String)" /> </composite:interface> In Omnifaces , there is a function: // Programmatically include composite component. Components.includeCompositeComponent(someParentComponent, libraryName, resourceName, id); However, it isn't clear to me how to specify the autoCompleteMethod in the obtained UIComponent instance. How can I achieve this? The