ADF Faces and multiframe window for master/detail view

Hi,
I have a web page divide into 2 frames : frame1, the master view and frame2 the detail view.
When I load the whole web page, the master frame print all the paginated list. Each row has a "show more" button. When I click one, the corresponding detail view is displayed in the detail view (frame2). And, when I clicked again the "show more" button, the paginated list (present in the master view) is displayed in the detail view !!! WHY ??
When I click a third time on the "show more" button, the detail view display the corresponding detail information (work well like first click)....and alternatively clicking on the "show more" button, this problems occurs.
Where does this problem come from ?
The ADF Faces code shown in the master view (targetFrame attribute means to display on the detail view when show more button is clicked).
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- table displaying the list of buildings -->
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="1.2"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:afh="http://xmlns.oracle.com/adf/faces/html"
     xmlns:af="http://xmlns.oracle.com/adf/faces">
     <jsp:directive.page contentType="text/html;charset=utf-8" />
     <f:view >
          <af:document title="List of buildings" >
               <af:form >
                    <af:panelPage title="Show the list of buildings">
                         <af:table var="building" value="#{buildingsBean.buildingsList}">
                              <af:column>
                                   <af:outputText value="#{building.name}" />
                              </af:column>
                              <af:column>
                                   <af:outputText value="#{building.objectId}" />
                              </af:column>
                              <af:column>
                                   <af:commandButton text="Show more"
                                        action="#{adfMasterSlaveBackingBean.showBuilding}" >
                                   </af:commandButton>
                              </af:column>
                         </af:table>
                    </af:panelPage>
               </af:form>
          </af:document>
     </f:view>
</jsp:root>

Yes I put a targetFrame (I forgot to restablish it).
Code of the backing bean (to show building list) :
public List getBuildingsList() throws Exception {
          System.out.println("getBuildings");          
          CLPNetworkInstanceAPI netAPI = CLPNetworkInstanceAPI.getNetworkInstanceAPI();
          buildingsList.clear();
try {
     CTResource resources[] = netAPI.fetchAllResourcesByType("CLPRMBuilding");      
               for (int i=0; i<resources.length;i++)
                    buildingsList.add(resources);
          } catch (CTConnectionException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
          } catch (CTUnsupportedTypeException e) {
               // TODO Auto-generated catch block
               e.printStackTrace();
          return buildingsList;
and the backing bean to show building detail :
public String showBuilding() {
          FacesContext context = FacesContext.getCurrentInstance();
          CLPRMBuilding building = (CLPRMBuilding)
     context.getApplication().getVariableResolver().resolveVariable(context, "building");
     if (building == null)
     return "error";
     AdfFacesContext afContext = AdfFacesContext.getCurrentInstance();
     afContext.getProcessScope().put("buildingDetail", building);
     return "showBuilding";

Similar Messages

  • 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();

  • ADF Desktop Integration - Can it Support Master Detail Information

    I reviewed the OBE and also the user guide. I could not see any specific details as to whether the ADF Desktop integration can support master detail relationship - either master table with detail table or Master form with detail form, to be linked with the excel sheet.
    Defining both the master and detail table as "tables" I was able to get the data into the excel sheet for the entire master and the child of the first master. The fetch of the child records for the second or third master records is not happening, obviously because I am missing suitable actions.
    Please let us know if:
    - the Master detail can be supported in a view only mode in the integrated excel sheet - with partial page functionality?
    - The master - detail page can be used to upload a header record (master) and many detail records.
    Appreciate any inputs.
    Thanks
    Ram.

    Yes. ADFdi can be configured for "master-detail" type use cases.
    You can create cases with a master form and a detail table. Or, you can create cases with multiple tables.
    ADFdi does not automatically manage the relationship between the form and table, or between the tables. So, the implementation details depend on your specific use case.
    For example, given two tables (one above the other), you might choose to make one column in the "master" table double-clickable. The double-click action set can then invoke the download action of the second, "detail" table.
    For a master form - detail table case, you can configure a "next" button to navigate to the next "master" record and download the details into a table.
    HTH

  • Two Pages for Master Detail

    Hi,
    i would like to have 2 pages for master detail query on my aplication. One show a table with dept master rows, where i would choose a row , and then, when i press viewdetails button show a second page with details emps for this department. But i have a litle probs... How can i pass the row from emp to CurrentDepEmpView ?
    My code :
    "Master Page"
    <?xml version="1.0" encoding="windows-1252" ?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j">
    <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="MasterDeptEmpViewModule"
    definition="uix_test.Bc4j_testeModule"
    releaseMode="stateful">
    <bc4j:viewObjectDef name="deptVO" rangeSize="3"/>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <!-- <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="EmpForeignKeyLink1AppModule"
    definition="uix_test.Bc4j_testeModule"
    releaseMode="stateful">
    <bc4j:viewObjectDef name="deptVO" rangeSize="5"/>
    <bc4j:viewObjectDef name="CurrentDeptEmpsVO" rangeSize="10"/>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    -->
    <content>
    <try xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <catch>
    <header messageType="error">
    <boundAttribute name="text">
    <contextProperty select="ui:currentThrowable"/>
    </boundAttribute>
    </header>
    </catch>
    <contents>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    title="Master Dept View">
    <contents>
    <!-- this will contain any validation errors after form
    submission -->
    <messageBox automatic="true"/>
    <bc4j:rootAppModuleScope name="MasterDeptEmpViewModule">
    <contents>
    <header text="Search">
    <contents>
    <form name="search">
    <contents>
    <inlineMessage prompt="Search" vAlign="middle">
    <contents>
    <bc4j:viewObjectScope name="deptVO">
    <contents>
    <flowLayout>
    <contents>
    <choice name="attrName"
    data:selectedValue="attrName@ctrl:page"
    shortDesc="Search Column">
    <contents>
    <bc4j:region automatic="true">
    <bc4j:attrStamp>
    <option>
    <boundAttribute name="text">
    <bc4j:attrDefProperty name="name"/>
    </boundAttribute>
    <boundAttribute name="value">
    <bc4j:attrDefProperty name="name"/>
    </boundAttribute>
    </option>
    </bc4j:attrStamp>
    </bc4j:region>
    </contents>
    </choice>
    <textInput name="attrValue" columns="20"
    data:text="attrValue@ctrl:page"
    shortDesc="Search"/>
    </contents>
    </flowLayout>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    <end>
    <submitButton text="Go" ctrl:event="search"/>
    </end>
    </inlineMessage>
    </contents>
    </form>
    </contents>
    </header>
    <header text="Results">
    <contents>
    <form name="viewForm">
    <contents>
    <tableLayout>
    <contents>
    <bc4j:viewObjectScope name="deptVO">
    <contents>
    <!-- placing the table in automatic mode will cause the table
    to contain the keyStamp named child followed by the
    columnStamp named child for each attribute in the
    ViewObject. -->
    <bc4j:table name="viewTable" automatic="true"
    width="80%"
    alternateText="No rows found">
    <tableSelection>
    <!-- single selection for each row in the table -->
    <singleSelection selectedIndex="0"
    shortDesc="Select Row">
    <contents>
    <!-- the update button causes the currently selected
    row to be sent to the update page -->
    </contents>
    </singleSelection>
    </tableSelection>
    <!-- the key identifying the current row in the table -->
    <bc4j:keyStamp>
    <bc4j:rowKey name="key"/>
    </bc4j:keyStamp>
    <!-- the column rendered for each attribute -->
    <bc4j:columnStamp>
    <!-- the attrScope is automatic -->
    <bc4j:column>
    <columnHeader>
    <!-- the sortableHeader defaults its attrName
    from the current attrScope -->
    <bc4j:sortableHeader/>
    </columnHeader>
    <contents>
    <!-- renders the current attribute as read only -->
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    </bc4j:columnStamp>
    </bc4j:table>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </tableLayout>
    <submitButton text="Detalhes" ctrl:event="details"/>
    </contents>
    </form>
    </contents>
    </header>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    <contentFooter>
    </contentFooter>
    </pageLayout>
    </contents>
    </try>
    </content>
    <handlers>
    <event name="details">
    <bc4j:findRootAppModule name="MasterDeptEmpViewModule">
    <bc4j:findViewObject name="CurrentDeptEmpsVO">
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:propertyKey name="key"/>
    </bc4j:keyBinding>
    </bc4j:findRowByKey>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    <go name="detailView" redirect="true"/>
    </event>
    <event name="sort" source="viewTable">
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="MasterDeptEmpViewModule">
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="deptVO">
    <!-- sort by the submitted attribute name -->
    <bc4j:sort/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="goto" source="viewTable">
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="MasterDeptEmpViewModule">
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="deptVO">
    <!-- navigate to the submitted range -->
    <bc4j:goto/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="search">
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="MasterDeptEmpViewModule">
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="deptVO">
    <!-- search for the view criteria -->
    <bc4j:findByExample>
    <bc4j:exampleRow ignoreCase="true">
    <bc4j:exampleAttribute>
    <bc4j:nameBinding>
    <bc4j:parameter name="attrName"/>
    </bc4j:nameBinding>
    <bc4j:valueBinding>
    <bc4j:parameter name="attrValue"/>
    </bc4j:valueBinding>
    </bc4j:exampleAttribute>
    </bc4j:exampleRow>
    </bc4j:findByExample>
    <bc4j:executeQuery/>
    <!-- store the current search criteria as page properties -->
    <bc4j:setPageProperty name="attrName">
    <bc4j:parameter name="attrName"/>
    </bc4j:setPageProperty>
    <bc4j:setPageProperty name="attrValue">
    <bc4j:parameter name="attrValue"/>
    </bc4j:setPageProperty>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    </handlers>
    </page>
    "Detail Page"
    <?xml version="1.0" encoding="windows-1252" ?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:ui="http://xmlns.oracle.com/uix/ui"
    xmlns:bc4j="http://xmlns.oracle.com/uix/bc4j">
    <bc4j:registryDef>
    <bc4j:rootAppModuleDef name="DetailDeptEmpViewModule"
    definition="uix_test.Bc4j_testeModule"
    releaseMode="stateful">
    <bc4j:viewObjectDef name="deptVO" rangeSize="3"/>
    <bc4j:viewObjectDef name="CurrentDeptEmpsVO" rangeSize="10">
    <bc4j:rowDef name="deptVO" autoCreate="false" usesCurrency="true">
    <bc4j:propertyKey name="key"/>
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    <content>
    <try xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <catch>
    <displayException/>
    </catch>
    <contents>
    <pageLayout xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui"
    title="Detail Emp per Depto View">
    <contents>
    <!-- this will contain any validation errors after form
    submission -->
    <messageBox automatic="true"/>
    <bc4j:rootAppModuleScope name="DetailDeptEmpViewModule">
    <contents>
    <header text="Search">
    <contents>
    <form name="search">
    <contents>
    <inlineMessage prompt="Search" vAlign="middle">
    <contents>
    <bc4j:viewObjectScope name="CurrentDeptEmpsVO">
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:propertyKey name="key" />
    </bc4j:keyBinding>
    </bc4j:findRowByKey>
    <contents>
    <flowLayout>
    <contents>
    <choice name="attrName"
    data:selectedValue="attrName@ctrl:page"
    shortDesc="Search Column">
    <contents>
    <bc4j:region automatic="true">
    <bc4j:attrStamp>
    <option>
    <boundAttribute name="text">
    <bc4j:attrDefProperty name="name"/>
    </boundAttribute>
    <boundAttribute name="value">
    <bc4j:attrDefProperty name="name"/>
    </boundAttribute>
    </option>
    </bc4j:attrStamp>
    </bc4j:region>
    </contents>
    </choice>
    <textInput name="attrValue" columns="20"
    data:text="attrValue@ctrl:page"
    shortDesc="Search"/>
    </contents>
    </flowLayout>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    <end>
    <submitButton text="Go" ctrl:event="search"/>
    </end>
    </inlineMessage>
    </contents>
    </form>
    </contents>
    </header>
    <header text="Results">
    <contents>
    <form name="viewForm">
    <contents>
    <tableLayout>
    <contents>
    <bc4j:viewObjectScope name="CurrentDeptEmpsVO">
    <contents>
    <bc4j:rowScope name="deptVO">
    <contents>
    <!-- placing the table in automatic mode will cause the table
    to contain the keyStamp named child followed by the
    columnStamp named child for each attribute in the
    ViewObject. -->
    <bc4j:table name="viewTable"
    automatic="true" width="80%"
    alternateText="No rows found">
    <tableSelection>
    <!-- single selection for each row in the table -->
    <singleSelection selectedIndex="0"
    shortDesc="Select Row">
    <contents>
    <!-- the update button causes the currently selected
    row to be sent to the update page -->
    <submitButton text="Update"
    ctrl:event="update"/>
    <!-- the delete button causes the currently selected
    row to be removed -->
    <submitButton text="Delete"
    ctrl:event="delete"/>
    </contents>
    </singleSelection>
    </tableSelection>
    <!-- the key identifying the current row in the table -->
    <bc4j:keyStamp>
    <bc4j:rowKey name="key"/>
    </bc4j:keyStamp>
    <!-- the column rendered for each attribute -->
    <bc4j:columnStamp>
    <!-- the attrScope is automatic -->
    <bc4j:column>
    <columnHeader>
    <!-- the sortableHeader defaults its attrName
    from the current attrScope -->
    <bc4j:sortableHeader/>
    </columnHeader>
    <contents>
    <!-- renders the current attribute as read only -->
    <bc4j:input readOnly="true"/>
    </contents>
    </bc4j:column>
    </bc4j:columnStamp>
    </bc4j:table>
    </contents>
    </bc4j:rowScope>
    </contents>
    </bc4j:viewObjectScope>
    </contents>
    </tableLayout>
    </contents>
    </form>
    </contents>
    </header>
    </contents>
    </bc4j:rootAppModuleScope>
    </contents>
    <contentFooter>
    <!-- the create button redirects to the create page -->
    <button text="Create" ctrl:event="create"/>
    </contentFooter>
    </pageLayout>
    </contents>
    </try>
    </content>
    <handlers>
    <event name="search">
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="DetailDeptEmpViewModule">
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="CurrentDeptEmpsVO">
    <!-- search for the view criteria -->
    <bc4j:findByExample>
    <bc4j:exampleRow ignoreCase="true">
    <bc4j:exampleAttribute>
    <bc4j:nameBinding>
    <bc4j:parameter name="attrName"/>
    </bc4j:nameBinding>
    <bc4j:valueBinding>
    <bc4j:parameter name="attrValue"/>
    </bc4j:valueBinding>
    </bc4j:exampleAttribute>
    </bc4j:exampleRow>
    </bc4j:findByExample>
    <bc4j:executeQuery/>
    <!-- store the current search criteria as page properties -->
    <bc4j:setPageProperty name="attrName">
    <bc4j:parameter name="attrName"/>
    </bc4j:setPageProperty>
    <bc4j:setPageProperty name="attrValue">
    <bc4j:parameter name="attrValue"/>
    </bc4j:setPageProperty>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="sort" source="viewTable">
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="DetailDeptEmpViewModule">
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="CurrentDeptEmpsVO">
    <!-- sort by the submitted attribute name -->
    <bc4j:sort/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="goto" source="viewTable">
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="DetailDeptEmpViewModule">
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="CurrentDeptEmpsVO">
    <!-- navigate to the submitted range -->
    <bc4j:goto/>
    </bc4j:findViewObject>
    </bc4j:findRootAppModule>
    </event>
    <event name="create">
    <!-- forward to the create page -->
    <ctrl:go name="EmpForeignKeyLink1_Create" redirect="true"/>
    </event>
    <event name="update">
    <!-- forward to the update page, passing the selected key
    as a page property -->
    <ctrl:go name="EmpForeignKeyLink1_Update" redirect="true">
    <ctrl:property name="key">
    <ctrl:selection name="viewTable" key="key"/>
    </ctrl:property>
    </ctrl:go>
    </event>
    <event name="delete">
    <!-- using the ApplicationModule causes it to be checked out from the
    ApplicationPool. It is released using stateful mode. -->
    <bc4j:findRootAppModule name="DetailDeptEmpViewModule">
    <!-- establish the ViewObject scope -->
    <bc4j:findViewObject name="CurrentDeptEmpsVO">
    <!-- find the selected Row -->
    <bc4j:findRowByKey>
    <bc4j:keyBinding>
    <bc4j:selectionKey name="viewTable" key="key"/>
    </bc4j:keyBinding>
    <bc4j:handlers>
    <!-- remove the selected ViewObject row -->
    <bc4j:removeRow/>
    <!-- execute the query to eliminate dead row access -->
    <bc4j:executeQuery/>
    </bc4j:handlers>
    </bc4j:findRowByKey>
    </bc4j:findViewObject>
    <!-- commit the transaction, forwards to self automatically -->
    <bc4j:commit/>
    </bc4j:findRootAppModule>
    </event>
    </handlers>
    </page>

    Basic strategy is to make the selected row from the master table the current row, then forward to the detail page, which displays the current row.
    Use the <findRowByKey usesCurrency="true" > event handler.

  • ADF Faces and Struts confusion

    Hello alltogether,
    I'm developing with struts for some years now but I'm completely new to ADF and Faces.
    I want to integrate a "simple" ADF Faces page with one TreeTable to an existent struts application.
    The idea I had is to create an action within the struts-config.xml inheriting from the DataAction or DataForwardAction in order to load and prepare the data for the TreeTableModel.
    When I call the ADF Faces page using the .do call for the Action created (I have to prepend /faces/ to the normal Action call) the page is rendered correctly but I do not enter my derived Action class at all.
    So my question is: How is the preferred way to fill the Model of the TreeTable before the ADF Faces page is rendered. The necessary datasource is obtained from a struts basic action throughout the whole application.
    I'm now struggeling with the pageDef.xml (using the documentation from here: http://www.oracle.com/technology/documentation/jdev/b25947_01/index.html) but I'm really lost since I do not understand what happens when and how resp. why it happens.
    All I want is the following: Prepare and load the necessary TreeModel before the page gets rendered (the appropriate model depends on a parameter which is given in the request that is send and which successfully response should be the ADF Faces page with the TreeTable filled with the appropriate data)!
    Can please somebody give me the necessary piece of advice?
    I'm trying for almost a day now!
    Many thanks in advance
    Best Regards

    Dear Mr. Vohra, It is not yet Clear whether we can use ADF Faces with Tiles,
    With out using Facelets, of MyFaces?
    Some users say they are using these two frameworks, but still complain of problems.
    And you are suggesting to use facelets with ADF faces .
    Can't we use ADF Faces and Tiles with out any other intermediate technology?
    Thanking you,
    Samba.
    Message was edited by:
    saasira

  • ADF Faces and MapViewer

    Hello,
    i'm investigating the possibility to write an ADF Faces MapViewer Client. I'm especially thinking of some Google Maps style navigation, e.g. panning by dragging the map.
    I'd like to use AJAX to prevent full page reloads, so if i drag the map only the map image is reloaded.
    Now the question are:
    1. How do i extend the ADF Faces Components with AJAX Scripts without breaking the ADF Faces PPR concept?
    2. Is it possible to trigger the reload of an ADF Faces component from my javascript?
    3. Is it possibe to extend the java classes for the components or the renderer with my own code?
    4. Has anyone already created an example that uses ADF Faces and MapViewer?
    Thanks for help,
    Dirk

    Hi,
    I just talk with our admin. The problem was server port 8080. Some of internet providers (also one of the biggest Polish) blocks this port. It's a reason - when I change internet connection to other everythig works OK. I thing it would be nice to change server port to default 80, if you want to make this application accessile for all.
    Kuba

  • Using bind variables in the model view for master detail

    Hi all,
    I have a master-detail views setup on the following two queries.
    In the first query below - I use two bind variables to collect the start and end date.
    you have to add (and :startDate = :startDate and :endDate = :endDate) or you will get errors - bind not defined in sql
    I then use the viewQueryCriteria to collect the data on a search panel - so far so good. (Make the bind variables required) along with the other criteria.
    The bind variables are displayed in the search panel and the data is entered correctly.
    The query executes and all is happy.
    VIEWOBJECT1
    SELECT DepositAccounts.COA_ID,
    ... ChartOfAccounts.ACCOUNT_CODE || ' ' || ChartOfAccounts.ACCOUNT_TITLE as description
    FROM DEPOSIT_ACCOUNTS DepositAccounts, DEPOSIT_ACCOUNT_DETAILS DepositAccountDetails, CHART_OF_ACCOUNTS ChartOfAccounts
    WHERE DepositAccounts.ID = DepositAccountDetails.DEP_ACC_ID
    and ChartOfAccounts.id = DepositAccountDetails.COA_ID
    and :startDate = :startDate and :endDate = :endDate
    Now I add the summation of a value (AMOUNT) to the view object (java - create view impl) to the VOViewRowImpl
    and everything works - the value is shown in the transient attribute formatted and looking nice.
    VIEWOBJECT2
    SELECT PostingBatchAccounts.AMOUNT,
    FROM POSTING_BATCH_ACCOUNTS PostingBatchAccounts, POSTING_BATCHES PostingBatches
    where PostingBatchAccounts.PB_ID = PostingBatches.ID
    and PostingBatches.SOURCE_DATE between :startDate and :endDate
    Now I need to add the start date and end date to the child query - before the view executes (or the summation is calculated).
    The attributes are in the where clause (PostingBatches.SOURCE_DATE between :startDate and :endDate) in VIEWOBJECT2 which is the child.
    I need the child records and the summation to work with the date restrictions.
    I would assume you could get access to the child view in the VOViewImpl file and set the bind variables there.
    Everything I find is based on the JSF - not the model layer - this should be fairly easy (and common). can anyone give me a hand on this?

    Hi all,
    I have a master-detail views setup on the following two queries.
    In the first query below - I use two bind variables to collect the start and end date.
    you have to add (and :startDate = :startDate and :endDate = :endDate) or you will get errors - bind not defined in sql
    I then use the viewQueryCriteria to collect the data on a search panel - so far so good. (Make the bind variables required) along with the other criteria.
    The bind variables are displayed in the search panel and the data is entered correctly.
    The query executes and all is happy.
    VIEWOBJECT1
    SELECT DepositAccounts.COA_ID,
    ... ChartOfAccounts.ACCOUNT_CODE || ' ' || ChartOfAccounts.ACCOUNT_TITLE as description
    FROM DEPOSIT_ACCOUNTS DepositAccounts, DEPOSIT_ACCOUNT_DETAILS DepositAccountDetails, CHART_OF_ACCOUNTS ChartOfAccounts
    WHERE DepositAccounts.ID = DepositAccountDetails.DEP_ACC_ID
    and ChartOfAccounts.id = DepositAccountDetails.COA_ID
    and :startDate = :startDate and :endDate = :endDate
    Now I add the summation of a value (AMOUNT) to the view object (java - create view impl) to the VOViewRowImpl
    and everything works - the value is shown in the transient attribute formatted and looking nice.
    VIEWOBJECT2
    SELECT PostingBatchAccounts.AMOUNT,
    FROM POSTING_BATCH_ACCOUNTS PostingBatchAccounts, POSTING_BATCHES PostingBatches
    where PostingBatchAccounts.PB_ID = PostingBatches.ID
    and PostingBatches.SOURCE_DATE between :startDate and :endDate
    Now I need to add the start date and end date to the child query - before the view executes (or the summation is calculated).
    The attributes are in the where clause (PostingBatches.SOURCE_DATE between :startDate and :endDate) in VIEWOBJECT2 which is the child.
    I need the child records and the summation to work with the date restrictions.
    I would assume you could get access to the child view in the VOViewImpl file and set the bind variables there.
    Everything I find is based on the JSF - not the model layer - this should be fairly easy (and common). can anyone give me a hand on this?

  • 3 Levels Master Detail View Object with Java class interface

    Hi Developers,
    I've created 3 tables with one to many relations as below
    BOARD ------<- APPLICANT ------<- QUALIFICATION
    a board includes many applicants and an applicant includes many qualifications.
    When I add these tables to a Fusion Project, JDeveloper 11g helps me to add the Entity Links and View Associations automatically.
    Then, I defined these relations in an ApplicantModule's Data Model as below.
    [+] BoardVO1
          |
          |--[+] ApplicantVO1
                   |
                   |--[+] QualificationVO1The problem is: I cannot write any function in QualificationVO and publish it by client interface.
    I created a simple function with a single line (System.out.println(...) ) in QualificationVOImpl.java. and selected it in Client Interface. But when I execute it from the ApplicantionModel for testing, an oracle.jbo.NoObjException JBO-25003 is raised. with message: Object ... ApplicantVO1 of type ApplicationModule not found.
    Has anyone tried to implement some coding in the third level of a master details view structure as my example? How do you make it works?
    I'm using JDeveloper 11.1.1.3 with ADF BC.
    Regards,
    Samson Fu

    Samson,
    Looks like a bug (probably with the application module tester). I created your tables:
    create table board(board_id number primary key not null);
    create table applicant(applicant_id number primary key not null, board_id number not null);
    create table qualification(qualification_id number primary key not null, aplicant_id number not null);
    alter table applicant add a_fk foreign key(board_id) references board;
    alter table qualification add q_fk foreign key(aplicant_id) references applicant;I created a JDev project and got the same results. I've e-mailed a test case off to Frank.
    Frank - the method is indeed exposed on the VO instance, and I tried testing that way, but the AM tester gives the error as if it is looking for an AM instance with the VO's name.
    John

  • Performance Problem with Master-Detail Views

    Hi,
    I have developed a JSP-Applikcation with the master-detail views.
    I would like to report a bad performance at fetching data records from the detail view, because all records
    from master view have firstly to be retrieved to locate right row (rangesize="-1"). The number of records in
    the master table ist 2500 and 7000 in detail table.
    ============= Code Snippets (See HOWTO:Navigate using Data Tags of J. Oropeza) =====
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" rangesize="-1">
    <jbo:RefreshDataSource datasource="dsMaster">
    <jbo:Row id="msRow" datasource="dsMaster" action="Find" rowkeyparam="RowkeyValue">
    <jbo:dataSource id="dsDetail" appid="testAppId viewobject="DetailView">
    ======================================================================
    When rangesize="20" sets, performance is good, but the right row location of master view ist not found if the row
    is not positoned in this range (No data from detail view object are displayed).
    How can I improve the performance?
    Many thanks for your help.
    regards,
    Yoo

    Sung:
    Thank you for your suggestion.
    According to your suggestion I have changed my BC4J/JSP-application. However, the performance ist still bad.Whenn I click on a row retrieved from the master view, it takes 15 seconds until the associated data in detail view will be displayed on the other window (The application has been deployed on the test system of ISP).
    In an other case with much less data (162 master and 228 detail rows), it takes only 2 seconds (The application
    goes with the local server and DB of our company).
    ======================== master.jsp =================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView" >
    <a href="detail.jsp?RowKeyValue=<jbo:ShowValue datasource="dsMaster" dataitem="RowKey"/>">
    Here Click
    </a>
    ======================== detail.jsp ======================================
    <jbo:DataSource id="dsMaster appid=testAppId viewobject="MaterView">
    <jbo:RefreshDataSource datasource="dsMaster">
    <jbo:Row id="msRow" datasource="dsMaster" action="Find" rowkeyparam="RowkeyValue">
    <jbo:dataSource id="dsDetail" appid="testAppId viewobject="DetailView">
    How do you think of this coding (My application is based on the document How to of J. Oropeza)?
    How can I increase the performance independently of the number of rows?
    Many thanks for your help.
    regards,
    Yoo

  • Date validation in a master/detail view

    Hi everyone,
    I have a problem and I hope someone can help me. I'm trying to create a validation for my application. I have a Master/Detail view where I add rows to my database and in the rows there is a "from date" and "to date". I want to create a validation so that the "from date" can not be chosen before the current date.
    I'm having trouble because most of the tutorials I read on this work with page items, but since I have this in a Master/Detail view I have Column Attributes, wich do not behave the same way as page items.
    Any help would be very appreciated.
    Thanks,
    Luka

    I'm still having quite some trouble with this... everything I try gives me some sort of error.
    My latest attempt was to make a PL/SQL returning boolean validation with the code:
    FOR i IN 1..APEX_APPLICATION.G_F10.COUNT LOOP
    IF DATUM_OD(APEX_APPLICATION.G_F10(i), 'DD.MM.YYYY HH24:MI') < SYSDATE THEN
    return true;
    else
    return false;
    END IF;
    END LOOP;
    and it says:
    Error processing validation.
    ORA-06550: line 2, column 4: PLS-00201: identifier 'DATUM_OD' must be declared ORA-06550: line 2, column 1: PL/SQL: Statement ignored

  • ADFBC JTree Master-Detail view

    Hello, I am using Jdeveloper 10.1.3.3. with ADFBC.
    I have table ORGUNIT with following fields:
    1. ID_ORGUNIT
    2. NAME
    3. ID_PARENT_ORGUNIT
    I have created Entity and View for this table, and ViewLink which is used for fields ID_ORGUNIT and ID_PARENT_ORGUNIT.
    In short, I am trying to create JTree which contains data about organizational units.
    Let's say these are my data:
    1. "ADM" "ADMINISTRATION" "NULL"
    2. "FIN" "FINANCING DEPARTMENT" "NULL"
    3. "FIN1" "FINANCING DEPARTMENT - XXX" "NULL"
    4. "FIN2" "FINANCING DEPARTMENT - YYY" "NULL"
    5. "DEV" "DEVELOPMENT DEPARTMENT" "NULL"
    So, I want to use JTree to create hierarchy:
    ADM
    I--FIN
    I I--FIN1
    I I--FIN2
    I
    I--DEV
    The problem is, when I create view link previously described...I get all data from view with their descendants...
    ADM
    I--FIN
    I I--FIN1
    I I--FIN2
    I
    I--DEV
    FIN
    I--FIN1
    I--FIN2
    FIN1
    FIN2
    DEV
    Can anyone help me? What could be the problem?

    Hi John,
    Thank you for your assistance.
    Just to confirm the details of what I have.
    Master VO: CustomerVO (based on customer table) correct!>Child VO: A VO based on a join between preferences and customer_preferences. (i.e. base your VO on two EO's) correct!what I have is a customer VO based on a customer EO, a customer_preferencesVO based on a customer_preferencesEO and a preferencesVO based on a preferencesEO.
    View links exist between customerVO and customer_preferencesVO and again between preferences and customer_preferences thus facilitating a many-to-many relationship.
    so what I'm trying to do is construct a master detail view between customers and preferences . I figured that in order to achieve this I would need to create two new VO instances, one for customers and one for preferences and then to probable use a statement in the where clause so that only preferences are returned for customers on the current row where a relationship exist via the customer_preverencesVO.
    This is where I'm struggling in understanding how best to implement this.
    All I want is a mechanism whereby when I come to use a tree view component in my UI model I will have a node that will display preferences.
    Thanks again,
    Gary

  • How to set a page template for news detailed view?

    Is there a way to set a page template for the detailed view of the news module?
    I have a page template setup and added the {module_announcement,,,,,} to the page. When the news item is clicked it always opens the default template - is this how it is designed to work or is there a way I can specify it to use a different page template?
    Dave.

    Hey Dave, See the image below:

  • Master/Detail Viewer Application in Web Dynpro ABAP

    Hello @ll,
    i search a Master/Detail Viewer Application in Web Dynpro ABAP like this in WEB Dynpro Java (show below).
    http://help.sap.com/saphelp_nw04/helpdata/en/84/8bc1a36a38da41a46517b114ca0974/frameset.htm
    Have anyone a tutorial or can help how i config the event "onLeadSelect".
    I create a master- and detail table done all context mapping.
    Thanks in advance
    regards
    armin

    Hi Armin,
    Please go through
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/7a89b067-0801-0010-8192-a9896a60938e?quicklink=index&overridelayout=true
    Thanks,
    Prahsant

  • Can there be multiple Master Detail Views, if yes then how? Please suggest

    Dear All,
    In first master-detail view, I have a button, which when clicked will trigger the second detail view.
    I tried invoking second master detail view but was not able to see the second master view. Could you please guide as to how to go about this.
    Thanks.

    Do a Google search. Here's one link.
    http://mobiforge.com/developing/story/developing-split-view-based-apps-ipad
     Cheers, Tom

  • In the toolbar I click on color face and see the RGB color space view. How do I put them into CMYK?

    In the toolbar left I click on color face and see the RGB color space view. How do I put them into CMYK?
    German:
    In der Werkzeugleiste klicke ich auf Farbfläche und sehe den RGB-Farbraumansicht. Wie stelle ich diese in CMYK um?

    I design print material. I hope Adobe will change it.
    The ID Color Picker works the same as Photoshop's classic color picker except that it doesn't have an H,S,B presentation (which is the more intuitive interface). So both programs let you choose an R, G, B and L, a, b presentation of color via the 6 radio buttons, and you can pick RGB, Lab or CMYK versions of the chosen color—the mode you get depends on where your cursor is. If you pick an out-of-gamut CMYK color it is brought into gamut in the Swatches or Color panels after you click OK.
    So here I'm picking RGB, Lab and CMYK Swatches or Colors of the color selection because my cursor is in a respective RGB, Lab or CMYK field, note that the Add Swatch button changes accordingly:
    When I click inside the color field, the CMYK values are a color managed conversion of the chosen color, but I also have the option of entering any value. So it would be unlikely I would get a blue gray color like 50|0|0|50 with a color managed conversion, but I have the option to enter those specific numbers.
    The 3 versions of the color added as swatches
    An InDesign document can have a mix of RGB, Lab, and CMYK colors. Colors and swatches can be converted to any CMYK destination space when you export or print.

Maybe you are looking for

  • Java function in Safari

    List members:    I'm running OS 10.7.4 on an Intel desktop Mac. I'm using Safari 5.1.7, as well as the latest versions of Chrome and Firefox. I have the most recent version of Java. Pop-up blockers are off. The Java plug-in is enabled.    When I try

  • Get Manager - SWX_GET_MANAGER

    Hello I'm using SWX_GET_MANAGER FM to determine the Manager in the workflow but I'm using this in another report too. I'm sending to FM the employee user but I need to send PERNR. Is this possible with this FM? Thanks!

  • Support for Ultra 10

    Does the Solaris 10 OS support Sun Ultra 10 machines? The OS documentation (http://docs.sun.com/source/817-6337/chapterHPG.html#BEJFCAEE. ) lists Ultra 10 along with many other Ultra configurations as supported platforms but when we tried to install

  • Miss my old app!!!

    Is there a file "opener" that comes with Windows 7?  I had this when I first started using my computer and I backed up my computer and lost this awesome file app.  Can anyone help please??  Thank you so much.     magicstuff6

  • Cannot enable HP Web Services: "Connection error. Check Internet connection."

    Hello, I have a problem with LaserJet setup using Wi-Fi network from windows 7 and 8. The problem as far as I understand is due to inaccessible HP Web Services. Details: 1, The printer works good by USB. 2. The printer is correctly configured to use