PropertyNotFoundException on a custom component

Hello,
I'm experiencing some issue while using a custom component in a FXML file. I try to instanciate my comp and tu set a text with the command :
<fx:include source="MyComponent.fxml" text="myText" />
I have linked my component to a controller using fx:controller="myPackage.MyComponent" and in this MyComponent.java I wrote a setter :
+public void setText(String text){ ... }+
Yet, during the execution, I always get a PropertyNotFoundException : Property "text" does not exist or is read-only.
I guess I forgot a little something but I don't managed to find what. Could somebody help me with this issue please ?
Léo

The "text" property in this example applies to the root element of the included file, not its controller:
<fx:include source="MyComponent.fxml" text="myText" />So, in order to process this markup, you'll need to make sure that the class represented by the root element defines a setText() method.

Similar Messages

  • 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

  • Unable to Edit the View in Custom Component

    Hi Experts,
    Please help me to resolve this issue !
    I am unable to lock the BOL Entity in my custom component using BTAdminH. I have written the below code in the Edit event Handler for Edit Button. The lr_entity->lock( ) condition statement is getting false and it is skipping the "set_view_editable( me )." code statement. Why??
    This is code excerpt that I have taken from edit button of the BP_HEAD/AccountViewSet and altered to my component/View
    DATA: lr_entity     TYPE REF TO cl_crm_bol_entity,
            lr_controller TYPE REF TO cl_ZVKH8_bspwdcomponent_impl.
      TRY.
          lr_controller ?= me->comp_controller.
          lr_entity ?= lr_controller->typed_context->btadminh->collection_wrapper->get_current( ).
    IF lr_entity IS BOUND.
      IF lr_entity->IS_LOCKED EQ abap_false.
        IF le_entity->IS_CHANGEABLE EQ abap_true.
           IF lr_entity->lock( ) EQ abap_true.
            me->view_group_context->set_view_editable( me ).
           ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
    and when I directly executed the below code in the Edit event Handler for Edit Button I am receiving the dereferencing NULL value exception. Why in my custom component in many places this happening??
      me->view_group_context->set_view_editable( me ).
    Exception Details
    CX_SY_REF_IS_INITIAL - Dereferencing of the NULL reference
    Method: ZL_ZVKH8_DETAILSEF_IMPL=>EH_ONBACK
    Thanks,
    Bujji

    Hi Summit & NishaNC,
    Thanks for your responses !
    As suggested, I have debugged the code for ->lock( ) method and there are exceptions raised from some methods.
    Method GET_LOCK () -> Method GET_ROOT () ->Method GET_PARENT ()
    At GET_ROOT( ) method i have received an exception
    "Root entity BTAdminH could not be determined" and one more "Entity BTAdminH could not be locked"
    Later when I have checked in MODEL Browser, I found that the BOL object "BTAdminH" for my view is an Access object and not the Root Object.
    Hence, I have a question? Does the locking can be done only for ROOT Objects?
    If this is TRUE then I think this is the major problem with my custom component where even the cross component navigation is also not happening and in many places I am receiving "Dereferencing NULL Value" information.
    Also I have gone through some of the Threads and one information that I found from Sumit Mittal
    1. An access object is an independent entity, has primary keys of its own.
    2. A root object is a special access object that is at the top of the hierarchy based on business rules.
    3. A dependent object's primary keys are supplied by access objects and it's lifetime is bound to them. If the parent object is destroyed, the dependent object is also destroyed.
    4. Search objects are query objects useful for querying root objects
    5. Search result objects - Search objects return the results in the form of a result object together with a relation pointing to the root object.
    6. View objects - ?
    7. Dynamic search objects - Used in advanced search, supports ranges and operators
    Could you please specify in which scenarios we have to go for Access Objects and Root Objects
    Thanks,
    Bujji

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

  • How to handle custom component data on overviewset save button CRM UI

    Hi,
    I have added a custom component to a standard view which is enchanted.
    I can handle any data with my buttons on the component but after editing data
    i need the save the data when the save button on the overview(top) is pressed.
    I have redefined save button of overview but i cant get my data.
    My node name is Root. I think i couldnt bind it to overview.
    How can i do that?
    Thank you

    Probably it can be done by
    http://wiki.sdn.sap.com/wiki/display/CRM/CRMWebUITechnical-CreatingTableViewInWebUI
    i am trying
    Thank you

  • 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

  • Decode-method for custom component isn't called

    Hi,
    i have writen a custom component which gets some information by command-link. To make the data from the link accessible, i wrote a decode method in my renderer and in me component. But both method are not called from the faces framework.
    Dows anybody knows what i made wrong???
    Thanks, Sebastian

    Hi,
    thank you for your reply.
    Unfortunately the processDecodes(...) of my component is also not called from the framework. Does anybody knows what i'm making wrong???
    Thanks!

  • Problem with attributes in custom component

    Hi All,
    I am creating a simple jsf PanelGrid custom component....in that component I am adding two new attributes....
    when I use that tag in my jsf application it is rendering fine in the client side....but the parent class that is PanelGrid component's attributes are not inheriting to my custom panelgrid....
    can any one tell me how can I use the attributes of the super class PanelGrid??
    Thanks...

    Have you configured the attributes in the tag library descriptor?

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

  • Can I use axis.jar in my custom component

    Can I use axis.jar in my custom component.
    Is there any license need to user this jar ??
    Thanks

    In our UCM setup axis has been implemented in a custom component to consume webservices. As Axis falls under the Apache license you can freely import it in your custom java classes.

  • JPanel won't display my custome component

    Hi,
    I made a custome component class that in its paint method at this stage is suppose to paint a white rectangle on screen. However the when I add this custome component to my JPanel it doesn't show up. Does anybody have a solution for this?
    My code for the custome component is,
    public spaceMediaDisplayObject(mediaObject mo){
         x = mo.getSpaceX();
         y = mo.getSpaceY();
         height = mo.getHeight();
         width = mo.getWidth();
         name = mo.getName();
         System.out.println("Constructor");
         this.repaint();
    public void paint(Graphics g){
         System.out.println("Draw");
         g.setColor(Color.white);
         g.drawRect(x, y, height, width);
    And the fragment of code I am using to try and display in on the panel is as follows,
    spaceMediaDisplayObject smdo = new spaceMediaDisplayObject(toDisplay);
         spaceBodyPanel.add(smdo);
    Please help if able.

    If it's null then you need to set the size of each component explicitly:
    JPanel panel = new JPanel(null);
    Component customComponent = new CustomComponent();
    panel.add(customComponent);
    customComponent.setBounds(0, 0, 100, 100); // For exampleA simple layout manager could be used to make the component fill the panel, for example:
    JPanel panel = new JPanel(new GridLayout(1, 1));
    panel.add(new CustomComponent());Hope this helps.

  • Advice on creating a tricky custom component

    Hi,
    I'm working on creating a custom component which displays a image at the top of the canvas, and loops through a passed array collection, displaying each row of the array collection in a item renderer. So the component should look like this (see attached image).
    As you can see from this image the header is a image itself, this will differ every instance of the panel, there should be 3 of these panels on the page. Then each row of data is a item renderer displaying the data provided from a array collection of value object. If there are 4 items in this array collection then the panel should show 4 rows, if there are 2 row in the array then the panel will display 2 rows. Also the height of the panel will dynamically change depending on the number of rows to show.
    I was thinking of extending a Canvas component, and then passing in the image URL and trying to load and draw the image dynamically, then I was thinking of using the Drawing API to create the rectangle shape using the drawRoundRectComplex() of the graphics class.
    The problems I see with this is that I don't think the drawn rectangle shape can re-draw itself to show the change in height when more or less row of data need to be be displayed.
    Another option I have been thinking about is extending the Panel class to create my component, this may be better for handling the height resizing, but I'm not sure it can support the look of this component (the header image and the three rounded corners).
    Could anyone give me some advice on what would be the better option for creating this component.
    Thanks
    Stephen

  • 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

  • I am not able to create a JMS connection from a custom component in UCM

    I am trying to create a custom component which makes a JMS connection and inserts messages in JMS Queue.
    THe JMS server is hosted on Weblogic Application Server.
    When the code runs I am getting the factory object and the queue object.
    But when I try to get a connection it throws an error as pasted below.
    WHen I googled the same error It has shown a simliar problem in TOmcat in sun thread
    It said two jar files xerces.jar and xml-apis.jar are obsolete.
    I replaced with the new version.
    still the same problem occurred
    Please help
    Pasting the code and exception here
    Code __________________________________________
    import java.util.Date;
    import java.util.Hashtable;
    import javax.jms.*;
    import javax.naming.*;
    import weblogic.jms.client.WLConnectionImpl;
    import weblogic.jms.extensions.*;
    import javax.rmi.PortableRemoteObject;
    public class SimpleProducer {
    public static void drive() {
    final int NUM_MSGS;
         NUM_MSGS = 93;
    Context jndiContext = null;
    Hashtable<String, String> ht;
              ht = new Hashtable<String, String>();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
                        "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://punitp52975d:7001");
    try {
         jndiContext = new InitialContext(ht);
    } catch (NamingException e) {
    System.out.println("Could not create JNDI API context: " +
    e.toString());
    System.exit(1);
    ConnectionFactory connectionFactory = null;
    Destination dest = null;
    try {
                   Object home = jndiContext.lookup("CNFT"); // where iiopTestDS is jndi name for my DataSource.
    connectionFactory =(ConnectionFactory)PortableRemoteObject.narrow(home , ConnectionFactory.class);
         Object home1 = jndiContext.lookup("QUEUE2"); // where iiopTestDS is jndi name for my DataSource.
    dest =(Destination)PortableRemoteObject.narrow(home1 , Destination.class);
         /*connectionFactory = (ConnectionFactory) jndiContext.lookup(
    "CNFT");
    dest = (Destination) jndiContext.lookup("QUEUE2");
    System.out.println("connectionFactory,dest "+connectionFactory+dest);*/
    } catch (Exception e) {
    System.out.println("JNDI API lookup failed: " + e.toString());
    e.printStackTrace();
    System.exit(1);
    //WLConnectionImpl connection = null;
    WLConnection connection = null;
    WLMessageProducer producer = null;
    try {
                   System.out.println("Getting Connection "+(WLConnection) connectionFactory.createConnection());
    //connection = (WLConnection) connectionFactory.createConnection();
                   System.out.println("Connection created");
    WLSession session =
    (WLSession) connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
    producer = (WLMessageProducer) session.createProducer(dest);
    WLMessage message = (WLMessage) session.createTextMessage();
    //TextMessage message = session.createTextMessage();
    for (int i = 91; i < NUM_MSGS; i++) {
    ((TextMessage) message).setText("This is message " + (i + 1));
    Long l = new Date().getTime();
    message.setLongProperty("ReleasedDate",l );
    System.out.println("Sending message: " + ((TextMessage) message).getText());
    producer.send(message);
    producer.send(session.createMessage());
    } catch (Exception e) {
    System.out.println("Exception occurred: " + e.toString());
    } catch (Throwable et) {
    System.out.println("Exception occurred: " + et.toString());
    et.printStackTrace();
    finally {
    if (connection != null) {
    try {
    connection.close();
    } catch (Exception e) {
                             System.out.println("*************Instantiating Producer***************");
    Exception_________________________________________________________________
    Exception occurred: java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
    java.lang.NoSuchMethodError: javax.xml.parsers.SAXParserFactory.getSchema()Ljavax/xml/validation/Schema;
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.<init>(SAXParserImpl.java:124)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.newSAXParserImpl(SAXParserFactoryImpl.java:115)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl.setFeature(SAXParserFactoryImpl.java:143)
    at weblogic.xml.jaxp.WebLogicSAXParserFactory.<init>(WebLogicSAXParserFactory.java:62)
    at weblogic.rmi.internal.wls.WLSRMIEnvironment.getSAXParser(WLSRMIEnvironment.java:136)
    at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:170)
    at weblogic.rmi.internal.DescriptorManager.getDescriptorAsMap(DescriptorManager.java:159)
    at weblogic.rmi.internal.DescriptorManager.createRuntimeDescriptor(DescriptorManager.java:104)
    at weblogic.rmi.internal.DescriptorManager.getBasicRuntimeDescriptor(DescriptorManager.java:85)
    at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:51)
    at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:37)
    at weblogic.rmi.internal.OIDManager.makeServerReference(OIDManager.java:194)
    at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:175)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
    at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
    at weblogic.rmi.internal.OIDManager.initializeDGCServer(OIDManager.java:231)
    at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:144)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceRemote(RemoteObjectReplacer.java:120)
    at weblogic.rmi.utils.io.RemoteObjectReplacer.replaceObject(RemoteObjectReplacer.java:103)
    at weblogic.rmi.extensions.server.ServerHelper.exportObject(ServerHelper.java:223)
    at weblogic.corba.server.naming.ReferenceHelperImpl.exportObject(ReferenceHelperImpl.java:233)
    at weblogic.rmi.extensions.PortableRemoteObject.exportObject(PortableRemoteObject.java:34)
    at weblogic.messaging.dispatcher.DispatcherImpl.export(DispatcherImpl.java:85)

    This is probably related to this other issue http://www.adobeforums.com/webx/.59b7fbab/0.
    Jasmin

Maybe you are looking for

  • Percentage Overhead Rates are not capture with Transport request

    Hi, I have defined Percentage Overheads rate in KZZ2 and assigned the same  into Costing Sheet.But while saving the transport reqest in to QAS client,It is throwing the below error.Kindly help me in solving this issue. Individual entries cannot be pu

  • Converting MS Word docs with coloured bacgrounds to pdf

    Forgive an Acrobat 'dope' but this outwardly appears to be a simple problem ....... that I can't figure out! For work I am using Microsoft Office Word 2003 (MS Office Pro 2003) and Acrobat 8 Pro.  I have no problem converting an MS Word doc, with bac

  • Submitting a dynamic program with layout name

    Hi, I searched many blogs and the SDN forum but couldn't find a solution. I need to know the layout fields of an ALV report for a later usage. Let me explain it with code: I used below code to extract data of a dynamic program. cl_salv_bs_runtime_inf

  • How do I create this using jQuery...Or even standalone javascript?

    Hi, what I'm trying to create has already been done but my lack of know how is holding me back from duplicating the effect as seen at  http://www.yidio.com/show/sons-of-anarchy Clicking the "Season" link/s expands the entirety of the master container

  • Multiple imports from same dump file

    Hi, I have to import multiple related schemas - to avoid having to create multiple dump files can I just export them into one dump file (owner= a,b,c etc) and then run simultaneous imports like : export <dba_user> owner=a,b,c file=all.dmp --in newdb