Issues in persisting dynamic entity and view objects using MDS

Hi All,
I'm trying to create dynamic entity and view objects per user session and to persist these objects throughout the session, I'm trying to use MDS configurations(either file or Database) in adf-config.xml.
I'm facing following two errors while trying to run the app module:
1. MDS error (MetadataNotFoundException): MDS-00013: no metadata found for metadata object "/model/DynamicEntityGenModuleOperations.xml"
2. oracle.mds.exception.ReadOnlyStoreException: MDS-01273: The operation on the resource /sessiondef/dynamic/DynamicDeptEntityDef.xml failed because source metadata store mapped to the namespace / DEFAULT is read only.
I've gone through the following links which talks about the cause of the issue, but still can't figure out the issue in the code or the config file. Please help if, someone has faced a similar issue.
[http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG |http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG ]
[http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm|http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm]
Attached is the code for dynamic entity/view object generation and corresponding adf-config.xml used.
///////////App Module Implementation Class/////////////////////////
public class DynamicEntityGenModuleImpl extends ApplicationModuleImpl implements DynamicEntityGenModule {
private static final String DYNAMIC_DETP_VO_INSTANCE = "DynamicDeptVO";
* This is the default constructor (do not remove).
public DynamicEntityGenModuleImpl() {
public ViewObjectImpl getDepartmentsView1() {
return (ViewObjectImpl) findViewObject("DynamicDeptVO");
public void buildDynamicDeptComp() {
ViewObject internalDynamicVO = findViewObject(DYNAMIC_DETP_VO_INSTANCE);
if (internalDynamicVO != null) {
System.out.println("OK VO exists, return Defn- " + internalDynamicVO.getDefFullName());
return;
EntityDefImpl deptEntDef = buildDeptEntitySessionDef();
ViewDefImpl viewDef = buildDeptViewSessionDef(deptEntDef);
addViewToPdefApplicationModule(viewDef);
private EntityDefImpl buildDeptEntitySessionDef() {
try {
EntityDefImpl entDef = new EntityDefImpl(oracle.jbo.server.EntityDefImpl.DEF_SCOPE_SESSION, "DynamicDeptEntityDef");
entDef.setFullName(entDef.getBasePackage() + ".dynamic." + entDef.getName());
entDef.setName(entDef.getName());
System.out.println("Application Module Path name: " + getDefFullName());
System.out.println("EntDef :" + entDef.getFileName() + " : " + entDef.getBasePackage() + ".dynamic." + entDef.getName());
entDef.setAliasName(entDef.getName());
entDef.setSource("DEPT");
entDef.setSourceType("table");
entDef.addAttribute("ID", "ID", Integer.class, true, false, true);
entDef.addAttribute("Name", "NAME", String.class, false, false, true);
entDef.addAttribute("Location", "LOCATION", Integer.class, false, false, true);
entDef.resolveDefObject();
entDef.registerSessionDefObject();
entDef.writeXMLContents();
entDef.saveXMLContents();
return entDef;
} catch (Exception ex) {
System.out.println(ex.getLocalizedMessage());
return null;
private ViewDefImpl buildDeptViewSessionDef(EntityDefImpl entityDef) {
try {
ViewDefImpl viewDef = new oracle.jbo.server.ViewDefImpl(oracle.jbo.server.ViewDefImpl.DEF_SCOPE_SESSION, "DynamicDeptViewDef");
viewDef.setFullName(viewDef.getBasePackage() + ".dynamic." + viewDef.getName());
System.out.println("ViewDef :" + viewDef.getFileName());
viewDef.setUseGlueCode(false);
viewDef.setIterMode(RowIterator.ITER_MODE_LAST_PAGE_FULL);
viewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
viewDef.setSelectClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
viewDef.setFromClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
viewDef.addEntityUsage("DynamicDeptUsage", entityDef.getFullName(), false, false);
viewDef.addAllEntityAttributes("DynamicDeptUsage");
viewDef.resolveDefObject();
viewDef.registerSessionDefObject();
viewDef.writeXMLContents();
viewDef.saveXMLContents();
return viewDef;
} catch (Exception ex) {
System.out.println(ex.getLocalizedMessage());
return null;
private void addViewToPdefApplicationModule(ViewDefImpl viewDef) {
oracle.jbo.server.PDefApplicationModule pDefAM = oracle.jbo.server.PDefApplicationModule.findDefObject(getDefFullName());
if (pDefAM == null) {
pDefAM = new oracle.jbo.server.PDefApplicationModule();
pDefAM.setFullName(getDefFullName());
pDefAM.setEditable(true);
pDefAM.createViewObject(DYNAMIC_DETP_VO_INSTANCE, viewDef.getFullName());
pDefAM.applyPersonalization(this);
pDefAM.writeXMLContents();
pDefAM.saveXMLContents();
////////adf-config.xml//////////////////////
<?xml version="1.0" encoding="windows-1252" ?>
<adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
xmlns:sec="http://xmlns.oracle.com/adf/security/config">
<adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
<defaults useBindVarsForViewCriteriaLiterals="true"/>
<startup>
<amconfig-overrides>
<config:Database jbo.locking.mode="optimistic"/>
</amconfig-overrides>
</startup>
</adf-adfm-config>
<adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
<adf-property name="adfAppUID" value="TestDynamicEC-8827"/>
</adf:adf-properties-child>
<sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
<CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore" credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
</sec:adf-security-child>
<persistence-config>
<metadata-namespaces>
<namespace metadata-store-usage="mdsRepos" path="/sessiondef/"/>
<namespace path="/model/" metadata-store-usage="mdsRepos"/>
</metadata-namespaces>
<metadata-store-usages>
<metadata-store-usage default-cust-store="true" deploy-target="true" id="mdsRepos">
<metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
<property name="metadata-path" value="/tmp"/>
<!-- <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
<property name="jndi-datasource" value="jdbc/TestDynamicEC"/>
<property name="repository-name" value="TestDynamicEC"/>
<property name="jdbc-userid" value="adfmay28"/>
<property name="jdbc-password" value="adfmay28"/>
<property name="jdbc-url" value="jdbc:oracle:thin:@localhost:1521:XE"/>-->
</metadata-store>
</metadata-store-usage>
</metadata-store-usages>
</persistence-config>
</adf-config>
//////////////////////////////////////////////////////////////////////////////////////////////////////////

Hi Frank,
I m trying to save entity and view object xml by calling writeXMLContents() and saveXMLContents() so that these objects can be retrieved using the xmls later on.
These methods internally use MDS configuration in adf-config.xml, which is creating the issue.
Please share your thoughts on resolving this or if, there is any other way of creating dynamic entity/view objects for db tables created at runtime.
Nik

Similar Messages

  • Newbie question about entity and view objects

    Hi everyone,
    My first ADF application in JDeveloper is off to a difficult start. Having come from a forms background, I know that it is necessary avoid using post-query type lookups in order to have full filtering using F11/Ctrl+F11. This means creating an CRUDable view and getting as much of the lookup data as possible into the view without losing the ability to modify the data. In JDeveloper, I do not know how to build my data model to support that. My thought was to start with a robust updateable view as my main CRUD EO and then create a VO on top of that with additional EOs or VOs. But, I have found that I cannot add VOs to another VO. However, if I link the VOs then I have a master-detail which will not work for me.
    For example, I have two joins to CSI_INST_EXTEND_ATTRIB_V shown in the queries below and need to have that show in the table displaying the CRUD VO’s data. It seemed that the best way to do this is to create a CSI_INST_EXTEND_ATTRIB_V entity object and view object. The view object would have two parameters, P_INSTANCE_ID and P_ATTRIBUTE name. Both the building and the unit are needed on the same record, and this is not a master-detail even though it might look that way. (A master-detail data control will not work for me because I need all this data to appear on the same line in the table.) So, I need help figuring out the best way to link these to the main (CRUD) view; I want as much of this data as possible to be filterable.
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'BUILDING NAME'
    select
    cieav.attribute_value
    from
    csi_inst_extend_attrib_v cieav
    where cieav.instance_id = p_instance_id
    and cieav.attribute_code = 'UNIT NAME'
    Ultimately, I need to display a ton of data in each record displayed in the UI table, so a ton of joins will be needed. And, I need to be able to add records using the UI table also.
    James

    Hi Alejandro,
    Sorry if I caused confusion with my first post. What I had in mind assumed that I could have a single CSI_INST_EXTEND_ATTRIB_V EO with a BuildingVO and UnitVO on top of it. So, I wrote the queries individually to show how I would invoke each view. When I realized that confused the issue, I rewrote the query to explain things better.
    Now having seen your 2 queries. You need to create 2 EO. One for each table. Then create an association between the 2 aeO (this will be the join you are talking about). Then, you need to create a VO based on one of the EO and after you can modify and add the second EO (in here you select the join type).
    After your done with this, youll have 1 VO that supports CRUD in both tables.
    There were three tables in the query: CIEAV_BUILDING, CIEAV_UNIT, and T -- the main CRUD table. When you say that I should create two EOs, do you mean that they are to be for CIEAV_BUILDING and CIEAV_UNIT? Or, CIEAV and T? Assuming CIEAV and T, that sounds like it would allow me to show my building or unit on the record but not both.
    By the way, everything is a reference except for the main CRUD table.
    Look forward to hearing from you. Thanks for your help (and patience).

  • Error while Insert new Row in Entity Base View Object

    Hi,
    can someone tell me the reason of following problem? :
    There is a Entity Base View object, which is Binded as ADF Table in a JSFX Page.
    I took the standard operations from the Control Panel: CreateInsert, Commit and Rollback.
    Places them a ADF Buttons.
    Whenever i am trying to insert a Row, after commit i am getting the ORA Error: ORA-01410: invalid ROWID.
    By the way: The Entity Object is using the RowID as Primary Key.
    When i press commit a second time, the the Row is inserted in the Database.
    Any Idea, how to workarround this ORA Error?
    Thank You!

    n by default if you had no pkconstrainst in db,
    in jdev default rowid as prim key.
    as john said make the key as proper.
    and do it.
    if you have db constrainst in db.
    it can be achived by dbconstrainstname with ora.
    what am saying dbconstranist name will map it ora.
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvgen.htm#BABEFGCI

  • Problem occured when create a tree table for master-detail view objects using SQL queries?

    I am programming a tree table for master-detail view objects using SQL queries and these 2 view objects are not simple singel tables queries, and 2 complex SQL are prepared for master and view objects. see below:
    1. Master View object (key attribute is SourceBlock and some varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK,                   
            sum(                   
             case when cntr_list.cntr_size_q = '20'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr20 ,                   
            sum(                   
             case when cntr_list.cntr_size_q = '40'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr40 ,                   
             sum(                   
             case when cntr_list.cntr_size_q = '45'                   
                  then cntr_list.cntr_qty                   
                  else 0 end ) as cntr45                    
    FROM (       
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,       
               scn.CNTR_SIZE_Q,        
               count(scn.CNTR_SIZE_Q) AS cntr_qty        
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2       
        WHERE       
        scm.cmr_n = scn.cmr_n             
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                 
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                 
        AND scm.shift_mode_c = :ShiftModeCode                           
        AND scm.end_terminal_c = :TerminalCode      
        AND scm.start_terminal_c = yb1.terminal_c                  
        AND scm.start_block_n = yb1.block_n                  
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                  
        AND scm.end_terminal_c = yb2.terminal_c                  
        AND scm.end_block_n = yb2.block_n                  
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n           
        AND scn.status_c not in (1, 11)             
        AND scn.shift_type_c = 'V'             
        AND scn.source_c = 'S'       
        GROUP BY yb1.BLOCK_M, scn.CNTR_SIZE_Q       
    ) cntr_list       
    GROUP BY cntr_list.SOURCE_BLOCK
    2. Detail View object (key attributes are SourceBlock and EndBlock and same varaible bindings are used for this view object.)
    SELECT  cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK,                
            sum(                     
             case when cntr_list.cntr_size_q = '20'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr20 ,                     
            sum(                     
             case when cntr_list.cntr_size_q = '40'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr40 ,                     
             sum(                     
             case when cntr_list.cntr_size_q = '45'                     
                  then cntr_list.cntr_qty                     
                  else 0 end ) as cntr45                      
    FROM (         
        SELECT yb1.BLOCK_M as SOURCE_BLOCK,     
               yb2.BLOCK_M as END_BLOCK,  
               scn.CNTR_SIZE_Q,          
               count(scn.CNTR_SIZE_Q) AS cntr_qty          
        FROM  SHIFT_CMR scm, SHIFT_CNTR scn, YARD_BLOCK yb1, YARD_BLOCK yb2         
        WHERE         
        scm.cmr_n = scn.cmr_n               
        AND (scm.plan_start_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS')                   
        OR scm.plan_end_dt BETWEEN to_date(:DateFrom,'YYYY/MM/DD HH24:MI:SS') AND to_date(:DateTo,'YYYY/MM/DD HH24:MI:SS'))                   
        AND scm.shift_mode_c = :ShiftModeCode                             
        AND scm.end_terminal_c = :TerminalCode        
        AND scm.start_terminal_c = yb1.terminal_c                    
        AND scm.start_block_n = yb1.block_n                    
        AND substr(scn.start_location_c,(instr(scn.start_location_c,',',1,5)+1),instr(scn.start_location_c,',',1,6)-(instr(scn.start_location_c,',',1,5)+1)) BETWEEN yb1.slot_from_n AND yb1.slot_to_n                    
        AND scm.end_terminal_c = yb2.terminal_c                    
        AND scm.end_block_n = yb2.block_n                    
        AND substr(scn.end_location_c,(instr(scn.end_location_c,',',1,5)+1),instr(scn.end_location_c,',',1,6)-(instr(scn.end_location_c,',',1,5)+1)) BETWEEN yb2.slot_from_n AND yb2.slot_to_n             
        AND scn.status_c not in (1, 11)               
        AND scn.shift_type_c = 'V'               
        AND scn.source_c = 'S'         
        GROUP BY yb1.BLOCK_M, yb2.BLOCK_M, scn.CNTR_SIZE_Q         
    ) cntr_list         
    GROUP BY cntr_list.SOURCE_BLOCK, cntr_list.END_BLOCK
    3. I create a view link to create master-detail relationship for these 2 view objects.
    masterview.SourceBlock (1)->detailview.SourceBlock (*).
    4. I create a tree table using these 2 view objects with master-detail relationship.
    When I set default value for variable bindings of these 2 view objects and the matching records exist, tree table can work well. I can expand the master row to display detail row in UI.
    But I need to pass in dymamic parameter value for variable bindings of these 2 view objects, tree table cannnot work again. when I expand the master row and no detail row are displayed in UI.
    I am sure that I pass in correct parameter value for master/detail view objects and matching records exist.
    Managed Bean:
            DCIteratorBinding dc = (DCIteratorBinding)evaluteEL("#{bindings.MasterView1Iterator}");
            ViewObject vo = dc.getViewObject();
            System.out.println("Before MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            System.out.println("Before MasterView1Iterator ShiftModeCode="+ vo.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo.executeQuery();
            System.out.println("MasterView1Iterator vo.getEstimatedRowCount()="+ vo.getEstimatedRowCount());
            DCIteratorBinding dc1 = (DCIteratorBinding)evaluteEL("#{bindings.DetailView1Iterator}");
            ViewObject vo1 = dc1.getViewObject();
            System.out.println("Before DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
            System.out.println("Before DetailView1Iterator ShiftModeCode="+ vo1.ensureVariableManager().getVariableValue("ShiftModeCode"));
            vo1.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
            vo1.ensureVariableManager().setVariableValue("DateTo", dateTo);
            vo1.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
            vo1.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
            vo1.executeQuery();
            System.out.println("after DetailView1Iterator vo1.getEstimatedRowCount()="+ vo1.getEstimatedRowCount());
    5.  What's wrong in my implementation?  I don't have no problem to implement such a tree table if using simple master-detail tables view object, but now I have to use such 2 view objects using complex SQL for my requirement and variable bindings are necessary for detail view object although I also think a bit strange by myself.

    Hi Frank,
    Thank you and it can work.
    public void setLowHighSalaryRangeForDetailEmployeesAccessorViewObject(Number lowSalary,
                                                                              Number highSalary) {
            Row r = getCurrentRow();
            if (r != null) {
                RowSet rs = (RowSet)r.getAttribute("EmpView");
                if (rs != null) {
                    ViewObject accessorVO = rs.getViewObject();
                    accessorVO.setNamedWhereClauseParam("LowSalary", lowSalary);
                    accessorVO.setNamedWhereClauseParam("HighSalary", highSalary);
                executeQuery();
    but I have a quesiton in this way. in code snippet, it is first getting current row of current master VO to determine if update variables value of detail VO. in my case, current row is possibly null after executeQuery() of master VO and  I have to change current row manually like below.
    any idea?
                DCIteratorBinding dc = (DCIteratorBinding)ADFUtil.evaluateEL("#{bindings.SSForecastSourceBlockView1Iterator}");
                ViewObject vo = dc.getViewObject();           
                vo.ensureVariableManager().setVariableValue("DateFrom", dateFrom);
                vo.ensureVariableManager().setVariableValue("DateTo", dateTo);
                vo.ensureVariableManager().setVariableValue("ShiftModeCode", shiftModeC);
                vo.ensureVariableManager().setVariableValue("TerminalCode", terminalCode);
                vo.executeQuery();
                vo.setCurrentRowAtRangeIndex(0);
                ((SSForecastSourceBlockViewImpl)vo).synchornizeAccessorVOVariableValues();

  • Entity Based View Object ROWID

    Hi,
    This might be a little hard to explain, but I have an entity object, and a view object that is based off of that EO. The EO is using a ROWID for its primary key. Now, the view object I have is querying a view in the database, but when I do not include the ROWID attribute in my view object, the LOV using the view object works.
    However sometimes I get this error:
    "oracle.jbo.PersistenceException, msg=JBO-26028: View object SponsorVwView does not include a primary key attribute RowId of entity base SponsorVw."
    And in the view object I get:
    "The attributes that represent the primary key of SponsorVw are missing from your query"
    So when I add the ROWID which is the primary key the LOV does not work.
    Does anyone have any ideas?

    Tullio:
    Sorry but I don't understand the workaround : if I
    insert my row in both VO I'll find it 2 times when I
    commit.You won't. The view row from the second VO will point to the same entity row as the row from the first VO. When you commit, we will only insert one database row.
    Thanks.
    Sung

  • DataControl and View Object

    Do all View Objects appear in the Data Control ? I presumed so. Anyway I migrated my application to TP4. I created a new view and it does not show in the DataControl. Is there anything I need to do for this ? Other view objects are appearing.

    Ignore this. I closed and restarted JDeveloper and it shows now.
    Do all View Objects appear in the Data Control ? I
    presumed so. Anyway I migrated my application to TP4.
    I created a new view and it does not show in the
    DataControl. Is there anything I need to do for this
    ? Other view objects are appearing.

  • OAF Export button fetching data in one column - view object using union all

    Dear All,
    Export button showing data in one column from  view object,
    View object is based on mulitple queries with union all ,
    Please let me know the solution for this issue.
    Thanks
    Maheswara Raju

    Maheswara Raju,
    As per my understanding you are not able to export all the View Attribute using export Button. Only the attribute which is used with the item/region will get exported.
    There are few work around in case if you want to export the column without showing on OAF Page. Let me know.
    Cheers
    Gyan

  • OAF, View object used with the clausule setWhereClause, show the error  not have been properly initialized.

    Hi to all,
    I'm new with oaf and in mi AM i have to VO that I use to find relative information to the one is shown to the user on a query region, after the user pressed the go buton  the CO request the AM tho load both VO and those information are used to show in a popup region to display and update. the main problem is when the popup region closes it send a submit to the server an the error "View object may not have been properly initialized during Update." is displayed
    The main page and the popup uses the same AM, the initM2mVo() and initTavleVo() are  called by the CO at the processRequest of the main PG, the popup dosen´t have a CO.
    This the AM that uses the main PG and the popup region
    package tasc.oracle.apps.tasc.m2m.imei.server;
    import oracle.apps.fnd.framework.OAViewObject;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.server.OAViewObjectImpl;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    // ---    File generated by Oracle ADF Business Components Design Time.
    // ---    Custom code may be added to this class.
    // ---    Warning: Do not modify method signatures of generated methods.
    public class ActualizarImeiAMImpl extends OAApplicationModuleImpl {
        /**This is the default constructor (do not remove)
        public ActualizarImeiAMImpl() {
        /*******************************USE FOR CUSTOM CODE****************************/
         * Inicializa el vo a través del cual se ejecutara la actualización del IMEI.
         * @param taskNumber
        public void loadImeiVo(String taskNumber) {
            OAViewObject voTableQry = getTableQryVO1();
            if (voTableQry != null) {
                voTableQry.reset();
                voTableQry.setWhereClause(null);
                voTableQry.setWhereClauseParams(null);
                voTableQry.setWhereClause("TASK_NUMBER = :1");
                voTableQry.setWhereClauseParam(0, taskNumber);
                voTableQry.executeQuery();
                if (voTableQry.hasNext()) {
                    voTableQry.next();
                    String idActuacion =
                        (String)voTableQry.getCurrentRow().getAttribute("IdActuacion");
                    String dsM2m =
                        (String)voTableQry.getCurrentRow().getAttribute("DsM2m");
                    String imei =
                        (String)voTableQry.getCurrentRow().getAttribute("Imei");
                    if (idActuacion != null) {
                        OAViewObjectImpl m2mVo = (OAViewObjectImpl)this.getTascTransEqInstM2mVO1();
                        m2mVo.reset();
                        if (!m2mVo.isPreparedForExecution()) {
                            m2mVo.setMaxFetchSize(0);
                            m2mVo.executeQuery();
                        m2mVo.setWhereClause(null);
                        m2mVo.setWhereClauseParams(null);
                        m2mVo.setWhereClause("ID_ACTUACION = :1 AND DS_M2M = :2 AND IMEI = :3 ");
                        m2mVo.setWhereClauseParam(0, idActuacion);
                        m2mVo.setWhereClauseParam(1, dsM2m);
                        m2mVo.setWhereClauseParam(2, imei);
                        m2mVo.executeQuery();
                        if(m2mVo.hasNext()){
                            m2mVo.next();
         * Carga los valores disponibles de IMEI según el taskNumber al cual pertenezca
         * el  IMEI seleccionado.
        public void loadImeiValuesList(String taskNumber) {
            ViewObject viewobject = this.getImeiListVO1();
            OAViewObject voTableQry = getTableQryVO1();
            if (voTableQry != null && voTableQry.getCurrentRow() != null) {
                String imeiType =
                    (String)voTableQry.getCurrentRow().getAttribute("Attribute17");
                if (viewobject != null & imeiType != null) {
                    viewobject.setWhereClause(null);
                    viewobject.setWhereClauseParams(null);
                    viewobject.setWhereClause("TASK_NUMBER = :1 AND ATTRIBUTE17 = :2");
                    viewobject.setWhereClauseParam(0, taskNumber);
                    viewobject.setWhereClauseParam(1, imeiType);
                    viewobject.executeQuery();
        /*******************************USE FOR CUSTOM CODE****************************/
        /**Container's getter for TableVO1
        public OAViewObjectImpl getTableVO1() {
            return (OAViewObjectImpl)findViewObject("TableVO1");
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) { /* package name */
            /* Configuration Name */launchTester("tasc.oracle.apps.tasc.m2m.imei.server",
                                                 "ActualizarImeiAMLocal");
        /**Container's getter for TascTransEqInstM2mVO1
        public OAViewObjectImpl getTascTransEqInstM2mVO1() {
            return (OAViewObjectImpl)findViewObject("TascTransEqInstM2mVO1");
        /**Container's getter for ImeiListVO1
        public OAViewObjectImpl getImeiListVO1() {
            return (OAViewObjectImpl)findViewObject("ImeiListVO1");
        /**Container's getter for TableQryVO1
        public OAViewObjectImpl getTableQryVO1() {
            return (OAViewObjectImpl)findViewObject("TableQryVO1");
    this is the CO of the main PG
    /*===========================================================================+
    |   Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA    |
    |                         All rights reserved.                              |
    +===========================================================================+
    |  HISTORY                                                                  |
    +===========================================================================*/
    package tasc.oracle.apps.tasc.m2m.imei.webui;
    import java.io.Serializable;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.TransactionUnitHelper;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean;
    * Controller for ...
    public class ActualizarImeiCO extends OAControllerImpl {
        public static final String RCS_ID = "$Header$";
        public static final boolean RCS_ID_RECORDED =
            VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
         * Layout and page setup logic for a region.
         * @param pageContext the current OA page context
         * @param webBean the web bean corresponding to the region
        public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
            super.processRequest(pageContext, webBean);
            //get the handle to AM Attached to our Simple Page Region MainRegionRN
            //The page is passed as parameter to this method, hence we can get handle
            //to the AM quite easily
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            //verifica si la transaccion de creacion esta activa todavia
            if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"ActualizarImeiM2m", false))
                // deshace cambios y finaliza Txn
                am.invokeMethod("rollback");
                TransactionUnitHelper.endTransactionUnit(pageContext, "ActualizarImeiM2m");
         * Procedure to handle form submissions for form elements in
         * a region.
         * @param pageContext the current OA page context
         * @param webBean the web bean corresponding to the region
        public void processFormRequest(OAPageContext pageContext,
                                       OAWebBean webBean) {
            super.processFormRequest(pageContext, webBean);
            //get the handle to AM Attached to our Simple Page Region MainRegionRN
            //The page is passed as parameter to this method, hence we can get handle
            //to the AM quite easily
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            //Detección del botón go de la región de query.
            this.queryButonGO(pageContext, webBean, am);
            this.updateImei(pageContext, am);
         * Detección del botón go de la región de query
         * @param pageContext
         * @param webBean
         * @param am
        public void queryButonGO(OAPageContext pageContext, OAWebBean webBean,
                                 OAApplicationModule am) {
            OAQueryBean queryBean =
                (OAQueryBean)webBean.findIndexedChildRecursive("QueryRN");
            String idGo = queryBean.getGoButtonName();
            if (pageContext.getParameter(idGo) != null) {
                String tareaId = pageContext.getParameter("TaskNumberLovInput");
                //Inicializa el vo a través del cual se ejecutara la actualización del IMEI.
                Serializable[] parameters2 = { tareaId };
                Class[] paramTypes2 = { String.class };
                am.invokeMethod("loadImeiVo", parameters2, paramTypes2);
                //Carga los valores disponibles de IMEI según el taskNumber al cual pertenezca  el  IMEI seleccionado.
                Serializable[] parameters = { tareaId };
                Class[] paramTypes = { String.class };
                am.invokeMethod("loadImeiValuesList", parameters, paramTypes);
        public void updateImei(OAPageContext pageContext, OAApplicationModule am){
            if (pageContext.getParameter("ActualizarImei") != null){
                String imei = pageContext.getParameter("ImeiPopup");
                //TODO......
    thanks to all.

    I thing I got the problem.
    I have the following configuration:
    One Main Page and external RN that is call as popup in main page
    2 VO, queries by java code, one to capture some information that is used to query the 2 VO that I use to update information by the popup.
    One AM that is map only in the Main Page. (Initially I had the external RN mapped to same AM as the main PG, but I remove it).
    The solution was remove the mapping of the AM from the external region and in the messageimput of the external region set the View instance and view Attribute manually in this fields (http://screencast.com/t/uDTALEedCh do not use the wizard ) as the one instanced am the AM, so the problem it seem that was that defining an AM to the external region create a new instance, causing that it can not see the information that I load manually in the VO by query it them.
    for this case there is not need to use the next code, because the Rows are load with information by the query in the java code, this only will have to be made when inserting a new row .
        public void initM2mVo(){
            //get a handle to the View Object that we wish to initialize
            OAViewObject vo = (OAViewObject)this.getTascTransEqInstM2mVO1();
            if (!vo.isPreparedForExecution()) {
                vo.setMaxFetchSize(0);
                vo.executeQuery();
            //Create a blank Row
            Row row = vo.createRow();
            //Attach that blank row to the VO. Data will be fed into this row, when the user types into the fields
            vo.insertRow(row);
            //Set the status of the blank row to initialized. This tells OA Framework that record is blank and must not be included in DML
            //Operations until    changes are made to its underlying VO [via screen fields]
            row.setNewRowState(Row.STATUS_INITIALIZED);

  • Dynamic embedding of view in used component

    Hi All,
    I have a scenario were i have to provide print functionality to all the views of an existing web dynpro component. This component has around 20 views. I have developed a new component for the print functionality were i am using BSP to fire the CTRL+P function.
    But the problem is how do i get the view at runtime in my print component.....?
    I tried passing the view controller reference to the print component through context binding, but i am unable to embed the view through the reference in to the print component view container element.
    Is there any way i can acheive this....???
    Any help will be appreciated..!
    Regards,
    Runal

    hi Runal ,
    have a look at this video presntation for dynamic embedding of views :
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/media/uuid/5cb731e7-0b01-0010-1792-fbe5f55e39d2
    or
    I wud suggest u to procced like this :
    1 In design time , insert all ur views inside ur tansparent container
    2 * initially set all ur view to invisible* , for this :
    Re: Making UI elements visible at runtime based on events.
    a) make a context attribute of type WDUI_VISIBILITY
    b) bind this attribute wid ur view
    c) set the view to invisible by setting the context attribute to '01' using set_attribute method
       DATA lo_nd_cn_visiblesuper TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_visiblesuper TYPE REF TO if_wd_context_element.
        DATA ls_cn_visiblesuper TYPE wd_this->element_cn_visiblesuper.
        DATA lv_ca_visible LIKE ls_cn_visiblesuper-ca_visible.
    *   navigate from <CONTEXT> to <CN_VISIBLESUPER> via lead selection
        lo_nd_cn_visiblesuper = wd_context->get_child_node( name = wd_this->wdctx_cn_visiblesuper ).
    *   get element via lead selection
        lo_el_cn_visiblesuper = lo_nd_cn_visiblesuper->get_element(  ).
    *   get single attribute
        lo_el_cn_visiblesuper->set_attribute(
          EXPORTING
            name =  `CA_VISIBLE`
            value = '01').
    // context attribute CA_VISIBLE under node cn_visible set to invisible
    3 nw based pn ur condition , whn u wanted to do dynamic embedding , at tht time make ur view visible inside ur appropriate method
    this wud do
    rgds,
    amit

  • Dynamic Variables and New-Object - in a GUI

    so, i have not found anything that i can parlay into a solution for what i am attempting to do.  
    Basically i am using powershell to build a GUI to manage websites on various servers.  
    in a nutshell:
    - i have an array with the servers i want to query
    - a foreach loop gets me the site names for each server (number of sites can vary on a server).
    - need put checkboxes on a GUI for every site to do something (25-30 sites across 8 servers).
    currently i am passing the $dir.name variable to a function that will create the new variable using this command:
    $pName = $dir.name New-variable -name $pName -value (New-Object System.Windows.Forms.CheckBox)
    $pName.Location -value (New-Object System.Drawing.Size(10,$i))
    $pName.Size -value (New-Object System.Drawing.Size(100,20))
    $Pname.Text -value $dir.name
    $groupBox.Controls.Add($pName) 
    Problem is i am not able to do anything with my newly created variable.  I am trying to use the following code to position the new checkbox but i get nothing (same for text, size, etc.)  I am not seeing any errors, so i don't know what i have going
    wrong.  
    is this even possible?
    I am able to create static checkboxes, and i can create dynamic variables.  But i can't mix the two...

    Here is how we normally use listboxes to handle form situations like this one.  The listboxes can automatically select subgroups.
    The hash of arrays can be loaded very easily with a script or the results of the first list can be used to lookup and set the contents of the second.
    Notice how little code is actually used.  This is all of the setup code needed aside from the from definition:
    $FormEvent_Load={
    $global:serversToSites=@{
    Server1=@('S1_SITE1','S1_SITE2','S1_SITE3')
    Server2=@('S2_SITE1','S2_SITE2','S2_SITE3')
    Server3=@('S3_SITE1','S3_SITE2','S3_SITE3')
    $listbox1.Items.AddRange($serversToSites.Keys)
    $listbox1_SelectedIndexChanged={
    $listbox2.Items.Clear()
    $listbox2.Items.AddRange($global:serversToSites[$listbox1.SelectedItem])
    $listbox2_SelectedIndexChanged={
    [void][System.Windows.Forms.MessageBox]::Show($listbox2.SelectedItem,'You Selected Site')
    Here is the complete demo form:
    [void][reflection.assembly]::Load("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")
    [void][reflection.assembly]::Load("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
    [System.Windows.Forms.Application]::EnableVisualStyles()
    $form1 = New-Object 'System.Windows.Forms.Form'
    $listbox2 = New-Object 'System.Windows.Forms.ListBox'
    $listbox1 = New-Object 'System.Windows.Forms.ListBox'
    $buttonOK = New-Object 'System.Windows.Forms.Button'
    $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
    $FormEvent_Load={
    $global:serversToSites=@{
    Server1=@('S1_SITE1','S1_SITE2','S1_SITE3')
    Server2=@('S2_SITE1','S2_SITE2','S2_SITE3')
    Server3=@('S3_SITE1','S3_SITE2','S3_SITE3')
    $listbox1.Items.AddRange($serversToSites.Keys)
    $listbox1_SelectedIndexChanged={
    $listbox2.Items.Clear()
    $listbox2.Items.AddRange($global:serversToSites[$listbox1.SelectedItem])
    $listbox2_SelectedIndexChanged={
    [void][System.Windows.Forms.MessageBox]::Show($listbox2.SelectedItem,'You Selected Site')
    $Form_StateCorrection_Load=
    #Correct the initial state of the form to prevent the .Net maximized form issue
    $form1.WindowState = $InitialFormWindowState
    $form1.Controls.Add($listbox2)
    $form1.Controls.Add($listbox1)
    $form1.Controls.Add($buttonOK)
    $form1.AcceptButton = $buttonOK
    $form1.ClientSize = '439, 262'
    $form1.FormBorderStyle = 'FixedDialog'
    $form1.MaximizeBox = $False
    $form1.MinimizeBox = $False
    $form1.Name = "form1"
    $form1.StartPosition = 'CenterScreen'
    $form1.Text = "Form"
    $form1.add_Load($FormEvent_Load)
    # listbox2
    $listbox2.FormattingEnabled = $True
    $listbox2.Location = '237, 26'
    $listbox2.Name = "listbox2"
    $listbox2.Size = '120, 134'
    $listbox2.TabIndex = 2
    $listbox2.add_SelectedIndexChanged($listbox2_SelectedIndexChanged)
    # listbox1
    $listbox1.FormattingEnabled = $True
    $listbox1.Location = '13, 26'
    $listbox1.Name = "listbox1"
    $listbox1.Size = '120, 134'
    $listbox1.TabIndex = 1
    $listbox1.Sorted = $true
    $listbox1.add_SelectedIndexChanged($listbox1_SelectedIndexChanged)
    # buttonOK
    $buttonOK.Anchor = 'Bottom, Right'
    $buttonOK.DialogResult = 'OK'
    $buttonOK.Location = '352, 227'
    $buttonOK.Name = "buttonOK"
    $buttonOK.Size = '75, 23'
    $buttonOK.TabIndex = 0
    $buttonOK.Text = "OK"
    $buttonOK.UseVisualStyleBackColor = $True
    #Save the initial state of the form
    $InitialFormWindowState = $form1.WindowState
    #Init the OnLoad event to correct the initial state of the form
    $form1.add_Load($Form_StateCorrection_Load)
    #Clean up the control events
    $form1.add_FormClosed($Form_Cleanup_FormClosed)
    #Show the Form
    $form1.ShowDialog()
    You can easily substitute  CheckedListbox if you like checkboxes.
    ¯\_(ツ)_/¯

  • SSMS is not listing table and views objects though the objects are listed when I execute TSql string "SELECT * FROM sys.Tables"

    I have a db, call it xyz.mdb
    It suddenly is that SSMS is not listing the table objects nor the Views.  SELECT * FROM sys.Tables and SELECT * FROM sys.Views work very fine.  But when I click on the tables node, on Objects Explorer, Only the Systems Tables and File Tables folders
    show. 
    Other DBs on same SQL instance do not show same problem.  They are all working very fine.
    I have backed up and restored this db on other computers and the behaviour is the same.  Incidentally right-clicking the db and clicking Properties throws up this error message.
    -------------------------------------------------------------------------Error!
    Cannot show requested dialog.
    Property Size is not available for Database '[Pliny E DB - NOA 2014]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights.  (Microsoft.SqlServer.Smo)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.3000.0+((SQL11_PCU_Main).121019-1325+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.PropertyCannotBeRetrievedExceptionText&EvtID=Size&LinkId=20476
    --------------------------------------------------------------------------------End>
    When I try to Refrresh the Tables node on Object Explorer, I get this other:
    ------------------------------Error!
    SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x9090d9b7; actual: 0x909001b4). It occurred during a read of page (1:1173) in database ID 21 at offset 0x0000000092a000 in file 'c:\Databases\Clients\NOA\Pliny E DB -
    NOA 2014.mdf'.  Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check
    (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online. (Microsoft SQL Server, Error: 824)
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=824&LinkId=20476
    ------------------------------End>
    The Help link of course is not valid any more.
    Many thanks
    Vie
    @Abuja
    Vie

    Your database is corrupted and you need to run.
    DBCC CHECKDB
    You already have a backup so do it...
    This link will provide you with more information:
    http://msdn.microsoft.com/en-us/library/ms176064.aspx

  • How can i generate simple Entities and View Objects ... automatically ?

    Hello eveybody,
    I hope this is the right place i'm posting in. My question is ADF/Jdeveloper related.
    Here is my problem. Where i work, we use xsd files to design our beans and we generate java classes from this xsd file. Then we design these beans again through Jdeveloper when creating Entities and related views, associations, view links... so we design our beans two times ... Moreover, 90% of the time, the work we do using Jdeveloper is the following : Writing CRUD operation that are almost the same every time.
    So my question is very simple. What do you think is the best way to automatically generate entities, views, associations, views Links and why not module (module.xml and an empty implementation) from our xsd files. Then we'll use JDeveloper to customize the generated files.
    Your help would be very appreciated, brahim !
    Edited by: user10394923 on 29 oct. 2008 06:01

    I didn't understand the role of the beans that you generate from the XSD files. When you use ADF Business Components, you don't need those beans at all and you don't need to write code for any of the CRUD operations. Can you clarify what role the beans play in the application?

  • Issue with complete refresh on materialized view when using rownum

    Hi all,
    I had an issue with rownum when using complete refresh
    I am using rownum when creating materialized view and it is generation correctly.But the issue was when i am refreshing the same ,rownum was not getting sorted in ascending order.
    anyone had come across this scenario

    rownum is determined as the row is output, so "order by rownum" does literally nothing.
    http://docs.oracle.com/cd/B19306_01/server.102/b14200/pseudocolumns009.htm

  • How to find which programs (and other objects) use the field LGORT

    Hi, Im an Abap freshman, and I have been asked to search all programs and objects that use the field LGORT (Storage Location), regardless of what table it is in.
    Is it possible to do it using the "Where-Used List"?
    This will be important since a new Storage Location will be created for MM, and we have to assure that no other programs that reference to it will be affected.
    I would appreciate any help. Thanks!!

    Hi George,
    Go to transaction SE11, choose radiobutton Data Element then enter the name LGORT. Now using the where-used-list in the toolbar, choose programs checkbox in the subsequent dialog and press enter. It should show all programs using the field LGORT irrespective of table name.
    Hope this helps.
    Cheers,
    Sougata.
    Using ECC6.0

  • User and Computer memberships are missing after moving computer and user objects using ADMT

    Hi to everybody.
    Source domain Windows 2003. Destination domain Windows 2008. I use ADMT 3.2
    I have noticed 2 issues:
    1. After migrating users, membership to all Bultin domain groups, is lost. Migration of custom groups is completed without any problems prior to start migrating users.
    a. Example 1: user in source domain belongs to Domain Admins, Domain Users and a custom Domain group with the name Test. After moving the user, the membership is as follow: Domain Users and Test! And the worst of all
    is that I believe that Domain users membership was not produced by the migration but from the AD mechanism that automatically gives every new user the Domain Users membership. Look at example 2.
    b. Example 2:user in source domain belongs only to the Domain group with the name Test. After moving the user, the membership is as follow: Domain Users and Test! 
    2. After migrating a computer account from source domain to destination domain I have noticed in the "Local Users and Groups" that the Domain Admins  membership in the Administrators group is missing. 
    Any ideas? I think I am missing something fundamental here. 
    Thank you all in advance. 

    additionally, from the migration log I see the following
    WRN1:7372 ADMT does not process BUILTIN accounts or change the membership of BUILTIN groups (Administrators,
    etc.).
    there is 1 line of the above WRN for each builtin group that the user belongs in the source domain. This
    means that there I have to do this membership update manually? And what if I have 1500 users and 300 groups? 

Maybe you are looking for

  • Error while deploying ECO for Java

    Hi I got this error while deploying ECO for JAVA I chose manual deplyoment I specified the location of the jar file, app name, display name and left the rest of the options unticked after i clicked on the apply button OAS returns me this error messag

  • Error message when trying to import a CD into iTunes

    I get an error message when I try to import a CD into iTunes that says the disk cannot be found. I recently requested to uninstall Tune-up because I kept receiving annoying messages to purchase the software. It looks like Tune-up is deactivated, but

  • AIR can't be found error window

    I constantly find this error: When I launch my air program sometimes the following error window (attached) will pop up and my application won't be launched. It says AIR can't be found but indeed it was installed and up to date. So far I only find thi

  • How to Edit form

    HI, I want to edit the form.I am trying to edit the Resource Wizard form which we see when we create a resource. When we create a resource we get "Back" , "Next", "Cancel" buttons on the form to natvigate between Identity Template,Resource Attributes

  • I have error when i have downloaded firefox the error is 0x77372245

    when I have downloaded firefox i have this error message coming in 0x77372245 i have deleted the software uploaded again but still the same. please help.