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

Similar Messages

  • 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.

  • How to access Parent page UIComponent from inlineFrame using ADF javascript

    Hi,
    My application includes an <af:inlineFrame component on the top portion of the page. It contains a table with delete option for the end user. Requirement is after user has deleted all the records of the table and table has no records to display, inlineFrame needs to be made invisible so that the bottom portion content of my page will get stretched fully and has more visibility to the user. Hence when user click on Delete button of the table, after delete operation, I am planning to check the row count and write javascript to client using ExtendedRenderKitService to make the inlineframe invisible.
    Question:
    1. What is the right ADF javascript API to access the parent page and work with its components. I came to know we can call using 'parent.document.getElementById' but I want to know correct ADF's javascript API.
    Thanks in Advance
    Raghu

    The way you suggested didn't help me.
    Yes.. This inlineFrame content is also a part of the same application only. The reason why it is kept in inlineFrame is it is an ADS implemented table. ADS is able to push the data to the table provided we should keep the application idle. If I keep on working with the application (i.e. request/response happens because user works with the bottom portion content of the page), ADS is not able to push the data to UI. Keeping the ADS implemented table in a top portion still but inside an inlineFrame has solved this problem.
    Given below my page design
       main.jspx
       ======
       <af:form id="f1"....
           <af:inlineframe source="faces/page/employee.jspx" />
       </form>
       employee.jspx
       =========
       <af:form id="f2"
        </form>
                 In the employee.jspx only I have delete button and javascript which is suppose to find the parent page (i.e. main.jspx) and to work with inlineframe component to make it visible/invisible based on whether table gets records or no records. (This javascript call will happen with the help of ClientListener set for the ADS implemented table with event type as propertyChange) Intention is to check the row count of the table during every javascript call and to go to parent page, find the inlineframe, make it visible or invisible.
    Edited by: Raguraman on 25-Jan-2013 08:59

  • Get the Values of the components inside the region onto the Parent Page

    Hi All,
    I am using Jdeveloper 11.1.1.5.
    I just wanted to know that my use case can be fitted to contextual events or should i use the #{data.pageDef.Attribute.inputValue} to get the values.
    I have a bounded taskflow "ChildTF.xml" with fragment say "child.jsff".Now i have dragged the ChildTF.xml on the other page say "Parent.jspx" as a region.In the child.jsff page i had input form having 20 fields and all the 20 fields are dragged from a View Object so i don't have the field values binded to the Managed Bean and on the parent page "Parent.jspx" i have a button. Now on click of button i need to get the values of those 20 fields of "child.jsff" page.
    How can i achieve this?
    Thanks
    Shah

    Hi Timo,
    Thanks .
    For sharing the data control i should follow this :-
    In the Property Inspector for the called task flow i.e ChildTF.xml, select Behavior.
    In the data-control-scope list, select shared.
    Is there anything else do i need to do ??
    I mean do i need to add the iterator to the parent page also. ?
    Kindly Suggest!!
    Regards,
    Shah

  • 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

  • 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?

  • How do you fire a button click event on apex page from fancybox iframe that was created by page

    I am trying to fire off the button click event from fancybox iframe. The apex page has a button that launches a fancybox iframe which is loaded with an APEX form. On close of that fancy box, I am trying to fire a click event on the parent page which will refresh a div with html that is created with plsql. The button on the page works as expected when clicked from the page. It will show a debug alert message to prove it was called and then load the div with the correct data. I am unable to fire off this button click from the fancybox iframe when it closes.
    A couple of points:
    I using Plug-in: Execute PL/SQL Code and Return Content ("PLUGIN_MULEDEV.SERVER_REGION_REFRESH") to place the create fancybox statement. It is used to populate a div using plsql.
    The name of the button on the main page is P2020_REFRESH_SECTION_BUILDER_BTN.
    The click dynamic action on the button is calling the plugin to replace the html in the div.
    The data in the form in the fancybox is being saved to the database. On close of the fancybox box I want to refresh the div so the new record is included in the div html.
    Can anyone help. Here is the fancybox code:
      function customProcessOnReadyState4(){
        for (var i=0;i<11;i++){
          $( "#tabs"+i ).tabs();
          $("#createNewExerciseLink"+i).fancybox({
              ''width''         : ''60%'',
              ''height''        : ''70%'',
              ''autoScale''     : true,
              ''transitionIn''  : 200,
              ''transitionOut'' : 200,
              ''type''          : ''iframe'',
              ''onClosed''         : function() {
                                         window.parent.$(''#P2020_REFRESH_SECTION_BUILDER_BTN'').click();
    Here are the dynamic actions assigned to the button:
    5 - Execute JavaScript Code
    alert("Starting refresh");
    10 - Execute PL/SQL Code and Return Content [Plug-in]
    begin
      SCTUI.create_sct_tabs2(:P2020_CREATE_SECTION_LOV, '1');
    end;

    user setActionListener...
    <af:setActionListener from="#{bindings.XXX.inputValue" to="#{backingbean.variable}"
                  <af:inputText value="#{bindings.Email.inputValue}"
                                label="#{bindings.Email.hints.label}"
                                binding="#{backingBeanScope.backing_ShuttlePage.it2}"
                                id="it2">
                    <f:validator binding="#{bindings.Email.validator}"/>
                  </af:inputText>
                  <af:commandButton text="commandButton 2"
                                    binding="#{backingBeanScope.backing_ShuttlePage.cb2}"
                                    id="cb2" action="passing">
                    <af:setActionListener from="#{bindings.Email.inputValue}"
                                          to="#{processScope.detail}"/>
                  </af:commandButton>next jsf page:
                <af:outputText value="#{processScope.detail}"
                               binding="#{backingBeanScope.backing_ProcessScope.ot1}"
                               id="ot1"/>setPropertyListener also should work
    <af:setPropertyListener from="#{bindings.Email.inputValue}" to="#{processScope.detail}" type="action"/>

  • Problem refreshing the parent page when closing a modal window.

    I have page that opens a modal window from a report link column. In the modal window I want to be able to make my changes and press an Apply button so that the modal window is closed and the parent page is refreshed to show the modified details in the report. In Firefox all works well but in IE I get the error message ‘Window.opener.location is null or not an object’ .
    When I comment out window.opener.location.href=window.opener.location.href; the modal window closes without error but I want to refresh the parent page with changes made in the modal window.
    I’m afraid my java script is very limited (the code is based on other peoples examples.)
    Parent Page I call this function from a report link column to display a modal window. Sets the hidden SAVE_STATUS field in destination page to ‘N’
    function modalWin(pshow)
    var url;
    url='f?p=&APP_ID.:'+pshow+':&SESSION.::::SAVE_STATUS:N';
    if (window.showModalDialog) {
    window.showModalDialog(url,"name","dialogWidth:650px;dialogHeight:700px"); }
    else {
    window.open(url,"name","height=700,width=650,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");
    Destination page (modal window)
    HTML Header.
    The function closeWindow should refresh the parent page and close the modal window.
    <base target=_self>
    <script language="JavaScript" type="text/javascript">
    <!--
    htmldb_delete_message='"DELETE_CONFIRM_MSG"';
    function closeWindow() {
    if ( document.getElementById("SAVE_STATUS").value == 'Y' )
    window.opener.location.href=window.opener.location.href;
    window.close();
    //-->
    </script>
    Html Body attribute.
    onLoad="closeWindow();"
    P_UPDATE_DATE process called from the Apply changes button. Sets the SAVE_STATUS flag to ‘Y’ for the onload in the html body.
    UPDATE event
    SET event_date = :P5001_EVENT_DATE
    WHERE contract_reference = :P330_EVD_CONTRACT
    AND event_number = :P330_EVD_EVENT_NUMBER;
    :SAVE_STATUS := 'Y';
    Thanks in advance, I will have a look when back in the office on Monday.
    Cheers Pete

    Hi Chris,
    Thanks for your help. I think I've sorted it using your first suggestion doing a refresh in the parent page, I just didn't know how at the time.
    What I've got in the parent window after the call to the modal window is the reload window.location.reload(); and in the modal window I close it using window.close(); The down side being the refresh happens if I use my 'Apply changes' or 'Cancel' button but I can live with that for now.
    It seems to work in IE and firefox but as I say most of what I'm doing is cobbling together using other peoples code without really understanding exactly what it does. Anyway thanks for your help, sound like I should look into JQUERY when I have time.
    Thanks Pete
    Parent window call to modal
    function modalWin(pshow)
    var url;
    url='f?p=&APP_ID.:'+pshow+':&SESSION.::::SAVE_STATUS:N';
    if (window.showModalDialog) {  window.showModalDialog(url,"name","dialogWidth:650px;dialogHeight:700px");                                          }
    else {
    window.open(url,"name","height=700,width=650,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no ,modal=yes");
    window.location.reload();
    Modal Window Close.
    window.close();

  • 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

  • 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:
    &lt;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.

  • Modifying Desitnation URI to open the PopUp Page on the Parent Page

    Hi,
    We have a requirement where when we click on the link, we have to open a new page on top of the old page(i.e the page on which link is present).
    As of now we are using the below DesinationURI.
    javascript:openWindow(top,'OA.jsp?page=/XXX/YYY/zzzz/ak/TestPG&GrpName={!GroupName}&reportType={@ReportType}&CategoryName={@Newcategory}&retainAM=Y&addBreadCrumb=Y', 'modal', {top:0,left:0,width:window.screen.availWidth,height:window.screen.availHeight,directories:true,location:true,menubar:true,resizable:true,scrollbars:true,status:true,toolbar:true},false, 'dialog', null);void(0);
    Please let me know, how i can modify this destination URI, so that TestPG loads on the parent page itself ie. the page on which the link to open TestPG is present.
    Thanks in advance
    Saurabh

    Hi Anoop,
    I have tried with
    Destination URI = OA.jsp?page=/xxx/yyyy/zzz/../webui/TestPG
    ActionType : FirepartialAction
    Event : Update
    Parameters :
    Name : GrpID
    Value : ${oa.XXXGroupNameVO1.GroupId}
    Now when the page loads, the URL formed on clicking of the link is
    http://10.94.65.116:9016/OA_HTML/OA.jsp?page=/xxx/yyyy/zzz/.../webui/TestPG&_ti=173057009&oapc=2&selection=_3_1_2_
    When i click on the link, page starts loading, loads for few seconds and then the loadin gets completed, but the desired page TestPG is not opened.
    Please let me know, where i am going wrong.
    Thanks in advance
    Saurabh

  • 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>

  • Web content parent page URL

    This URL would point to a parent page and would be used for navigation. Similar to the request for a home page URL, this attribute would be selectable and have an entry field for the relative path to the parent page.
    A typical use case.
    Photographs from an event with multiple activities are uploaded to a hosting site using LR2. Banquet photos go to /event/banquet. Golf outing photos go to /event/golf. Awards photos go to /event/awards. In each case, the Parent Page attribute is checked and the entry field is populated with "/event".
    After the content is uploaded from LR2, the user exits LRs and uploads index.html to /event that provides navigation to each of the activity pages.

    To be consistent, the entry field should be populated with the relative path and the name of the landing page file (i.e. /event/index.html).

  • 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!

Maybe you are looking for

  • HT201210 evrytime i try to restore my phone it says unknown error cant restore

    everytime i try to restore my phone it says itune cant restore unknown error 2003

  • Google pages not loading

    hey there... just curious if anyone knows why on my mac book google sites and gmail will not load and cannot be found... my firewall is off and i have emptied caches and checked with my internet provider and also google.... every other page loads fin

  • Rumor confirmed:  CS4 will remain 32-bit for Mac, but will be 64-bit in Windows

    Photoshop, Lightroom, and Adobe's 64-bit roadmap http://blogs.adobe.com/jnack/ CS4 will remain 32-bit for Mac, but will be 64-bit in Windows.

  • Keychain hassles

    I just bought a new MacPro. I wanted to change the short name for the new computer so when I migrated the data from the old Mac (G5 dual 2.7) I had the old user account change it's name during the transfer to my new preferred short name. Great, my ne

  • Loading metadata through integration services

    Hi, I am trying to load metadata into a BSO cube through integration services. In the log file (Olapisvr), I see that dimensions are being built but it's unable to save the outline in the end. I get these error messages: EssbaseAPI: You have been log