1 Reply Latest reply: Sep 22, 2011 8:30 AM by gimbal2 RSS

    Matrix display of Radio button in JSF

      I need to show a matrix using JSF in the following way .

      . A B C
      X 1 2 3
      Y 4 5 6
      Z 7 8 9

      I'm having a table in database named "matrix" which is having 3 fields.
      field1 is a number,field2 and field 3 are foreign keys which references to
      table "A1" and table "X1".
      A1 is having elements A,B,and C
      X1 is having elements X,Y and Z
      Elements of table MATRIX are as follows
      field2 field3 field1
      A X 1
      A Y 4
      A Z 7
      B X 2
      B Y 5
      B Z 8
      .. .... ..

      Now I need to display the field1 of "matrix" table according to X and Y direction values(Those values are dynamic ones).

      As h:datatable only supports X direction display, I thought I'll use any available GRID component for this kind of display.Unfortunately I couldnt get any faces component for this.

      Is there any ready-made component available? Or do I need to write my own component for this? If so, can you guys help me by providing any similar kind of component which I can change for my requirement?

      Please help me out a possible solution.
        • 1. Re: Matrix display of Radio button in JSF
          The trick is more likely in formatting the data in a bean such that you can easily display it using a h:datatable or h:panelGrid. So in stead of wanting to display the data is it is in the database, perform some translations on it to make the transition to a web display easier.

          With a clever datastructure you can usually display most of anything with out of the box JSF components. if you cannot, you should investigate the extension frameworks (primefaces, richfaces, tomahawk, icefaces) to see if one of them has a component that fits more with your requirements.