Skip to Content

The Web Dynpro Table is one of the most sophisticated UI elements in the Web Dynpro Java UI Element Library. Within SAP NetWeaver 7.0 it was enriched with additional, highly valuable functions like cell variants, fixed table layout, hierarchical columns or table popins. For TechEd ’07 we prepared a special 2 hours hands-on session (1 hour lecture and 1h hands-on exercises) which mainly focuses on the following learning objectives:

  • Provide an overview of the new Web Dynpro table functions in SAP NetWeaver 7.0
  • Use cell variants to display different cell editors in the same table column
  • Size tables using absolute and relative widths
  • Wrap text in table cell editors
  • Explain table grouping
  • Talks about some of the new table functions in SAP NetWeaver CE 7.1

Based on three hands-on exercises You learn how to display different cell editors in the same table column, how to optimize the widths-values of  Table and TableColumn UI element within specific table UI scenarios and how to enrich table column headers with additional hierarchical header lines.

NEW: Download all learning material here!

 Enjoy Web Dynpro and See You at SapTeched ’07

Bertram Ganz, Senior Product Specialist, SAP NetWeaver UI Foundation OPS, SAP AG

Exercise Application 1 – Using Table Cell Variants to display different Cell Editors in Same Column

Add a cell variant of type TableStandardCell to the first table column to display another table cell editor for a subset of table rows. Learn how to change the cell design for all cells in the same table row.

image

Exercise Application 2 – Sizing Web Dynpro Table Widths

In this table sizing application You can interactively test the table rendering result when setting specific table UI element property values like width, textWrapping, fixedTableLayout or readOnly.

NEW: You can download this special Web Dynpro “Table Sizing” application as a Web Dynpro project ZIP file. This sample applicatio is described more in detail within Chris Whealy’s and my SDN article “Demo Application for Java Web Dynpro Tables (in NW 7.0)“.

image

Exercise Application 3 – Adding Hierarchical Column Headers

Add two layers of column header texts above all table columns.

image

To report this post you need to login first.

6 Comments

You must be Logged on to comment or reply to a post.

  1. Siva Kumar
    Hello,

    Great blog, as always.

    My question is specific to disabling certain rows in the table based on a business condition, so that the user cannot deselect those rows while they are able to select only from the other enabled rows. Is there a standard/recommended approach to implementing this ?

    (0) 
    1. Bertram Ganz Post author
      Hallo Siva,

      this is possible. You can mark every node element in a table’s data node or in a node mapped to it as selectable or not.

      1) Define non-singleton inner node with cardinaltiy 1..1 in table’s data node or in a view controller node mapped to it.
      2) Add context attribute ‘rowSelectable’ of type boolean. This attribute can be a calculated one (readOnly = true) but this depends on your concrete busienss/application logic. You must just get the rowSelectable flag for every node element at runtime.
      3) Bind the Table UI element’s ‘rowSelectable’ property to the ‘rowSelectable’ context attribute.
      4) Implement application logic to explicitly set the ‘rowSelectable’ context attribute value for every node element.
      5) Make sure that the table’s data node has the ‘selection’ cardinality property correctly set (0..n) to allow multiselection in the table UI.

      RESULT: Only those table rows which are bound to node elements in state ‘rowSelectable’=true can be multi-selected by the user.

      Regards, Bertram

      (0) 
      1. Greetson Shunmugasundaram
        Hello Bertram,
                       How We can implement the 4) item on the above message ??

        4) Implement application logic to explicitly set the ‘rowSelectable’ context attribute value for every node element.

        Please explain me in detail. What method we need to override to achieve this functionality?

        One more questions from my side :
        I know in BSP we can use the Iterator on cell/column start method to modify the cell contents during runtime display of the table data . How we can achievt this functionality in Webdynpro??
        Thanks for your help in advance.
        Thanks,
        Greetson

        (0) 
        1. Bertram Ganz Post author
          Hallo Greetson,

          the most elegant way to implment this logic is based on defining the IsRowSelectable property as a calculated context attribute of type readOnly=true. This means the value is not stored in every node element attribute but it gets “calculated” by the Web Dynpro Runtime invoking the calculated context attribute getter method for every displayed table row (-> node element). In the generated getter method You must return true or false depending on whether a a node element / table row is selectable or not.  For doing this You must check some criteria.

          Regards, Bertram

          (0) 
          1. Greetson Shunmugasundaram
            Thanks for your immediate reply.
            That I can understand from your previous inputitself. i want to know inside what class method we have the scope for changing the tablerow selection flag to true/false depend on the requirement?

            Also I want to know what is the logic in Webdynpro that is equivalent to tabel iterator concept that we have in BSP.

            Thanks,
            Greetson

            (0) 
  2. Carlos Cambra
    Hi Bertram Ganz,

    Unfortunately I don’t have access to donwload the files, can you send me by email ?!

    Congratulation for your contributions, they are very helpfull !!!

    Best regards.

    (0) 

Leave a Reply