Loading an "MXML Component" at run-time creates a null object.

Hello!
I have a simple Flex 3 project with an MXML application file (the parent) and an MXML component file (the child).
At run-time I create childs of this component, and I add it to the stage using a simple "this.addChild()" call.
Now, besides that, in the creation loop, after every
  newChild = new mcComp();
I want to setup a few more custom parameters which belongs to this class. For example, now I want to set a label's text, this label is at the child.
The issue is that the label isn't created until I exit the creation function, and actually, until my code returns control to the Flash Player.
See my problem here?
With custom classes which resides at .AS files, when I instantiate them with the "new" operator, they run their constructure's code and eveything is fine.
But, when I do the same with those MXML components (which by the way are based over the Canvas class), their constructure do not execute and actually no other child of them is created.
Can anyone please advise? I must be missing some keyword here.. hopefully.

Hi Natasha thanks,
The issue is that the creationComplete event doesn't dispatch even when I addChild() the object.
var child:mcChild = null;
for(var i:int; i < 3; i++)
     child = new mcChild();
     // setting some properties, labels' text etc'
     this.addChild(child);
Try this and you'll see - the event doesn't dispatch until you got out of the code flow.
Anyway after looking at Flex's documentation I solved it differently;
After the addChild() call the child receives an "initialize" event. After that I could modify my label.
Thank you though!

Similar Messages

  • A dynamic table based on run-time created view object -- please help!

    Hello!
    I'm trying to create a dynamic table based on an run-time created view object. All go ok, but table binding component take the first view/iterator state and don't reflect changes they have. Please, take a look:
    1. At run-time the view is being replaced by new red-only one based on query in application module:
    getQueryView().remove();
    createViewObjectFromQueryStmt("QueryView", statement);
    2. Page definition file contains an iterator (using iterator or methodIterator - doesn't matter) binding and table, which binds to the iterator, like:
    <methodIterator id="distributeQuery1Iter" Binds="distributeQuery1.result"
    DataControl="QueryServiceDataControl" RangeSize="10"/>
    <table id="distributeQuery11" IterBinding="distributeQuery1Iter"/>
    3. The page code uses <af:table>. But, if I use table binding (it's right) like this:
    <af:table var="row" value="#{bindings.distributeQuery11.collectionModel}">
    <af:forEach items="#{bindings.distributeQuery11.attributeDefs}" var="def">
    the table will never changed (i.e. still show the first view instance).
    When I tried to use iterator binding directly (it's bad and cannot provide all needed features unlike CollectionModel from table binding) I saw that table works!
    (Code is somehing like:
    <af:table var="row" value="#{bindings.myIterator.allRowsInRange}">
    <af:forEach items="#{bindings.myIterator.attributeDefs}" var="def">
    Why the table binding do not reflect changes in iterator? Or should I use different approach?
    Thanks in advance!
    Ilya.

    I got it to work! I used a hybrid approach comprised of some of your code and some of Steve Muench's AcceessAppModuleInBackingBean example.
    In the setBindings method, I execute an app module method that redefines the query, then I used your code to delete and recreate bindings and iterator:
    public void setBindingContainer(DCBindingContainer bc) {
    this.bindingContainer = bc;
    rebuildVO();
    The rebuildVO() method looks like the code you provided in your example:
    private void rebuildVO() {
    DCDataControl dc;
    DispatchAppModule dApp;
    DCBindingContainer bc;
    DCIteratorBinding it;
    OperationBinding operationBinding;
    ViewObject vo;
    DCControlBinding cb;
    try {
    bc = getBindingContainer();
    dc = bc.findDataControl(DATACONTROL);
    dApp = (DispatchAppModule)dc.getDataProvider();
    // Execute App Module Method to rebuild VO based upon new SQL Statement.
    dApp.setDispatchViewSQL();
    vo = dApp.findViewObject(DYNAMIC_VIEW_NAME);
    it = bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME);
    it.bindRowSetIterator(vo, true);
    // logger.info("Remove value binding...");
    cb = bc.findCtrlBinding(DYNAMIC_VIEW_NAME);
    cb.getDCIteratorBinding().removeValueBinding(cb);
    bc.removeControlBinding(cb);
    // logger.info("Creating new value binding...");
    FacesCtrlRangeBinding dynamicRangeBinding =
    new FacesCtrlRangeBinding(null,
    bc.findIteratorBinding(DYNAMIC_VO_ITER_NAME), null);
    // logger.info("Add control binding...");
    bc.addControlBinding(DYNAMIC_VIEW_NAME, dynamicRangeBinding);
    } catch (Exception e) {
    e.printStackTrace();
    And my App Module method that redefines the view object looks like this:
    public void setDispatchViewSQL() {
    String SQL =
    "begin ? := PK_BUsiNESS.F_GETDISPATCHVIEWSQL();end;";
    CallableStatement st = null;
    String ViewSQL = null;
    try {
    st = getDBTransaction().createCallableStatement(SQL,
    DBTransaction.DEFAULT);
    * Register the first bind parameter as our return value of type LONGVARCHAR
    st.registerOutParameter(1, OracleTypes.LONGVARCHAR);
    st.execute();
    ViewSQL = ((OracleCallableStatement) st).getString(1);
    findViewObject(DYNAMIC_VO_NAME).remove();
    ViewObject vo = createViewObjectFromQueryStmt(DYNAMIC_VO_NAME, ViewSQL);
    vo.executeQuery();
    } catch (SQLException s) {
    throw new JboException(s);
    } finally {
    try {
    st.close();
    } catch (SQLException s) {
    s.printStackTrace();
    When I run it I get my desired results. One thing I don't quite understand is why when the page is first rendered it shows the last set of records rather than the first. Now I have to figure out how to put navigation URLS in each of the table cells.
    Thanks for your help; I would not have gotten this far without it,
    Jeff

  • How to use constructor to create a null object?

    I am trying to extend java.sql.Timestamp class. However, I am not sure what to do with a null Timestamp object. The constructor of Timestamp always creates a valid Timestamp object. Anyone have any idea how to create a null object using constructor? Thanks.
    Julia

    when you create an object i.e., instantiate an object there are three steps that are followed behind the scene.
    1) Assign memory
    2) Allocate a reference
    3) constructor is called.
    Now there is no such thing as a null object as has been pointed out however in case you mean you just want to assign a null reference to a variable then you are not instantiating an object and not calling a constructor but you could simply do
    String sqlQuery = null;But keep in mind that the object has not been instantiated and neither initialized here. Constructors basically do the initialization.

  • How to check the value of the structure component at run time

    Dear Friends,
    Kindly, through some idea for the below query:
    Step 1: I have a structure name as STRUCT with components COMP1, COMP2, COMP3,......, COMP99. At run time in this structure few components may have values and few may not have.
    Step 2: Now I have a variable of type char name as LV_CHAR, at run time this variable may have value as any of the structure components given in the above step such as COMP1 or COMP2 or .....or COMP99.
    Step 3: Let us assume the variable LV_CHAR have value COMP11 and now I need to check whether the strucutre componet STRUCT-COMP11 is initial or not using this variable.
    Could you please give me the steps what needs to be done to handle it.
    Thanks & regards,
    Mallikarjuna M.

    PatanGova wrote:
    Hi,
    Can someone help me out to divide a Hexadecimal number say"ABCD" and display 
    1) each value of hexadecimal number like 'A','B','C','D' in separate indicators and
    2)each value of hexadecimal number like 'A','B','C','D' into their respective decimal number and to show in separate indicators.
    Thanks.
    That has absolutely nothing to do this thread.  Start a new thread.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Setting Run-time parameters for EJB objects

    Hello,
    I need to set a run-time paramater that will be used by the session beans in my
    application. I looked thru the documentation, but I'm not finding an obvious
    way to do this.
    In weblogic-application.xml, there is an <application-parameter> element that
    seems promising, but I can't find a weblogic method for getting the value of this
    element from within an EJB.
    Any ideas on the best way to do this?
    Thank you

    Ellen,
    There is no global <env-entry> that you can use currently, but you can make
    an
    <env-entry> in the EJB module's descriptors for each session bean that needs
    the run-time parameter.
    the <application-parameter> element you speak of is not a place that
    arbitrary
    values can be placed and obtained. That element is used to by the server
    and there are a specific set of values that are recognized
    as override options for the server to use for the application.
    Michael Kovacs
    Senior Software Engineer
    BEA Systems
    "Ellen Kraffmiller" <[email protected]> wrote in message
    news:3f857657$[email protected]..
    >
    Hello,
    I need to set a run-time paramater that will be used by the session beansin my
    application. I looked thru the documentation, but I'm not finding anobvious
    way to do this.
    In weblogic-application.xml, there is an <application-parameter> elementthat
    seems promising, but I can't find a weblogic method for getting the valueof this
    element from within an EJB.
    Any ideas on the best way to do this?
    Thank you

  • Can not make work custom scope for run time created pages

    Greetings
    i have an application where you can choose a scope where you want to create your page using the create page task flow. the thing is that it is not working my pages are not being created on any new scope, looking through the folders of the MDS repository i only see a new folder where each new scope i create with mi app in runtime has a folder with the same name that the scope and inside of each...is an xml file....the path to those is /webcenter/mds-integServerRepos/<my_app_name>/oracle/webcenter/framework/scope/scopedMD/<custom_scope_name>/scope.xml
    does any body know why this is happening?

    Hello
    i am using the create page task flow.....here is the task flow configuration, it only has one parameter
    <taskFlow id="pagecreatepage1"
    taskFlowId="/oracle/webcenter/page/view/jsf/fragments/page-create-page.xml#page-create-page"
    activation="deferred"
    xmlns="http://xmlns.oracle.com/adf/controller/binding">
    <parameters>
    <parameter id="oracle_webcenter_page_createpage_scopename"
    value="${adminPagView.scopeName}"/>
    </parameters>
    </taskFlow>
    scope name is a method in my backing bean ..............and here is the method implementation
    public String getScopeName() {   
    ServiceContext sContext = ServiceContext.getContext();
    try {                   
    Scope scope = sContext.createScope("scope_test");
    sContext.setScope(scope);
    } catch (ScopeAlreadyExistsException scopeExistsException) {  
    System.out.println("Scope Already Exists...");
    return scopeName;
    the method executes correctly and in the mds folders y can see a folder for that scope in DefaultDomain/webcenter/mds-integServerRepos/<my_app_name>/oracle/webcenter/framework/scope/scopedMD/scope_test/scope..xml
    and my page jspx is in this path
    /oracle/webcenter/page/scopedMD/s8bba98ff_4cbb_40b8_beee_296c916a23ed/user/U364DAA907F1311DFAF1145A33DBB364E/Page1.jspx
    as you can see s8bba98ff_4cbb_40b8_beee_296c916a23ed is the defaul scope, maybe i am just creating a scope but no telling to the task flow to
    used it..............no sure what is happening

  • How can we add elements to component at run time  through java

    Hi,
    In my project ,I am using JArrayList to collect urls and I need to add those to JScrollPane(JTextArea) and this to frame. This works fine but I need the process of how the elements added to ArrayList simultaneusly added to JTextArea.
    pls suggest the way

    arrayList.add( someObject );
    textArea.append( someObject.toString() );

  • Custom component property value handling at run time

    I would like to develop simple custom component which has three properties PROP1, PROP2 & RESULT . These parameters are bound to excel sheet cells as follows..
    cell A1 connected to PROP1
    cell A2 connected to PROP2 and
    cell A3 connected to RESULT.
    In excel A1 cell has excel formula set as =IF(A2<5,10,0).
    Custom component would be simple button display at runtime and on click of the same, I would like to perform following actions in sequence with N number of times.
    1. First push any random number to PROP2. (which is simple task, I believe)
    2. Pick new value of PROP1 which is changed due to existance of excel formula (+ using dispatchevent I could able to pass value to excel cell A2. But not able to read new value of PROP1+)
    3. check new PROP1 value equal to 10. If it is 10 then count it otherwise again push new random value to PROP2.
    4. Continue step 1 to 3 till N number of times. and finally
    4. Push number of counts for PROP1 value 10 to RESULT parameter.
    All the parameters are bindable (getter/setter with [Bindable]) in Flex component application and flex propertysheet application use binding ID to bind with cell address. with binding direction BOTH and SINGLETON
    Here is flex function code which triggered at button click.
    public function test002():void {
    while ( N < 100)
      this.PROP2 = Math.round(Math.random()*1000);
      dispatchEvent(new PropertyChangeEvent(PropertyChangeEvent.PROPERTY_CHANGE, false, false, PropertyChangeEventKind.UPDATE, "PROP2", null, PROP2, this));
         if (this.PROP1 == 10)
          cnt++;
       this.RESULT = cnt;
    My observations are as follows.
    - new push of value to PROP2 get reflected to excel A2 when button click event is over, not at the time of while loop process execution.
    - Also I observed PROP1 value never changes and it is the value which is recorded just before button click event of component at run time and remain the same till button click event is over.
    - Further to this I notice as click event is over, new value of PROP2 reflected in cell A2 and change value (if it passes IF formula of excel ) in A1 as well. Next button click action takes these new A1 and A2 values in consideration and process the function "test002".
    I would like to understand possibility of custom component event execution process, which can able to pass as well as read value from component parameters to underlying excel with changes due to excel formula existance.  If it is not limitations (If so) what is the set of commands which can be helpful to achieve this. I appreciate if anybody explain typical event execution required in such scenarios with some actionscript code directions.
    Thanks
    Sandesh
    Edited by: Sandesh Darne on Feb 8, 2010 11:48 AM
    Edited by: Sandesh Darne on Feb 10, 2010 5:23 AM

    Marton,
    I have tried your solution. It works well immediately after xcelsius dashboard get displayed or preview. It does not wait click event to happen. So I modified further by adding one switch ( "switch001" in code piece shown below) to control iteration by click event. That stops running of iteration immediate after dashboard display.
    In order to see iteration I have to click twice on button. First click does send "frm" parameter value to excel and excel formula operates. The excel formula result send back to component via SETTER of "frmResult" . But it stops over there. If I click second time the iteration starts for 100 times.
    Also I try to export this to PDF. PDF file get generated. If I try to open PDF file it raise error.
    My code is attached here.
    "frm" is the parameter that sends random number to excel.
    "frmResult" parameter receives excel formula output and send it back to component.
    "test()" function operate on button click event and set switch001 and then calls "Calc" function for iterations.
    MXML code..........
      <mx:VBox>
           <mx:TextInput id="frmResultLabel" width="100" />
           <mx:Button label="test..." click="test()"/>
      </mx:VBox>
    Actionscript code
    public var cnt:int;
              public var N:int = 0;
              public var sum:int = 0;
              public var switch001:Boolean = false;
             public function test():void {
                   N = 0;
                   sum = 0;
                   switch001 = true;
              public function Calc():void {
              if (switch001 == true)
                if (N < 100)
                    this.frm = Math.round(Math.random() * 1000);
                else if (N == 100)  // return the result
                     this.frmResult = sum;
                     // Label component use to display frm and frmResult values at runtime
                     frmResultLabel.text = sum.toString() + ">" + this.frm + ">" + this.frmResult;
                 N++;
              [Bindable]
              private var _frm:int;
              private var _frmChanged:Boolean = true;
              [Bindable]
              public function get frm():int
                   return _frm;
              public function set frm(value:int):void
                   //if (value == null)  value = 0;
                   if (_frm != value)
                        _frm = value;
                        _frmChanged = true;
                        invalidateProperties();
              override protected function commitProperties():void
                 super.commitProperties();
                 if (_frmResultChanged == true)
                        // start the cycle again by generating a new random number,
                        // or write out the result
                        Calc();

  • Loading MXML Component Dynamically

    Hi all,
    I am new to Flex and was trying out small things . I created
    a MXML Application and also MXML components.
    I tried loading MXML component to application using xmlns and
    it worked fine.(
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" backgroundColor="#ffffff" xmlns:mi="com.*">
    <mi:base1 id="base1" />
    <mi:base2 id="base2" />
    This method is ok if we are loading 3-4 components .
    but , if i have to load a mxml component dynamically how do I
    do it?
    for example ,if base1 and base2 are two components and i want
    to load them based on some event performed.
    I have tried the method which uses ViewStack and code
    myViewStack.selectedChild=Container(myViewStack.getChildByName(selectedNode))
    ,where each child will have one component declared or initialized.
    Following this method is not a feasible when we have hundred
    of components to be loaded.
    Can anyone help me on this??

    "srirama.83" <[email protected]> wrote in
    message
    news:gpkoui$g3u$[email protected]..
    > Hi all,
    > I am new to Flex and was trying out small things . I
    created a MXML
    > Application and also MXML components.
    > I tried loading MXML component to application using
    xmlns and it worked
    > fine.(
    > <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    > layout="absolute"
    > backgroundColor="#ffffff" xmlns:mi="com.*">
    > <mi:base1 id="base1" />
    > <mi:base2 id="base2" />
    > )
    > This method is ok if we are loading 3-4 components .
    > but , if i have to load a mxml component dynamically how
    do I do it?
    > for example ,if base1 and base2 are two components and i
    want to load them
    > based on some event performed.
    >
    > I have tried the method which uses ViewStack and code
    >
    myViewStack.selectedChild=Container(myViewStack.getChildByName(selectedNode))
    > ,where each child will have one component declared or
    initialized.
    >
    > Following this method is not a feasible when we have
    hundred of components
    > to
    > be loaded.
    > Can anyone help me on this??
    >
    >
    http://www.magnoliamultimedia.com/flex_examples/Amys_Flex_FAQ.pdf
    Q4

  • Loading the final static variables at run time.. Please help

    Hello, fellow developers & Gurus,
    Please help me figure out the best way to do this:
    I need to load all my constants at run time. These are the public static final instance variables. The variables values are in the DataBase. How do I go about loading them.

    Your original question was diffeent, but your further posts show what you really want to do:
    1) all constants in 1 class
    2) available readonly for other classes
    3) updatable during runtime by changing in the database
    Did I understand you right?
    Then smiths' approach solves point 2):
    Instead, make the variables available through a method
    call - that way you avoid the whole final variable
    versus read-only attributes problem.
    //GLOBAL VARIABLES EXPOSED AS PUBLIC PROPERTIES
    public final class GlobalProperties
    public static int getTableSize();
    public static int getRowSize();
    Each "constant" should be a private static variable, and these methods simply return their values.
    The variables are initialized in a static initializer by accessing the db. Ok.
    You habe a table with one row containing as columns all the constants.
    A method readConstants() does a "select constant1, constant2, ... from const_table" and sets all the variables.
    The static initializer calls this method.
    Right?
    Ok, then you simply call readConstants() everytime you want to synchronize with the actual content of const_table.
    Was it this?

  • How to change object background color on  java run time

    Hi,
    I create object loading program. my problem is run time i change object background color using color picker. i select any one color of color picker than submit. The selecting color not assign object background.
    pls help me? How to run time change object background color?
    here follwing code
    import com.sun.j3d.loaders.objectfile.ObjectFile;
    import com.sun.j3d.loaders.ParsingErrorException;
    import com.sun.j3d.loaders.IncorrectFormatException;
    import com.sun.j3d.loaders.Scene;
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import com.sun.j3d.utils.applet.MainFrame;
    import com.sun.j3d.utils.universe.*;
    import javax.media.j3d.*;
    import javax.vecmath.*;
    import java.io.*;
    import com.sun.j3d.utils.behaviors.vp.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    import java.awt.Graphics ;
    import javax.swing.*;
    public class ObjLoad1 extends Applet implements ActionListener
    private boolean spin = false;
    private boolean noTriangulate = false;
    private boolean noStripify = false;
    private double creaseAngle = 60.0;
    private URL filename = null;
    private SimpleUniverse u;
    private BoundingSphere bounds;
    private Panel cardPanel;
    private Button Tit,sub;
    private CardLayout ourLayout;
    private BorderLayout bl;
    Background bgNode;
    BranchGroup objRoot;
    List thelist;
    Label l1;
    public BranchGroup createSceneGraph()
    BranchGroup objRoot = new BranchGroup();
    TransformGroup objScale = new TransformGroup();
    Transform3D t3d = new Transform3D();
    t3d.setScale(0.7);
    objScale.setTransform(t3d);
    objRoot.addChild(objScale);
    TransformGroup objTrans = new TransformGroup();
    objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
    objTrans.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
    objScale.addChild(objTrans);
    int flags = ObjectFile.RESIZE;
    if (!noTriangulate) flags |= ObjectFile.TRIANGULATE;
    if (!noStripify) flags |= ObjectFile.STRIPIFY;
    ObjectFile f = new ObjectFile(flags,(float)(creaseAngle * Math.PI / 180.0));
    Scene s = null;
         try {
              s = f.load(filename);
         catch (FileNotFoundException e) {
         System.err.println(e);
         System.exit(1);
         catch (ParsingErrorException e) {
         System.err.println(e);
         System.exit(1);
         catch (IncorrectFormatException e) {
         System.err.println(e);
         System.exit(1);
         objTrans.addChild(s.getSceneGroup());
         bounds = new BoundingSphere(new Point3d(0.0,0.0,0.0), 100.0);
    if (spin) {
         Transform3D yAxis = new Transform3D();
         Alpha rotationAlpha = new Alpha(-1, Alpha.INCREASING_ENABLE,0,0,4000,0,0,0,0,0);
         RotationInterpolator rotator = new RotationInterpolator(rotationAlpha,objTrans,yAxis,0.0f,(float) Math.PI*2.0f);
         rotator.setSchedulingBounds(bounds);
         objTrans.addChild(rotator);
    //Background color setting
    Color3f bgColor = new Color3f(100,200,230);
    bgNode = new Background(bgColor);
    bgNode.setApplicationBounds(bounds);
    objRoot.addChild(bgNode);
    return objRoot;
    private void usage()
    System.out.println("Usage: java ObjLoad1 [-s] [-n] [-t] [-c degrees] <.obj file>");
    System.out.println("-s Spin (no user interaction)");
    System.out.println("-n No triangulation");
    System.out.println("-t No stripification");
    System.out.println("-c Set crease angle for normal generation (default is 60 without");
    System.out.println("smoothing group info, otherwise 180 within smoothing groups)");
    System.exit(0);
    } // End of usage
    public void init() {
    if (filename == null) {
    try {
    URL path = getCodeBase();
    filename = new URL(path.toString() + "./galleon.obj");
    catch (MalformedURLException e) {
         System.err.println(e);
         System.exit(1);
         //setLayout(new BorderLayout());
         //setLayout(new GridLayout(5,0));
         //setLayout(new CardLayout());
         //setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));
    GraphicsConfiguration config = SimpleUniverse.getPreferredConfiguration();
    Canvas3D c = new Canvas3D(config);
    add(c);
    BranchGroup scene = createSceneGraph();
    u = new SimpleUniverse(c);
    ViewingPlatform viewingPlatform = u.getViewingPlatform();
    PlatformGeometry pg = new PlatformGeometry();
    Color3f ambientColor = new Color3f(45,27,15);
    AmbientLight ambientLightNode = new AmbientLight(ambientColor);
    ambientLightNode.setInfluencingBounds(bounds);
    pg.addChild(ambientLightNode);
    Color3f light1Color = new Color3f(111,222,222);
    Vector3f light1Direction = new Vector3f(1.0f, 1.0f, 1.0f);
    Color3f light2Color = new Color3f(1.0f, 1.0f, 1.0f);
    Vector3f light2Direction = new Vector3f(-1.0f, -1.0f, -1.0f);
    DirectionalLight light1 = new DirectionalLight(light1Color, light1Direction);
    light1.setInfluencingBounds(bounds);
    pg.addChild(light1);
    DirectionalLight light2 = new DirectionalLight(light2Color, light2Direction);
    light2.setInfluencingBounds(bounds);
    pg.addChild(light2);
    viewingPlatform.setPlatformGeometry(pg);
    viewingPlatform.setNominalViewingTransform();
    if (!spin) {
    OrbitBehavior orbit = new OrbitBehavior(c,OrbitBehavior.REVERSE_ALL);
    BoundingSphere bounds = new BoundingSphere(new Point3d(0.0, 0.0, 0.0), 100.0);
    orbit.setSchedulingBounds(bounds);
    viewingPlatform.setViewPlatformBehavior(orbit);     
    u.addBranchGraph(scene);
         public ObjLoad1(String[] args) {
              if (args.length != 0) {
                   for (int i = 0 ; i < args.length ; i++) {
                        if (args.startsWith("-")) {
                             if (args[i].equals("-s")) {
                                  spin = true;
                             } else if (args[i].equals("-n")) {
                                  noTriangulate = true;
                             } else if (args[i].equals("-t")) {
                                  noStripify = true;
                             } else if (args[i].equals("-c")) {
                                  if (i < args.length - 1) {
                                       creaseAngle = (new Double(args[++i])).doubleValue();
                                  } else usage();
                             } else {
                                  usage();
                        } else {
                             try {
                                  if ((args[i].indexOf("file:") == 0) ||
                                            (args[i].indexOf("http") == 0)) {
                                       filename = new URL(args[i]);
                                  else if (args[i].charAt(0) != '/') {
                                       filename = new URL("file:./" + args[i]);
                                  else {
                                       filename = new URL("file:" + args[i]);
                             catch (MalformedURLException e) {
                                  System.err.println(e);
                                  System.exit(1);
    public void actionPerformed(ActionEvent e)
         if (e.getSource() == Tit)
    //Color Picker tool
              Color c1 = JColorChooser.showDialog(((Component)e.getSource()).getParent(),"Zaxis Color Picker", Color.blue);
              cardPanel.setBackground(c1);
              objRoot.removeChild(bgNode);
              int a = c1.getRed();
              int b = c1.getBlue();
              int c = c1.getBlue();
              System.out.println(a);
              System.out.println(b);
              System.out.println(c);
              Color3f ccc = new Color3f(a,b,c);
              bgNode.setApplicationBounds(bounds);
         objRoot.addChild(bgNode);
         else
              System.out.println("mathi");
    public ObjLoad1()
    Tit = new Button("BG Color");
    sub = new Button("Object Color");
    cardPanel = new Panel();
    cardPanel.add(Tit);
    cardPanel.add(sub);
    //cardPanel.add(l1);
    //cardPanel.add(thelist);
    sub.addActionListener(this);
    Tit.addActionListener(this);
    // thelist.addActionListener(this);
    //setLayout for applet to be BorderLayout
    this.setLayout(new BorderLayout());
    //button Panel goes South, card panels go Center
    this.add(cardPanel, BorderLayout.SOUTH);
    //this.add(cardPanel, BorderLayout.CENTER);     
    this.setVisible(true);
    public void destroy() {
    public static void main(String[] args) {
         new MainFrame(new ObjLoad1(args),400, 400);

    hi,
    i am using setColor(Color3f color) method
    like
    if (e.getSource() == Tit)
              Color c1 = JColorChooser.showDialog(((Component)e.getSource()).getParent(),"Zaxis Color Picker", Color.blue);
              bgColor = new Color3f(c1);
              System.out.println(bgColor.get());
         bgNode.setColor(bgColor);
         bgNode.setApplicationBounds(bounds);
         objRoot.addChild(bgNode);
    but error will be displayed
    like
    javax.media.j3d.CapabilityNotSetException: Background: no capability to set color
         at javax.media.j3d.Background.setColor(Background.java:307)
         at ObjLoad1.actionPerformed(ObjLoad1.java:230)
         at java.awt.Button.processActionEvent(Unknown Source)
         at java.awt.Button.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    pls help me

  • How to change the Schema (DB2, Oracle) in CommandTable at run time

    Dear all,
    I have a problem as below:
    I have created report with CommandTable, then I am using Java and CRJ 12 to export data. So how to change the SCHEMA in CommandTable? 
    Please help me on this.
    Ex: CommandTable is SELECT * from SCHEMA.TableA, SCHEMA.TableB
    Thanks,
    Nha

    Dear Ted,
    I want to change DataSource, it means the report will be load and change connection at run time (using CRJ SDK) and i want to change the SCHEMA.Tablename in CommandTable in report.
    I also use the parameter to do it, but it can not be at run time, just correct when designing.
    Could you please help me on this. You can post the code if any.
    Thanks,
    Nha

  • Bind variables at run time

    We have a view object with LOV, this LOV has a bind variable. How can we set this bind variable at run time through this view object?

    Hi bara,
    1. Wat you ve to do is create a transient attribute in the child entity.
    2. Create an association between master and child.
    3. The value should be a groovy expression such that it refers the field in master table which needs to be passed to the LOV.
    4. Add the transient attribute in ViewObject also.
    4. Use ViewAccessors and map the transient attribute to the bind variable in the List View Object
    Regds,
    Srinidhi

  • How to change the application (MIDlet) input language at MIDlet run-time?

    Hi,
    I am working on a Messaging (SMS) J2ME MIDlet where it is required to change the input language for a TextField/Area at run-time.
    For example if default handset language is set to Chinese, during MIDlet execution time the textfield language (locale) should be changed to Arabic/Spanish/French. Here I understand that provided the required languages are supported on handset, one can change them from handset settings.
    Can anyone help me out with changing the microedition.locale to zh_CN from en_US?
    Thanks

    Dear Ted,
    I want to change DataSource, it means the report will be load and change connection at run time (using CRJ SDK) and i want to change the SCHEMA.Tablename in CommandTable in report.
    I also use the parameter to do it, but it can not be at run time, just correct when designing.
    Could you please help me on this. You can post the code if any.
    Thanks,
    Nha

  • Getting Run time error when trying to open WAD

    I get the following message when opening WAD either from Business Explorer or from the start menu of the window.
    run time error '438'.
    Object does not support this property or method.
    Any Insights? I was able to do this earlier.
    Thanks
    Amit.

    Stefan,
    What is your front end patch level ? to find out , open the Logon pad ad right click on the icon on the status bar and select about , you will know the patch level for the same , that might give you some idea , what you have to possibly do is implement a front end patch.
    Arun

Maybe you are looking for

  • Originals folder in iPhoto 11

    Hello - I am having a problem associated with iPhoto 11. in iPhoto 09, I used to go to Originals folder and find my events as folders sorted by yearly folders. It is till the same, except that originals folder now point to Masters folder AND 1. the y

  • ASM and Cold backup

    Is there any way to coldbackup a database that is using ASM? My development server has a database of 500GB in size. To move this to the production server I used to do cold backups but unable to do it with ASM. I was planning to use EXPORT utility but

  • Website can't communicate with db - SQL Express 2005

    Here's the error message: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name. I have successfully connected to the db through coldfusion admin. I can see the tables in SQL Express 2005,

  • Regarding Module Pool's Cancel button

    Hi Guys, Please help me I have created on Module Pool and now this module pool is called through a a UserExit . now the thing is if i cancel button which is placed on my popup screen then it is still going into the output which is wrong it should sho

  • Time Change Issues

    On a recent trip by air through two time-zones, my Android 2 failed to automatically change the time both going and returning. I nearly missed a flight because of this!!  Plus, I am noticing that \the Android 2 gains about two minutes a day compared