composite-component

Validation/conversion for two component based composite in JSF

不羁的心 提交于 2019-12-10 15:54:28
问题 I'm developing a JSF web application where I need to use periodicities as data structure. Here there are the Java classes I work with: public class Periodicity implements Serializable { private Integer value = 0; private PeriodicityType type; //Getter and setters } public enum PeriodicityType { DAY, WEEK, MONTH, YEAR } That way I can specify different periodicities for my tasks, which can combine values with PeriodicityType . I also have created an input composite element called

JSF composite:attribute with f:attribute conversion error

旧时模样 提交于 2019-12-10 15:45:34
问题 I'm implementing a JSF component and need to conditionally add some attributes. This question is similar to a previous JSF: p:dataTable with f:attribute results in "argument type mismatch" error, but with a completely different error message, so I raised a new question. <composite:interface> <composite:attribute name="filter" required="false" default="false" type="java.lang.Boolean"/> <composite:attribute name="rows" required="false" default="15" type="java.lang.Integer"/> ... </composite

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

寵の児 提交于 2019-12-10 10:32:39
问题 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">

Adding composite component programmatically

时光总嘲笑我的痴心妄想 提交于 2019-12-10 10:08:44
问题 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

<f:ajax render> not working via <composite:clientBehavior>

徘徊边缘 提交于 2019-12-10 08:31:28
问题 I have a composite component which has ajax: <composite:interface> <composite:attribute name="question" required="true"/> <composite:attribute name="value" required="false"/> <composite:attribute name="id" required="true" /> <composite:clientBehavior name="alter" event="change" targets="input"/> </composite:interface> <composite:implementation> <label for="#{cc.attrs.id}"> <h:outputText value="#{cc.attrs.question}" /> </label> <div class="fld"> <h:selectOneRadio value="#{cc.attrs.value}" id=

Packaging composite component in JSF2 with Netbeans 7.0.1, Maven

浪尽此生 提交于 2019-12-09 07:05:17
问题 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 ? 回答1: 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

JSF Composite component <f:ajax> contains an unknown id - cannot locate it in the context of the component

孤人 提交于 2019-12-08 17:11:27
问题 I'm trying to update a parent component from a composite component event using f:ajax . The composite component is here: <cc:interface> <cc:attribute name="update" /> <cc:attribute name="customid" required="true"/> <cc:attribute name="val" required="true"/> <cc:attribute name="selectedvalue" required="true"/> </cc:interface> <cc:implementation> <h:panelGrid columns="2" style="font-size: 10px" > <p:selectOneMenu id="#{cc.attrs.customid} value="#{cc.attrs.selectedvalue}"> <f:selectItems value="

Composite components & ID

萝らか妹 提交于 2019-12-08 17:01:13
问题 I want to implement some javas cript into my JSF composite component, but I have problem with id. My java script with: document.getElementById("myForm:customerId") does not work, because the id is wrong. I have JSF composite component: <composite:implementation> <div id="element_customer"> <h2 class="element_title">Customer</h2> <h:form id="myForm"> <h:inputText id="customerId" value="#{cc.attrs.customerId}"/> </h:form> </div> </composite:implementation> and HTML output is: <div id="element

Duplicate ID error with updated Mojarra 2.1.27

*爱你&永不变心* 提交于 2019-12-08 07:40:48
问题 I will give some context first before describing the issue I'm experiencing. The environment is JSF, Primefaces 3.5 and GlassFish 3.1.2.2. I am working on an application used for editing data. The data is split between several forms, each form being in a tabView's tab. The data model is very rich, and in some cases there are several nested tabViews. To ease development, the application has one composite component describing a form field. It groups the field's label, input, tooltips and other

validator method not work in the JSF custom composite components

自闭症网瘾萝莉.ら 提交于 2019-12-08 05:18:53
问题 JSF custom composite components input.xhtml <cc:interface> <cc:attribute name="validator"/> </cc:interface> <cc:implementation> <h:inputText validator="#{cc.attrs.validator}"/> </cc:implementation> *.xhtml <l:input value = ... validator="#{testValidator.validator}"/> java code @ManagedBean public class TestValidator { public void validator(FacesContext context, UIComponent component, Object value) throws ValidatorException { System.out.println("Call validator"); } } PropertyNotFoundException: