composite-component

Components are with the same id inside ui:repeat

假装没事ソ 提交于 2019-12-29 07:53:04
问题 Unfortunately, primefaces accordionPanel doesn't works well in version 2.2.1 if you are trying to create tabs dynamically. This is my case, I need to create accordions if the user clicks an add icon, and remove if he clicks on x icon. No problem, I've created my own composite component, like you can see here: <c:interface> <c:attribute name="titulo" default="" required="false" /> <c:attribute name="renderizar" default="true" required="false" /> <c:attribute name="width" required="false"

How to prevent multiple composite components reset themselves on a JSF page?

南笙酒味 提交于 2019-12-29 07:09:11
问题 I put this problem in a simple example, a composite component that calculates the sum of 2 inputs and prints the result in an outputText Main JSF page: <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ez="http://java.sun.com/jsf/composite/ezcomp/"> <h:head></h:head> <h:body> <ez:Calculator /> <br/> <br/> <ez:Calculator /> <br/> <br/> <ez:Calculator /> </h:body> </html> Composite component XHTML: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/

Can I nest a composite component in itself recursively?

回眸只為那壹抹淺笑 提交于 2019-12-25 17:03:10
问题 I have DTO which contains itself (it is nested). public class MyDTO { private SomeData someData; private MyDTO nested; // getters and setters } I created composite component, which is calls itself recursively. I call it like this: <screen:my-dto-screen dto="#{myDTOBean.myDto}" /> The definition is: <composite:interface> <composite:attribute name="dto"/> </composite:interface> -- display "someData" here -- <p:panel rendered="#{cc.attrs.dto.nested != null}" /> -- this acts as recursion bottom -

Composite component with navigation using managed bean

允我心安 提交于 2019-12-25 03:28:08
问题 I created a composite component that receives a managed bean as a parameter. The composite has a submit h:commandButton that runs a method from the managed bean parameter ( #cc.attrs.mBean.action} ; signature: String action() ). Knowing about the use of the target attribute in composite:implementation if I were using a method-signature instead of a bean action: is there a way to achieve a similar behavior when using a bean method? Other reads: Unable to find matching navigation case from

Accessing JSF nested composite component elements in JavaScript

梦想与她 提交于 2019-12-24 13:52:57
问题 I am trying to DRY up popup windows in my JSF 2 project using composite components. This code base uses Icefaces 3.3.0 (with their 1.8.2 compatibility layer for historical reasons), Mojarra 2.2.7, and Glassfish 4.1. I have input.xhtml which provides a text input and uses a 2-button popup (ok/cancel), which in turn builds on the basic popup. input.xhtml: <composite:interface> <!-- ... --> <composite:editableValueHolder name="forInput" targets="theInput"/> </composite:interface> <composite

Ajax call to toggle a composite component boolean variable seems to work only once

戏子无情 提交于 2019-12-24 11:31:57
问题 I have a pretty simple composite component which toggles back and forth between two images when it is clicked. When I click it the first time, it works fine. Every time after that, nothing happens. The "toggleSingleSelect" is called, but the panel itself is not re-rendered. singleMultiSelectText.xhtml: <cc:interface componentType="singleMultiSelect"> </cc:interface> <cc:implementation> <h:panelGroup id="singleMultiSelectPanel" styleClass="field" layout="block"> <h:commandButton styleClass=

How to recognize Java Server Faces 2.0 composite components when using ajax?

痴心易碎 提交于 2019-12-24 07:59:31
问题 I have the following Java Server Faces 2.0 composite component. Notice i am using verbatim resources/customer/customer.xhtml <composite:interface> <composite:attribute name="id" required="false"/> <composite:attribute name="firstName" required="false"/> <composite:attribute name="lastName" required="false"/> <composite:attribute name="age" required="false"/> <composite:attribute name="rendered" required="false"/> </composite:interface> <composite:implementation> <f:verbatim id="#{cc.attrs.id}

JSF2 composite cc.attrs expression does not evaluate action parameters correctly

蹲街弑〆低调 提交于 2019-12-23 19:11:59
问题 I have a JSF composite component which is a list of email addresses that can be dynamically added to, and deleted from: <composite:interface shortDescription="Display party email addresses"> <composite:attribute name="addressable" required="true"/> </composite:interface> <composite:implementation> <h:panelGroup layout="block" id="emails"> <h:dataTable id="emailList" value="#{cc.attrs.addressable.emailAddresses}" var="email" styleClass="data-list small-list" cellpadding="0" cellspacing="0"> <h

Can't access javascript file in jsf component

二次信任 提交于 2019-12-23 16:43:21
问题 I have a jsf component that must access to a javascript file, i added this whith outputScript as in the code bellow, I get an error in the generated html, and the javascript can't be reached. The javascript file is located in document_root/js directory How can i resolve this problem, thank you for your help. <!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/xhtml" xmlns:h="http://java

Managed Bean as Facelet parameter lets composite component prevent resolving

荒凉一梦 提交于 2019-12-23 10:55:19
问题 In the given case, I want to use a facelet with different ManagedBeans, so the regarding action-bean is given as an parameter: <?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/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" > <h:body> <ui:include src="ratings.xhtml" > <ui:param name="createAction" value="