JSF 2.0 composite component children

Hi ,
question is regarding how to get a composite component's children components. Once I get the list of children components I can iterate through them but how do I get that list? :
Is there any way using EL to retrieve a children list so I can iterate through it with:
<ul>
<ui:repeat value="#{Magic El expression}" var="children" >
&lt;li>
&lt;p> #{children.id} *&lt;/p>
&lt;/li>
</ui:repeat>
&lt;/ul>
&lt;div>
&lt;cc:insertChildren />
&lt;/div>
What I'm trying to do here is create a Tab composite component. Tabs are children components is there anyway i can iterate and fetch their attributes?
I want to implement it with composite component. There is a not working solution to that question here :
http://stackoverflow.com/questions/4999720/jsf-composite-component-childrens

All composite components are NamingContainers. This is necessary to prevent ID collisions.
In order to avoid a generated ID on a particulare composite component, specify an ID in the component
within the using page:
<h:form id="form">
    <components:myComponent id="c" />
</h:form>So the client ID of the text component would be: form:c:text.

Similar Messages

  • Best practice for JSF 2.0 composite component?

    Following the various tutorials and blog entries I have found, I have managed to implement a few composite components. I want to do a more complex one, but haven't found and example yet to follow and my own proficiency in programming model isn't sufficient for me to determine the best way to do it.
    What I would want to implement is something like the following example.
    .. xmlns:mc="http://java.syn.com/jsf/composite/myComponent" ..
    <mc:addTwo value="#{SomeBean.someProperty}" />The included component has two fields, which when the user inputs those the someProperty is set to some calculation of those two (for example adding them together). What I think I need to do is implement a backing bean for the "addTwo" component and do the calculation there. Then when that is done the composite backing bean needs to access the using page's SomeBean.someProperty setter. How is this done?
    My actual intent is to make a component that looks up an entity in a data base based on a number of user inputs, then set the "someProperty" property to that value. If I could do the above example then I think I can apply the same principle, which is to have the composite component's backing bean access the someProperty property in the using page's bean via a #{cc.attrs.xxx} type reference. Am I on the right track?

    this certainly seems like the place for JSF 2.0 discussions, yes.
    It seems so obvious, was this forum called something else when this was posted perhaps?

  • Sink Composite Component Event in Parent Page

    Hi All,
    I have a conceptual mind-block around the use of a JSF 2.0 composite component with a parent page. I understand how to implement an ActionListener (and others) for a composite component's action but how is this wired-up for the parental page to consume? For example, I want my login composite component to perform authentication and when complete, inform the parent page's backing bean through the ActionListener to do some UI initialization work. The key here is the login component would say, "Hey, I'm done and the user is good. Your turn."
    Thanks in advance for the assistance.
    Peace.
    Chris
    Edited by: user10773481 on Oct 26, 2010 8:43 PM

    Thanks for the feedback. However, online examples (i.e. http://www.ibm.com/developerworks/java/library/j-jsf2fu3/index.html) show actionlisteners performing the work versus a composite component action doing the work THEN informing parents that work is complete. It is the later scenario I am trying to implement. Are you suggesting using System or Application level events to notify the parent of the completion of a unit of work? Thanks again.
    Edited by: user10773481 on Oct 27, 2010 9:06 PM

  • Adding JSF 2 composite component at runtime from backing bean

    Hello,
    I try to add a custom composite component to a JSF page from a backing bean method in this way:
    +//-----------------------------------------------------------------------------------------------------+
    +public String addCC(){+
    +//create my comoposite component's istance+
    ccPageLoader = new CCPageLoader();
    +//set a property+
    ccPageLoader.setSrc("one.xhtml");
    +//get the object on the JSF page that must contains the comp.comp.+
    UIComponent c = this.findComponentInRoot("container");
    +//ADD THE COMPOSITE COMPONENT TO THE PAGE+
    c.getChildren().add(ccPageLoader);
    return null;
    +}+
    +//-----------------------------------------------------------------------------------------------------+
    Now, the method doesn't get errors, the beginEncode() method of the composite component is called, but I cannot see the composite component in the page...
    Instead, if a try to add a standard JSF component, using the same code, I can see the JSF component in the page.
    Any suggestion?
    Thank you, F. ...

    I removed all my assertions to see how far the submission could go when going unsane.
    I discovered that JSF attempts to redisplay my web page, and not to follow on the next one...
    ... so I have one explanation.
    Except that:
    There is no fields in the form that require a validation.
    (three hidden text fields, and a <h;inputTextarea> but that is not checked or mandatory).
    The form is not supposed to fail,
    and even if it had too, why the validation step doesn't carry the current managed bean at redisplay time, but instead re-create an empty managed bean?
    My form starts with a:
    <h:form id="${someId}"> where ${someId} is a scoped variable.
    Can it causes a problem during submission? Shall I use only a constant id for my form?
    What can you suggest me to do?
    Do I have a way to discover what JSF is about to complain against, before it tries to redisplay the page? I see nothing in my logs, but may be I shall redefine a log level somewhere, add one handler or something else?
    Regards,
    Grunt.

  • Using a composite component from an xhtml that is included in another xhtml

    JBoss 7.1.1
    JSF 2.1
    I have the following composite component:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <ui:component xmlns="http://www.w3.org/1999/xhtml"
            xmlns:h="http://java.sun.com/jsf/html"
            xmlns:composite="http://java.sun.com/jsf/composite"
            xmlns:f="http://java.sun.com/jsf/core"
            xmlns:ui="http://java.sun.com/jsf/facelets"
            xmlns:rich="http://richfaces.org/rich">
            <composite:interface>
                <composite:attribute name="for" required="true" />
            </composite:interface>
            <composite:implementation>
                <rich:panel styleClass="aas-msg-tt-p">
                    <rich:message id="#{cc.attrs.for}-msg"
                        for="#{cc.attrs.for}" />
                    <rich:tooltip id="#{cc.attrs.for}-msg-tt">
                        <rich:message for="#{cc.attrs.for}"
                            styleClass="aas-rf-det-tooltip" />
                    </rich:tooltip>
                </rich:panel>
            </composite:implementation>
    </ui:component>It is in WebContent/resources/aas-composite/messagetooltip.xhtml ( where WebContent is the root directory or root context directory of the deployed WAR )
    h3. *1. Using the composite component and working as expected*
    If I use the composite component directly as follows, it all works:
    1) Create test.xhtml in WebContent
    2) Content of test.xhtml as follows:
    <!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.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:aas="http://java.sun.com/jsf/composite/aas-composite">
    <h:head>
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
    </h:head>
    <h:body>
        <h:outputStylesheet library="css" name="richfacesoverrides.css"/>
        <h:form id="testform">
           <table>
                <tr>
                    <td><aas:messagetooltip for="id2"/></td>
                    <td><h:outputLabel>Input 2: </h:outputLabel></td>
                    <td><h:selectOneMenu id="id2"
                            required="true"
                            requiredMessage="Cause of Death is required"
                            value="${death.causeOfDeath}">
                           <f:selectItem itemValue="" itemLabel="-- Select One --" />
                           <f:selectItem itemValue="COD01" itemLabel="Cancer" />
                           <f:selectItem itemValue="COD02" itemLabel="Diabetes" />
                           <f:selectItem itemValue="COD11" itemLabel="Other" />
                        </h:selectOneMenu>
                    </td>
                </tr>
           </table>
           <h:commandButton id="submit" value="Submit"/><br/>
    </h:form>
    </h:body>
    </html>3) Deploy and test, all good
    h3. *2. Using the composite component but NOT working as expected*
    Now if I use the composite component as follows:
    4) Create XHTML file called includeThisFromRoot.xhtml under WebContent directory
    5) with content as follows:
    <!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.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:aas="http://java.sun.com/jsf/composite/aas-composite">
        <ui:composition>
           <table>
                <tr>
                    <td><aas:messagetooltip for="id2"/></td>
                    <td><h:outputLabel>Input 2: </h:outputLabel></td>
                    <td><h:selectOneMenu id="id2"
                            required="true"
                            requiredMessage="Cause of Death is required"
                            value="${death.causeOfDeath}">
                           <f:selectItem itemValue="" itemLabel="-- Select One --" />
                           <f:selectItem itemValue="COD01" itemLabel="Cancer" />
                           <f:selectItem itemValue="COD02" itemLabel="Diabetes" />
                           <f:selectItem itemValue="COD11" itemLabel="Other" />
                        </h:selectOneMenu>
                    </td>
                </tr>
           </table>
           <h:commandButton id="submit" value="Submit"/><br/>
        </ui:composition>
    </html>6) Make a copy test.xhtml, but call the new one testWithInclude.xhtml, with content as follows:
    <!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.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:aas="http://java.sun.com/jsf/composite/aas-composite">
    <h:head>
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
    </h:head>
    <h:body>
        <h:outputStylesheet library="css" name="richfacesoverrides.css"/>
        <h:form id="testform">
            <ui:include src="includeThisFromRoot.xhtml" />
        </h:form>
    </h:body>
    </html>h3. Summary of change
    You can see here that I simply moved all of the content between the form tags from the original XHTML to a separate XHTML, and included that separate XHTML using <ui:include>.
    h3. Result
    7) Deploy and access testWithInclude.jsf from browser, and I get:
    15:17:55,310 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/richfacestest].[Faces Servlet]] (http--0.0.0.0-8081-5) Servlet.service() for servlet Faces Servlet threw exception: javax.faces.view.facelets.TagException: /includeThisFromRoot.xhtml @13,52 <aas:messagetooltip> Tag Library supports namespace: http://java.sun.com/jsf/composite/aas-composite, but no tag was defined for name: messagetooltip
            at com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:304) [jsf-impl-2.1.7-jbossorg-2.jar:]
            at com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:266) [jsf-impl-2.1.7-jbossorg-2.jar:]
            at org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:496)
            at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:180)
            at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:810)
            at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:275)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1653)
            at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:324)
            at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:845)
            at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768)
            at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
            at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1196)
            at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:555)
            at org.apache.xerces.jaxp.SAXParserImpl.parse(SAXParserImpl.java:289)
            at javax.xml.parsers.SAXParser.parse(SAXParser.java:195) [rt.jar:1.7.0_09]
            at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:434) [jsf-impl-2.1.7-jbossorg-2.jar:]
            at com.sun.faces.facelets.compiler.SAXCompiler.doCompile(SAXCompiler.java:410) [jsf-impl-2.1.7-jbossorg-2.jar:]
            at com.sun.faces.facelets.compiler.Compiler.compile(Compiler.java:124) [jsf-impl-2.1.7-jbossorg-2.jar:]
            at com.sun.faces.facelets.impl.DefaultFaceletFactory.createFacelet(DefaultFaceletFactory.java:305) [jsf-impl-2.1.7-jbossorg-2.jar:]
            at com.sun.faces.facelets.impl.DefaultFaceletFactory.access$100(DefaultFaceletFactory.java:93) [jsf-impl-2.1.7-jbossorg-2.jar:]
            at com.sun.faces.facelets.impl.DefaultFaceletFactory$1.newInstance(DefaultFaceletFactory.java:160) [jsf-impl-2.1.7-jbossorg-2.jar:]What gives ? Am I missing something simple ?

    I think I may have found a workaround.
    In the XHTML file that is included and using the composite component, add the namespace as part of the custom component, like so:
    <aas:messagetooltip xmlns:aas="http://java.sun.com/jsf/composite/aas-composite" for="id2"/>So that it now becomes:
    <!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.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:aas="http://java.sun.com/jsf/composite/aas-composite">
        <ui:composition>
           <table>
                <tr>
                    <td><aas:messagetooltip xmlns:aas="http://java.sun.com/jsf/composite/aas-composite" for="id2"/></td>
                    <td><h:outputLabel>Input 2: </h:outputLabel></td>
                    <td><h:selectOneMenu id="id2"
                            required="true"
                            requiredMessage="Cause of Death is required"
                            value="${death.causeOfDeath}">
                           <f:selectItem itemValue="" itemLabel="-- Select One --" />
                           <f:selectItem itemValue="COD01" itemLabel="Cancer" />
                           <f:selectItem itemValue="COD02" itemLabel="Diabetes" />
                           <f:selectItem itemValue="COD11" itemLabel="Other" />
                        </h:selectOneMenu>
                    </td>
                </tr>
           </table>
           <h:commandButton id="submit" value="Submit"/><br/>
        </ui:composition>
    </html>I tried this after finding a similar bug about nested composite components, which I do not use, but thought I would give it a try:
    http://stackoverflow.com/questions/10898906/myfoo-tag-library-supports-namespace-http-java-sun-com-jsf-composite-mycom
    http://stackoverflow.com/questions/9735593/nested-composite-component-broken-in-jboss-7-1-1
    Have to keep track of all these workarounds that I am doing.

  • How to bind a complex object to a composite component

    I'm using JSF2 and having an issue binding an object (EL Expression) as a parameter to my composite component.
    I have written a composite component (not very complex) that will display a drop-down list of countries and should bind the selection to a provided target bean.
    <!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.sun.com/jsf/html"
    xmlns:composite="http://java.sun.com/jsf/composite"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:a4j="http://richfaces.org/a4j"
    xmlns:rich="http://richfaces.org/rich">
    <!-- INTERFACE -->
    <composite:interface>
    <composite:attribute name="label" required="true" />
    <composite:attribute name="requiredMessage" required="true"/>
    <composite:attribute name="target" required="true" type="com.mycompany.entity.Country"/>
    </composite:interface>
    <!-- IMPLEMENATION -->
    <composite:implementation>
    <h:panelGrid columns="2">
    <h:outputLabel for="country-list" value="#{cc.attrs.label}"/>
    <h:panelGrid id="country" columns="1" styleClass="select-one-menu-panel" >
    <h:selectOneMenu id="country-list"
    enabledClass="select-one-menu-enabled" disabledClass="select-one-menu-disabled"
    layout="pageDirection"
    value="#{cc.attrs.target}"
    required="true" requiredMessage="#{cc.attrs.requiredMessage}"
    >
    <f:selectItem itemLabel="#{msgs['label.pleaseSelect']}" itemValue="" />
    <f:selectItems value="#{countryController.countries}" />
    <a4j:ajax />
    </h:selectOneMenu>
    <a4j:outputPanel id="country-list-error-panel" ajaxRendered="true">
    <h:message id="country-list-error" for="country-list" style="color:red"/>
    </a4j:outputPanel>
    </h:panelGrid>
    </h:panelGrid>
    </composite:implementation>
    </html>
    I want to be able to use the composite component in the following way:
    <util:country-select
    label="#{msgs['label.countryOfBirth']}"
    requiredMessge="#{msgs['error.birthCountryRequired']}"
    target="#{participant.countryOfBirth}"/>
    When I load the page everything renders correctly, but when I select an item from the drop-down I get a validation error.
    apply-form:j_idt77:country-list: Validation Error: Value is not valid
    I know that it must be something with the way that I have the parameters defined but I simply can't find any information to help me figure this out.
    Any light that you might be able to she on this would be greatly appreciated.
    Thank you for the help...

    Hi,
    well, you can. What the ADF Data Control and thus the binding gives you is the JSF component binding and the business service access.
    If you don't want to use ADF, then what you can do is
    - Create an ADF BC root Application Module from a managed bean
    e.g. see http://docs.oracle.com/cd/E21764_01/web.1111/b31974/bcservices.htm#CHDDDBFC
    - Access the View Object for querying the data to display
    - Expose the queried data so the component can handle it e.g. setter/getter for input components, ArrayList for tables (or you create the more complex component models like table and tree models)
    Having outlined the above, here are some gotchas to watch out for
    - Make sure creating the root application module is done such that you don't create/release it with each request. So you may consider a data serving managed bean in a scope like page flow or session
    - Ensure you have helper methods that allow you to query and CRUD operate the View Object data
    Frank

  • JSF 2.0: Composite Components and their ID

    I'm using Composite Components with JSF 2.0.
    Template:
    <composite:interface />
    <composite:implementation>
        <h:inputText id="text" />
    </composite:implementation>Template Client:
    <h:form id="form">
        <components:myComponent />
    </h:form>In the rendered result, the h:inputText's id will be "form:j_id1060595728_4b62ee3:text".
    How can I override that default ID?
    I tried to set an id attribute on composite:interface and composite:implementation, however, that doesn't have any effect.
    Using ui:debug, I found that the component with ID "j_id1060595728_4b62ee3" is a UINamingContainer.
    When using my own UINamingContainer implementation, i.e., ...
    <composite:interface componentType="util.jsf.UINamingContainerWithID" />
    @FacesComponent("util.jsf.UINamingContainerWithID")
    public class UINamingContainerWithID extends UINamingContainer {
         private String id = "foo";
         @Override
         public String getId() {
              return id;
         @Override
         public void setId(String id) {
              // this.id = id;
         public void setFooID(String id) {
              this.id = id;
    }... I can prevent the id from being set in setId(String), and h:inputText's id will be "form:foo:text".
    (I have tried to debug but the source code is slightly out of sync.)
    I also tried to add an attribute fooID to composite:interface and composite:implementation, with no effect.
    How do you work with Composite Components and their IDs?
    Thanks

    All composite components are NamingContainers. This is necessary to prevent ID collisions.
    In order to avoid a generated ID on a particulare composite component, specify an ID in the component
    within the using page:
    <h:form id="form">
        <components:myComponent id="c" />
    </h:form>So the client ID of the text component would be: form:c:text.

  • JSF 2.0 Composite components

    Hello
    I've learning and testing JSF 2.0 for fun on the latest few days, and i'm try to check if something is possible to do with composite components.
    Most o examples that I have seen do something like this:
    <util:myform image="#{resource['images:back.jpg']}"
    actionMethod="#{places.logout}"
    style="border: thin solid lightBlue"/>
    but i want to have something like:
    <util:mycomp image="#{resource['images:back.jpg']}"
    actionMethod="#{places.logout}"
    style="border: thin solid lightBlue">
    <p>insert some HTML and JSF tags here</p>
    </util:mycomp>
    where i want to grab inside my composite component the "<p>insert some HTML and JSF tags here</p>".
    Is it possible? Is there any example of this feature?
    Thanks

    Hi,
    Not sure I understand fully what you are looking to do but this my help you -
    This is a Composite Component declared in the resources folder...
    <!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.sun.com/jsf/html"
          xmlns:cc="http://java.sun.com/jsf/composite">
        <head>
            <title/>
        </head>
        <h:body>
            <cc:interface />
            <cc:implementation>           
                <h:form>
                    <div>
                        <h5><h:outputLabel value="Email:" /></h5>
                        <h:inputText label="Email" id="email" style="margin-bottom:4px; width: 172px;"
                           validator="#{securityBean.validateEmail}" value="#{securityBean.email}" />
                        <h5><h:outputLabel value="Password:" /></h5>
                        <h:inputSecret  label="Password" id="password" value="#{securityBean.password}"
                             style="width: 172px;" validator="#{securityBean.validatePassword}"/>
                        <h:commandButton value="Register" type="reset" styleClass="logbt"  />
                        <h:commandButton value="Login" action="#{securityBean.performLogin}" styleClass="logbt"  />
                    </div>
                </h:form>
            </cc:implementation>
        </h:body>
    </html>And then you would be able to reuse it using something like
    <!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:cc="http://java.sun.com/jsf/composite"
          xmlns:ro="http://java.sun.com/jsf/composite/components">
          <ro:loginPanel />                Hope this helps
    Regards
    Patrick

  • Netbeans 9 + Composite Component -- Not working

    Hello,
    I am trying to learn Java EE 6. I have the following code, and the editor I am using is netbeans 9 and glassfish server v3
    Composite component file : out.xhtml
    <?xml version='1.0' encoding='UTF-8' ?>
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:cc="http://java.sun.com/jsf/composite">
    <!-- INTERFACE -->
    <cc:interface>
    </cc:interface>
    <!-- IMPLEMENTATION -->
    <cc:implementation>
    <h1> HELLO </h1>
    </cc:implementation>
    </html>
    Using page : MyComponent.xhtml
    <?xml version='1.0' encoding='UTF-8' ?>
    <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>
    <title>Use of component</title>
    </h:head>
    <h:body>
    <ez:out/>
    </h:body>
    </html>
    Its the most basic example I tried.. But it doesnt run. When I access the file MyComponent.xhtml, I dont get any error, but I dont get any output also..
    Please help me in finding out whats the problem here.

    The web.xml is already configured by the Netbeans. I didnt make any changes. Here it is.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
        <context-param>
            <param-name>javax.faces.PROJECT_STAGE</param-name>
            <param-value>Development</param-value>
        </context-param>
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>/faces/*</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>faces/index.xhtml</welcome-file>
        </welcome-file-list>
    </web-app>

  • How do you assign a value to an expression in a composite component?

    Hi all,
    I have just started out on JSF 2.0 not too long ago. I am trying to create a composite component that can execute a method defined by the user and then assign the returned results to a bean, also defined by the user.
    Something like the one below:
    <composite:myComponent value="#{someBean.someProperty}"  action="#{someBean.someActionMethod}" />If its just executing the method, I have no problems with that. But I do not know how to assign the returned value. Can anyone enlighten me on how to execute the method in the component and then assign the returned value to the bean?
    Thank you.
    Edited by: honsho on Aug 4, 2010 1:36 AM

    I am not sure about that. Do you mean that all I have to do is provide the interface <cc:attribute name="value" type="lvl1.lvl2.someClass"/> and when I run the method, the returned result will be written into the expression provided in "value"?

  • InsertFacet to another Composite-Component

    Hi!
    My setup:
    Netbeans 6.8 + Glassfish v3 + JSF 2.0.2 (also tried 2.0.3 Snapshot of today)
    I have following 3 pages:
    index.xhtml
    <html ...
          xmlns:cs="http://java.sun.com/jsf/composite/component">
        <h:head>
        </h:head>
        <h:body>
                    <cs:comp1>
                        <f:facet name="header">
                            HEADER
                        </f:facet>
                    </cs:comp1>
        </h:body>
    </html>
    comp1.xhtml
    <html ...
          xmlns:cs="http://java.sun.com/jsf/composite/component">
        <h:head>
        </h:head>
        <h:body>
            <cc:interface>
                <cc:facet name="header" />
            </cc:interface>
            <cc:implementation>
                <cs:comp2>
                    <cc:insertFacet name="header" />
                </cs:comp2>
            </cc:implementation>
        </h:body>
    </html>
    comp2.xhtml
    <html ...
          xmlns:cs="http://java.sun.com/jsf/composite/component">
        <h:head>
        </h:head>
        <h:body>
            <cc:interface>
                <cc:facet name="header" />
            </cc:interface>
            <cc:implementation>
                <cc:renderFacet name="header" />
            </cc:implementation>
        </h:body>
    </html>In words, I want to pass a facet through a composite component, however it doesn't work. The text HEADER won't display...
    When I change comp1.xhtml to following:
                <h:dataTable>
                    <cc:insertFacet name="header" />
                </h:dataTable>it works. The text HEADER will display.
    So what I'm doing wrong? Why my composite-component doesn't receive and display the facet and a jsf-standard-component does? JSF Bug??
    Btw.: <cc:insertChildren /> alone doesn't fit my requirements, I need facets.
    Thanks in advance,
    Schober Markus

    Another thing that doesn't work with facets and composite components for me.
    index.xhtml
    <html ...
          xmlns:cs="http://java.sun.com/jsf/composite/component">
        <h:head>
        </h:head>
        <h:body>
                    <cs:comp1>
                        <f:facet name="header">
                            HEADER
                        </f:facet>
                    </cs:comp1>
        </h:body>
    </html>
    comp1.xhtml
    <html ...
          xmlns:cs="http://java.sun.com/jsf/composite/component">
        <h:head>
        </h:head>
        <h:body>
            <cc:interface>
                <cc:facet name="header" />
            </cc:interface>
            <cc:implementation>
                <cs:comp2>
                    <cc:renderFacet name="header" />
                </cs:comp2>
            </cc:implementation>
        </h:body>
    </html>
    comp2.xhtml
    <html ...
    xmlns:cs="http://java.sun.com/jsf/composite/component">
    <h:head>
    </h:head>
    <h:body>
    <cc:interface>
    </cc:interface>
    <cc:implementation>
    <cc:insertChildren />
    </cc:implementation>
    </h:body>
    </html>
    In words, I want to render a facet on another composite component, however it doesn't work. The text HEADER won't display...
    When I change comp1.xhtml to following:
                <h:panelGroup>
                    <cc:renderFacet name="header" />
                </h:panelGroup>it works. The text HEADER will display.
    Rendering a facet seem to work only on standard-jsf-components, not on my composite components. Can anyone reproduce this behaviour, or is there a implementation mistake in my code? An error by JSF?
    Thanks in advance,
    Schober Markus

  • Why composite component doesn't see action command?

    Using JSF2, facelets, glassfish 3.
    I have a composite component that doesn't seem to be able to identify the action parameter for a button.
    I get an error in the server log that says:
    javax.faces.FacesException: javax.el.PropertyNotFoundException: /resources/components/financial/payrollRight.xhtml @21,85 goBtnAction="#{payrollSessionBean.goBtn_action}": The class 'principlenet.PayrollSessionBean_$$_javassist_170' does not have the property 'goBtn_action'.
    Does anyone know what I am doing wrong, that I can't see the action property?
    This was originally a PrimeFaces command button, but I get the same results if I change back to an h:commandButton.
    I'm relatively new to JSF2 and composite components, so I don't know if I am not creating the component properly or what.
    Thanks.
    Here is the component:
    <?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:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:enc="http://java.sun.com/jsf/composite/components/enrollment/common"
          xmlns:cc="http://java.sun.com/jsf/composite"
          xmlns:p="http://primefaces.prime.com.tr/ui"
          xmlns:comp="http://java.sun.com/jsf/composite/components">
        <!-- INTERFACE -->
        <cc:interface>
            <cc:attribute name="styleClass" default="selectDatePanel" required="false"/>
            <cc:attribute name="rendered" default="true" required="false"/>
            <cc:attribute name="calStyleClass" default="" required="false" />
            <cc:attribute name="descStyleClass" default="selectDateDesc" required="false" />
            <cc:attribute name="descValue" default="Select Date:" required="false" />
            <cc:attribute name="calInputStyleClass" default="selectDateInput" required="false" />
            <cc:attribute name="inputValue" default="" required="false" />
            <cc:attribute name="calImageStyleClass" default="selectDateCal" required="false" />
            <cc:attribute name="toolTip" default="Enter date or push calendar icon and select date.  Then push 'Go'." required="false" />
            <cc:attribute name="goBtnStyleClass" default="selectDateGoBtn" required="false" />
            <cc:attribute name="goBtnValue" default="Go" required="false" />
            <cc:attribute name="goBtnAction" default="" required="false" />
            <cc:attribute name="update" default="" required="false" />
        </cc:interface>
        <!-- IMPLEMENTATION -->
        <cc:implementation>
            <p:outputPanel id="selectDatePanel" styleClass="#{cc.attrs.styleClass}" rendered="#{cc.attrs.rendered}" >
                <enc:calendarGroup id="selectDate"
                                   styleClass="#{cc.attrs.calStyleClass}"
                                   descStyleClass="#{cc.attrs.descStyleClass}"
                                   descValue="#{cc.attrs.descValue}"
                                   calInputStyleClass="#{cc.attrs.calInputStyleClass}"
                                   inputValue="#{cc.attrs.inputValue}"
                                   calImageStyleClass="#{cc.attrs.calImageStyleClass}"
                                   toolTip="#{cc.attrs.toolTip}" />
                <h:commandButton id="selectDateGoBtn" styleClass="#{cc.attrs.goBtnStyleClass}"
                                 value="#{cc.attrs.goBtnValue}"
                                 action="#{cc.attrs.goBtnAction}" />
            </p:outputPanel>
        </cc:implementation>
    </html>Here is a portion of the page that calls the component:
    <?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:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:tsc="http://java.sun.com/jsf/composite/components/timesheet"
          xmlns:cc="http://java.sun.com/jsf/composite"
          xmlns:p="http://primefaces.prime.com.tr/ui"
          xmlns:comp="http://java.sun.com/jsf/composite/components">
        <!-- INTERFACE -->
        <cc:interface>
        </cc:interface>
        <!-- IMPLEMENTATION -->
        <cc:implementation>
            <p:outputPanel id="payrollRightPnl" styleClass="rightPanel" >
                <h:form id="payrollRightForm" styleClass="rightPanel" prependId="false" >
                    <comp:selectDate id="prSelectDate" styleClass="prSelectDate"
                                     inputValue="#{loginSessionBean.selectedDate}"
                                     goBtnAction="#{payrollSessionBean.goBtn_action}" />Here is the goBtn_action() method of the backing bean:
        public void goBtn_action() {
            lsb.logMsg("<PayrollSessionBean.goBtn_action>");
            setReadPayrollData(true);
            drawPayrollGrid();
        }

    Hello!! I wanted to tell you that I tested with "method-signature" but I have also worked continuously showing the same error.
    Excepcion
    javax.servlet.ServletException: javax.el.PropertyNotFoundException: Objetivo inalcanzable, identificador 'swithPagesBean' resuelto a nulo
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:321)
    org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
    causa raíz
    javax.faces.el.EvaluationException: javax.el.PropertyNotFoundException: Objetivo inalcanzable, identificador 'swithPagesBean' resuelto a nulo
    javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
    com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
    javax.faces.component.UICommand.broadcast(UICommand.java:311)
    javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:781)
    javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1246)
    com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:77)
    com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
    com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
    org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
    My code is:
    BACKING BEAN : "SwithPagesBean" ----------------------------------------------------
    public class SwithPagesBean implements Serializable {
    private String home = "home";
    private String newUserPage = "new_user";
    private String modifiUserPage = "modifi_user";
    //*Getteres,Setter & constructor *//
    //This is the first page to run
    FILE: "HOME.XHTML" ---------------------------------------------------------------
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <f:view>
    <h:head>
    </h:head>
    <h:body>
    <h:form>
    <ui:composition template="template_home.xhtml">
    <ui:define name="footer">
    <h:form>
    <h1>Estas en el home</h1>
    </h:form>
    </ui:define>
    </ui:composition>
    </h:form>
    </h:body>
    </f:view>
    </html>
    FILE: TEMPLATE_HOME.XHTML -----------------------------------------------------------------------------
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:p="http://primefaces.prime.com.tr/ui"
    xmlns:ui="http://java.sun.com/jsf/facelets">
    <f:view>
    <h:head>
    </h:head>
    <h:body>
    <div id="layout_intellipost">
    <div id="header">
    <ui:include src="header.xhtml" />
    </div>
    <div>
    <ui:insert name="footer">
    </ui:insert>
    </div>
    </div>
    </h:body>
    </f:view>
    </html>
    FILE: "HEADER.XHTML"-------------------------------------------------------------------------------------------
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.prime.com.tr/ui"
    xmlns:gfu="http://java.sun.com/jsf/composite/gfu">
    <f:view>
    <ui:composition>
    <h:form>
    <p:panel id="panel" header="IntelliPos - Caja 66" >
    <h:panelGrid columns="6">
    <gfu:Navegator action="#{swithPagesBean.newUserPage}" btnModificacionLabel="Modificar Usuario" />
    </h:panelGrid>
    </p:panel>
    </h:form>
    </ui:composition>
    </f:view>
    </html>
    FILE: "NAVEGATOR" ---------------------------------------------------------------------------------------------------------------
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.prime.com.tr/ui"
    xmlns:composite="http://java.sun.com/jsf/composite">
    <f:view>
    <head>
    <title>Navegator Alta</title>
    </head>
    <body>
    <composite:interface>
    <composite:attribute name="btnModificacionLabel" />
    <composite:actionSource name="btnModificacion" />
    <composite:attribute name="action" method-signature="java.lang.String f()" targets="btnModificacion" />
    </composite:interface>
    <composite:implementation>
    <h:commandButton id="btnModificacion" value="#{cc.attrs.btnModificacionLabel}"/>
    </composite:implementation>
    </body>
    </f:view>
    </html>
    file: "faces-config"
    <navigation-rule>
    <navigation-case>
    <from-outcome>new_user</from-outcome>
    <to-view-id>/facelet/alta.xhtml</to-view-id>
    </navigation-case>
    </navigation-rule>
    When y try to click in my custom command button "navegator", this is to fire the excepcion mentioned.
    Anyone have any other suggestions?
    From already thank you very much!

  • Composite component attribute scope

    I'm implementing a master-detail screen on bicycles are shown for the bicycle category selected. When the user selects a bicycle category in the selectOneMenu, the change request is handled using ajax and the new list of bicycles is displayed.
    <cc:interface>
         <cc:attribute name="categoryHolder" required="true">
              <cc:attribute name="selectedCategory" />
         </cc:attribute>
         <cc:attribute name="onSelectCategory"
              method-signature="void action()" required="false" />
         <cc:attribute name="showAllOption" required="false"
              default="#{false}" />
         <cc:attribute name="onChangeRender" required="false" default="@form" />
         <cc:attribute name="rendered" required="false" default="#{true}" />
    </cc:interface>
    <cc:implementation>
         <h:selectOneMenu value="#{cc.attrs.categoryHolder.selectedCategory}"
              rendered="#{cc.attrs.rendered}">
              <f:selectItem itemLabel="All" itemValue="#{null}" noSelectionOption="#{true}" />
              <f:selectItems
                   value="#{bicycleCategoryListUiComponent.bicycleCategories}"
                   var="bicycleCategory" itemLabel="#{bicycleCategory.name}"
                   itemValue="#{bicycleCategory}" />
              <f:ajax event="change" render="#{onChangeRender}" execute="#{cc.attrs.categoryHolder.check()}" />
         </h:selectOneMenu>
    </cc:implementation>I call the component like this:
              <component:bicycleCategoryList
                   categoryHolder="#{selectBicyclePageBean}" onChangeRender="@form" />However, when I select a category I get the following error message:
    serverError: class javax.faces.component.UpdateModelException /resources/component/bicycleCategoryList.xhtml @32,35 value="#{cc.attrs.categoryHolder.selectedCategory}": java.lang.NullPointerException
    It seems like #{cc.attrs.categoryHolder} has run out of scope and this isn't available anymore.Therefore I'm wondering how I can manipulate the scope of composite component attributes? JSF 2 has elegent scopes for managed beans, but I could not find anything about this topic. When there is some other solution, also please enlighten me.
    Thanks in advance!

    Did you find a solution to your problem? I too am trying to do something similar but rather than have an onChangeRender attribute, I was trying to find a way to nest <f:ajax> inside the call to the custom component. Using your code as an example, I was trying to do the following:
    <component:bicycleCategoryList categoryHolder="#{selectBicyclePageBean}">
        <f:ajax event="someCustomEvent" render="@form"/>
    </component:bicycleCategoryList>However I get the following exception:
    <f:ajax> Error: enclosing composite component does not support event someCustomEventIn the FacesComponent, I did implement ClientBehaviorHolder. The someCustomEvent would be fired after an internal <f:ajax> is called. For example:
    <f:ajax onevent="handle_onevent"/>Then:
    function handle_onevent(data) {
         if (data.status == "success") {
              var evt = document.createEvent("Events")
              evt.initEvent("someCustomEvent", true, true);
              this.dispatchEvent(evt);
    }Any help would be very appreciated. Thanks!

  • Where to begin with 'composite component'?

    Hi everyone.  I'm having a hard time understanding how to build a basic composite component.  There is some online documentation on this, but for some reason, I just cannot follow it.  Honestly, I'm not trying to get someone here to do my work for me, but I'm hoping that if described a very simplified version of what I need to do, that someone could show me how to do it through code.
    Here's what I'm essentially trying to do (build a control that is a combobox with a button on the side of it):
    <hbox>
         <combobox/>
         <button/>
    </hbox>
    Doing something like above is easy enough.  But what I really need is for the root control to be a combobox so that all properties and events of the combobox are available to its owner without me having to re-implment/proxy all of them.
    Hopefully this will illustrate the concept:
    <combobox>
         <button/>
    </combobox>
    I see from the doc that I need an AS class and have to override updateDisplayList, createChildren, etc.  But for some reason, I just cannot understand the doc enough to do something even this simple.  I think if someone showed me how to do this example, then it would be a good starting point for me to go back to the doc and hopefully it'll make more sense!
    Thanks in advance!

    I think the o.p is loking for an example of composition that starts by extending some component like ComboBox, and then adds another control to it.  the benefit of this is that the new control can be treated as  a ComboBox, with all of its functionality.  Here is an example.  You will need to find your own image to use for the button, or change it to a regular button.
    Test application:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
        xmlns="*"
        layout="absolute"
        creationComplete="init()" >
    <mx:Script><![CDATA[
      import mx.collections.ArrayCollection;
      import mx.controls.Alert;
      [Bindable]private var _acDP:ArrayCollection;
      public function init():void
        _acDP = new ArrayCollection([{label:"one", value:1},{label:"two", value:2},{label:"three", value:3}])
      private function onButtonClick(event:Event):void
        Alert.show(ComboButton(event.currentTarget).selectedLabel);
    ]]></mx:Script>    
    <ComboButton dataProvider="{_acDP}" labelField="label" comboButtonClick="onButtonClick(event)" />
    </mx:Application>
    ComboButton.as
    package
      import flash.events.Event;
      import flash.events.MouseEvent;
      import mx.controls.ComboBox;
      import mx.controls.Image;
      [Event(name="comboButtonClick", type="flash.events.Event")]
      public class ComboButton extends ComboBox
        [Embed(source="assets/help.gif")]
        private var buttonImage:Class;
        private var _imgButton:Image;
        //Constructor
        public function ComboButton()
         super();
        /** instantiates the button and adds it to the displaylist */
        override protected function createChildren():void
          super.createChildren();                // Call to the superclass for necessary processing.
          if(!_imgButton) {                       // Create the button component.
            _imgButton = new Image();
            _imgButton.source = buttonImage;
            _imgButton.toolTip = "Click Me";
            _imgButton.addEventListener(MouseEvent.CLICK, onClickButton);
            addChild(_imgButton);
        /** Positions and sizes the image button */
        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
          super.updateDisplayList(unscaledWidth, unscaledHeight);
            var buttonHeight:Number =  unscaledHeight;
            var buttonWidth:Number = buttonHeight; 
            var nbuttonX:Number = unscaledWidth + 5;
            var nbuttonY:Number = 0;
            _imgButton.height = buttonHeight;
            _imgButton.width = buttonWidth;
            _imgButton.move(nbuttonX, nbuttonY);
        }//updateDisplayList 
        /** dispatches event on button click */
        private function onClickButton(event:MouseEvent):void
          dispatchEvent( new Event("comboButtonClick", false));
      }//public class ComboButton
    }//package
    Tracy Spratt

  • How can I build a composite component?

    I heard that Java Swing can support composite component, meaning combining several component's
    functionalities onto one component. Does anyone know
    what class and methods I should choose to build such
    a component? Thanks for helping!

    Hi,
    I use JPanels to construct composite components.
    Create a subclass of JPanel, for example as follows:
    public class NameField extends JPanel {
        private JTextField tf;
        public NameField() {
            setLayout(new BorderLayout());
            add(new JLabel("Name:"), BorderLayout.WEST);
            add(tf = new JTextField(10), BorderLayout.EAST);
        public String getName() {
            return tf.getText();
    }Now use can use this NameField component wherever you like. You could make much more complicated components, of course.
    Henri

Maybe you are looking for

  • Help with Mega PC build

    This is my first time to build a PC and its been SUCH a headache. I purchased the MEGA barebones pc with the P4 socket.  I bought everything new (except the TV Card) and put it together.  So far... really easy.  The CD I received didn't work, so I ju

  • EDI / Idoc DESADV Inbound Delivery

    Hello, we send IDocs (DELVRY03,DESADV) as shipping notifications to another R/3 system. The inbound deliveries in the receiving system, generated automatically, are also containing the handling units as delivery positions, which are specified in the

  • Gnome-terminal rendering problem

    Hi everyone, I'm new here because I never had a question that the answer wasn't already here. But today it's a different day. I have installed Arch in my desktop, everything seemed to work fine until I opened gnome-terminal and get this: All other pr

  • Problem after update to 10.9.3 rMBP - no login panel

    Hi, After update to 10.9.3 I don't run the rMBP. After press power button I pressed Cmd+S, then mount -uw / and cat /var/log/system.log. fsck ok What to do? I can't work. I must run MBP without reinstall OSX.

  • Whats wrong with this loop

    1 Declare 2 v_system_user VARCHAR2(30); 3 v_system_user_flag number :=0 ; 4 v_username varchar2(30); 5 Cursor C_system_users is select * from dbaoper.t_system_users; 6 begin 7 for v_system_user in C_system_users loop 8 dbms_output.put_line('v_system_