composite-component

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:

Getting JSF-defined component with Javascript

微笑、不失礼 提交于 2019-12-08 04:13:03
问题 I'm creating an interface using JSF, and I'd like the value of one text field to provide the default for a second if the second hasn't yet been set. The crucial code will look something like this: <h:outputScript> function suggestValue2() { var value2 = document.getElementById('value2').value; if (value2 == "") { document.getElementById('value2').value = document.getElementById('value1').value; } } </h:outputScript> <h:inputText id="value1" onblur="suggestValue2();" /> <h:inputText id="value2

Using EL in attribute of composite component

痴心易碎 提交于 2019-12-08 03:52:43
问题 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

Unable to find matching navigation case from composite component

限于喜欢 提交于 2019-12-08 03:09:56
问题 I have a composite component button and the action is coming from an attribute. <comp:interface> <comp:attribute name="buttonId" required="false"/> <comp:attribute name="action" required="false" method-signature="java.lang.String action()"/> <comp:attribute name="alt"/> <comp:attribute name="value" /> <comp:attribute name="immediate"/> </comp:interface> <comp:implementation> <h:commandButton alt="#{cc.attrs.alt}" action="#{cc.attrs.action}" value="#{cc.attrs.value}" id="#{cc.attrs.buttonId}"

validator method not work in the JSF custom composite components

十年热恋 提交于 2019-12-08 03:02:27
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: validator="#{testValidator.validator}": The class 'TestValidator' does not have the property

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

萝らか妹 提交于 2019-12-08 02:06:16
问题 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

工具导航Map