Programmatically refresh components inside a specific row of an af:table

How to programmatically refresh components inside a specific row of an af:table without refreshing the whole table ?_
I have an af:table displaying a read-only view object. There is an edit button inside the table calling an af:popup, where the user can update some informations and click a submit button to validate his changes.
The action property of this button is a method in a backing been where
-     1 : A stored procedure is called to update several tables (related to my read-only VO).
-     2 : The VO is re-queried (VO. refreshQueryKeepingCurrentRow() )
-     3 : The whole table is refreshed (AdfFacesContext.getCurrentInstance().addPartialTarget(myTable) )
Is it possible to programmatically refresh some components of the current row of the table without refreshing the whole table (point 3)?
I’ve tried to play with the “partialTrigger” property of af:outputText (table:column:outputText), without success.
Thanks
Nicolas

"+do you happen to want to refresh following an action on the row? Like a link/button click?+" : NO
There is a table on my page. The user select a row and click on an edit button. This edit button call a popup where the user can modify some information (not directly on the viewObject. All fields in the popup are dummy fields bind to attributes in my backing bean) and then he click on a submit button.
The submit button action execute a method "submitInformation" in a backing been.
public String submitInformation(){
        Map<String, Object> params = new HashMap<String, Object>();
        params.put("pManNo", xManNo.getValue()); //xManNo is an attribute of the backing bean
        params.put("pDate", xPeriod.getValue()); //xPeriod is an attribute of the backing bean
        // Execute Operation
        OperationBinding oper = ADFUtils.findOperation("serviceSubmitInfo");
        oper.getParamsMap().putAll(params);
        String results = (String)oper.execute();
        // Close Popup & Refresh Row if OK
        if(!StringUtils.isStringEmpty(results) && results.equals("TRUE")){
             closePopup("pt1:popAbs");
             refreshMyCol();
}The serviceSubmitInfo method is defined in my serviceImpl
    public String serviceSubmitInfo (String pManNo, String pPeriod, ......){
         String results =
            callStoredFunction("? :=myDatabaseFunction(?, ?, ?, ?)",
                               new Object[] { pManNo, pPeriod, ...... });
          // Commit
          getDBTransaction().commit();
          // Refresh VO (re-query & set currentRow)
          getMyVO().refreshQueryKeepingCurrentRow();         
          return results; // TRUE if ok
    }I want the " refreshMyCol()" method to refresh only the current row and not the whole table...
Regards
Nicolas

Similar Messages

  • How to access specific row of a database table.

    hi all,
    i am saving all the hr tables in a internal table.
    say, mtable = 'pa0002'  is the content of mtable on looping above internal table.
    LOOP AT i_itf_list INTO wa_list.  "wa_list contains list of hr tables.
       mtable = wa_list-tabname.
       LOOP AT persno.  "persno contains list of personal numbers.
    "how to acess particular row of (mtable)  dynamically where pernr = persno-pernr."
       ENDLOOP.
    ENDLOOP.
    thanks.

    Hi,
    Use below code for your reference.
    data : ref_table_des type ref to cl_abap_structdescr,
              dref type ref to data.
    field-symbols : <itab> type standard table,
                            <wtab> type any.
    data : mtable type tabname.
    LOOP AT i_itf_list INTO wa_list. "wa_list contains list of hr tables.
    clear mtable.
    mtable = wa_list-tabname.
    LOOP AT persno. "persno contains list of personal numbers.
    ref_table_des ?= cl_abap_typedescr=>describe_by_name( mtable ).
    create data dref type handle ref_table_des.
    assign dref->* to <wtab>.
    create data dref like standard table of <wtab>.
    assign dref->* to <itab>.
    ***if you want to select multople rows use below select***********
    select * from (mtable)
    into table <itab>
    where pernr = persno-pernr.
    ********if you want to select single row use below select************
    select single * from (mtable)
    into <wtab>
    where pernr = persno-pernr.
    ENDLOOP.
    ENDLOOP.
    Vijay

  • Hiding one specific column element in specific row  of a report table

    Hi Apex People!
    I have a report table showing something like this:
    Make Reservation····Movie·········Time·······Available Seats
    Link·······················Terminator·················>12
    Link·······················Terminator·················4
    Link·······················Terminator·················>12
    Link·······················Terminator·················sold out
    What I want is to hide the first column link when the screening is sold out:
    Make Reservation····Movie·········Time·······Available Seats
    Link·······················Terminator·················>12
    Link·······················Terminator·················4
    Link·······················Terminator·················>12
    ·····························Terminator·················sold out
    How can one do that?
    All I tried so far let me hide all Links, but not the one from the rows, with available_seats =0...
    Thank you
    Johann

    Johann,
    You could use a CASE statement in the select from the report to hide the first column dependent on the value in the Available seets column.
    Or you could grey it out using a style tag.
    Have a look at this link which talks about conditional formatting which is what you are wanting to do
    formating values
    Chris
    Message was edited by:
    tiffer

  • How do i put bold on a specific row text i a Table

    Hej
    I want to put a bold font on a text to show that this day is booked in my calendar. Im creating the Table in one class (MyCalendar) and then i pass that table to the GUI which shows the table.
    So, how to i put bold on a text when i create the table in MyCalendar (I have marked the code where i want bold):
    public DefaultTableModel calendarMonthArray(int year, int month, int daysInMonth)
            String[] columnNames = {"Man", "Tirs", "Ons", "Tors", "Fre", "Lr", "Sn"};           
            Object[][] data = new Object[5][columnNames.length];
            int days = 1;
            for(int i = 0 ; i <= 4; i++)
                for(int j = 0 ; j <= 6; j++)
                    if(days <= daysInMonth){
                        if(bookingList.checkDate(year, month, days))
                            data[i][j] = days; *<--- Here i want to add bold on the text because there the day is booked*
                        }else{
                            data[i][j] = days;
                        days++;
            table = new DefaultTableModel(data, columnNames);
            return table;
        }

    if(days <= daysInMonth){
                        if(bookingList.checkDate(year, month, days))
                            data[i][j] = days; *<--- Here i want to add bold on the text because there the day is booked*
                        }else{
                            data[i][j] = days;
                        }instead of having the condition check here you should put it in the GUI logic where you are putting the content of this table.
    Ok. you might not have access to bookingList there then second solution is declaring one more array of type boolean and set it to true where you need bold on the text. send
    the same to your GUI Logic.

  • JSP Table Editing (Getting Specific Row)

    Hi there,
    I want to ask how do i get a specific row on my jsp table with a column containing "Edit" buttons.
    I want that when the user click the "Edit" button It will return the data of the selected row.
    Hope you could help me with this.
    Thank you and God Bless

    The logic is simple...
    Just store the primary key Id with each of the edit buttons.
    <input type="hidden" name="tempId">
    <input type="button" name="xyz" value="Edit" onClick="callEdit(<%=primaryKeyId%>)">Write a JS function as below ...
    <script>
    function callEdit(key)
       document.forms[0].tempId.value=key;
       document.forms[0].submit();
    </script>When the user clicks this button then the passed Id can be queried in your DB to retreive the values specific to that row.

  • Navigate to a specific row on page load

    i a, working on JDeveloper 11.1.2.3
    how could i navigate to a specific row on page load
    Regards

    inside task flow insert method call before your page and inside the method you can set the row

  • Components inside components (Flash 8)

    Hi,
    I have an Accordion component which needs to contain a number
    of small forms, each of which is built as a MovieClip containing
    TextInput, Button, ComboBox, etc.
    So, I build my little forms in Flash, make them into
    MovieClips, give them a linkage identifier and assign them the AS2
    class "mx.core.View", as the documentation says.
    Then I use ActionScript to attach these to my Accordion
    control, using my_accordion.createChild(). OK, fine. Works nicely.
    The problem is that in the next few lines of code I also want
    to be able to populate the TextInput and ComboBox components which
    reside inside my accordion. I can't do it. Trying to do so fails
    silently. Tracing out the path to the Components shows that they
    are "there", but if i put some content into, say, one of the
    TextInputs up-front (i.e. in the Properties panel inside Flash) and
    then try to trace... my_acc.my_form.my_textInput.text... i get
    undefined.
    So, it looks like the components inside the form inside the
    Accordion aren't yet "initialised" when I am trying to get/set
    their values. I've seen similar behaviour before, but it's not
    clear in the documentation how to get around it.
    Anyone help? What is the correct way to use components inside
    components like this? I don't want to have to call a second
    function or put any code on the timeline or anything like that!
    Many thanks,
    Andy

    Flash only supports a handful of html tags natively, so the
    short answer is, no, you can't do that. However, there are a few
    xhtml render classes floating around that will render many many
    more tags, including iframes. However, these implementations have
    VERY specific style and construction limitations, and of course
    don't support any scripting, so if you don't have control over the
    content, then it's pretty much hopeless.

  • Item renderer for specific rows

    I need to have a checkbox item renderer for a spark datagrid column. I am using the following to get an item renderer into column:
    var checkBoxRenderer:ClassFactory = new ClassFactory(GridCheckBoxItemRenderer);
    column.itemRenderer = checkBoxRenderer;
    My question is if I need to show a checkbox for specific rows can I do that without going into GridCheckBoxItemRenderer's source code?
    Thanks

    Hi Zolotoj ,
    Please go through following links :
    http://stackoverflow.com/questions/1952940/show-itemrenderer-in-specific-datagrid-rows-oth ers-empty
    http://www.flexer.info/2009/01/09/different-rows-in-datagrid-programmatically-added-itemre nderers-classfactory-and-ifactory/
    It will provide you some idea to how to proceed further for this problem.
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Iterate query result - put specific rows in a collection and do output

    JDeveloper 11.1.1.3.0
    Oracle Lite: 10.2.0.1.0
    Browser: IE 7
    Hi,
    please help me in working on following requirement:
    1. Iterate the View Object Query Result
    2. Do some calculation on the Rows, lets say:
    Concatination of column1 and column2 and place it in a non database Attribute "column3"
    3. How to handle/place the non database attribute?
    4. Fetch specific rows from the query result; there should be a comparison, like checking master and detail hierachy struktur:
    Take Column1_ID (Master) check in columns2_ID (Detail), when found detail take this Row and place it in a buffer (Maybe ArrayList, or something like that)
    5. Show the Chace(ArrayList) to user, in a form of View Object, with standard functions like sorting and filtering
    Till now my process of solving the above requiremnts are:
    To Point 1:
    Created a service method in Application Implementation Class
       public void iterateEmp(){
         EmployeesVOImpl vo = getEmployeesVO1();
         while (vo.hasNext()){
          EmployeesVORowImpl row = (EmployeesVORowImpl)vo.next();
          System.out.println(row.getEmployeeId() + " | " + row.getFirstName() + " | " + row.getLastName() + " | " +  row.getEmail());   
          //row.setCalcCol(row.getFirstName() + "," + row.getLastName());
         }To point 2:
    Added an attribute to the View Object, with updateable and Queryable options. Place it on the JSPX Page.
    With setter method, filled with values, for example (non Database Attributes Name is CalcCol):
    Name:
    //see above code
    row.setCalcCol(row.getFirstName() + "," + row.getLastName());When doing so, on initial Call the values will be representated, but when sorting o filtering will be done, the values then will be erased.
    3. Added an Attribute in View Object "Attributes Panel".
    Here the XML Code of the View Object:
    <?xml version="1.0" encoding="windows-1252" ?>
    <!DOCTYPE ViewObject SYSTEM "jbo_03_01.dtd">
    <!---->
    <ViewObject
      xmlns="http://xmlns.oracle.com/bc4j"
      Name="EmployeesVO"
      Version="11.1.1.56.60"
      BindingStyle="OracleName"
      CustomQuery="true"
      ComponentClass="model.EmployeesVOImpl"
      PageIterMode="Full"
      UseGlueCode="false"
      RowClass="model.EmployeesVORowImpl">
      <DesignTime>
        <Attr Name="_codeGenFlag2" Value="Access|Coll|VarAccess"/>
        <Attr Name="_isExpertMode" Value="true"/>
        <Attr Name="_isCodegen" Value="true"/>
      </DesignTime>
      <SQLQuery>
        <![CDATA[select employee_id, first_name, last_name, email from employees]]>
      </SQLQuery>
      <ViewAttribute
        Name="EmployeeId"
        IsUpdateable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="6"
        Scale="0"
        Type="oracle.jbo.domain.Number"
        ColumnType="NUMBER"
        AliasName="EMPLOYEE_ID"
        Expression="EMPLOYEE_ID"
        SQLType="NUMERIC">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="22"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="FirstName"
        IsUpdateable="false"
        IsPersistent="false"
        PrecisionRule="true"
        Precision="20"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="FIRST_NAME"
        Expression="FIRST_NAME"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="20"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="LastName"
        IsUpdateable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="25"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="LAST_NAME"
        Expression="LAST_NAME"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="25"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="Email"
        IsUpdateable="false"
        IsPersistent="false"
        IsNotNull="true"
        PrecisionRule="true"
        Precision="25"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="EMAIL"
        Expression="EMAIL"
        SQLType="VARCHAR">
        <DesignTime>
          <Attr Name="_DisplaySize" Value="25"/>
        </DesignTime>
      </ViewAttribute>
      <ViewAttribute
        Name="CalcCol"
        IsSelected="false"
        IsPersistent="false"
        PrecisionRule="true"
        Type="java.lang.String"
        ColumnType="VARCHAR2"
        AliasName="VIEW_ATTR"
        SQLType="VARCHAR"/>
      <AttrArray Name="KeyAttributes">
        <Item Value="EmployeeId"/>
      </AttrArray>
    </ViewObject>To Point 4:
    There should be a specific sort order, which i have to code in ADF.
    Just to give an overview:
    Colum1 and Column2 (nothing to do with the emp table) have relationship. Several hierachies are existing in the Query Result.
    For identifying the start point of any of these hierachies, i have to iterate through the Query Result and fetch these start point
    and buffer it in an array or something like that.So in the end i have to get the same query Result but with different Sort Order.
    How to buffer theses Rows (Array?) and show in a View Object?
    Can we use the same view Object for solving that, or should we use another View Object which catches the new Result Set?
    To Point 5:
    The Result should be, as mentioned above, a View Object including new Result Set, which can provide standard behavior (sort, filter)
    I hope the requirement is defined clearly enough, so maybe you can make some suggestions on that.
    Thank you for replies.
    Edited by: user9198377 on 13.07.2011 02:52

    Hi.. You can do this without DB View. Have CalcCol transient attribute in VO. Instead of iterating VO rows and setting CalcCol attr, generate View Row Impl class. Inside getCalcCol(), write your logic. This will be called during each and every request so that transient attr data won't become null during sorting and filtering. If your VO is entity driven, do the same in Entity impl class
    Raghu
    Edited by: Raguraman on Sep 5, 2011 9:48 AM

  • How to refresh a child table each time I select a row in the master table

    I've 2 tables, a master table and a child table.
    When i click on each row of the master table, the child table needs to be refreshed.
    I've given the id of table1(master) as the CreatePartialTrigger value in table2(child).
    The refresh does happen but it happens in an inconsistent manner.
    For eg. in my scenario,
    1.I add a row to the master table
    2.Click on the create button of the child table, this opens a popup and i enter a few values and the child row gets added.
    3.Now when i toggle between the rows in my master table, the refresh does not happen and I see duplicate rows in the child table but in the datebase only one record gets stamped..
    Is there any clean way to refresh the child table based on the row selection in the master table.
    Kindly let me know.
    Table1
    <fnd:applicationsTable tableId="table">
    <af:table value="#{bindings.Actions1.collectionModel}" var="row"
    rows="#{bindings.Actions1.rangeSize}"
    fetchSize="#{bindings.Actions1.rangeSize}"
    selectedRowKeys="#{bindings.Actions1.collectionModel.selectedRow}"
    selectionListener="#{bindings.Actions1.collectionModel.makeCurrent}"
    rowSelection="single" id="table1"
    contentDelivery="immediate" editingMode="clickToEdit"
    columnSelection="multiple" autoHeightRows="10"
    summary="#{HcmActionsTopGenBundle['Header.Action.ActionCode']}" rowBandingInterval="0"
    styleClass="AFStretchWidth"
    partialTriggers="::create ::createMenuItem">
    <af:column id="column1" headerText=" " width="5"
    rowHeader="true"/>
    <af:column sortProperty="ActionCode" sortable="true"
    headerText="#{bindings.Actions1.hints.ActionCode.label}" width="150"
    showRequired="true" rendered="true" id="c1">
    <af:inputText value="#{row.bindings.ActionCode.inputValue}"
    label="#{bindings.Actions1.hints.ActionCode.label}"
    required="#{bindings.Actions1.hints.ActionCode.mandatory}"
    columns="#{bindings.Actions1.hints.ActionCode.displayWidth}"
    maximumLength="#{bindings.Actions1.hints.ActionCode.precision}"
    shortDesc="#{bindings.Actions1.hints.ActionCode.tooltip}" id="it1"
    autoSubmit="true"
    />
    </af:column>
    </fnd:applicationsTable>
    Table 2
    <fnd:applicationsTable tableId="table2"
    styleClass="AFStretchWidth"
    id="AT2"
    actionsMenuRendered="false"
    secondaryToolbarRendered="false"
    createPatternType="secondaryWindow"
    createText="#{hcmActionsBundle['Action.Add']}"
    createAction="#{backingBeanScope.SetupUiBean.invokeCreatePopUp}"
    createPopupId="create1"
    editEnabled="false"
    createPartialTriggers="table1"

    Hi Frank,
    As you mentioned I already have the id of my master table which is 'table1' as the createPartialTrigger in my child table.
    In my case there are 2 scenarios.
    I add a row to the Master table and when I click on the create button on the chile table, I get a pop with 'Yes' , 'No' and 'Cancel'
    Scenario1
    If I click 'Yes' , then I get another popup where I enter the values for the ActionReasonsActionReasonUsagesVO which is a combination of the ActionReasonsEO and the ActionReasonUsagesEO, now when I click on OK, a new row gets created in the ActionReasonsActionReasonUsagesVO.
    In the above scenario things work fine, as I toggle between the rows in the Master table the child table gets refreshed.
    Scenario2
    If I click 'No' I get a search popup where I can query up the ActionReasonsVO and select existing data,on clicking OK, the values get mapped from the ActionReasonsVO to the ActionReasonsActionReasonUsagesVO.
    Now when I toggle between the rows in my master table, I observe 2 types of behaviors
    1.Due to incorrect refresh, the child table rows vanishes from the UI.
    2.There are duplicate rows in the child table.
    The issue is specific to this scenario where the refresh of the child table rows does not happen correctly.
    Edited by: 944295 on Apr 18, 2013 5:16 PM

  • Set specific rows in ALV grid ready for input

    Hi everyone,
      I have a question about how to set specific rows in ALV grid ready for input.
      I know that I can make some columns ready for input before the ALV displayed,but I have no idea how to make specific rows displayed in the ALV ready for input.

    Hello Aaron
    For editable columns we can use the fieldcatalog (LVC_S_FCAT-EDIT = 'X') but for rows you need to define editability on cell level.
    The required steps are documented in sample report BCALV_EDIT_02. Below I point out a few crucial points:
    *§1.Extend your output table for a field, e.g., CELLTAB, that holds
    *   information about the edit status of each cell for the
    *   corresponding row (the table type is SORTED!).
    DATA: BEGIN OF gt_outtab occurs 0.  "with header line
            include structure sflight.
    DATA: celltab type LVC_T_STYL.
    DATA: END OF gt_outtab.
    *§3.Provide the fieldname of the celltab field by using field
    *   STYLEFNAME of the layout structure.
       gs_layout-stylefname = 'CELLTAB'.
       CALL METHOD grid1->set_table_for_first_display
             EXPORTING i_structure_name = 'SFLIGHT'
                       is_layout        = gs_layout
             CHANGING  it_outtab        = gt_outtab[].
    Note: in the sample report only field SEATSMAX is editable. In your case you need
    to fill CELLTAB for all fields in a row.
    *§2.After selecting data, set edit status for each row in a loop
    *   according to field SEATSMAX.
      LOOP AT gt_outtab.
        l_index = sy-tabix.
        refresh lt_celltab.
        if gt_outtab-seatsmax ge 300.
            perform fill_celltab using 'RW'
                                 changing lt_celltab.
        else.
            perform fill_celltab using 'RO'
                                 changing lt_celltab.
        endif.
    *§2c.Copy your celltab to the celltab of the current row of gt_outtab.
        INSERT LINES OF lt_celltab INTO TABLE gt_outtab-celltab.
        MODIFY gt_outtab INDEX l_index.
      ENDLOOP.
    ENDFORM.                               " SELECT_DATA_AND_INIT_STYLE
    NOTE: LVC_T_STYL is a SORTED table type. Thus, take care that you are using the
    INSERT ... INTO TABLE statement and not APPEND (because then nothing is appended
    to the CELLTAB itab).
      IF p_mode EQ 'RW'.
    *§2a.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_ENABLED to set a cell
    *    to status "editable".
        l_mode = cl_gui_alv_grid=>mc_style_enabled.
      ELSE. "p_mode eq 'RO'
    *§2b.Use attribute CL_GUI_ALV_GRID=>MC_STYLE_DISABLED to set a cell
    *    to status "non-editable".
        l_mode = cl_gui_alv_grid=>mc_style_disabled.
      ENDIF.
      ls_celltab-fieldname = 'SEATSMAX'.
      ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
      INSERT ls_celltab INTO TABLE pt_celltab.
    Regards
      Uwe

  • Maintain the current row position of a table after refresh.

    Hi,
    I use a poll to refresh tables continuously. when a table is refreshed, the current referring row is reset.
    To maintain the current row position after a refresh I use the following poll method.
    public void refreshTableT1(PollEvent pollEvent) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding dcb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer bindings1 = (DCBindingContainer) dcb.getValue(fctx);
    DCIteratorBinding dciter = bindings1.findIteratorBinding("<VOIterator>");
    if(dciter!=null){
    if(dciter.getCurrentRow()!=null){   
    Key current_row_key = dciter.getCurrentRow().getKey();
    dciter.executeQuery();
    if(current_row_key!=null){
    try{
    dciter.setCurrentRowWithKey(current_row_key.toStringFormat(true));
    }catch(Exception ex) {
    System.out.println("Exception in current_row_key");
    }This works for normal tables well. But when I use it to master-detail tables (pair of tables) it does not.
    At the master-detail tables, before the first data fetch, it works well. if we go below the first data fetch, it sets the current row into another position.
    how can I overcome this...??
    Thanks,
    Dinuka.

    Hi Mr.Frank,
    I have an association in two VOs.
    for example: There are 2 tables called Emp and Dept. Every Department has Employees. so there is an association (both tables have a common column). Master table is the Dept table. when you click on one record of the Dept table Detail table will show the details of the employees belongs to that selected department. That's what I referred as master-detail tables. first one is master table; second one is detail table.
    When the web page loads all the table data is not fetched from the db (it will depend on the fetch size). when we scroll down the table data fetch happens again and again.
    think my data fetch size is 25 rows per time.
    Suppose we use mine poll method and think I have clicked on the 20 ^th^ row of table1(master table). then the table2 will display details belongs to selected department. that is OK even after refresh. that works well.
    when I go to 30 ^th^ row data fetch will happen (my fetch size = 25)
    when I click on the 30 ^th^ row of the table1(master table), table2 will display details belongs to selected department. but after the poll method is called the selected row at the table1 disappears and is set to another position. now the 30 ^th^ row is not in the 30 ^th^ position. but it is the selected row and table2 displays correct details.
    I think you have got the problem now. :D
    Thanks a lot.
    Dinuka.

  • How to select specific rows in rtf template for complex calculation

    Hi,
    I want custom calculation in my rtf template and for this i need to select specific cell's value OR specific row's value. Any one please suggest how can I get this. Below is the example i have plotted using excel. My target is to get field 8 and 9 using sum and minus. We can calculate column over column, is there any way to calculate row over row? If I use variables, then i have to create so many variables because I have more columns and rows to calculate (here i posted one sample table). Any one please help me how can I get expected result other than using variables! If "Using variables" is the only way then also give your valuable opinions.
    Row No
    Curr Qtr
    PQtr1
    PQtr2
    3
    B3
    C3
    D3
    4
    B4
    C4
    D4
    5
    B5
    C5
    D5
    6
    B6
    C6
    D6
    7
    B7
    C7
    D7
    8
    B8=SUM(B4:B7)
    C8=SUM(C4:C7)
    D8=SUM(D4:D7)
    9
    B9=B8-B5
    C9=C8-C5
    D9=D8-D5
    Thanks.

    Hi AlexAnd,
    Thanks for the reply, I got 0 using both codes. This is a dummy table and I plotted 3,4 to give an idea of row number (as like as excel). Rows are individual data sets combining different measures and dimensions with different values.
    Account
    Curr_Qtr
    PQtr1
    PQtr2
    Deposit
    10
    15
    20
    Loan
    15
    20
    25
    Earning
    20
    25
    30
    Assets
    25
    30
    35
    Total
    =SUM(15,20)
    =SUM(20,25)
    =SUM(25,30)
    Expense
    =SUM(15,20)-25
    =SUM(20,25-30
    =SUM(15,20)-25
    Is there any way to identify the range or individual cell's value? Using variables I have to create lots of variables for each cells, I want to avoid that and want to use rows in calculation! Is that possible, Pls share your valuable opinions!
    Thanks.

  • Custom row-fetch and how to get column values from specific row of report

    Hi -- I have a case where a table's primary key has more than 3 columns. My report on the
    table has links that send the user to a single-row DML form, but of course the automatic
    fetch won't work because 1) I can't set more than 3 item values in the link and 2) the
    auto fetch only handles 2 PK columns.
    1)
    I have written a custom fetch (not sure it's the most elegant, see second question) that is working
    for 3 or few PK columns (it references the 1-3 item values set in the link), but when there are
    more than 3, I don't know how to get the remaining PK column values for the specific row that was
    selected in the report. How can I access that row's report column values? I'll be doing it from the
    form page, not the report page. (I think... unless you have another suggestion.)
    2)
    My custom fetch... I just worked something out on my own, having no idea how this is typically
    done. For each dependent item (database column) in the form, I have a source of PL/SQL
    function that queries the table for the column in question, using the primary key values. It works
    beautifully, though is just a touch slow on my prototype table, which has 21 columns. Is there
    a way to manually construct the fetch statement once for the whole form, and have APEX be smart
    about what items get what
    return values, so that I don't have to write PL/SQL for every item? Because my query data sources
    are sometimes in remote databases, I have to write manual fetch and dml anyway. Just would like
    to streamline the process.
    Thanks,
    Carol

    HI Andy -- Well, I'd love it if this worked, but I'm unsure how to implement it.
    It seems I can't put this process in the results page (the page w/ the link, that has multiple report rows), because the link for the row will completely bypass any after-submit processes, won't it? I've tried this in other conditions; I thought the link went directly to the linked-to page.
    And, from the test of your suggestion that I've tried, it's not working in the form that allows a single row edit. I tried putting this manually-created fetch into a before header process, and it seems to do nothing (even with a hard-coded PK value, just to test it out). In addition, I'm not sure how, from this page, the process could identify the correct PK values from the report page, unless it can know something about the row that was selected by clicking on the link. It could work if all the PK columns in my edit form could be set by the report link, but sometimes I have up to 5 pk columns.
    Maybe part of the problem is something to do with the source type I have for each of the form items. With my first manual fetch process, they were all pl/sql functions. Not sure what would be appropriate if I can somehow do this with a single (page level?) process.
    Maybe I'm making this too hard?
    Thanks,
    Carol

  • Problem with "Row-specific or Cascading Lists in Table Layout"

    Hello, friends!
    I have read article "Row-specific or Cascading Lists in Table Layout" written by Steven Davelaar. I have maked several table layouts with this technique and it worked fine.
    But now I have one problem, and this problem is very strange. One of VOs for which I use this table layouts throw exception after commit changes on first LOV attribute (Deptno). First time it was error
    (oracle.jbo.ReadOnlyAttrException) JBO-27008: for atribute mgrList
    at oracle.jbo.AttrValException.<init>(AttrValException.java:112)
         at oracle.jbo.ReadOnlyAttrException.<init>(ReadOnlyAttrException.java:40)
         at oracle.jbo.server.ViewRowImpl.setAttribute(ViewRowImpl.java:815)
         at oracle.jbo.jbotester.JboTesterUtil.setData(JboTesterUtil.java:173)
    Then I setted updateable property of MgrList attribute to always and now i have this error:
    oracle.jbo.domain.DataCreationException: JBO-25009: Cannot create an object of type:java.util.List with value:[{}]
         at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:721)
         at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:85)
    I don't know why, but all worked fine yestarday. And same code works fine for another VOs. And article Test application works fine too.
    Help me, please.
    Thank you.

    <table id="OsnovaniyaPrikazEnd" model="${jhsTableBindings.OsnovaniyaPrikazEnd_1B}" detailDisclosure="${uix.eventResult.detailData}" partialRenderMode="multiple" partialTargets="messageBox _uixState " proxied="true" alternateText="${nls.NO_ROWS_FOUND}" width="50%" rendered="${bindings.newGroup_end2Iterator.findMode!='true'}">
    <tableFormat tableBanding="rowBanding"/>
    <contents>
    <formValue value="${uix.current.rowKeyStr}" name="rowKeyStr" id="${ui:concat('OsnovaniyaPrikazEnd:rowKeyStr:',uix.current.tableIndex)}"/>
    <column>
    <columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
    <columnHeader>
    <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'Id')}" text="Id" required="yes"/>
    </columnHeader>
    <contents>
    <messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:Id:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2Id)}" text="${uix.current.OsnovaniyaPrikazEndId}" name="Id" promptAndAccessKey="&Id" rows="1" maximumLength="1" columns="1">
    <onSubmitValidater>
    <decimal/>
    </onSubmitValidater>
    </messageTextInput>
    </contents>
    </column>
    <column>
    <columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
    <columnHeader>
    <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdPrikaz')}" text="IdPrikaz"/>
    </columnHeader>
    <contents>
    <messageTextInput id="${ui:concat('OsnovaniyaPrikazEnd:IdPrikaz:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.newGroup_end2IdPrikaz)}" text="${uix.current.OsnovaniyaPrikazEndIdPrikaz}" name="IdPrikaz" promptAndAccessKey="&IdPrikaz" rows="1" maximumLength="1" columns="1">
    <onSubmitValidater>
    <decimal/>
    </onSubmitValidater>
    </messageTextInput>
    </contents>
    </column>
    <column>
    <columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
    <columnHeader>
    <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdOsnovanie')}" text="&#1053;&#1072; &#1086;&#1089;&#1085;&#1086;&#1074;&#1072;&#1085;&#1080;&#1080;"/>
    </columnHeader>
    <contents>
    <messageChoice id="${ui:concat('OsnovaniyaPrikazEnd:IdOsnovanie:',uix.current.tableIndex)}" model="${ui:cond(uix.current.isNewRow,null,uix.current.IdOsnovanie)}" name="IdOsnovanie" promptAndAccessKey="&IdOsnovanie" selectedValue="${uix.current.newGroup_end2IdOsnovanie}">
    <contents childData="${jhsTableBindings.Osnovaniya_not_viewVO_1T.rangeSet}">
    <option value="${uix.current.Id}" text="${uix.current.Text}"/>
    </contents>
    <primaryClientAction>
    <firePartialAction event="whenListChanged" formSubmitted="true" unvalidated="true" targets="${ui:cond(uix.current.isNewRow,'OsnovaniyaPrikazEnd', 'OsnovaniyaPrikazEnd')}"/>
    </primaryClientAction>
    </messageChoice>
    </contents>
    </column>
    <column>
    <columnFormat displayGrid="true" cellNoWrapFormat="true" columnDataFormat="numberFormat"/>
    <columnHeader>
    <sortableHeader model="${ctrl:createSortableHeaderModel(bindings.OsnovaniyaPrikazEnd,'IdMoves')}" text="IdMoves"/>
    </columnHeader>
    <contents>
    <messageChoice rendered="${uix.current.ListLength>'1'}" id="${ui:concat('OsnovaniyaPrikazEnd:IdMoves:',uix.current.tableIndex)}"
    model="${ui:cond(uix.current.isNewRow,null,uix.current.OsnovaniyaPrikazEndIdMoves)}" name="IdMoves" promptAndAccessKey="&IdMoves"
    selectedValue="${uix.current.newGroup_end2IdMoves}">
    <contents childData="${uix.current.MovesList.inputValue}">
    <option value="${uix.current.Id}" text="${uix.current.Fam1}"/>
    </contents>
    </messageChoice>
    </contents>
    </column>
    <column>
    <columnFormat displayGrid="true" columnDataFormat="iconButtonFormat"/>
    <columnHeader>
    <text text="&#1059;&#1076;&#1072;&#1083;&#1080;&#1090;&#1100;?"/>
    </columnHeader>
    <contents>
    <checkBox name="deleteRow" value="ok"/>
    </contents>
    </column>
    </contents>
    </table>
    Thank you.

Maybe you are looking for

  • My iPod shows up in windows but not in iTunes, so what do I do?

    I have a 30GB 5th Gen. iPod that worked fine until a couple of weeks ago. I don't know what happened to it but when I connected to iTunes, it said corrupt so I restored it but now it doesn,t show up in iTunes any more. I've done what I thought would

  • PDF downloads not displaying correctly

    I am experiencing problems when viewing PDF files attached to email. They don't display correctly

  • I have just purchased a used 3gs and the previous owner hadnt reset it.

    I have just purchased a used 3gs and the previous owner hadnt reset it. So i did the reset and left it over night as this can take a few hours. This morning 10 hours later there is stillthe cirlcle going round in the centre of the screen. There is no

  • Music from a different itunes user

    HI Lately I got some new music from my girlfriend via usb stick, but some of the songs I cannot play, they always ask me for authorization.Do I have to authorize with my ID or with hers? please help me!!! thanks kat

  • Can anyone help - battery trouble!

    Hey I was wondering if anyone can help me. My ipod is 2 years old now and even from the start the battery life has never been that good. having recently having to reset the whole thing i have had even more trouble with the batter life. I plug it into