FXML loading custom component scene slow

All we are creating a custom component to place into a TilePane each time a user clicks a button like so
FXMLLoader loader = new FXMLLoader(resource.getURL());
  Pane panel = (Pane)loader.load();
Scene scene = panel.getScene();
When we get panel.getScene() it is empty. So we created a new scene and then added that node to the tilePane. The only issue is, it is very slow and takes forever to appear on the tilePane. Is this the correct way of doing it?

Why do you need a new Scene? Surely the TilePane is already shown in a scene; you can just do
tilePane.getChildren().add(panel);
Maybe I am misunderstanding the question though.

Similar Messages

  • Cannot load custom Swing component

    Hi, I have an existing desktop application where there are quite a few custom Swing components in use. There's not been an issue before with these components (past 2 yrs).... until today :-). I opened my IDE (Java Studio Enterprise 8.1) and began work on an existing JPanel only to find all kinds of errors on the panel. Here is what I'm seeing along with setup details:
    1) Existing panels will not load without errors referring to classpath issues indicating that the custom components on the panel cannot be found.
    2) Custom component(s) cannot be added to a newly created clean JPanel. The following message is given: "Cannot load component class <class name> from Project: <project name>. The class must be compiled and must be on the classpath of the project this form belongs to."
    3) I've checked the class path >5 different times with various configurations and find no obvious issues. The custom components are part of the project. I've even put the projects classes output folder in the project compile class path but to no avail. Also the project compiles cleanly without issues.
    4) I've removed Java Studio and reinstalled it but still get the same error.
    5) JDK = 1.6
    6) Source level = 1.6
    I'm not sure what else to do. Help please.
    Regards,
    Daniel

    4) I've removed Java Studio and reinstalled it but still get the same error.Have you also ensured that you are not reusing the user directory from previous install? Please take a look at http://blogs.sun.com/karthikr/entry/jse_directories
    If it does not help, are there any error messages in the ide log file (found at <userdir>/var/log/messages.log)?
    - Have you considered using NetBeans as an alternative to JSE8.1. From http://forum.java.sun.com/thread.jspa?threadID=5192837 :
    Java Studio Enterprise 8.1 is itself built on top of NetBeans version 5.0. NetBeans is an ide developed as opensource at www.netbeans.org; it is extensible ide and so add-on modules can be developed to run on top of netbeans. And that is what JSE8.1 does; JSE 8.1 is NetBeans 5.0 plus several add-on modules (like UML etc).
    The latest stable version of NetBeans is 5.5.1 and NetBeans 6.0 is currently under development with milestone 10 being the latest release.
    Home page: www.netbeans.org
    Download: http://www.netbeans.info/downloads/index.php (From the main page, you can also download several packs which are addons that provide various functionality).
    Docs: http://www.netbeans.org/kb/index.html
    Docs on EE apps: http://www.netbeans.org/kb/trails/java-ee.html
    Further community resources (mailing lists, issue tracking etc) : http://www.netbeans.org/community/index.html
    wiki.netbeans.org
    NetBeans download is free. And since it is developed as an opensource project, the source is freely available under CDDL license.

  • Button in custom component not showing

    I made a very simple custom component with a TextField and Button but when I add multiple instances of it to a Layout, only the first Button shows up while the other show only when I focus the corresponding TextField. I'm quite new to fx and I'm not sure I did everything correctly but I don't see any obvious error in my code.
    The component:
    public class TestComponent extends BorderPane {
        @FXML
        private Button browseButton;
        @FXML
        private TextField textField;
        public TestComponent() {
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("TestComponent.fxml"));
            fxmlLoader.setRoot(this);
            fxmlLoader.setController(this);
            try {
                fxmlLoader.load();
            } catch (IOException exception) {
                throw new RuntimeException(exception);
    The fxml
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.HBox?>
    <fx:root type="javafx.scene.layout.BorderPane" xmlns:fx="http://javafx.com/fxml/1"
        xmlns="http://javafx.com/javafx/2.2">
        <center>
            <TextField fx:id="textField" prefWidth="200.0" />
        </center>
        <right>
            <Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"
                minHeight="-Infinity" prefHeight="${textField.height}" text="Browse"
                textAlignment="CENTER"  />
        </right>
    </fx:root>
    and the test code
    @Override
        public void start(Stage primaryStage) {
            VBox box = new VBox(5);
            box.setPadding(new Insets(5));
            TestComponent a = new TestComponent();
            TestComponent b = new TestComponent();
            TestComponent c = new TestComponent();
            box.getChildren().addAll(a, b, c);
            Scene scene = new Scene(box);
            primaryStage.setScene(scene);
            primaryStage.show();
    I'm running on Ubuntu with jdk-8-ea-bin-b111-linux-i586-10_oct_2013. I tested with jdk 1.7.0_40 and the buttons don't show.
    I'd include screenshots but the button to add images is disabled.
    Thanks for the help

    The issue is with the bind definition in the FXML, if you remove that definition, the buttons will display.
       prefHeight="${textField.height}"
    I think the binding is working, but when there is some kind of error (bug) in the layout process such that the scene is not automatically laid out correctly when the binding occurs.
    You can get exactly the same behaviour by removing the binding definition in FXML and placing it in code after the load.
                browseButton.prefHeightProperty().bind(textField.heightProperty());
    When the scene is initially displayed, the height of all of the text fields is 0, as they have not been laid out yet, and the browser button prefHeight gets set to 0 through the binding.
    That's OK and expected.
    Then the scene is shown and a layout pass occurs, which sets the height of the text fields to 26 and the prefHeight of all of the browser buttons adjust correctly.
    That's also OK and expected.
    Next the height of one of the buttons is adjusted via a layout pass.
    That's also OK and expected.
    But the height of the other buttons is not adjusted to match their preferred height (probably because a layout pass is not run on them).
    That is not OK and not expected (and I think a bug).
    If you manually trigger a layout pass on one of the components which did not render completely, the button will be displayed - but that should not be necessary.
    You can file a bug against the Runtime project at:
       https://javafx-jira.kenai.com/
    You will need to sign up at the link on the login page, but anybody can sign up and log a bug.
    Here is some sample code.
    import javafx.application.Application;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class ComponentTestApp extends Application {
      @Override
      public void start(Stage primaryStage) {
        VBox box = new VBox(5);
        box.setPadding(new Insets(5));
        TestComponent a = new TestComponent();
        TestComponent b = new TestComponent();
        TestComponent c = new TestComponent();
        box.getChildren().addAll(a, b, c);
        Scene scene = new Scene(box);
        primaryStage.setScene(scene);
        primaryStage.show();
        b.requestLayout(); // I don't understand why this call is necessary -> looks like a bug to me . . .
      public static void main(String[] args) {
        launch(args);
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.fxml.FXML;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.control.Button;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.BorderPane;
    import java.io.IOException;
    public class TestComponent extends BorderPane {
        private static int nextComponentNum = 1;
        private final int componentNum = nextComponentNum;
        @FXML
        private TextField textField;
        @FXML
        private Button browseButton;
        public TestComponent() {
          nextComponentNum++;
            FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("TestComponent.fxml"));
            fxmlLoader.setRoot(this); 
            fxmlLoader.setController(this); 
            try { 
                fxmlLoader.load();
                browseButton.prefHeightProperty().bind(textField.heightProperty());
                System.out.println(componentNum + " " + browseButton + " prefHeight " + browseButton.getPrefHeight());
                textField.heightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + textField + " height " + newValue);
                browseButton.prefHeightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + browseButton + " prefHeight " + newValue);
                browseButton.heightProperty().addListener(new ChangeListener<Number>() {
                  @Override
                  public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
                    System.out.println(componentNum + " " + browseButton + " height " + newValue);
                    new Exception("Not a real exception - just a debugging stack trace").printStackTrace();
            } catch (IOException exception) {
                throw new RuntimeException(exception); 
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.HBox?>
    <fx:root type="javafx.scene.layout.BorderPane" xmlns:fx="http://javafx.com/fxml/1"
             xmlns="http://javafx.com/javafx/2.2">
        <center>
            <TextField fx:id="textField" prefWidth="200.0" />
        </center>
        <right>
            <Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"
                    minHeight="-Infinity" text="Browse"
                    textAlignment="CENTER"  />
            <!--<Button fx:id="browseButton" mnemonicParsing="false" maxHeight="-Infinity"-->
                    <!--minHeight="-Infinity" prefHeight="${textField.height}" text="Browse"-->
                    <!--textAlignment="CENTER"  />-->
        </right>
    </fx:root>
    Here is the output of the sample code:
    1 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    2 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    3 Button[id=browseButton, styleClass=button]'Browse' prefHeight 0.0
    1 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    1 TextField[id=textField, styleClass=text-input text-field] height 26.0
    2 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    2 TextField[id=textField, styleClass=text-input text-field] height 26.0
    3 Button[id=browseButton, styleClass=button]'Browse' prefHeight 26.0
    3 TextField[id=textField, styleClass=text-input text-field] height 26.0
    2 Button[id=browseButton, styleClass=button]'Browse' height 26.0
    java.lang.Exception: Not a real exception - just a debugging stack trace
      at testcomponent.TestComponent$3.changed(TestComponent.java:69)
      at testcomponent.TestComponent$3.changed(TestComponent.java:65)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyDoubleWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:177)
      at javafx.beans.property.ReadOnlyDoubleWrapper.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:143)
      at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
      at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146)
      at javafx.scene.layout.Region.setHeight(Region.java:915)
      at javafx.scene.layout.Region.resize(Region.java:1362)
      at javafx.scene.layout.BorderPane.layoutChildren(BorderPane.java:583)
      at javafx.scene.Parent.layout(Parent.java:1063)
      at javafx.scene.Parent.layout(Parent.java:1069)
      at javafx.scene.Scene.doLayoutPass(Scene.java:564)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2341)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:329)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    java.lang.Exception: Not a real exception - just a debugging stack trace
      at testcomponent.TestComponent$3.changed(TestComponent.java:69)
      at testcomponent.TestComponent$3.changed(TestComponent.java:65)
      at com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:347)
      at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:80)
      at javafx.beans.property.ReadOnlyDoubleWrapper$ReadOnlyPropertyImpl.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:177)
      at javafx.beans.property.ReadOnlyDoubleWrapper.fireValueChangedEvent(ReadOnlyDoubleWrapper.java:143)
      at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:113)
      at javafx.beans.property.DoublePropertyBase.set(DoublePropertyBase.java:146)
      at javafx.scene.layout.Region.setHeight(Region.java:915)
      at javafx.scene.layout.Region.resize(Region.java:1362)
      at javafx.scene.layout.BorderPane.layoutChildren(BorderPane.java:583)
      at javafx.scene.Parent.layout(Parent.java:1063)
      at javafx.scene.Parent.layout(Parent.java:1069)
      at javafx.scene.Scene.doLayoutPass(Scene.java:564)
      at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2341)
      at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:329)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:479)
      at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:460)
      at com.sun.javafx.tk.quantum.QuantumToolkit$13.run(QuantumToolkit.java:327)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    1 Button[id=browseButton, styleClass=button]'Browse' height 26.0

  • 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

  • Using itemCreationPolicy with a custom component

    I'm working on a project where the users need to be able to have a 'filtered' view of one of the edit dialogs. I'm using view states to control which of the input fields show up for each view. The 'save' logic is the same for both states, so I still need to be able to pull data for the inputs even if they are not currently displayed. I tried setting itemCreationPolicy to immediate with no success. Some of the inputs were getting created but the initial values were not being set. The issue seems to be that the input component (an extended version of DropDownList) defers setting the selected value until the commitProperties() method. Since the inpit isn't actually being shown, the commitProperties() method is never getting called and the value is never being set.
    Can anyone suggest a workaround for this issue? The only thing I can think of would be to use includeInLayout and visible to show/hide the inputs, but that is going to get really messy since I would have to apply it to every input and the FormItem components that enclose them.

    Jasmin,
    Is your class included in the custom component?
    Yes, It is a annotated entity class,
    When creating sessionFactory it is not loading the class.
    i'm using flowing code block for creating sessionFactory,
    factory =
    new AnnotationConfiguration().addAnnotatedClass(dao.entity.UserEntity.
    class).setProperty(
    "hibernate.dialect",m_dialect ).setProperty(
    "hibernate.connection.driver_class", m_driverClass).setProperty(
    "hibernate.connection.url", m_connectionUrl ).setProperty(
    "hibernate.connection.username",m_userName).setProperty(
    "hibernate.connection.password", m_password).setProperty(
    "hibernate.hbm2ddl.auto", m_hbmTodll ).setProperty(
    "current_session_context_class",m_contextClass ).configure(resource).buildSessionFactory();
    Is the jar referenced in the class patch section of the component.xml?
    Yes , I have tried for this approch too , but class is entity class is not loaded.

  • Dynamic attribute in a custom component

    has anybody tried generating an attribute dynamically in a custom component
    e.g
    <cx:inputText value="" foo="footest"/>
    where foo is not defined in the custom inputtexttag.java
    can we have a hashmap which stores all the unknown attributes into the hashmap upon loading and then handle it in the setproperties

    can we have a hashmap which stores all the unknown
    attributes into the hashmap upon loading and then
    handle it in the setpropertiesJSF's UIComponent has a function of generic attributes.
    Use <f:attribute>.
    <cx:inputText value="" foo="footest"/> Anyway, if you want to use the syntax like this, you should provide a custom
    tag handler which has a setFoo() method and whose setProperties() method
    copys the value to the corresponding (generic) attribute of the component.

  • Custom component: porting from lc 8.0 to lc 8.2

    hello
    i developed a java pojo custom component for lc 8.0, essentially it connected to a db and returned a complex object. Now the environment has been upgraded to lc 8.2 . I've loaded my processes (which include my custom component) on the new environment. When i start the process , my component reaches the finally block where i've logged the db connections closing. Immediatly after the system crushes with the following error(i haven't added the whole stack trace because its huge): 
    2009-04-10 13:11:21,422 WARN  [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource@2ac6fb1
    2009-04-10 13:11:21,431 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackLocalException in method: public abstract com.adobe.pof.GenericObject com.adobe.pof.omapi.POFObjectManagerLocal.writeObject(com.adobe.pof.GenericObject,com.ado be.idp.Context) throws com.adobe.pof.POFException, causedBy:
    org.jboss.util.NestedSQLException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 643401bb:6b45:49df1884:29cb status: ActionStatus.ABORT_ONLY >); - nested throwable: (org.jboss.resource.JBossResourceException: Could not enlist in transaction on entering meta-aware object!; - nested throwable: (javax.transaction.SystemException: java.lang.Throwable: Unabled to enlist resource, see the previous warnings. tx=TransactionImple < ac, BasicAction: 643401bb:6b45:49df1884:29cb status: ActionStatus.ABORT_ONLY >))
        at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:94 )
        at com.adobe.pof.ConnectionWrapper.getConnection(ConnectionWrapper.java:45)
        at com.adobe.pof.ConnectionWrapper.prepareStatement(ConnectionWrapper.java:179)
        at com.adobe.pof.adapter.JDBCAdapter.prepareStatement(JDBCAdapter.java:5299)
    After that jboss get stucked, printing exceptions every 2 minutes, and i need to stop and restart it. I don't see anything wrong with my code: i get the datasource object, i get a coonettin from it, make my queries/updates and finally i close the connection.
    googling i've found this might be due to datasource item being local-tx-datasource instead of xa-datasource, but all datasources are of this kind.
    Any hint about this problem will be greatly appreciated
    thank you in advance
    Stefano

    hi Steve
    thank you for your answer. Unluckly i'm not using mysql but oracle 9i (or 10i i don't know since i'm just a poor programmer). Anyway i did a test : i've bypassed the datasource file , hardcoding the connection parameters in my custom component and it has got executed without problem, then process has crushed again on a query done by some adobe component. there are many adobe sql component instances to read/write from the same schema my compnent uses, so i suppose the problem is inside datasource configuration. There's a datasource sample for oracle too?
    I cannot give much details, since the new system has been recently installed and i don't know all info (i think jboss is 4.2 but i'm not sure)
    thanks again
    regards
    Stfano

  • Using Hibernate as a Custom Component

    I don’t know whether this question is appropriate in LC context.
    Our scenario, We have very complex logic in each of JDBC store/retrieve activity in the process. We would like to move this part into Hibernate based custom component.
    We tried with simple Hibernate persistence class but it seems to be LC not loading them.
    1)      Is this the restriction with LC? (using hibernate as a custom component)
    2)      What is the appropriate solution?
    You help is highly appreciated

    Jasmin,
    Is your class included in the custom component?
    Yes, It is a annotated entity class,
    When creating sessionFactory it is not loading the class.
    i'm using flowing code block for creating sessionFactory,
    factory =
    new AnnotationConfiguration().addAnnotatedClass(dao.entity.UserEntity.
    class).setProperty(
    "hibernate.dialect",m_dialect ).setProperty(
    "hibernate.connection.driver_class", m_driverClass).setProperty(
    "hibernate.connection.url", m_connectionUrl ).setProperty(
    "hibernate.connection.username",m_userName).setProperty(
    "hibernate.connection.password", m_password).setProperty(
    "hibernate.hbm2ddl.auto", m_hbmTodll ).setProperty(
    "current_session_context_class",m_contextClass ).configure(resource).buildSessionFactory();
    Is the jar referenced in the class patch section of the component.xml?
    Yes , I have tried for this approch too , but class is entity class is not loaded.

  • Actionscript in a Custom Component

    Can anyone tell me if you can put actionscript inside of a
    custom component? It throws errors anytime I try to do it.
    I have a horizontallist component that is being populated
    with an itemrenderer which holds an image component. The
    horizontallist takes fifteen images and loads them into the
    itemrenderers, creating a scrollable image slideshow.
    I am trying to get it to check to see if the image loaded
    successfully, and if not, either set the visibility of that image
    component to false, or remove it.
    Here is the code for the horizontallist:
    <mx:HorizontalList
    id="imageBar"
    itemRenderer="listingImage"
    height="330"
    width="925"
    paddingLeft="5"
    paddingRight="5"
    rollOverColor="#FFFFFF"
    selectionColor="#FFFFFF"
    >
    And the code for the custom component.....
    <mx:Canvas
    xmlns:mx="
    http://www.adobe.com/2006/mxml"
    height="320"
    width="400"
    verticalScrollPolicy="off"
    horizontalScrollPolicy="off"
    >
    <mx:Image
    source="
    http://www.urladdress.com/idx/rmls/images/resimages/{data.id}_{data.imageNum}.jpg"
    height="300" scaleContent="true"
    />
    </mx:Canvas>
    I'm pretty new to Flex, so any help would be great!

    just insert the script tags in the custom component and place
    your actionscript within those script tags. So in your case just
    insert the following script tags above the image control...
    <mx:Script>
    <![CDATA[
    // actionscript goes here
    ]]>
    </mx:Script>
    - Tony

  • Custom component  - how to store java Properties object in ucm environment

    Hi Experts,
    I am developing a custom component.
    my custom component code is reading a properties file and load in Properties object. Everytime this custom Service is called, properties file is read from file system and new Properties Object is created.
    Is there any way to load the Properties object once and store somewhere in UCM context ? (just like we do in JSP using application object"
    thanks!!
    Edited by: user4884609 on Jul 12, 2010 3:01 PM

    I'd say there are quite a few ways how to do it, but many of them have nothing in common with UCM.
    - I'd opt for the only "UCM" way I' aware of: as a part of custom component you can create your own properties file (it's also called environment variables) as a part of your custom component. You can, then, easily read (and write?) properties from/to the file.
    - The first option could have disadvantage, if there are too many properties. In this case you could use Java serialization - it should be UCM independent
    - Another option is to create your properties in the database - it is a bit similar to the first option, but it's more robust. Plus, you may use features of the database if you want to have some additional logic in you properties.
    - Note that you can also create a static object, which could be initialized e.g during class load

  • JSF custom component

    Hi
    I have created a JSF cutom component , which has some javascript files. If i use the component within the same project my path for accessing the JS files is :- js/task.js (Its in public/html folder) .
    My problem is that when I use this custom component in some other project i am not able to access the js file ( Js file are deployed with other source file in ADF Library Jar) . As I have to hard code the path of JS files in the render can any one please tell me what will be the path for accessing the JS files.
    i heard ADFLibraryFilter is used for the purpose. Anyone please shed more light on it.

    Thanx Frank for your help .
    I am generating html from the rendererm, in the encodeBegin method i have now written <script type="text/javascript" src="adflibResources/js/task.js"></script>
    But still the script isn't loading on the page
    I added the following code in web.xml but Jdeveloper (Studio Edition Version 11.1.1.1.0) is complaining that "refernce oracle.adf.library.webapp.LibraryFilter and oracle.adf.library.webapp.ResourceServlet not found. I am using Fusion Web Application (ADF) as the application template.
    <filter>
    <filter-name>ADFLibraryFilter</filter-name>
    <filter-class>oracle.adf.library.webapp.LibraryFilter</filter-class>
    <init-param>
    <param-name>provider-lazy-inited</param-name>
    <param-value>true</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ADFLibraryFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>REQUEST</dispatcher>
    </filter-mapping>
    <servlet>
    <servlet-name>adflibResources</servlet-name>
    <servlet-class>oracle.adf.library.webapp.ResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>adflibResources</servlet-name>
    <url-pattern>/adflib/*</url-pattern>
    </servlet-mapping>

  • Error invoking a custom component in a Process.

    Hi,
    I've build a custom component that uses Output ES services.
    If i run it as a Java app all runs well, he generates the output pdf files and output report .xml file.
    If i import it as a component into Livecycle ES and use it in a process i get the following error:
    2008-05-20 11:35:52,390 INFO [STDOUT] com.adobe.livecycle.output.exception.OutputException: java.lang.ClassCastException: com.adobe.livecycle.output.client.OutputResult
    2008-05-20 11:35:52,390 INFO [STDOUT] at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:138)
    2008-05-20 11:35:52,390 INFO [STDOUT] at outputfactory.Output.outputFromXML(Output.java:55)
    2008-05-20 11:35:52,390 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2008-05-20 11:35:52,390 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    2008-05-20 11:35:52,390 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    2008-05-20 11:35:52,390 INFO [STDOUT] Caused by: java.lang.ClassCastException: com.adobe.livecycle.output.client.OutputResult
    2008-05-20 11:35:52,390 INFO [STDOUT] at com.adobe.livecycle.output.client.OutputClient.generatePDFOutput(OutputClient.java:122)
    I deploy it with th adobe-output-client.jar in my component jar and the reference for it in the component.xml file (also in my component.jar).
    How can i solve this problem? thanks

    Hi Rui
    Very difficult to know from your description.
    It's a class-cast exception - try to find the line in your code that's doing the cast, and find out what the actual object is.
    It could also be a jar versioning problem, or a class-loader problem.
    Sorry, very difficult to help without doing some detailed debugging.
    Howard
    http://www.avoka.com

  • Custom Component Error -- Uggh

    I have tried to solve the problem using online resouces, 3rd party message boards, Xcelsius tutorials, the textbook "Xcelsius 2008: Dashboard Best Practices", tutorials which came with the Xcelsius SDK, among others, however, I continue to run into problems. Additionally, I am have tried to fix by reading the Flex 3 SDK, Xcelsius 2008 SDK, and the samples for Xcelsius/Flex which came bundled in the SDK.
    The problem is that the custom component, created in Flex 3 Hotfix and brought into Xcelsius using the Add-on Packager and the Add-on Manager does not display on the canvas. While all of the inherent components in Xcelsius work correctly the custom component does not display. When dropped on the canvas it simply disappears and never instatiates on the canvas and also is not listed inside the object browser. The custom component is, however, listed in the vertical menu under the category Add-Ons.
    Example:
    1. I use a sample Flex project which was included in the Xcelsius SDK and bring it into Flex 3 builder.
    2. I configure the project to run appropriately in my local environment
    3. I build the project successfully.
    4. I open the Xcelsius Add-on Packager
    4a. In the GENERAL tab I give the package a name
    4b. In the VISUAL tab I type the name of the class (i.e. com.business.dept.project )
    4c. In the VISUAL tab I type the display name (i.e. Email Component)
    4d. In the VISUAL tab I type the directory location of the .swf (i.e. C:\Xcelsius\Flex\Project\Email\emailcomponent.swf )
    4e. In the VISUAL tab I type the directory location of the property sheet (i.e. C:\Program Files\Business Objects\Xcelsius\SDK\bin\propertyinspector.swc )
    4f. In the BUILD tab I build the component sucessfully
    5. I open Xcelsius and go to File -- Manage Add-Ons
    6. I add the new emailcomponent.xlx file to the Add-on Manager and select Close
    7. I exit Xcelsius and reopen Xcelsius
    8. The new component is listed in the vertical menu under Components -- Add-Ons
    9. I test the function of inherent objects and drag a pie chart successfully onto the canvas of Xcelsius
    10. I drag my new component onto the canvas, and while there is a visible border outline of the object as I drag over the canvas, when I drop the component onto the canvas the object does NOT appear on the canvas.
    11. I re-test another inherent componet in Xcelsius which works fine
    12. I re-test my component with the same failure.
    Thank you for the assistance in advance.
    Alex Dove

    I have successfully created a Flex component in Xcelsius. The data is static and hard coded into the Flex component which is not ideal, but it certainly is a step in the right direction.
    My steps were as follows:
    1. Create a new Flex project
    2. Create a new Flex component and save it into the class namespace directory I was planning on using
    3. Include all of the MXML logic for the application in the component file
    4. Reference the component file in the Application file as a namespace reference
    5. Save the file
    6. Create an .xlx file using the Xcelsius Add-on Packager
    7. Typing the class namespace location using the entire path and file name without the extension
    8. Loading the new component into Xcelsius
    9. Building the app.
    Success.
    Thank you for all the help
    Alex Dove

  • Custom component accessing data

    I am trying to build a custom component that utilizes the
    datagrid. I want to create a class that loads in xome XML and
    populates the datagrid. The datagrid's ID is not available in the
    class's load.COMPLETE event handler, so I cannot populate the
    datagrid from the class. I then tried making a public property in
    the class that holds the XML, but, still I run into problems,
    because that property is null before the XML is loaded, so I cannot
    access it outside the class until the load is complete anyways. So,
    I guess the question is, what would be the best practice for
    passing data, loaded from a class, to a custom component.

    Events.
    There are some examples in the archives.
    Tracy

  • Opinion: new Package for every new custom Component?

    Hi there,
    I am just thinking of some possibilities to structurize my Components I made.
    I wonder if it is useful/good programming to define a new package for each new custom Component?
    So if I define a new MyComponent class extending JFrame should I make a new package:
    "mycomponent"
    containing these subfolders:
    "view"
    "model"
    "controler"
    subfolging "controler" in:
    "listeners"
    "adapters"
    "events"
    Is there any sense to do so? I think this would be the best way to structurize one's components.
    But if you do, you have to include millions of packages if you want to use one of these components :(.
    Please post, what you think.
    Thank you
    Sincerely
    Karlheinz Toni

    nope ;). I would most certainly not want to put every file in a single directory.
    But I like sturctured things. If things belong to each other, it should be visible at once, that they have something to to with each other. And the best method I can figure you is putting them in one package.
    The subpackages should be created, because of the model, that is used for all swing componentd (UI-delegete, MVC...) so that each structural component is where it belongs to.
    I don't like it if tere are 100 events one object could possibly create and you don't know the events from the component (of course you can guess by the name Event :)), but if they are in the same package, you would have to scroll a long way to get the thing you want (either m, v or c).
    So this is why I would do it ;).
    Anyway: do includes make the program run slower (I have read many threads about it, but there are way to many opinions, so I would be grateful if you post your opinions here, thx ;).
    Thanks for your answer,
    Sincerely
    Karlheinz Toni
    p.s.: why wouldn't you put them in a seperate directory (just overkill?), would you use classes that are structured like this if you are looking for a implementation of something and find it in this structure?

Maybe you are looking for

  • Photoshop CS3 installs but won't run on new OS install

    Hello, I've been searching through the forums and have seen some users with a similar problem, but haven't found any info that's relevant to my situation. I have done a fresh install of Windows XP Pro SP2 and decided to install a brand-new copy of CS

  • CS6 master collection (korean)trial ver. error 110 or 108

    My system is windows 7 X64 ultimate, 8G ram and 500G HDD When I tried to download CS6 master collection (korean) trial version via adobe download asistance, everytime when the progress is about 2/3 complete, the statement "error 110....." or 108 appe

  • OSB - XQuery - line 7, col 2: {err}FORG0005: expected exactly 1 item, got 0

    Hi, I am trying to execute the below sample XQuery. Eclipse designer does not show any error. However on executing the XQuery, I get the following error "+Error executing the XQuery transformation: line 7, column 2: {err}FORG0005: expected exactly on

  • RAC : User equivalence  check failed

    Hi All, Platform linux CentOS 4.5 and oracle 10g. I facing an issue with " user equivalence failed" while executing cluvfy command. On accessing node 2 from node 1 using ssh it is asking for password(oracle user) after configuring SSH. I have configu

  • Cross company LIV without a Inter-company billing

    Hi, Is it possible to post a FI-customer invoice (FB70) in Company A by posting a LIV in Company Code B. Currently Company A does not have a Sales/Purchasing organization setup. Requirement for a PO in Company B is, to track the products and monitor