This discussion is archived
2 Replies Latest reply: Nov 15, 2011 2:28 AM by RanjithChitharanjan RSS

Matrix Representaion of data in UI

RanjithChitharanjan Explorer
Currently Being Moderated
Hi all,
I have a table which contains co-ordiate, weightage and description.
eg: axis_name     weightage     description
     --------------     --------------      ---------------
        x                 1                   Descriptiona 
        x                 2                   Descriptionb 
.....
        y                 1                   Descriptionp 
        y                 3                   Descriptionq
I have to show a matrix in UI based on this table with X axis and its fields are in Horizontal direction and the values corresponding to the Y axis in vertical direction .
and I have to show the product of the weightage in the cells.
Name                                Criteria X axis
                         Desc a    Desc b   Desc c Desc d Desc e          
Criteria Y axis                      1     2     3     4       5
     Description p   5     5(5*1)     10     15     20     25 (5*5)
        Description q     4     4     8     12     16     20
     Description r     3     3     6     9     12     15
     Description s     2     2     4     6     8     10
     Description t     1     1     2     3     4     5
I have tried with the pivot table, But I failed to access the cells of the table, to set the products. also I have to put some color on the cells based on the product.

The data in the matrix may chabge day to day basis.

how can i implement this requirement using adf.

please help....

I am using JDeveloper Studio Edition Version 11.1.1.2.0,


Thanks and regards,

Ranjith C
  • 1. Re: Matrix Representaion of data in UI
    Frank Nimphius Employee ACE
    Currently Being Moderated
    Hi,
    its the Pivot table.


    I have tried with the pivot table, But I failed to access the cells of the table, to set the products. also I have to put some color on the cells based on the product.

    You can code for cell access in the Pivot table, same for color coding the cells.


    I Googled this for you, and this is what I found (and you would have found too)

    http://technology.amis.nl/blog/3673/adf-11g-richfaces-a-closer-look-at-the-pivot-table-data-visualization-component
    http://docs.oracle.com/cd/E12839_01/web.1111/b31973/dv_crosstab.htm

    Frank
  • 2. Re: Matrix Representaion of data in UI
    RanjithChitharanjan Explorer
    Currently Being Moderated
    Hi Frank,
    Thank you very much for your help.
    I have implemented the pivot table and I bring the data from my query in to the pivot table.
    But one requirement remains, I have to fill the cells with the products of the weightahes.
    Through my query I can bring only five rows, so I can show 5 cells out of 25.
    here is my pivot
     <dvt:pivotTable id="pivotTable1"
                                  value="#{bindings.MatrixDisplayVO.pivotTableModel}"
                                  modelName="pivotTable1Model"
                                  var="cellData"
                                  inlineStyle="width:600px; height:600px;"
                                  varStatus="cellStatus"
                                  headerFormat="#{SampleBean.getHeaderFormat}"
                                  dataFormat="#{SampleBean.getDataFormat}">
                    <dvt:dataCell>
                      <af:panelGroupLayout>
                        <af:outputText value="#{cellData.dataValue}"/>
                        <af:outputText value= ???????
                                       rendered="#{cellData.dataValue==null}" />
                      </af:panelGroupLayout>
                    </dvt:dataCell>
                    <dvt:headerCell/>
                  </dvt:pivotTable>
    I have tried to set the product by code, through getDataFormat(),to the second text box, But no success.

    can you pls tell me a way to insert the product of the weighatges in to the cells. the weightages are available in the row and column edges...

    regards,
    Ranjith

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points