Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » [NEON] Table page with detail view
[NEON] Table page with detail view [message #1752855] Sun, 29 January 2017 15:42 Go to next message
Marco Dorfliger is currently offline Marco DorfligerFriend
Messages: 43
Registered: January 2015
Member
I'm using scout with the Neon.2 release. I just tried to create a table page with a detail view form. In my example, I want it south of the table page. No matter what I try, the form takes up the whole page and obscures the table.

I was following the instructions from the Scout 4.0 tutorial, and also checked this against my Mars implementation (which works fine). Has anyone else experienced this issue?

For completeness, my code:
@Data(ProjectActivityTablePageData.class)
public class ProjectActivityTablePage extends ActivityTablePage<Table> {

    private Long projectId;

    ...

    @Override
    protected void execPageActivated() {
        if (getDetailForm() == null) {
            ProjectActivityCalendarForm form = new ProjectActivityCalendarForm();
            form.setProjectId(getProjectId());
            setDetailForm(form);
            form.startView();
        }
    }

    ...

}

@FormData(value = ProjectActivityCalendarFormData.class, sdkCommand = FormData.SdkCommand.CREATE)
public class ProjectActivityCalendarForm extends AbstractForm {

    private Long projectId;

    @FormData
    public Long getProjectId() {
        return projectId;
    }

    @FormData
    public void setProjectId(Long projectId) {
        this.projectId = projectId;
    }

    @Override
    protected int getConfiguredDisplayHint() {
        return DISPLAY_HINT_VIEW;
    }

    @Override
    protected String getConfiguredDisplayViewId() {
        return VIEW_ID_S;
    }
    @Override
    public Object computeExclusiveKey() {
        return projectId;
    }

    public void startView() {
        startInternalExclusive(new ViewHandler());
    }

    ...

    @Order(1000)
    public class MainBox extends AbstractGroupBox {
    ...
    }

    public class ViewHandler extends AbstractFormHandler {
        @Override
        protected void execLoad() {
            getOkButton().setVisibleGranted(false);
            getCancelButton().setVisibleGranted(false);
        }

        @Override
        protected boolean getConfiguredOpenExclusive() {
            return true;
        }

        @Override
        protected void execStore() {
        }
    }
}
Re: [NEON] Table page with detail view [message #1755370 is a reply to message #1752855] Thu, 02 March 2017 16:39 Go to previous messageGo to next message
David Klein is currently offline David KleinFriend
Messages: 8
Registered: June 2015
Junior Member
Hi Marco! Since you asked - yes I am experiencing the same issue Smile
Have you solved this already? I am working on this now and will elaborate if I get any solution.

Best,
David
Re: [NEON] Table page with detail view [message #1755396 is a reply to message #1755370] Thu, 02 March 2017 19:08 Go to previous messageGo to next message
Marco Dorfliger is currently offline Marco DorfligerFriend
Messages: 43
Registered: January 2015
Member
Nope. In the end I exhausted my options and gave up, and implemented the view and table as separate pages in a node table page. I didn't see it reported as a bug, either. Perhaps we should report it?
Re: [NEON] Table page with detail view [message #1755413 is a reply to message #1752855] Fri, 03 March 2017 07:34 Go to previous messageGo to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 87
Registered: November 2010
Member
Hello

Yes, this behavior has changed with Scout 5 (HTML UI). You can only have a detail table or a detail form at the same time. You can toggle them using the navigation buttons (up/down button at the top right).

There are two ways to get a table view with a detail form at the bottom:

1. Add a custom TableControl to the table, like the search form. To do so, override addDefaultTableControls() in the table page. Advantage: Belongs to the specified table. Disadvantage: Only one table control can be selected at a time.

2. Open a "normal" form with displayHint=DISPLAY_HINT_VIEW and displayViewId=VIEW_ID_S, i.e. do not set it as the detail form of the table page. This will create a new area on the desktop (that can even hold multiple views). Advantage: Form is visible all the time. Disadvantage: Form is not automatically removed when a different page is selected. You have to link it to the table page yourself.

A third possibility would be a detail form with a table field. Advantage: freedom to arrange elements as required. Disadvantage: different styling (e.g. smaller row height), no automatic table page functionality (e.g. "drill down").

Regards,
Beat
Re: [NEON] Table page with detail view [message #1760197 is a reply to message #1755413] Mon, 24 April 2017 13:36 Go to previous message
Benjamin Schulte is currently offline Benjamin SchulteFriend
Messages: 17
Registered: December 2016
Junior Member
For implementing the third possibility, the Widgets demo's FormPage class comes in very handy. I wonder why it is not included in Scout project itself. Are there issues with the FormPage I need to know when using it in my own project?
Previous Topic:[neon] AbstractPageWithTable and Custom TableControls
Next Topic:Custom Fields FormData
Goto Forum:
  


Current Time: Wed May 24 00:34:57 GMT 2017

Powered by FUDForum. Page generated in 0.01716 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software