Dynamic app creation using MXML?

I'm working on creating a small quiz application which will
be driven by pre-formatted external XML. I have designed various
custom question canvases for each of the question types (MCQ, short
answer, match-pairs etc.) and I'm wondering if there is some way to
implement the main application using MXML instead of ActionScript?
I've managed to hard-code the order of the questions, knowing
which canvases are needed in which order, but I need to be able to
detect the question type from the XML (that bit I can manage) and
then add the appropriate question canvas component in order in my
tabNavigator.
Essentially, I'm trying to replicate the function of a
switch:case clause in MXML. Does anyone know if this is possible?
I've started trying to implement it in ActionScript, but I'm a bit
of a newbie to AS3, and I keep getting errors I don't understand,
like "Access of undefined property" where I'm referring to an
object I've just declared and instantiated in the previous line of
code. E.g (anywhere I use mainPanel):
<mx:Script>
<![CDATA[
import mx.controls.Text;
import mx.containers.Canvas;
import mx.containers.Panel;
var mainPanel:Panel = new Panel();
Root.addChild(mainPanel);
mainPanel.layout = "absolute";
mainPanel.setStyle("left", 10);
mainPanel.setStyle("top", 10);
mainPanel.setStyle("right", 10);
mainPanel.setStyle("bottom", 10);
var testPage:Canvas = new Canvas();
var numQuestions:int = quizQns.childNodes.length;
var qTypes:Array = new Array(numQuestions);
var textLine:Array = new Array(numQuestions);
]]>
</mx:Script>

You can declare and initialize variables outside functions in
your script block, but for most else you need to do it in a
function. I would continue learning AS3 as it will give you real
flexibility and power.
<?xml version="1.0"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<![CDATA[
import mx.controls.Text;
import mx.containers.Canvas;
import mx.containers.Panel;
private var mainPanel:Panel;
private var testPage:Canvas = new Canvas();
private var numQuestions:int = 10;
// private var numQuestions:int = quizQns.childNodes.length;
private var qTypes:Array = new Array(numQuestions);
private var textLine:Array = new Array(numQuestions);
public function init():void {
mainPanel = new Panel();
addChild(mainPanel);
mainPanel.layout = "absolute";
mainPanel.setStyle("left", 10);
mainPanel.setStyle("top", 10);
mainPanel.setStyle("right", 10);
mainPanel.setStyle("bottom", 10);
]]>
</mx:Script>
</mx:Application>

Similar Messages

  • Dynamic header creation using SQL

    Hi Gurus,
    I need your help again. I have a query which uses a date parameter to populate a report. The report pulls out data from the user entered date to minus eleven months. The report counts totals calls registered each month. I have the query working fine but I need help in populating the header.
    For ex - suppose I run the query on todays date (18-Jan-2012)
    The report header will be -
    Jan Feb Mar Apr ....Dec
    But I want the header to be populated in the following format -
    Jan 2012 Feb 2011 Mar 2011 Apr 2011....Dec 2011
    And for ex if I run the report for a future date say (21-May-2012)
    The header will be in the following format -
    Jan 2012....May 2012 Jun 2011 Jul 2011 .......Dec 2011.
    Please let me know if I can populate the header using SQL. Any help is greatly appreciated.

    Hi Tenacious,
    You wrote:
    I want the header to be populated in the dynamic format with the year value concanated to the Month column.My script does that; you can look one more time at the output in my first post, and also in my second post.
    And if you want another example, when we replace 18-Jan-2012 by 21-May-2012, we have the following:
    SQL> select to_char(col,'Monyyyy') col_date
      2  from
      3  (select
      4         add_months(to_date('21-May-2012','dd-Mon-yyyy'),
      5                      -level + 1) col
      6  from dual
      7  connect by level <= extract(month from to_date('21-May-2012','dd-Mon-yyyy')
      8  union
      9  select
    10         add_months(to_date('21-May-2012','dd-Mon-yyyy')
    11                    , level - 12 )
    12  from dual
    13  connect by level <= 12 - extract(month from to_date('21-May-2012','dd-Mon-y
    yyy')))
    14  order by extract(year from col) desc, extract(month from col);
    COL_DAT
    Jan2012
    Feb2012
    Mar2012
    Apr2012
    May2012
    Jun2011
    Jul2011
    Aug2011
    Sep2011
    Oct2011
    Nov2011
    COL_DAT
    Dec2011
    12 rows selected.
    SQL>

  • Dynamic Table Creation using RTTS - Question on Issue

    I am using the RTTS services to dynamically create a table.  However, when I attempt to use the get_components method it does not return all the components for all tables that I am working with.
    Cases and End Results
    1) Created structure in data dictionary – get_components works.
    2) Pass PA0001, P0001 or T001P to get_components and I do not receive the correct results.  It only returns a small subset of these objects.  The components table has all the entries; however, the get_components method only returns about 4 rows.
    Can you explain this and point me to the correct logic sequence? I would like the logic to work with all tables.
    Code excerpt below:
    The logic for the get components works for case 1, but not case 2. When I pass into this method a "Z" custom table or structure name for parameter “structure_name” and the get_components() method executes and returns the correct results. However, when I pass in any of the objects listed above in case 2, the get_components method does not return the correct number of entries. When I check typ_struct which is populated right before the get_components line, I see the correct number of components in the components table. 
    method pb_add_column_headings .
      constants: c_generic_struct type c length 19 value 'ZXX_COLUMN_HEADINGS'.
      data: cnt_lines      type sytabix,
            rf_data        type ref to data,
            typ_field      type ref to cl_abap_datadescr,
            typ_struct     type ref to cl_abap_structdescr,
            typ_table      type ref to cl_abap_tabledescr.
      data: wa_col_headings type ddobjname.
      data: rf_tbl_creation_exception type ref to 
                                      cx_sy_table_creation,
            rf_struct_creation_exception type ref to
                                      cx_sy_struct_creation.
      data: t_comp_tab type
                       cl_abap_structdescr=>component_table,
            t_comp_tab_new      like t_comp_tab,
            t_comp_tab_imported like t_comp_tab.
      field-symbols: <fs_comp> like line of t_comp_tab,
                     <fs_col_headings_tbl> type any table.
    **Get components of generic structure
      wa_col_headings = c_generic_struct.
      typ_struct ?= cl_abap_typedescr=>describe_by_name(
                                       wa_col_headings ).
      T_COMP_TAB = typ_struct->get_components( ).
    **Determine how many components in imported structure.
      typ_struct ?= cl_abap_typedescr=>describe_by_name(
                                        structure_name ).
      t_comp_tab_imported = typ_struct->get_components( ).
      cnt_lines = lines( t_comp_tab_imported[] ).

    Hi Garton,
    1. GET_COMPONENT_LIST
       Use this FM.
       It gives all fieldnames.
    2. Use this code (just copy paste)
    REPORT abc.
    DATA : cmp LIKE TABLE OF rstrucinfo WITH HEADER LINE.
    DATA : pa0001 LIKE TABLE OF pa0001 WITH HEADER LINE.
    CALL FUNCTION 'GET_COMPONENT_LIST'
      EXPORTING
        program    = sy-repid
        fieldname  = 'PA0001'
      TABLES
        components = cmp.
    LOOP AT cmp.
      WRITE :/ cmp-compname.
    ENDLOOP.
    regards,
    amit m.

  • DYNAMIC TABLE CREATION USING JSP

    I WANT TO CREATE A DATABASE TABLE IN AN INTERACTIVE WAY ie MY QUESTION IS: HOW TO CREATE A TABLE USING JSP WITH TWO ARRAYS(FIRST ARRAY CONTAINS FIELD(COLUMN) NAMES AND THE SECOND ARRAY CONTAINS ITS CORRESPONDING DATATYPE)BOTH ARRAYS ARE OF VARYING SIZE.IF THE USER ENTERS SUPPOSE '6' AS THE INPUT TO FORM A TABLE OF 6 FIELDS SO, THE QUERY SHOULD BE DYNAMICALLY FORME USING THE ARRAY NAME FOR FIELD AND THE ARRANAME FOR ITS CORRESPONDING DATATYPE.HAVE ANY IDEA ON THIS PLEASE LET ME KNOW.
    THANKS

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Dynamic table creation using JDBC

    hi all, i am working in JDBC and using prepared statements.the problem i have is i need to create and read from tables,dynamically and i should also create tables with keys dynamically,i.e the user gives the table name and i should create it using JDBC.the user does not enter the full query he just types the table name.i am using oracle as backend.i have tried prepared statements to retrieve datas from tables whose names r given dynamically like
    "select * from ?"
    and then using
    setString(1,the variable which holds the table name);
    but this doesnt seem to work.it says invalid table name.how can i do this.i shd also create tables the same way like
    "create table ? ..."
    is there a way out of this problem or is there any other type of statement that i can use.please give a detailed example.thanks in advance.

    Usually when I work with Oracle DBA's they get real excited when I suggest that the application could create the tables dynamically. Because this means that there is absolutely no chance that there is a coherent implemetation of table allocation.
    Seemed like a good point to me.

  • Dynamic Tree Creation using JSP, Struts framework

    I urgently require tips/information/code snippet for creating a Dynamic Tree structure.
    Tree is the hierarchical folder structure that we see in windows operating system.
    Dynamic tree in the sense that all nodes shall be populated from database & a radio button shall be present at each node that can be selected & submitted to form.
    Tree should be done using JSP (& if required Javascript).
    I am using Struts framework .
    [email protected]

    u need to know quite a few java technologies to make archieve your dream.
    JDBC, dynamic array and JSP.
    after reading tutorial regarding to these 3 materials, you should be able to get your job done.

  • Endeca App creation using crs

    hi guys,
    i am using atg 10.1.1 ,
    i successfully running the crs app , now i would like to integrate crs with endeca.
    Can u guys tel me the next step please?
    Edited by: ressh on Jan 29, 2013 10:41 PM

    Hi,
    Check this blog
    http://atgendecaoasis.blogspot.com/

  • Dynamic Dynpro Creation using RPY_DYNPRO_INSERT

    Hi there,
    Did anyone of you already worked with this function and could provide me some information about the following points?
    1. How do I have to fill the CONTAINERS and FIELDS_TO_CONTAINERS tables to let the Dynpro show me e.g. a text field with the text "Hello World"? (The Dynpro header works fine and I also get the Dynpro shown, but without any fields, also the Flow Logic works fine) Which fields of the appropriate structures do I have to fill in which way?
    2. Due to my task I need to generate the Screen at runtime and every time it is called I need a new one. Is there a possibility to delete these Screens dynamically again? So the program does not create thousands of Screens over time.
    Thank you in advance for your help.
    Kind Regards,
    Sebastian

    Hi there,
    Did anyone of you already worked with this function and could provide me some information about the following points?
    1. How do I have to fill the CONTAINERS and FIELDS_TO_CONTAINERS tables to let the Dynpro show me e.g. a text field with the text "Hello World"? (The Dynpro header works fine and I also get the Dynpro shown, but without any fields, also the Flow Logic works fine) Which fields of the appropriate structures do I have to fill in which way?
    2. Due to my task I need to generate the Screen at runtime and every time it is called I need a new one. Is there a possibility to delete these Screens dynamically again? So the program does not create thousands of Screens over time.
    Thank you in advance for your help.
    Kind Regards,
    Sebastian

  • Dynamic Load Plan creation using scripting

    Hello All,
                   We have a requirement to create load plans dynamically i.e using script groovy. Idea is that we will store interface scenarios in a table and then script will read these scenarios an create dynamic load plans. Now following are my question.
                   1) Is it possible to create load plans through script ? (different blogs on net claims that you can do anything or everything whatever ODI studio can do)
                    2) Any pointer what API to use for this task ? I am very new to scripting and have zero idea about how to go about it . if possible please suggest sample script to create load plans (I can see some sample to create interface,folder etc on net.)
    Thanks in advance for your reply.
    Thanks & Regards

    ODI SDK apis allows dynamic creation of Loadplans. Oracle Fusion Middleware Java API Reference for Oracle Data Integrator
    Studio too uses these APIs for LP related operations so you should be able to do using these whatever studio allows.
    You can find SDK samples at Oracle Data Integration Sample Code

  • Simple WebService Creation using JDeveloper 11.1 Technology Preview 2

    Hi,
    I like the way JDeveloper simplifies the web service creation using the wizards and allows to test the web services from the IDE itself.
    I have the following issues when I tried the step-by-step tutorial (http://www.oracle.com/technology/obe/obe11jdev/11/ws/ws.html) to build a web service. I greatly appreciate if some one can help me with these issues. This tutorial basically provides how to create a simple hello world kind of web service using JDev. Some of the steps are failing in my case.
    Failure 1) Unable to find the WSDL document
    When I invoke the "Test Web Service" menu item HTTP Analyzer is unable to locate the dynamically generated WSDL. I did try with and with-out proxy settings both the cases it failed. However I can see the WSDL if I go to the given WSDL URL in my web browser. I suspect I am missing some thing in Jdeveloper configuration. So I had to manually save the WSDL from the browser to go to further steps.
    Failure 2) Failure in the Response message
    When I invoke the request message I am getting the following error in the response:
    "The selected message is not a SOAP message". However, if I use the browser to test the web service, it is working fine.
    I greatly appreciate if you can provide me some insight into why JDeveloper is failing in these cases.
    Thanks
    Sunil

    It started working after I restarted the JDeveloper with no proxy settings. Seems to be after changing proxy settings JDev need to be restarted to take the preference changes to be effective in this case.
    Another interesting aspect that I noticed was, when HTTP analyzer is running it dynamically sets the proxy in the preferences settings as localhost with the HTTP analyzer port.
    But anyway now I am able to run and test this webservice within the JDev itself.
    Regards
    Sunil

  • WLST Domain Creation using JRF template throws SQLRecoverableException

    I am working on domain creation using templates and included the JRF template to use OPSS functionality.
    I have run the RCU utility to create the required components that will have necessary tables to host OPSS data and also tested that it works with CC_STB user that i will use to connect from WLS.
    I am able to ping the database server having RCU components from the VM where i want to create and configure the domain but when i configure the LocalSvcTblDataSource with the same ip address and try to setup the OPSS datasources, it gives me "Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified Error Code: 17002"
    Below is my WLST python script:
    #=======================================================================================
    # Open a domain template.
    #=======================================================================================
    readTemplate("/u01/app/mw/Oracle_Home/wlserver/common/templates/wls/wls.jar")
    #=======================================================================================
    # Update the domain to enable the WebLogic Server domain with JRF and EM.
    #=======================================================================================
    addTemplate('/u01/app/mw/Oracle_Home/oracle_common/common/templates/wls/oracle.jrf_template_12.1.2.jar')
    addTemplate('/u01/app/mw/Oracle_Home/em/common/templates/wls/oracle.em_wls_template_12.1.2.jar')
    #=======================================================================================
    # Configure the Administration Server and SSL port.
    # To enable access by both local and remote processes, you should not set the
    # listen address for the server instance (that is, it should be left blank or not set).
    # In this case, the server instance will determine the address of the machine and
    # listen on it.
    #=======================================================================================
    cd('Servers/AdminServer')
    set('ListenAddress','')
    set('ListenPort', 7001)
    create('AdminServer','SSL')
    cd('SSL/AdminServer')
    set('Enabled', 'True')
    set('ListenPort', 7002)
    #=======================================================================================
    # Define the user password for weblogic.
    #=======================================================================================
    cd('/')
    cd('Security/base_domain/User/weblogic')
    # Please set password here before using this script, e.g. cmo.setPassword('value')
    cmo.setPassword('password')
    #=======================================================================================
    # Create and configure a JDBC Data Source, and sets the JDBC user.
    #=======================================================================================
    # Get RCU Configuration using RCU service table (STB) schema credentials
    cd('/')
    cd('JDBCSystemResource/LocalSvcTblDataSource/JdbcResource/LocalSvcTblDataSource')
    cd('JDBCDriverParams/NO_NAME_0')
    set('DriverName','oracle.jdbc.OracleDriver')
    set('URL','jdbc:oracle:thin:@XX.XX.XX.XX:15210/xe')
    set('PasswordEncrypted', 'password')
    set('UseXADataSourceInterface', 'false')
    cd('Properties/NO_NAME_0')
    cd('Property/user')
    cmo.setValue('CC_STB')
    getDatabaseDefaults()
    #=======================================================================================
    # Write the domain and close the domain template.
    #=======================================================================================
    setOption('OverwriteDomain', 'true')
    writeDomain('/u01/data/user_projects/domains/cc_domain')
    closeTemplate()
    #=======================================================================================
    # Exit WLST.
    #=======================================================================================
    exit()
    And the complete exception trace.
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
    Error: writeDomain() failed. Do dumpStack() to see details.
    wls:/offline/base_domain>dumpStack();
    com.oracle.cie.domain.script.jython.WLSTException: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
    Domain Location: /u01/data/user_projects/domains/cc_domain
    Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
    Exception:
    oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at com.oracle.cie.domain.script.jython.CommandExceptionHandler.handleException(CommandExceptionHandler.java:55)
      at com.oracle.cie.domain.script.jython.WLScriptContext.handleException(WLScriptContext.java:1967)
      at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1126)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.python.core.PyReflectedFunction.__call__(Unknown Source)
      at org.python.core.PyMethod.__call__(Unknown Source)
      at org.python.core.PyObject.__call__(Unknown Source)
      at org.python.core.PyInstance.invoke(Unknown Source)
      at org.python.pycode._pyx5.writeDomain$15(/tmp/WLSTOfflineIni4846195865917165143.py:73)
      at org.python.pycode._pyx5.call_function(/tmp/WLSTOfflineIni4846195865917165143.py)
      at org.python.core.PyTableCode.call(Unknown Source)
      at org.python.core.PyTableCode.call(Unknown Source)
      at org.python.core.PyFunction.__call__(Unknown Source)
      at org.python.pycode._pyx93.f$0(<console>:1)
      at org.python.pycode._pyx93.call_function(<console>)
      at org.python.core.PyTableCode.call(Unknown Source)
      at org.python.core.PyCode.call(Unknown Source)
      at org.python.core.Py.runCode(Unknown Source)
      at org.python.core.Py.exec(Unknown Source)
      at org.python.util.PythonInterpreter.exec(Unknown Source)
      at org.python.util.InteractiveInterpreter.runcode(Unknown Source)
      at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
      at org.python.util.InteractiveInterpreter.runsource(Unknown Source)
      at weblogic.management.scripting.WLST.main(WLST.java:219)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at weblogic.WLST.main(WLST.java:29)
    Caused by: com.oracle.cie.domain.script.ScriptException: Domain Creation Failed!
    Domain Location: /u01/data/user_projects/domains/cc_domain
    Reason: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
    Exception:
    oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at com.oracle.cie.domain.script.ScriptExecutor.runGenerator(ScriptExecutor.java:3706)
      at com.oracle.cie.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:991)
      at com.oracle.cie.domain.script.jython.WLScriptContext.writeDomain(WLScriptContext.java:1117)
      ... 29 more
    Caused by: com.oracle.cie.domain.security.external.ConfigSecurityException: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:129)
      at com.oracle.cie.domain.DomainGenerator.run(DomainGenerator.java:315)
      at java.lang.Thread.run(Thread.java:744)
    Caused by: oracle.security.opss.tools.lifecycle.LifecycleException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:708)
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.configureDBSecurityStore(OpssDomainConfigImpl.java:339)
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.initializeSubsystem(OpssDomainConfigImpl.java:166)
      at oracle.security.opss.tools.lifecycle.cie.OpssSecurityConfiguration.initializeSubsystem(OpssSecurityConfiguration.java:126)
      ... 2 more
    Caused by: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.processJPAException(JpsDBDataManager.java:2088)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:955)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1459)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.beginTransaction(JpsDBDataManager.java:1455)
      at oracle.security.jps.internal.common.rdbms.util.JpsDbBootstrapImpl.<init>(JpsDbBootstrapImpl.java:162)
      at oracle.security.opss.tools.lifecycle.OpssDomainConfigImpl.checkIfFarmExists(OpssDomainConfigImpl.java:679)
      ... 5 more
    Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:614)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:282)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getVersion(JpsDBDataManager.java:1027)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.getEMFAndSubject(JpsDBDataManager.java:1124)
      at oracle.security.jps.internal.policystore.rdbms.JpsDBDataManager.init(JpsDBDataManager.java:907)
      ... 9 more
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.2.v20130514-5956486): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLRecoverableException: IO Error: Unknown host specified
    Error Code: 17002
      at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
      at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:319)
      at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:138)
      at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
      at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:690)
      at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:215)
      at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:554)
      ... 16 more
    Caused by: java.sql.SQLRecoverableException: IO Error: Unknown host specified
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:465)
      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:546)
      at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:232)
      at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
      at java.sql.DriverManager.getConnection(DriverManager.java:571)
      at java.sql.DriverManager.getConnection(DriverManager.java:187)
      at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
      ... 20 more
    Caused by: oracle.net.ns.NetException: Unknown host specified
      at oracle.net.resolver.HostnameNamingAdapter.resolve(HostnameNamingAdapter.java:191)
      at oracle.net.resolver.NameResolver.resolveName(NameResolver.java:133)
      at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:416)
      at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
      at oracle.net.ns.NSProtocol.connect(NSProtocol.java:247)
      at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1109)
      at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:316)
      ... 27 more
    Any help/pointers/hints will be helpful
    Thanks,
    Santosh

    Hi Micheal,
    Thanks a Lot for your response.
    We have checked the OS requirements :
    System Itanium 11i (11.31) B.11.31.0803.318a Base Quality Pack Bundle for HP-UX 11i v3, March 2008+
    Response:
    ======
    We have the higher version installed for this quality pack.
    QPKBASE B.11.31.1109.367a Base Quality Pack Bundle for HP-UX 11i v3, September 2011
    2) Required Packages : HPDesktopDev (version B.11.31.01)
    Response:
    =======
    This package is also installed.
    X11MotifDevKit B.11.31.01 HP-UX Desktop Developer's Toolkit - X11, Motif, and Imake
    3) Required Operating System Patches
    PHKL_36248
    PHKL_36249
    PHSS_37202
    PHSS_37501
    PHCO_38050
    PHSS_38139
    Response:
    ========
    We have the supersets for these patches installed. The installation logs also confirm these patches at the OS level.
    Check Name:Patches
    Check Description:This is a prerequisite condition to test whether the patches recommended for installing the product are available on the system.
    Checking for PHKL_36248; found PHKL_36248. Passed
    Checking for PHKL_36249; found PHKL_36249. Passed
    Checking for PHSS_37202; found PHSS_37202. Passed
    Checking for PHSS_37501; found PHSS_37501. Passed
    Checking for PHCO_38050; found PHCO_38050. Passed
    Checking for PHSS_38139; found PHSS_38139. Passed
    Check complete. The overall result of this check is: Passed
    Regards
    Sumit Kapila

  • Dynamic Table Creation & Fill Up

    Hello,
    Can anyone please guide where I can find examples for dynamic table creation (programmaticaly), with dynamic number of columns and rows, used to place inside text components (or whatever) to fill them with data.
    All programmatic.
    Using JSF, ADF BC
    JDeveloper 10.1.3.1
    Thanks
    Message was edited by:
    RJundi

    Hi,
    Meybe this article helps: http://technology.amis.nl/blog/?p=2306
    Kuba

  • Does Seeburger's SFTP adapter support dynamic filename creation

    Hi all,
    Does the SFTP adapter support dynamic filename creation.
    If yes, then do we have to use UDF's and are there any specific settings that have to be done in the SFTP communication channel.
    Please provide a blog which helps in the configuration process of the above case.
    thanks,
    younus

    Dynamic Creation of File using counter in Seeburger Variable:
    1. Configuration Needed in the Communication Channel:
    The process of dynamic creation of files can be done we have to select the following checkbox in the receiver channel:
    Dynamic Attribute in receiver Channel:
    Import the following modules:
    Localejbs/Seeburger/solution/sftp
    Localejbs/Seeburger/AttribMapper
    Localejbs/ModuleProcessorExitBean
    Enter  the desired file naming convention:
    Use the Parameter GetCounter("ID") to the place where the counter is expected to come.
    2. Configuration Needed in the SeeBurger Workbench:
    If the J2EE server is listening on a port different from 50000 (which is the standard for the SAP client 000), the port number must be configured:
    Login into the seeburger workbench using the URL
    http://<localhost>:<port number>/seeburger/index.html
    Select Property Store.
    Create or edit the following property:
    Parameter
    Value
    Namespace
    http://seeburger.com/xi/SeeFunctions
    Key
    provider.servlet.server
    Value
    http://localhost:50000/ (where the port number 50000 must be set
    accordingly to the J2EE server configuration).
    Note: The configured value (server URL) has to end with a slash (/). Otherwise,
    SeeFunctions will not work correctly.
    If we need to start the counter from any specific value , it can be configured in the SeeBurger workbench, this value can be maintained in Mapping Variables :

  • How to Add/Edit/Delete UI Components(i.e not text values) in a UIContainer as per XML data using mxml.

    Hi All,
    I was asked to make a application for monitoring a remote devices and data is accessed through XMLSocket, the devices at the remote system could be added/deleted at runtime. and Web UI should act accotdingly. What is the best way of approch to implement it ?is it using mxml component or using action script?.I already implemented using mxml and could display devices in Web, for dynamic addiotion/deletion/edition of devices and its properties i'm looking for your inputs/suggestion.
    thanks in Advance.

    hi satyamurthy,
    assign unique name to each of the UIComponents adding to the container ( default stage )
    by using the name property of the components you can get the object from the container using
    container.getChildByName("name assigned to the property") this function will return as DisplayObject
    typecast the DisplayObject to the target class to that you can edit the object.
    example:
    var sp:Sprite = myContainer.getChildByName("one") as Sprite;   // here I am getting sprite reference with name 'one' from 'myContainer'
    sp.x=sp.x + 10;  // here I am editing the property 'x' of the Sprite whose name is 'one'
    Note : similarly you can perform operation on the sprite
    Deleting UIComponent:
    removeChild will be used to remove the child from the container where it is added
    container.removeChild(container.getChildByName("name assigned to the property"));
    If this post answers your question or helps, please mark it as such

  • Dynamic Datasource creation

    I am trying to create datasources dynamically. Using an example from a previous
    post,
    mbeanHome = lookupMBeanHome();
    JDBCDataSourceMBean dsMBean = (JDBCDataSourceMBean)mbeanHome.createAdminMBean(poolName,"JDBCDataSource",
    mbeanHome.getDomainName());
    dsMBean.setJNDIName(poolName);
    dsMBean.setPoolName(poolName);
    dsMBean.addTarget(tserverMBean);
    dsMBean.setPersistenceEnabled(false);
    How can I retrieve the proper TargetMBean reference to send to the addTarget method.
    Does anyone know where I can find an entire class example of dynamically creating
    datasources, or something similar.
    Thanks in advance,
    Fahd

    Hi Fahd,
    Here is a sample I posted here some time ago
    import java.sql.Connection;
    import java.sql.SQLException;
    import java.util.Iterator;
    import java.util.Set;
    import javax.naming.Context;
    import javax.sql.DataSource;
    import weblogic.jndi.Environment;
    import weblogic.management.configuration.JDBCDataSourceMBean;
    import weblogic.management.configuration.ServerMBean;
    import weblogic.management.MBeanHome;
    * This class demonstrates dymamic creation,
    * using and deletion of DataSource via
    * Weblogic management API.
    public class DynamicDataSource {
    private Context ctx = null;
    private JDBCDataSourceMBean dsMBean = null;
    private MBeanHome mbeanHome = null;
    private ServerMBean serverMBean = null;
    // DataSource attributes
    private String cpName = "yourPoolName";
    private String dsJNDIName = "dynamic-data-source";
    private String dsName = "dynamic-data-source";
    // Security credentials
    private String password = "admPasword";
    private String serverName = "yourServer";
    private String url = "t3://localhost:7701";
    private String userName = "system";
    * Creates and starts up a DataSource using
    * management API.
    public void createDataSource() throws SQLException {
    System.out.println("Creating DataSource...");
    try {
    // Get context
    Environment env = new Environment();
    env.setProviderUrl(url);
    env.setSecurityPrincipal(userName);
    env.setSecurityCredentials(password);
    ctx = env.getInitialContext();
    // Lookup for MBean home
    mbeanHome = (MBeanHome)ctx.lookup(MBeanHome.ADMIN_JNDI_NAME);
    serverMBean = (ServerMBean)mbeanHome.getAdminMBean(serverName,
    "Server");
    // Delete if DataSource MBean already exists in active domain
    Set dsMBeanSet = mbeanHome.getMBeansByType("JDBCDataSource",
    mbeanHome.getDomainName());
    Iterator iter = dsMBeanSet.iterator();
    while(iter.hasNext()) {
    JDBCDataSourceMBean dsmb = (JDBCDataSourceMBean) iter.next();
    if (dsmb.getJNDIName().equals(dsJNDIName)) {
    dsMBean = dsmb;
    deleteDataSource();
    break;
    // Create DataSource MBean
    dsMBean = (JDBCDataSourceMBean)mbeanHome.createAdminMBean(
    dsName, "JDBCDataSource",
    mbeanHome.getDomainName());
    // Set DataSource attributes
    dsMBean.setJNDIName(dsJNDIName);
    dsMBean.setPoolName(cpName);
    // Startup datasource
    dsMBean.addTarget(serverMBean);
    } catch (Exception ex) {
    throw new SQLException(ex.toString());
    * Symply gets and closes a connection from dynamic
    * DataSource. Will throw a SQLException if datasource
    * does not exists.
    public void createConnection() throws SQLException {
    System.out.println("Getting Connection...");
    try {
    DataSource ds = (DataSource)ctx.lookup (dsName);
    Connection conn = ds.getConnection();
    conn.close();
    } catch (Exception ex) {
    throw new SQLException(ex.toString());
    * Shuts down and deletes DataSource from configuratrion
    * using management API.
    public void deleteDataSource() throws SQLException {
    System.out.println("Deleting DataSource...");
    try {
    // Remove dynamically created datasource from the server
    dsMBean.removeTarget(serverMBean);
    // Remove dynamically created datasource from the configuration
    mbeanHome.deleteMBean(dsMBean);
    } catch (Exception ex) {
    throw new SQLException(ex.toString());
    public static void main(String args[]) {
    DynamicDataSource dds = new DynamicDataSource();
    try {
    dds.createDataSource();
    dds.createConnection();
    dds.deleteDataSource();
    } catch (SQLException ex) {
    ex.printStackTrace();
    "Fahd" <[email protected]> wrote in message
    news:[email protected]...
    >
    I am trying to create datasources dynamically. Using an example from aprevious
    post,
    mbeanHome = lookupMBeanHome();
    JDBCDataSourceMBean dsMBean =(JDBCDataSourceMBean)mbeanHome.createAdminMBean(poolName,"JDBCDataSource",
    mbeanHome.getDomainName());
    dsMBean.setJNDIName(poolName);
    dsMBean.setPoolName(poolName);
    dsMBean.addTarget(tserverMBean);
    dsMBean.setPersistenceEnabled(false);
    How can I retrieve the proper TargetMBean reference to send to theaddTarget method.
    >
    >
    Does anyone know where I can find an entire class example of dynamicallycreating
    datasources, or something similar.
    Thanks in advance,
    Fahd

Maybe you are looking for