How to set App Module Config parameters at run time?

Hi,
I am using jdev 11.1.1.3 and developed a Fusion Web Application application.
Before moving the code to production I want to have a stress testing where I should be able to set the application module configuration parameters at run time.
So I would like to know what are the options are there to achieve this instead of setting the same in design time.
Any help would be appreciated.
~Abhijit

AT SELECTION-SCREEN OUTPUT.
  PERFORM radio_hide_options.
FORM radio_hide_options .
IF rad =  ' '.
    LOOP AT SCREEN.
      CASE screen-name.
        WHEN 'RT1'.
          screen-input = '0'.
          MODIFY SCREEN.
        WHEN 'RT2'.
          screen-input = '0'.
          MODIFY SCREEN.
      ENDCASE.
    ENDLOOP.
  ELSEIF rad = 'X'.
    LOOP AT SCREEN.
      CASE screen-name.
        WHEN 'RT1'.
          screen-input = '1'.
          MODIFY SCREEN.
        WHEN 'RT2'.
          screen-input = '1'.
          MODIFY SCREEN.
      ENDCASE.
    ENDLOOP.
  ENDIF.
endform.

Similar Messages

  • HOW TO: Set up your application server to run BC4J

    How To set up your application server to run BC4J.
    INTRODUCTION
    A running BC4J application is actually the combination of:
    * Your own application files
    * BC4J runtime libraries
    In order to successfully run your BC4J application in local mode, the first requirement is
    that your application server contains the necessary BC4J libraries.
    This How To describes the steps required to ensure that you have a functional
    BC4J runtime environment installed on your application server.
    Oracle IAS 1.0.2 and Tomcat 3.1 will be used as examples.
    THE BC4J RUNTIME LIBRARIES
    Whatever application server you deploy to, the following libraries
    are required in the following order to be in the classpath.
    BC4J Libraries:
    xmlparserv2.jar
    jdev-rt.zip
    jbojdbcpatch.zip
    connectionmanager.zip
    jbohtml.zip
    jboimdomains.zip
    ordim817.zip
    ordvir817.zip
    ordhttp.zip
    jbomt.zip
    jbodomorcl.zip
    jboremote.zip
    jndi.jar
    jbodatum12.zip
    These libraries can be found in <JDEV_HOME>/lib/
    INSTALLING THE LIBRARIES ON IAS:
    Installing the libraries is simply a matter of copying them to the
    application server's filesystem and adding them to the classpath.
    IAS's classpath can be modified by editing the file:
    <IAS_HOME>\Apache\Jserv\conf\jserv.properties
    In this file you'll find the existing pre-installed BC4J libraries which
    looks like this:
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\lib\ordvir817.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\lib\ordim817.zip
    etc.
    Note! These BC4J libraries correspond to JDeveloper 3.1.1.
    In order to run JDev 3.2 based applications you will have to update these libraries
    to JDeveloper 3.2 production.
    Steps:
    1. Copy (or FTP) the JDev 3.2 BC4J libraries from <JDEV_HOME>\lib to a NEW directory on the
    appserver's filesystem called:
    <IAS_HOME>\Apache\BC4J\newlib
    2. Modify the classpath by editing <IAS_HOME>\Apache\Jserv\conf\jserv.properties.
    Example: (modified classpath entries)
    # New 3.2 BC4J Runtime libraries
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\xmlparserv2.jar
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jdev-rt.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jbojdbcpatch.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\connectionmanager.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jbohtml.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jboimdomains.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\ordim817.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\ordvir817.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\ordhttp.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jbomt.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jbodomorcl.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jboremote.zip
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jndi.jar
    wrapper.classpath=<IAS_HOME>\Apache\BC4J\newlib\jbodatum12.zip
    Note: Make sure to remove or comment out the existing 3.1.1 BC4J library entries!
    To see the changes, you must restart IAS and that's it, your IAS will be updated with
    the JDev 3.2 BC4J libraries which allow you to run BC4J Data Tags among other
    things!
    INSTALLING THE LIBRARIES ON TOMCAT
    As before, this process involves both the copying of the libraries
    and modifying the classpath.
    After copying the BC4J libraries to a path accessible from Tomcat,
    you can modify Tomcat's classpath by editing it's startup script:
    <TOMCAT_HOME>\bin\tomcat.bat (NT)
    <TOMCAT_HOME>\bin\tomcat.sh (Unix)
    Here is a portion of a modified tomcat.bat (on NT)
    rem Add BC4J libraries
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\xmlparserv2.jar
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jdev-rt.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jbojdbcpatch.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\connectionmanager.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jbohtml.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jboimdomains.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\or dim817.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\ordvir817.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\ordhttp.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jbomt.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jbodomorcl.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jboremote.zip
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jndi.jar
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\jbodatum12.zip
    rem Add Oracle JDBC library
    set CLASSPATH=%CLASSPATH%;D:\bc4j_lib\classes12.zip
    Note: I also added the Oracle JDBC library since Tomcat does not have it.
    It is found at:
    <JDEV_HOME>\jdbc\lib\oracle8.1.7\classes12.zip
    And That's It!
    When Tomcat is restarted using this script, the necessary BC4J libraries
    will be in the classpath..
    A follow up How To:"How To Deploy a BC4J JSP Application on IAS and Tomcat"
    will be posted shortly!

    I copied the following files in jserv classpath
    bc4jct.jar
    bc4jctejb.jar
    bc4jdomorcl.jar
    bc4jhtml.jar
    bc4jimdomains.jar
    bc4jmt.jar
    bc4jmtejb.jar
    bc4juixtags.jar
    collections.jar
    datatags.jar
    jdev-cm.jar
    regexp.jar
    share.jar
    uix2.jar
    cabo.war
    classes12.jar
    nls_charset12.jar
    ordim.jar
    ordhttp.jar
    runtime12.jar
    jdev-rt.jar
    xmlparserv2.jar
    bc4j_jclient_common.jar
    webapp.war
    I got this list from Jdev 9031 on-line help
    I also copied the new DataTags.tld file to /webapp directory
    When i run my jsp page i get this error..
    java.lang.NoClassDefFoundError: java/util/TimerTask
         at oracle.jbo.http.HttpContainer.findSessionCookie(HttpContainer.java:693)
         at oracle.jbo.html.jsp.datatags.ApplicationModuleTag.doStartTag(ApplicationModuleTag.java:148)
         at jspapp.odrjsp__html._menu._jspService(Compiled Code)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.jsp.app.JspApplication.dispatchRequest(Compiled Code)
         at oracle.jsp.JspServlet.doDispatch(Compiled Code)
         at oracle.jsp.JspServlet.internalService(Compiled Code)
         at oracle.jsp.JspServlet.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at oracle.portal.provider.v1.http.JspRenderer.renderBody(JspRenderer.java:116)
         at oracle.portal.provider.v1.RenderManager.render(RenderManager.java:164)
         at oracle.portal.provider.v1.http.ServletProviderResponse.showPortlet(Compiled Code)
         at oracle.portal.provider.v1.http.HttpProvider.dispatchProviderAction(Compiled Code)
         at oracle.portal.provider.v1.http.HttpProvider.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at org.apache.jserv.JServConnection.processRequest(Compiled Code)
         at org.apache.jserv.JServConnection.run(Compiled Code)
         at java.lang.Thread.run(Compiled Code)
    In the JDK 1.3 APi docs, i found that TimerTask was introduced only in JDK 1.3
    Does this mean that BC4J (in jdev 9031) will only work
    with JDK 1.3 or later?
    Thanks for your time.
    Harish

  • Setting FLVPlayback parameters at run time

    Hello,
    Is there a way to change the parameters on the FLVPlayback at
    run time? For example, I create a swf file to play the video
    "my_video", and I set the parameter "autoPlay" to false. I then
    embed the following code into a web page:
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="326" height="266" id="my_video" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="my_video.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#666666" />
    <embed src="my_video.swf" quality="high" bgcolor="#666666"
    width="326" height="266" name="my_video" align="middle"
    allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer">
    </embed>
    </object>
    The video is embedded in the page, and the user can click the
    controls to play the video.
    What I'm wondering is ... can I change the parameters at run
    time by using the above code somehow? For example, can I change the
    autoStart parameter to true, so now the video would start
    automatically when the page is loaded. Or, could I change the
    contentPath parameter so the code would now play a different flv
    file?
    Thanks for any help.
    Bob

    Hi,
    Thanks for the quick response. Your suggestion works almost
    perfectly. I can now change the flv to any flv I want, and it plays
    the video I want. However, even though I am specifying
    autoPlay=false, it still plays automatically when the page loads.
    Here is my actionscript:
    flvPlayback.playPauseButton = myplayPause;
    flvPlayback.seekBar = mySeek;
    flvPlayback.muteButton = myMute;
    flvPlayback.contentPath = newPath;
    flvPlayback.autoPlay = autoStart;
    and here is my html:
    <object
    classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
    width="326" height="266" id="xxx" align="middle">
    <param name="allowScriptAccess" value="sameDomain" />
    <param name="movie" value="pokflvplayer.swf">
    <param name="FlashVars"
    value="autoStart=false&newPath=holiday_message_2007.flv" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#666666" />
    <embed src="pokflvplayer.swf"
    FlashVars="newPath=holiday_message_2007.flv&autoStart=false"
    quality="high" bgcolor="#666666" width="326" height="266"
    name="medical_imaging" align="middle"
    allowScriptAccess="sameDomain" type="application/x-shockwave-flash"
    pluginspage="
    http://www.macromedia.com/go/getflashplayer">
    </embed>
    </object>
    Any idea why it will not recognize the autoStart paramenter?
    By the way, I had to change your myFLV.autoStart - autoS to
    flvPlayback.autoPlay=autoStart. The actual name of the parmameter
    is autoPlay, not autoStart. My guess is that was just a typo on
    your part. Thanks again for your help.
    Bob

  • How can i update data in JTable at run time ?

    i am trying to build a client/server architecture for conducting quizzes & online tests.. My client will return a object to the server after the test is over, which contains details about the participant, his score and other details. i am putting the incoming object to an Vector. I'll create a new thread each time for the incoming connection and insert the object to the Vector.. Now, please tell me tat, how can i update my table automatically at run time so tat, my table is updated whenever a new object is entered into vector..
    here is my code for the table..
    public class MyTableModel extends AbstractTableModel {
        String columNames[] = { "ID", "NAME", "COLLEGE", "SCORE", "CELL" };
        /** Creates a new instance of MyTableModel */
        public MyTableModel() {
            Main.List = new Vector();
            SetDefaultData();
        public int getRowCount() {
            return Main.List == null ? 0 : Main.List.size();
        public int getColumnCount() {
            return columNames.length;
        public String getColumnName(int column) {
            return columNames[column];
        public boolean isCellEditable(int row,int col) {
            return false;
        public Object getValueAt(int rowindex, int columnindex) {
            if(rowindex < 0 || rowindex >= getRowCount())
                return "";
            Student row = (Student)Main.List.elementAt(rowindex);
            switch (columnindex)
                case 0 : return row.id;
                case 1 : return row.name;
                case 2 : return row.college;
                case 3 : return row.score;
                case 4 : return row.cell;
            return "";
        public String getTitle() {
            return "Student Table";
        private void SetDefaultData() {
            Main.List.removeAllElements();
            Main.List.addElement(new Student("CS041","Keerthivasan M","MNM",95,"9884326321"));
            Main.List.addElement(new Student("CS012","Arun M","MNM",90,"9884825780"));
            Main.List.addElement(new Student("CS019","Balaji S","MNM",79,"9841742068"));
            Main.List.addElement(new Student("CS005","Anand R","MNM",89,"9884130727"));
            Main.List.addElement(new Student("CS045","Manish J","MNM",55,"9841624625"));
            Main.List.addElement(new Student("CS013","Mangal S","MNM",5,"9841961742"));
    }

    In the future Swing related questions should be posted in the Swing forum.
    how can i update my table automatically at run time so tat, my table is
    updated whenever a new object is entered into vector..You don't update the Vector directly. You should be creating a method in your TableModel, called "addRow(...)". This method will do two things:
    a) add the Student object to the Vector
    b) invoke the fireTableRowsInserted(..) method of AbstractTableModel. This will cause the table to be repainted.

  • How can i see Log information of Report Run Time?

    Hi Gurus,
    How can i see Log information of Report Run Time?, till now i am counted report run time manually. Is there any way i can see the workbook running time in log information?.
    Thanks & Regards
    Vikram

    There could be a few things -
    At one time, you needed to run a separate script to create the tables. I'm not sure that is still the case. If you check the Administrators guide, look into the chapter that deals with the EUL Status Workbooks.
    If you are not logged on as the eul owner, you may not have select privileges, or you may need to qualify the table with the schema (if there is no synonym) - select * from <eul_owner>.EUL5_QPP_STATS;
    If you are on 4i, the table is EUL4_QPP_STATS

  • How We Can Change Page Size During Report Run Time

    Hello !
    How We Can Change Page Size During Report Run Time .
    How can we stop to change the column name when we amend a sql in report data model.
    Thanks !
    null

    hello sohail
    1. question - i'm afraid this cannot be done ... bit in report 6 and newer you have posibility to divide your report in 3 parts (former header, body, trailor) and each part can have diferent page siz, orientation , ...
    2. question - best is give each column in your statements in one report diferent alias. when you have to chnge something, alias will remain same ...
    try this: select 1 as fist_column, 1 as second_column from dual
    hope this helsp

  • How to drag and drop a picture at run time in a window displaying pictures?

    How to drag and drop a picture at run time in a window displaying pictures on the front panel. The main thing is that the window is displaying frames continuously?

    vivman,
    So from your description you have a picture control where you've already created an image and you'd like to drag an image around inside of the picture control. This can be done although it is going to take a significant amount of research and programming on your behalf. You can use the drag event in the event handler to find out when the drag occurs and where the cursor is. Then edit the picture as you move your mouse so that when you drop the picture gets updated.
    The even structure is a somewhat advanced topic and the drag and drop feature is one of the more advanced uses of this structure. I would search the example finder (help>>find examples) for "event" and "drag" to see how to use these events. Also you'll want to look at the examples for the picture control.
    Sounds like a cool project! Check out Darren's Weekly Nugget 10/30/2006 this topic (http://forums.ni.com/ni/board/message?board.id=170&message.id=212920). It might prove useful.
    Good luck!
    Chris C
    Chris Cilino
    National Instruments
    LabVIEW Product Marketing Manager
    Certified LabVIEW Architect

  • How to set values of a parameterized message in ADF Faces?

    Hi all,
    i've got the following problem: I want to set the values of a parameterized message before i add the message to the FacesContext.
    Contents of the message resource bundle:
    testPage.successMsg.create=The device {0} was created successfully!
    Code within backing bean method:
    String message = getStringFromBundle("testPage.successMsg.create");
    FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(message));
    In Struts/ADF UIX the following code did the job:
    protected void setUIXInfoMessage(HttpServletRequest request, String key, Object[] args)
    MessageData msgs = new MessageData();
    MessageResources mr = this.getResources(request);
    String msg = "";
    if (mr != null)
    msg = mr.getMessage(request.getLocale(), key, args);
    msgs.addMessage(null, msg, null, UIConstants.MESSAGE_TYPE_INFO);
    request.setAttribute(UIX_MESSAGE_KEY, msgs);
    Can anyone help me with this problem? I have searched a lot in the Oracle ADF Development Guide and within forum, but did not find any solution.
    Another interesting thing is, how to set the parameters from jspx-Code.
    How can i achieve the same results in ADF Faces corresponding to the following UIX-Code:
    <boundAttribute name="title">
    <messageFormat format="${nls['deleteTip.confirmation']}">
    <dataObject source="${bindings.TipName}"/>
    </messageFormat>
    </boundAttribute>
    Resource Bundle:
    deleteTip.confirmation=Do you really want to delete the tip {0}?
    Another question:
    What are the corresponding elements in ADF Faces corresponding to <concat> and <if> in UIX or what possibilites exist in ADF Faces to dynamically concatenate strings depending on certain conditions?
    I know, these are many questions. I am familiar with UIX, but now i have to start developing applications with ADF Faces and there are some things i don't find corresponding equivalents.
    Thanks in advance!
    Regards,
    Stefan

    Hi,
    SRDemo shows you how to do this declratively
    <h:outputFormat value="#{res['srcreate.confirmPanel.message']}"
    escape="false" id="nextButton">
    <f:param value="#{requestScope.SRDEMO_CREATED_SVRID}"/>
    </h:outputFormat>
    where the <f:param ...> element sets the value of the variable
    To programmatically access internationalized strings, SRDemo uses
    private static ResourceBundle getBundle() {
    FacesContext ctx = getFacesContext();
    UIViewRoot uiRoot = ctx.getViewRoot();
    Locale locale = uiRoot.getLocale();
    ClassLoader ldr = Thread.currentThread().getContextClassLoader();
    return ResourceBundle.getBundle(ctx.getApplication().getMessageBundle(),
    locale, ldr);
    public static String getStringFromBundle(String key) {
    ResourceBundle bundle = getBundle();
    return getStringSafely(bundle, key, null);
    You take it from there and put it to a FacesMessage, If it uses parameters I guess you will have to parse the string
    Frank

  • Multiple jdbc credentials : setting AM pool config parameters on runtime

    Hi
    was working with multiple jdbc credentials. In the custom JDBC cookie session factory, i try to set my AM configuration parameters , and pass this on to the env info provider , as instructed in the samples. But if i try to pass the JDBC Name , or configuration parameter etc , it refuses to recognize the connection. I have to specify the DB username, DB password and jdbc connection url string for the settings to actually take effect.
    I tried using data sources as well, but it in vain.
    Is this probably a bug , or is this an issue with how i have implemented it.
    code sample with createSessionCookie method of customJDBCSessionCookieFactory:-
    Hashtable env = pool.getEnvironment();
    env.remove(Configuration.DB_USERNAME_PROPERTY);
    env.remove(Configuration.DB_PASSWORD_PROPERTY);
    env.remove(Configuration.DB_CONNECT_STRING_PROPERTY);
    env.remove(Configuration.JDBC_CONNECTION_NAME);
    pool.setUserData(null);
    EnvInfoProvider provider = null;
    String dbSID = (String)request.getAttribute("dbSID");
    if(dbSID.equalsIgnoreCase("SID1")){
    provider = new DynamicJDBCEnvInfoProvider( "myJDBCName");
    session.setAttribute( Configuration.JDBC_CONNECTION_NAME, "myJDBCName");
    cookie.setEnvInfoProvider(provider);
    .............................................................

    KUBA - were you able to resolve these issues and if so are there any lessons learned you can share?
    I'm hoping someone from the ADF team can answer our original question including guidelines for setting pool parameters and how to monitor the pool's performance while running in production.
    thanks

  • How to set the Java VM parameters in Ant ?

    Hi All,
    Am trying to set the Java VM parameter "-Djava.library.path=C:\MA\bin" in Ant task.
    I used tag <java jvmargs="">
    but it dint seems to be working.
    Any help on this would be appriciated.
    thanks in advance,
    Loginform.

    Thanks for your response,
    When i tried with the above option it doesnt seems to load the .dll file in the path.
    Could you pls suggest how to set the .dll in classpath in Ant
    It would be greathelp.
    Thanks in advance,
    loginform.

  • How 2 Set the logic for report 2 run 1st of everymonth......

    Hi Experts,
    i ve developd a HR-ABAP report in that Some part of code will Mon-Fri, Excluding Public holidays and sat & sundays...( i.e no public holidays and no sat & sundays)
       and some part of should Run on 1st of everymonth.... but 2 parts of code should be in same report..
    How can set the logic to run the report respective times....
    Thanks in Advance....
    sudeer.

    you can code this but need some good expertise on fm's  , date handling techniques and subroutine call coding.
    1.
    to make the code run only on 1st of every month
    capture the rundate of ur prog .. take value of  sy-datum
    ex.. 01.xx.yyyy
    or date std will be yyyymmdd so check for dd = 01 ..
    so per logic first two chars show that its first of any month in any year ..
    if yes
    execute the logic for the first of every month ..
    endif.
    2.
    where the code needs to be run on mon-fri and not on public holidays / sun / sat ..
    first fetch the day based on date .. like mon or tue or wed .. except sat and sun..
    second check whether if m-t-w-th-fr if any of them is  a holiday or not
    u need to check the date in the calender list like tholi thoc and .. to check whether that is a holiday or not ..
    coming to sat and sundays .. u need to check the day for date using function modules and build the logic ...
    br,
    vijay..

  • How to set defalut value to DB current date time in EO using sql

    HI,
    I am using below query to set default date time as DB current date
    select to_char(sysdate, 'DD-MM-YYYY HH24:MI:SS') from dual
    but it is throwing exception
    (oracle.jbo.AttributeLoadException) JBO-27021: Failed to load custom data type value at index 7 with java object of type oracle.jbo.domain.Timestamp due to java.sql.SQLException.

    Halo,
    I tested it & was able to find the values inserted in db in hiredate column.. What is that you did? Was this..
    In EO of emp -- Hire date column of datatype timestamp :
    details tab.. Default value -- expression :
    DBTransaction.currentDbTimeIf you would have done this,
    On run time when we click createInsert button , by default you will see the date.. After committing the changes, query it in db and will find the inserted record with default value..
    Sample data i tested :
    SQL Statement which produced this data:
      select * from emp where empno=1111
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO
    1111,null,null,null,06/05/2013 17:18:41,4500,null,nullRegards,
    Archana

  • 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 get value in data control at run time based on bind variable in VO

    Hi,
    we are capturing the value of customer id at run time. we are associating the captured value of customer id to bind variable of the view object.
    View object is returning the data of that customer id, this view object is part of the application module ,this application module is exposed as data control,so than we have drag and drop this view object response on the
    page from data control.
    How ever after assigning the customer id to bind variable but still it is not showing on jsf page,even we refreshed the data control manually with the help of java code so kindly provide some solution for it.

    Hi,
    If i got your post correctly,you can filter your VO using defining view criteria see following samples
    Oracle ADF - Create View Criteria and Execute using Bean.
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

  • How to make a text field required at run time when the user clicks the checkbox ?

    I got a form where , there are several checkboxes and text fields associated with that checkboxes.If the use clicks on the check box then the associated
    text fields should become required.I have tried the change event and the click event for the checkboxes.It gives error in the onChnage event and I got some weird results in the on click event .Sometimes if the user click the check box , then for the 1st time the field doesnt become required , then the user onclicks the check box and when the user clicks the checkbox for the second time the field becomes required,but if i deselects the highlighted field option and selects it again the field becomes required even if the user onchecks it I am totally confused !!! Adding to it i have also written the wrong code still i achieved the desired result ?? How it can be possible . I am writing the codes below , please help me as i am working under a deadline from the client.
    onChange event :
    var newVal = this.boundItem(xfa.event.newText);
    if(newVal == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "disabled";
      else
         xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.Purchasecost3_1" ).validate.nullTest = "error";
    For the onClick event :
    var a = xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovere d_OnlyEnergyCharges").rawValue;
    //app.alert(a);
    if(a == 0)
        xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "error";
      if(a == 1)
          xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").validate.nullTest = "disabled";
       Please help someone !!!

    I used the onchange event and wrote the code for it. I got the result . But there is a problem.All these fields are in a table and it's a dynamic table where you can add rows dynamically at the run time .I have other change event for some fields in this table .All are working fine when i add the row.But for this check box the required fields are not validated as required at the run time . I am here giving the code , Please help me .
    form1.Subform0.Subform1.Subform9.Subform10.Table48.Row2.CostItemRecovered_OnlyEnergyCharge s::change - (JavaScript, client)
    if(this.rawValue == "1")
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory= "error";
      xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory= "error";
    else
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L1_1").mandator = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row4.ComplianceCheck_ L2_1").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L1_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row5.ComplianceCheck_ L2_2").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L1_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row6.ComplianceCheck_ L2_3").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L1_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row7.ComplianceCheck_ L2_4").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L1_5").mandatory = "disabled";
    xfa.resolveNode("form1.Subform0.Subform1.Subform9.Subform10.Table48.Row8.ComplianceCheck_ L2_5").mandatory = "disabled";

Maybe you are looking for

  • Internet Connection Speed SLOW!

    My Set-up... 2012 MacPro 3.33 GHz 6-Core Intel Xeon running Mavericks 10.9.5 Airport Extreme Base Station -  Card Type: AirPort Extreme  (0x14E4, 0x8E) - Supported PHY Modes: 802.11 a/b/g/n - Firmware Version: Broadcom BCM43xx 1.0 (5.106.98.100.22) M

  • Extracting SQL statement from a Webi document's data provider using SDK.

    Hi all, Is it possible to extract the SQL statement from an existing Webi document's data provider using BO SDK?  I've searched through the class library but haven't found any information on this yet.  If you have done it, could you provide some guid

  • How do connect iPad wireless to a projector for use in classroom?

    I want to be able to utilize my iPad in the classroom as I would an airtablet.  Is there a way to do this?

  • Mouse gestures enabled by default???

    Hey I'm getting kinda annoyed when I move my mouse the wrong way and firefox goes to the last page I visited. Now I have no idea how this mouse gesture got there, but I'd like to deactivate it. Its not a firefox gesture as far as I can tell and I nev

  • Code for  single button which acts for add,find,update

    I have created one btns- (acting for add,find, update etc having same unique id )using VB.NET code.I want to write code according to the captions of the button...I mean for diff caption of the btn , diff action should perform? So , plz anyone tell me