Custom component by aggregation of components

I developed with some my custom and starndard component somthing like input text with server autocompletion.
It works using an HtmlInputText, then there is one my custom component, and than I use a HtmlDataTable to show the list for autocompletion.
So in my jsp i use somthing like:
<my:wrapper>
<h:inputText.../>
</my:wrapper>
<h:dataTable>
<h:column>
<h:outputLink..><h:outputText../></h:outputLink>
</h:column>
<h:dataTable>
Ok now I want to aggregate all these components in one custom component.
How can I do this?
Should I create only a new tag, or also new component?
How to create the aggregation of components in the java code?
Thanks a lot.
Alberto Gori.

Take a look at:
http://forum.java.sun.com/thread.jspa?forumID=427&threadID=556688
http://forum.java.sun.com/thread.jspa?forumID=427&threadID=532149
http://forum.java.sun.com/thread.jspa?forumID=427&tstart=0&threadID=549925
Sergey : http://jsfTutorials.net

Similar Messages

  • Custom component composed of other components

    Hello.
    I have a form (long, but simple) that is reused a few times across my applicaition. It would be great if I could package it as a JSF component. But I see no obvious way to create an UIComponent composed of other UIComponents.
    Are UIComponents really meant to be written from scrach, each parsing it's own request parameters and outputting raw html? Am I missing something?
    Thanks.

    Thanks for the quick reply, but I'm still stuck...
    How do I go about writing a composite custom
    component? Instanciating all sub components and
    delegating encoding and decoding to each? That's the road I try to take first.
    - Construct a SMALL test-bed application to develop your component.
    - consider implementing the naming container interface if you add components as children
    - consider acquiring "JSF in Action" from Kito Mann, it's the book with most samples for component building
    - announce "absences" to your family. It takes longer than you think beforehand ;-)
    - If your servlet-container starts up in less than 10 seconds it's better...
    I'm afraid to be asking too much, but does anyone
    know where can I find an example of this? I'm
    currently browsinng the MyFaces code, but so far
    whithout much luck....Well the myfaces code is the second best source after JSF in action and then there are a few tutorials on the net... time to surf to google and http://www.jsftutorials.net/
    hope this helps
    Alexander

  • DataGrid with Custom Component not showing sub-components

    I'm hoping someone can enlighten me on this issue.
    I have a datagrid with one column which has an item renderer. It doesn't matter if the "text" data comes from a dataProvider or is static.
    If I do the following, only the first label will show up.
    <mx:DataGridColumn headerText="Column Title">
         <mx:itemRenderer>
               <mx:Component>
                   <mx:VBox>
                        <mx:Label text="{data.data1}" />
                        <mx:Label text="{data.data2}" />
                   </mx:VBox>
              </mx:Component>
         </mx:itemRenderer>
    </mx:DataGridColumn>
    However, if I change the VBox to a HBox both labels will show up.
    <mx:DataGridColumn headerText="Column Title">
          <mx:itemRenderer>
                <mx:Component>
                    <mx:HBox>
                        <mx:Label text="{data.data1}" />
                         <mx:Label text="{data.data2}" />
                    </mx:HBox>
               </mx:Component>
          </mx:itemRenderer>
    </mx:DataGridColumn>
    I'm using:
    Flex Builder 3 Standalone
    Version: 3.0.214193
    OS: Vista
    Any ideas or comments would be appreciated.

    Thanks for the reply KomputerMan.com. I've tried changing the dimensions of the VBox and no other labels appeared. Usually, when there is not enough room within the datagrid cell scrollbars will appear - you can experiment with the example below to see what I mean.
    As for radiobuttons in a datagrid, here you go. The DataGrid and its dataProvider are constructed in the same way you normally would.
    <mx:DataGridColumn headerText="Approve/Deny/Pending" width="170">
        <mx:itemRenderer>
            <mx:Component>
                <mx:HBox height="27" paddingLeft="10">
                    <mx:Script>
                        <![CDATA[
                            private function isSelected(s:Object, val:String):Boolean {
                                if ( s.toString() == val) {
                                    return true;
                                } else {
                                    return false;
                        ]]>
                    </mx:Script>
                    <mx:RadioButton groupName="approveType"
                        id="approved"
                        label="A"
                        width="33"
                        click="data.status='1'"
                        selected="{isSelected(data.status, '1')}"/>
                    <mx:RadioButton groupName="approveType"
                        id="denied"
                        label="D"
                        width="33"
                        click="data.status='2'"
                        selected="{isSelected(data.status, '2')}/>
                    <mx:RadioButton groupName="approveType"
                        id="Pending"
                        label="P"
                        width="33"
                        click="data.status='3'"
                        selected="{isSelected(data.status, '3')}/>
                </mx:HBox>
            </mx:Component>
        </mx:itemRenderer>
    </mx:DataGridColumn>

  • Nesting JSF components in a  custom component

    I'm creating a new JSF custom component. my component needs to include an input text and a list box. my question is : how do I add these components to my JSF component ? I want to use to JSF component to render them rather then encoding the HTML myself. how can I do it ?
    I was told I need to use encodeChildren method somehow but I don't know how ?

    I finally found how to set a default skin to a custom component so that users of my component will not have to set again the skinClass value of my component.
    You have to create a defaults.css file at the root of your library and tell the compiler to take it into account.
    The remaining problem is about the compiler. There are some steps before success and they are a bit mysterious/unclear....
    I found 2 or 3 blog articles explaining those steps but the compiler arguments to use are all differents in each article...
    Here are the links I found:
    http://www.unitedmindset.com/jonbcampos/2010/05/12/creating-custom-spark-components/
    http://www.betadesigns.co.uk/Blog/2010/05/14/default-skin-for-custom-flashbuilder-componen ts/
    http://flexdevtips.blogspot.com/2009/06/default-stylesheet-in-swc-flex-library.html
    Following the first article guidelines has been successful for me but I'm not marking this topic as Resolved because I'd like some answers about this whole thing...

  • Best practices for adding components in a composite custom component

    Hello,
    I am developing a custom, composite JSF component need to dynamically add child components in my renderer class. I've noticed that people add components to a custom component in many different ways. I'd like to follow JSF best practices when developing this component - of the following approaches, which would you recommend? Or is there yet another approach I should be using?
    1) in the encodeBegin method of my renderer class, create a new component, add it to the component tree, and let the page life cycle take care of the rendering:
    HtmlDataList dimensionStateGroupDataList = (HtmlDataList) app.createComponent( HtmlDataList.COMPONENT_TYPE );
    //set properties on dimensionStateGroupDataList
    component.getChildren().add(dimensionStateGroupDataList);
    2) in either the encodeBegin or encodeEnd method, create a component and encode it:
    HtmlDataList dimensionStateGroupDataList = (HtmlDataList) app.createComponent( HtmlDataList.COMPONENT_TYPE );
    //set properties on dimensionStateGroupDataList
    dimensionStateGroupDataList.encodeBegin();
    dimensionStateGroupDataList.encodeEnd();
    Both of these methods are functional, and I prefer the first (why encode children if you don't have to?), but I am interested in other people's take on how this should be done.
    Thanks for your help.
    -Christopher

    My bad, sorry, wasnt concentrating, Im afraid I have no experience with portlets, but I would have thought that you can mimic the outputLinkEx in you renderer by encoding your own links?
    If you were to bind a backing bean variable to an outputLinkEx what would it be? Not understanding portlets, or knowing what an outputLinkEx is may be hindering me, but you should be able to create an instance of it in code like (this example uses HtmlOutputLink, you would need to know which component to use):
    HtmlOutputLink hol = new HtmlOutputLink();
    hol.set....Then set any attributes on it, and explicitly call its encodeStart, encodeEnd functions. Is that way off the mark.

  • Extended Swing Components into Custom Component Palette

    Hi
    As part of my swing application I have a number of GUI components created as an extension of a normal swing component.
    As example is below.
    package com.myapp
    import java.awt.Font;
    import javax.swing.JLabel;
    public class MLabel extends JLabel
    public MLabel()
    this.setFont(new Font("Tohoma",0,10));
    this.setFocusable(false);
    As you can see this simple sets some default attributes. How can I add this custom component into a palette for each access when using the GUI builder.
    I've created a new page in the palette, but am unable to add my components.
    Thanks for your help.
    Nick.

    Hi,
    - create a JAR file with your component(s) in it
    - Create a custom Library in JDeveloper (Tools--> Managed Libraries)
    - Select the JAR file
    - On the component palette (the page you created), select the properties option of the context menu
    - Your library now shows up in the drop down list to choose the component to add
    Frank

  • How to include multiple image components into a single custom component???

    How to include multiple image components into a single custom component???

    Hi Marcel,
    an ABAP transaction can only run or at least be started on one single system. A portal transaction can be assigned using a URL. This doesn't need any logical component.
    Regards
    Andreas

  • Best strategy for variable aggregate custom component in dataTable

    Hey group, I've got a question.
    I'd like to write a custom component to display a series of editable Things in a datatable, but the structure of each Thing will vary depending on what type of Thing it is. So, some Things will display radio button groups (with each radio button selecting a small set of additional input elements, so we have a vertical array radio buttons and beside each radio button, a small number of additional input elements), some will display text-entry fields, and so on.
    I'm wondering what the best strategy for tackling this sort of thing is. I'm sort of thinking I'll need to do something like dynamically add to the component tree in my custom component's encodeBegin(), and purge the extra (sub-) components in encodeEnd().
    Decoding will be a bit of a challenge, maybe.
    Or do I simply instantiate (via constructor calls, not createComponent()) the components I want and explicitly call their encode*() and decode() methods, without adding them to the view tree?
    To add to the fun of all this, I'm only just learning Faces (having gone through the Dudney book, Mastering JSF, and writing some simpler custom components) and I don't have experience with anything other than plain vanilla JSP. (No EJB, no Struts, no Tapestry, no spiffy VisualDevStudioWysiwyg++ [bah humbug, I'm an emacs user]). I'm using JSP 2.0, JSF 1.1_01, JBoss 4.0.1 and JDK 1.4.2. No, I won't upgrade to 1.5 (yet).
    Any hints, pointers to good sample code? I've looked at some of the sample code that came with the RI and I've tried to navigate the JSF Blueprints stuff, but I haven't really found anything on aggregating components into a custom component. Did I miss something obvious?
    If this isn't a good question, please let me know how I can sharpen it up a bit.
    Thanks.
    John.

    Hi,
    We're doing something very similar. I had a look at the Tomahawk Date component, and it seems to dynamically created InputText components in the encodeEnd(). However, it doesn't decode this directly (it only expects a single textual value). I expect you may have to check the request yourself in decode().
    Other ideas would be appreciated, though - I'm still new to JSF.

  • Problem with inputText in my custom component

    Hi, I have a custom dataTable component that I'm trying to get to work. It has to be a custom component because dataTable doesn't support rowspan, colspan, multi line headers, and a rendered attribute for rows. The problem is, that when I wrap the column tag inside my row tag then the method for the inputText tag never gets called in the UPDATE_MODEL_VALUES phase.
    I'm starting to think that JSF doesn't support 2 levels of tags between the inputText and dataTable. I'm hoping that someone can tell me what I have wrong with my components.
    Here is the JSP snippet.
    <cjsf:rptTable>
         <cjsf:data id="dataTable1" value="#{allAuthUser.tableRows}" var="myTableRow1">
              <cjsf:row>
                   <cjsf:col>
                        <h:inputText id="tableTestFld" value="#{myTableRow1.testFld}" size="5" maxlength="5"/>
                   </cjsf:col>
              </cjsf:row>
         </cjsf:data>
    </cjsf:rptTable>Here is what it renders. It looks to me like everything renders fine. So I'm guessing that there is something in a component that is causing JSF during the life cycle to not be able to process correctly.
    <table>
         <tbody>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_0:tableTestFld" name="tblmaintForm:body:dataTable1_0:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_1:tableTestFld" name="tblmaintForm:body:dataTable1_1:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_2:tableTestFld" name="tblmaintForm:body:dataTable1_2:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
         </tbody>
    </table>Note: If I leave off the row tag it renders the same way except of course the <tr> and </tr> tags are missing. If I do this, then the backing method for the inputText tag is called and everything works fine. Why doesn't it work with the row tag in place?
    Here are the components:
    public class UIRptTable extends UIComponentBase {
         public UIRptTable() {
              setRendererType("tblmaint.rptTableRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableData extends HtmlDataTable {
         public UIRptTableData() {
              setRendererType("tblmaint.rptTableDataRenderer");
         public String getFamily() {
              return "javax.faces.Data";
    public class UIRptTableRow extends UIOutput {
         public UIRptTableRow() {
              setRendererType("tblmaint.rptTableRowRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableCol extends UIColumn {
         public UIRptTableCol() {
              setRendererType("tblmaint.rptTableColRenderer");
         public String getFamily() {
              return "javax.faces.Column";
    }Here is part of the faces-config file in case you need it.
    <!-- Components -->
    <component>
         <component-type>tblmaint.rptTable</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTable</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableData</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableData</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableRow</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableCol</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol</component-class>
    </component>
    <!-- Render Kits -->
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Data</component-family>
              <renderer-type>tblmaint.rptTableDataRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableDataRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRowRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRowRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Column</component-family>
              <renderer-type>tblmaint.rptTableColRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColRenderer</renderer-class>
         </renderer>
    </render-kit>I sure hope that someone can help me out. Please let me know if you need any additional information.
    Thanks,
    Ray

    Hi, Ray!
    1) I was trying to put a button in the column header (for sorting) and I couldn't get that to work. That involved the >colhdr tag. I got that to work but I don't remember the fix. I'll look it up and reply back with that when I can.Dealing the first part of your trouble, you need NOT a custom component.
    I have looked through the implementation of RepeaterRenderer, as you advised me, and found that the multi-header possibility is included in the implementation of dataTable control.
    The code below is the part of source of repeater.jsp with only change:
    <d:data_repeater> &#61664; <h:dataTable>
    And it works fine.
    <h:dataTable id="table"
    binding="#{RepeaterBean.data}"
         rows="5"
    value="#{RepeaterBean.customers}"
    var="customer">
    <f:facet name="header">
    <h:outputText value="Customer List"/>               <!� First Header row -- >
    </f:facet>
    <h:column>
    <%-- Visible checkbox for selection --%>
    <h:selectBooleanCheckbox
    id="checked"
    binding="#{RepeaterBean.checked}"/>
    <%-- Invisible checkbox for "created" flag --%>
    <h:selectBooleanCheckbox
    id="created"
    binding="#{RepeaterBean.created}"
    rendered="false"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Account Id"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="accountId"
    binding="#{RepeaterBean.accountId}"
    required="true"
    size="6"
    value="#{customer.accountId}">
    </h:inputText>
    <h:message for="accountId"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Customer Name"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="name"
    required="true"
    size="50"
    value="#{customer.name}">
    </h:inputText>
    <h:message for="name"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Symbol"/>
    </f:facet>
    <h:inputText id="symbol"
    required="true"
    size="6"
    value="#{customer.symbol}">
    <f:validateLength
    maximum="6"
    minimum="2"/>
    </h:inputText>
    <h:message for="symbol"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Total Sales"/>
    </f:facet>
    <h:outputText id="totalSales"
    value="#{customer.totalSales}">
    <f:convertNumber
    type="currency"/>
    </h:outputText>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Commands"/>
    </f:facet>
    <h:commandButton id="press"
    action="#{RepeaterBean.press}"
    immediate="true"
    value="#{RepeaterBean.pressLabel}"
    type="SUBMIT"/>
    <h:commandLink id="click"
    action="#{RepeaterBean.click}"
    immediate="true">
    <h:outputText
    value="Click"/>
    </h:commandLink>
    </h:column>
    </h:dataTable>
    You may have a look at HTML source to prove that dataTable is already what you need:
    <table id="myform:table">
    <thead>
    <tr><th colspan="6" scope="colgroup">Customer List</th></tr>
    <tr>
    <th scope="col"></th>
    <th scope="col">Account Id</th>
    <th scope="col">Customer Name</th>
    <th scope="col">Symbol</th>
    <th scope="col">Total Sales</th>
    <th scope="col">Commands</th>
    </tr>
    </thead>
    <tbody>
    2.) The second trouble is still unsettled as previously. Right now I have different task at my job, and I can�t continue investigation of this problem.
    But when you find smth., please let me know. I�ll be very grateful.
    Regards,
    Oleksa Stelmakh

  • How do you reference a valueObject located in main to a custom component created in Catalyst?

    Hello,
    I have been working with the Catalyst Beta 2 / Flash Builder beta trying to create a photogallery and have hit a little bit of a snag, try as I might I can't seem to find the answer anywhere. I am still new to Flex so please excuse me if this is a basic question, I have been trying to understand more about Flex to make my designs in Catalyst better.
    I found this video on Adobe TV: http://tv.adobe.com/watch/rich-internet-applications-101/ria-stepbystep-16-binding-a-data- service-to-flash-builder-components/
    It's wonderful and I have the datalist I created in Catalyst working with the XML file I generated but I designed my little photogallery a bit diffrent, I created a Custom Component in Catalyst so that when you click an item on the DataList it pop's up a little screen with a larger photo in on it, rather then having an image in the main application. Now my problem seems to be that I can't refrence the valueObject I created with the wizard as it's in my Main.mxml file, is there a way to refrence it from my Custom Component so the larger image will display? Is there a way to let the component know which item on the dataList in the main application is selected and display the correct image?
    I should also say I really enjoy working with the Beta for both Flash Builder / Catalyst, thanks for the hard work!
    Thanks for the help,
    Chris

    I am afraid you cannot bind to static properties in Windows Store Apps. It is simply not supported.
    You could create a proxy class that exposes the static command property and bind to this property of an instance of the proxy object:
    http://stackoverflow.com/questions/14186175/bind-to-a-static-field-in-windows-8-xaml
    http://stackoverflow.com/questions/4708711/how-can-i-use-the-xstatic-extension-for-phone7-silverlight-apps
    You will of course have to create an instance of the proxy object. There is no way around this.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question.

  • Custom Component UI not displaying in 11G

    Hi All,
       We have a custom component in 10G where we have added new link in the UCM Home Page, it will be displayed beside Administration tab with name Edit Tables, under this we have sub links Alldistr_RVS, Distprod, Distuser, Prdstate, Products_RVS, State_RVS, Stateusr. When we deployed this code in 11G it is not working. Could any one please provide me code to make it work in 11G instace. Appreciate your help on this.
    Below is the code used in 10G in resource file
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    ampfRVSEditTables htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamichtml custom_finish_layout_init@>
    <$include super.custom_finish_layout_init$>
      <$include how_to_components_menu$>
      <$include vbis_edit_tables_link$>
    <@end@>
      <@dynamichtml how_to_components_menu@>
      <$if not how_to_components_menu_included$>
      //add a drop-down menu, or a tray to the UI
      navBuilder.addChildNodeTo('NAVTREE', 'collection', 'id==EDIT_Tables', 'label==Edit Tables');
      if (navBuilder.menuB)
      navBuilder.menuB.addTopLevelNode("EDIT_Tables");
      else if (navBuilder.trayA)
      navBuilder.trayA.addTopLevelNode("EDIT_Tables");
      <$EDIT_Tables_menu_included=1$>
      <$endif$>
      <@end@>
    <@dynamichtml vbis_edit_tables_link@>
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==ALLDISTR_RVS',
    'label==Alldistr_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_ALLDISTR_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTPROD',
    'label==Distprod', 'url==<$HttpCgiPath$>?IdcService=GET_DISTPROD_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==DISTUSER',
    'label==Distuser', 'url==<$HttpCgiPath$>?IdcService=GET_DISTUSER_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRDSTATE',
    'label==Prdstate', 'url==<$HttpCgiPath$>?IdcService=GET_PRDSTATE_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==PRODUCTS_RVS',
    'label==Products_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_PRODUCTS_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATE_RVS',
    'label==State_RVS', 'url==<$HttpCgiPath$>?IdcService=GET_STATE_RVS_PAGE');
    navBuilder.addChildNodeTo('EDIT_Tables', 'item', 'id==STATEUSR',
    'label==Stateusr', 'url==<$HttpCgiPath$>?IdcService=GET_STATEUSR_PAGE');
    <@end@>
    </body>
      </html>
    Thanks.
    Ashok

    Hi Jiri,
       I from the sample example I tried to develop component to display HOW_TO_COMPONENTS as Menu item under which there is sub item Annuity_Dispname_Mapping, but it is not displaying. I am afraid where it went wrong. Below is the code i used, please help me to fix this. Thank you
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>
    MenuExample htmlIncludeOrString
    </title>
    </head>
    <body>
    <@dynamicdata CoreMenuItems@>
    id,           label,       linkType, linkData
    HOW_TO_COMPONENTS, How To Components, YuiDev,
    ANNUITY_DISPNAME_MAPPING, Annuity_Dispname_Mapping, YuiDev, <$HttpCgiPath$>?IdcService=GET_DATA_ACCESS_PAGE
    <@end@>
    <@dynamicdata CoreMenuItemRelationships@>
    <?commatable mergeKey="primaryKey"?>
    parentId,    id,           loadOrder
    MENU_A,      HOW_TO_COMPONENTS,  1000
    HOW_TO_COMPONENTS, ANNUITY_DISPNAME_MAPPING, 10
    <@end@>
    <@dynamicdata CoreMenuItemsFlags@>
    id,           flags
    HOW_TO_COMPONENTS, isLoggedIn
    ANNUITY_DISPNAME_MAPPING, isLoggedIn
    <@end@>
    <@dynamicdata CoreMenuItemsImages@>
    id,           image,                imageOpen
    HOW_TO_COMPONENTS,     ScsPageItem.gif,
    ANNUITY_DISPNAME_MAPPING,     ScsPageItem.gif,
    <@end@>
    <@dynamicdata ampcustom_menu_items_template_data@>
    <?commatable indexedColumns="id"?>
    id,                  parentId,    linkType,        flags
    HOW_TO_COMPONENTS_LINK_TEMPLATE, HOW_TO_COMPONENTS, external,
    <@end@>
    <@dynamichtml custom_navigation_menu_items@>
    <$include super.custom_navigation_menu_items$>
      <$urlCount = 0$>
      <$if utLoadResultSet("pne_portal", "PersonalURLS")$>
      <$if rsFirst("PersonalURLS")$>
      <$loop PersonalURLS$>
      <$ddAppendIndexedColumnResultSet("ampcustom_menu_items_template_data", "NavigationMenuItems", "id", "HOW_TO_COMPONENTS_LINK_TEMPLATE")$>
      <$rsLast("NavigationMenuItems")$>
      <$NavigationMenuItems.id = "HOW_TO_COMPONENTS_" & urlCount$>
      <$NavigationMenuItems.label = js(title)$>
      <$NavigationMenuItems.linkData = js(website)$>
      <$NavigationMenuItems.loadOrder = urlCount$>
      <$urlCount = urlCount + 1$>
      <$endloop$>
      <$endif$>
    <$endif$>
    <@end@>
    </body>
    </html>
    Thanks

  • How to construct the component tree in my custom component?Help!

    Hi, i am writing a custom component like this:
    public class HtmlCategory extends HtmlPanelGrid
         public void processRestoreState(javax.faces.context.FacesContext context,
                java.lang.Object state)
              setColumns(1);
              HtmlCommandLink link=new HtmlCommandLink();
              link.setValue("Let's Bingo");
              MyUtil.setActionListener(context,link,"#{temp.mytest}");
              UIParameter param=new UIParameter();
              param.setName("name");
              param.setValue("Robin!");
              link.getChildren().add(param);
              param.setParent(link);
              getChildren().add(link);
              link.setParent(this);
              super.processRestoreState(context,state);
    }         you see, i want to construct the compont tree at Restore View phase this way,because the structure of the component tree will always be the same, so i don't the user to write extra code.
    But the children of the component are not rendered,the renderer of the HtmlCategory component just extends the HtmlGridRenderer(myfaces) directly,and always calls the "super" methods in the encode methods of the renderer.
    I got a message from the console:
    Wrong columns attribute for PanelGrid id0:id4: -2147483648
    but i have set the columns attribute in the code above, so what's happening? or please give some advice about how to render the component tree by myself in Restore View with the tree constructing code in the custom component class code,just lke the code above.
    Best Regards:)
    Robin

    Well, i don't know if i have got my question clear.
    usually, according to the tags you use in the jsf page, a component tree will be created at the Restore View phase,for example:
    <f:form>
      <h:panelGrid ...........>                         
              <h:dataTable ................>
              </h:dataTable>
       </h:panelGrid>
    </f:form>but because i am writing a component for my web app, all the child components and their attributes are not likely to change. so i want to reduce the tags into one custom tag, and construct the component tree internally by myself.But it is not the case of backing bean.So i wrote the the code in the method:
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)as it is shown in my orginal message.But it seems that it is not right way to construct my component tree.So where should i put the code that construct the component tree?Overriding the method :
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)is not the right way?
    Best Regards:)
    Robin

  • I want to add DataGrid in my custom component as a child component,

    I want to add DataGrid in my custom component as a child component, can we ?? or should i generate HTML for table creation in my custom component's renderer ?

    I did that:
    for example, if i want to add a Button control in my custom control:
    public void encodeChildren( FacesContext context ) throws IOException
             super.encodeChildren( context );
            //createComponent raises exception.... invalid component type     
            //UIComponent field = FacesContext.getCurrentInstance().getApplication().createComponent( javax.faces.component.html.HtmlInputText.class.getName() );
             HtmlInputText input = new HtmlInputText();
            getChildren().add( input );
        public boolean getRendersChildren()
            return true;
        }Can you give me any example, i want to add child components at run time basically..

  • How Do I Link to Custom Component States From Scrolling Content Buttons?

    Hi there, I'm in need of some help as i've got a deadline to meet within the next few weeks and im stuck!
    Basically what I've done is i've made a scrolling content lists, containing about 10 products in each one, my plan was to turn each product into a button so that users could click on that product, and take them to a new page containing more detailed information on that product; when they've finished looking at that product they can click a button to return them to the list they were on previously. However I can't just make a brand new state for each product as there is a limit to 20 states, and I will need around 50 of them.
    So, from what i've read I will need to create custom components. the only trouble with doing this is that I can't link to the custom component on a different main timeline state (I dont get the option to link to the states of the custom component).
    If i put the image of the detailed product into the scroll panel I am able to link to it, however, it's inside the scrolling content and it just scrolls around and stuff which isn't what I want; as it makes it look messy.
    - Basically I just need to link from the buttons in the scrolling list, to a more detailed page for that product. Then be able to return to the list using a button.
    If anybody has any input on how to achieve this, please help me out. Starting to panic now as this needs to be finished before september :s
    Btw i'm happy to share my .fxp file it that helps.
    Thanks alot, Hoping for some helpful replies on this topic
    - Tom

    Hi Tom,
    Adding this back here to share my wireframe with the community.
    Have put a quick .fxp together based on the 'product' section of your project.
    Take a look at how the product lists are linking into the product detail pages within their custom components. 
    Using this model you should be able to expand out to infinite product detail states.  If a particular product area has more than the maximum allowed states, just start a new custom component (part 2 for that product section).
    Let me know if you have any questions. Hope this sets you on a path to getting your project complete.  It's looking nice.
    Tanya

  • How to create custom component in CRM 2007

    Hi.
    I am new for the CRM 2007 Web UI.
    Here we have CRM_UI_FRAME.
    Like this so many Components are there.
    I want how to create our own component.
    I created it as follows.
    Open the Transaction code bsp_wd_cmpwb.
    Provide Z Name in the Component.
    Zcomponent
    Press Create button.
    Go to Run Time Repository.
    Press Change Mode.
    Create a MODEL as ALL.
    GO to Browser Component Structre.
    Select View.
    Provide View name.
    Create the View.
    Go to view Layout.
    Provide the code like this.
    <%@page language="abap"%>
    <%@ extension name="htmlb" prefix="htmlb"%>
    <%@ extension name="xhtmlb" prefix="xhtmlb"%>
    <%@ extension name="crm_bsp_ic" prefix="crmic"%>
    <%@ extension name="bsp" prefix="bsp"%>
    <cthmlb:overviewFormConfig/>
    Create the context under the context.
    Go to Configuration tab.
    Assigne the Attributes to the Screen.
    GO to the Run Time Repository.
    press change mode.
    Assigne the view name to the Window.
    Save it.
    Test the Componet. But it is not diaply anything on the screen.
    How i will get the data into the web UI.
    Can anybody expalin about this one to me with screen shorts if possible.
    I want add some fields into the web UI. Provide some values into that. Capture the values.
    Navigate the data from one screen to another screen. How it is possible. I did not understand. 
    If i am changing any screens in the pre define component it shows dump.
    So, now i need Custom component with adding of the fields.
    Please give me proper information regarding this one.
    Thank You.
    Krishna. B.

    Hi,
    Try put the htmlb to show a field:
    <thtmlb:label design="LABEL" for="//<context>/<field>" text="<field>"/>
    <thtmlb:inputField  id="<field>" maxlength="31" size="20" value="//<context>/<field>"/>
    In order to get value, you can write a simple code in the event_handler:
    LR_BOL                      type ref to IF_BOL_BO_PROPERTY_ACCESS
    LR_BOL = ME->TYPED_CONTEXT-><context>->COLLECTION_WRAPPER->get_current()
    var1 = LR_BOL->GET_PROPERTY_AS_STRING('FIELD').
    take a look at lr_bol methods so that you can see the set and get methods.
    Regards,
    Renato.

Maybe you are looking for

  • Can't add music to iTunes 11.0.2

    Hey guys, I am using iTunes 11.0.2 on Windows 7 and I just recently purchased a new nano. When I went to go add some more music onto it tonight to my suprise nothing I selected would upload my iTunes library at all. I have tried restarting my compute

  • Exporting to multiple PDF's from one report

    I have a requirement to create multiple PDF's from one report. My thought is that I can I can create a foreach loop that cycles through one of my groups.  I would then like to have each file have the name of that group.  If anyone could help me on ho

  • Problème d'installation d'ios cisco aironet 1300

    au fait j'ai un cisco aironet 1300 et je n'arrive pas à installer l'ios par ce que 'il ne me donne pas la main pour gérer. Au lieu de m'afficher root> il m'affiche que bridge: avec des commandes qui ne permettent pas d'installer l'ios. Si vous pouvez

  • Excel - Unrecogniz​ed Document Format...N​OT a Office 2007 issue

    On my previous, and now latest BB (8330), I cannot open e-mail attachments in the Excel (.xls) format. I am using Access 2003 to produce reports/exceptions/alerts using Office 2003 (and Excel 2003 as well). It's no issue on a standard PC...the attach

  • Where is the 64-bit Linux 12c agent??

    We have a fresh clean install of 12c on a 32-bit Linux platform. I tried pushing out the agent (through 12c) to a host running 64-bit Linux. The remote agent install failed, as it would not take the 32-bit agent from the OMS host on the 64-bit remote