Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 347975

Summary: AbstractWrappedFormField - no borders on inner tables
Product: z_Archived Reporter: Christian Ulrich <Christian.Ulrich>
Component: ScoutAssignee: Project Inbox <scout.core-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ivan.motsch, zimmermann
Version: unspecifiedFlags: zimmermann: indigo+
zimmermann: juno+
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
sample project for 20100705 release
none
sample project for 3.6-trunk
none
patch to solve this issue none

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