Complete Scout Newbie [message #1484303] |
Sun, 23 November 2014 09:51 |
|
Hello there,
I'm a complete scout newbie and went through the wiki, scout book and forums the last 2 weeks. Nevertheless I have got a few unanswered questions... I hope someone of you can lead me in the right direction...
- Outline based Application
- How can I get the OutlineToolbar to work?
If I add several Outlines to the Desktop, do I have to take care of populating a OutlineToolbar by myself? If so, how?
- Is it possible to define an initial height and width for the different view placeholders?
- Outline & TablePage
- Whats the most convenient way to create a master/detail form?
Is it with a TablePage and a detail form to this table page?
Or is it to open separate views in the same view placeholder (eg. South)?
How can I realize a data binding between the selected row in the table page and the row displayed in the detail form? Because I'd like to immediately reflect the changes when the the details are changed. Or at least, when the are saved. Is there a way to achieve this?
- Is it possible to detect a double-click on a selected table-row in order to open a new detail form/-view with the data of selected row?
- Is it possible to add a search box on top of the table in the table page? And when typing there to search for the entered text?
- Is it possible to add a toolbar to a table page (e.g. for creating, deleteing an entity or activating the search form)?
- Forms
- Is there a way to hide "OK/Cancel"-Buttons when the form is display as view?
- Is there a way to detect that a view with a specific primary key was already opened and instead of opening it again just activate and show it?
I hope that's not too much for a first timer . But I have to say that I really like scout from what I have seen so far and I want to dig deeper into it.
Thanks in advance
Peter
|
|
|
|
Re: Complete Scout Newbie [message #1485773 is a reply to message #1484303] |
Mon, 24 November 2014 14:30 |
Jeremie Bresson Messages: 1252 Registered: October 2011 |
Senior Member |
|
|
Hi Peter,
Thank you for joining us on this forum.
As Bakhtiyor Ruzimatov mentioned it (thank you for that), some of the points you are mentioning have already been discussed on this forum. I will try to give you some starting points for the topics you mention.
Feel free to continue the discussion on the forum. I will be happy to go deeper in one or the other topics.
Peter Pfeifer wrote on Sun, 23 November 2014 10:51How can I get the OutlineToolbar to work?
If I add several Outlines to the Desktop, do I have to take care of populating a OutlineToolbar by myself? If so, how?
Desktop Window can display some Tool Buttons at the top of the window.
I know there are some limitation with SWT that have been discussed on the forum (you need to add some missing glue code).
Peter Pfeifer wrote on Sun, 23 November 2014 10:51Is it possible to define an initial height and width for the different view placeholders?
I am not sure to undestand what you want to do. Have you some sketch or a screenshot?
Peter Pfeifer wrote on Sun, 23 November 2014 10:51Whats the most convenient way to create a master/detail form?
I have discussed on the forum how you can have some TableField in a form and some GroupBox to edit the content of the selected row in the same form.
Or do you mean: master/detail between 2 forms opened as views?
Peter Pfeifer wrote on Sun, 23 November 2014 10:51Is it with a TablePage and a detail form to this table page?
Or is it to open separate views in the same view placeholder (eg. South)?
How can I realize a data binding between the selected row in the table page and the row displayed in the detail form? Because I'd like to immediately reflect the changes when the the details are changed. Or at least, when the are saved. Is there a way to achieve this?
If you use a table page, you will get a table as main content. You can display an additional detail form (for example in the south area). The the typicall use case is to display additional data in the detail form (for example a graph), not to modify data in this form.
To answer your question: I think is possible, but not provided out of the box.
The typical scout flow is to open a new modal form to edit the data.
(see outline based application)
Peter Pfeifer wrote on Sun, 23 November 2014 10:51Is it possible to detect a double-click on a selected table-row in order to open a new detail form/-view with the data of selected row?
It is possible to define a menu, which action will be stated when the user double clicks on a row. See getConfiguredDefaultMenu() in the table.
@Override
protected Class<? extends IMenu> getConfiguredDefaultMenu() {
return MyTablePage.Table.MyTestMenu.class;
}
We often have an „Edit X..." menu as first table menu. A double click is a convenience way of executing the same action.
Peter Pfeifer wrote on Sun, 23 November 2014 10:51
Is it possible to add a search box on top of the table in the table page? And when typing there to search for the entered text?
Yes. You can influence where your search form will be located as with any other form.
To react on each user input set the property "ValidateOnAnyKey" to true in your StringField. You can start the search using this.
=> be aware of the potential performance issues, when you use a pattern like this one.
Peter Pfeifer wrote on Sun, 23 November 2014 10:51
Is it possible to add a toolbar to a table page (e.g. for creating, deleteing an entity or activating the search form)?
I am not sure to understand what you need at this point.
Peter Pfeifer wrote on Sun, 23 November 2014 10:51Is there a way to hide "OK/Cancel"-Buttons when the form is display as view?
Yes. Call setVisible(false) on the buttons.
Peter Pfeifer wrote on Sun, 23 November 2014 10:51Is there a way to detect that a view with a specific primary key was already opened and instead of opening it again just activate and show it?
You can access all the forms and all the views from the Desktop. See:
- IDesktop# getViewStack()
- IDesktop# getDialogStack ()
You can do some checks by yourself (looking for the primary key). If you find something, call IForm#activate() if you do not find it, start a new form for the primary key.
I hope it helps.
.
|
|
|
Re: Complete Scout Newbie [message #1486563 is a reply to message #1485773] |
Tue, 25 November 2014 05:49 |
|
Hello all,
thanks for the warm welcome and all your answers. I tried to create a screenshot with my questions as suggested. I hope this helps to understand me a bit better.
Thanks in advance.
Peter
|
|
|
|
|
|
Re: Complete Scout Newbie [message #1487863 is a reply to message #1487745] |
Wed, 26 November 2014 05:52 |
|
Hi,
Bakhtiyor Ruzimatov wrote on Wed, 26 November 2014 03:36
Most likely you create with SWT?
Yes I'm using the SWT client. I didn't know that there is more to do than creating OutlineViewButtons.
Regards,
Peter
|
|
|
|
|
|
Re: Complete Scout Newbie [message #1531850 is a reply to message #1495730] |
Sat, 27 December 2014 17:46 |
|
Hello.
Since I have got a little more time to play around with Scout in my vacation, I have to say thanks.
I managed to solve most of my above mentioned problems with your help.
There are just a few open problems and of course new questions (which I didn't find any proper answer for). I'll open single new threads for each problem in order to keep it more clear.
Thank you all.
Peter
|
|
|
|
Powered by
FUDForum. Page generated in 0.02864 seconds