cancel
Showing results for 
Search instead for 
Did you mean: 

Two tables to maintain a static header

Former Member
0 Kudos

Hello Experts,

I'm using NWDS 7.0.18 for EP 7.0.18

Scenario:

We do not want the table header to scroll away as we scroll down the table rows.

Solution:

I have 2 tables one above the other. Both have exactly the same data sources.

The top table (Table 1) has a TableSorter and TableFilter implemented. The headers are visible but the visibleRowCount is set to 0 and the footerVisible is set to false. The tablecelleditors are all textviews and all of them have their visible property set to none.

The bottom table (Table 2) has all the headers visible property set to none and the Table 2's footerVisible is set to false. Table 2 is inside a scroll container.

Problem:

When the tables are populated, Table 1's footer appears. Also the Table 1's header are misaligned with Table 2's columns.

How can I make sure the footer in Table 1 doesnt appear after table is populated? And how can I keep the headers of Table 1 kept in alignment with the columns of Table 2?

Thanks in advance.

M

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I recommend against all those crappy workarounds and use the UI elements as they are implemented in the corresponding release. Doing so, you will get the enhancements in following releases without touching your code.

The table has a real scrollbar instead of crappy paginator buttons starting with NW 7.1. If you use the Table UI element as designed, you will get this without changing your code when the server is updated. Otherwise you have to adapt the workaround.

Armin

Former Member
0 Kudos

Armin,

I agree with you 100%. However, an upgrade is not on the horizon for us for at least 18 months. The max the company might do is go from SPS 18 to EHP1 for 7.0 (04s).

This is why I have implemented this 'crappy' workaround. If only the stupid footer would stay invisible on the top table and the columns would stay aligned in both tables, I would be fine.

M

Former Member
0 Kudos

That's really sad because Web Dynpro has matured a lot with releases 7.1 and following. You will see features like drag-and-drop, context menus, CCTS data types support, asynchronous input suggestion (AJAX) to name only a few.

I can only recommend to have a look at all these enhancements and consider an upgrade. It's really worth it.

Armin

Former Member
0 Kudos

Hi Marshall,

Armin has his point, as a developer I don't think we should say no to some requirements, but you should let the folks know that WDP has A LOT of limitations compared to other technologies. This kind of problem you are facing is solved in newer releases, which as Armin said, it's starting to do "the basics" of any new Rich UI application.

However, I still use NW7.0 in my development, like you do. I usually tell them, hey, this is not available in this version, but 7.1 has it. In this version, we can do this. You should try use this approach, it is justified explanation to not implement some solution like what you suggested. It is the product, there's limitations on it.

My two cents.

Going back to the topic, setting the property footerVisible to false should make the footer disappear. I use 7.0.15 and it is working in this release. To have the columns aligned in both tables, you can follow normal HTML rules.

One common example, you want your table to use 100% of horizontal space.

Set both "width" to 100%, inside the table, you need to have "fixed column widths" - each column needs to match the other table column. Use "px" as unit of these values. You may have only one "variant" cell, with no width (usually, I use something like description) - both tables should "stretch" that column to whatever else needs to complete 100% (less all the columns width in px previously declared).

Hope it helps,

Regards,

Daniel

Former Member
0 Kudos

Armin, Daniel,

I do agree 100% with both of you. However, I have requested the upgrade several times only to be faced by budgetary issues. I know we will at some point, however, not as immediate as I would like. In the meantime, I have decided not to implement the static header, as after trying everything it doesn't give the desired effect.

Marshall.