Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347975 - AbstractWrappedFormField - no borders on inner tables
Summary: AbstractWrappedFormField - no borders on inner tables
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Scout (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-01 12:08 EDT by Christian Ulrich CLA
Modified: 2021-08-19 11:28 EDT (History)
2 users (show)

See Also:
zimmermann: indigo+
zimmermann: juno+


Attachments
sample project for 20100705 release (120.67 KB, application/octet-stream)
2011-06-01 12:09 EDT, Christian Ulrich CLA
no flags Details
sample project for 3.6-trunk (119.76 KB, application/octet-stream)
2011-06-01 12:09 EDT, Christian Ulrich CLA
no flags Details
patch to solve this issue (1.79 KB, patch)
2011-06-16 10:43 EDT, Christian Ulrich CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ulrich CLA 2011-06-01 12:08:01 EDT
Build Identifier: 

The border has to be visible in case of a form is used in a wizard, no borders around the table would confuse the user.

This problem also exists in current Eclipse Scout (3.6-trunk).

Reproducible: Always

Steps to Reproduce:
See attached sample project:

1. Start server and client (user/pw: admin / manager) 
2. You see three menus below "Tools" ("Extras" in german)
3. "Test" starts the TestForm, a form containing a date field and a simple table
4. "Test2" starts the Test2Form, a form containing an AbstractWrappedFormField which contains the TestForm from above
5. "TestWizard" starts the TestWizard, a wizard using the TestForm in it's first step

>> Using the first menu the border of the table is visible while using the others will make use of an AbstractWrappedFormField which makes the border disappear.
Comment 1 Christian Ulrich CLA 2011-06-01 12:09:23 EDT
Created attachment 197111 [details]
sample project for 20100705 release
Comment 2 Christian Ulrich CLA 2011-06-01 12:09:52 EDT
Created attachment 197112 [details]
sample project for 3.6-trunk
Comment 3 Christian Ulrich CLA 2011-06-08 09:27:01 EDT
Note: SWT is not affected by this issue
Comment 4 Christian Ulrich CLA 2011-06-16 10:43:20 EDT
Created attachment 198110 [details]
patch to solve this issue

as discussed by phone, this patch removes the code which hides the border of tablefields if the mainbox has no border. this is the case when a form is the inner form of an wrapperformfield which disables the mainbox border.
Comment 5 Ivan Motsch CLA 2011-06-27 05:18:22 EDT
Thanks for the analysis. You found the right spot.
But as mentioned in an earlier patch, just removing existing functionality to reach the personal goal is in most cases not the right solution.

Your patch would break major existing functionality regarding look and feel of table pages and top level tables.

In order to distinguish between inner forms and top level forms we can use getOuterForm as an additional check in SwingScoutTableField

        // top level table in top-level form has no border
-->        if (getScoutObject().getForm().getOuterForm() == null) {
          if (getScoutObject().getParentField() instanceof IGroupBox) {
            IGroupBox g = (IGroupBox) getScoutObject().getParentField();
            if (g.isMainBox() && !g.isBorderVisible()) {
              JScrollPane scrollPane = newTableComposite.getSwingScrollPane();
              scrollPane.setBorder(new EmptyBorder(0, 0, 0, 0));
            }
          }
-->        }
Comment 6 Matthias Zimmermann CLA 2011-10-10 12:35:27 EDT
shipped with scout 3.7.1