|
Re: AbstractPageWithNodes with default page [message #1739526 is a reply to message #1738844] |
Tue, 02 August 2016 12:46   |
Eclipse User |
|
|
|
What you describe is the default behavior of Scout. Each node in the outline tree on the left is linked to a specific content on the right. A page with sub-nodes does not display any content of the sub-nodes by default, because it usually is not semantically appropriate. It is also not easy to tell which is the "first" node, because the child nodes might be ordered or filtered in a special way. For example, when you have a "Persons" folder with "Alice", "Bob" and "Charlie" as child nodes, you don't see Alice's data when you click on "Persons". Instead you see a list of persons, possibly with a search form.
What exactly is your intention? When you select "Baubarkeit", would you like to see the content of "Baubarkeit modifizieren"? Is the number of child nodes of "Baubarkeit" dynamic? Can you have more than one? If you just want to switch between a "view mode" and an "edit mode" of an item, the usual pattern would be to have a detail form with a "read only" form handler on the node page, including an "edit" menu that opens the same form again with a "modify" form handler.
Another possibility is that you want to automatically select the "Baubarkeit modifizieren" node as soon as the user selects "Baubarkeit". This could be achieved by overriding "execPageActivated()" in your node page and programmatically changing the selected node in the outline tree.
If you need further assistance, I suggest that you elaborate the goal you are trying to achieve, and maybe post some code.
Regards,
Beat
|
|
|
|
|
Re: AbstractPageWithNodes with default page [message #1740010 is a reply to message #1739936] |
Mon, 08 August 2016 03:14  |
Eclipse User |
|
|
|
YES, this is exactly what we're intended to do: open first child on click on the "parent" node!
Thank you!
This is the code we're searching for:
@Override
protected void execPageActivated() {
setExpanded(true);
// Schedule automatic child selection to allow the current selection to
// be fully completed
ModelJobs.schedule(() -> getTree().selectNode(getChildNode(0)),
ModelJobs.newInput(ClientRunContexts.copyCurrent()));
}
Great!
|
|
|
Powered by
FUDForum. Page generated in 0.05300 seconds