Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » Complete Scout Newbie
Complete Scout Newbie [message #1484303] Sun, 23 November 2014 09:51 Go to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

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... Smile

  1. 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?

  2. 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)?

  3. 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 #1485346 is a reply to message #1484303] Mon, 24 November 2014 06:55 Go to previous messageGo to next message
barust Mising name is currently offline barust Mising nameFriend
Messages: 57
Registered: February 2014
Member
Hi, Peter and Welcome!
Answers to some questions you ask are already on this forum. You need to spend time and search.

Sincerely,
Bakhtiyor
Re: Complete Scout Newbie [message #1485773 is a reply to message #1484303] Mon, 24 November 2014 14:30 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
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:51
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?

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:51
Is 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:51
Whats 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:51
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?

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.
https://wiki.eclipse.org/images/8/8a/Scout_Client_Concepts.png
(see outline based application)

Peter Pfeifer wrote on Sun, 23 November 2014 10:51
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?

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:51
Is 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:51
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?

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 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

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. Smile

Thanks in advance.

Peter
Re: Complete Scout Newbie [message #1486737 is a reply to message #1486563] Tue, 25 November 2014 08:53 Go to previous messageGo to next message
barust Mising name is currently offline barust Mising nameFriend
Messages: 57
Registered: February 2014
Member
Hi Peter,
By your screenshot:
Quote:
1) how can I add the Outline Toolbar.

this links: https://www.eclipse.org/forums/index.php/m/1412831/#msg_1412831 and https://wiki.eclipse.org/Scout/Tutorial/4.0/Modular_Application
Re: Complete Scout Newbie [message #1486779 is a reply to message #1486737] Tue, 25 November 2014 09:33 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

Hi,

thanks a lot for the link. Pictures are so helpful Smile
I did it as described in the link above. The AbstractOutlineViewButtons are created as well in the Desktop class. But they are not shown in the toolbar. Do I have to enable the toolbar somehow?

Peter

[Updated on: Tue, 25 November 2014 12:07]

Report message to a moderator

Re: Complete Scout Newbie [message #1487745 is a reply to message #1486779] Wed, 26 November 2014 03:36 Go to previous messageGo to next message
barust Mising name is currently offline barust Mising nameFriend
Messages: 57
Registered: February 2014
Member
Quote:
But they are not shown in the toolbar.

Most likely you create with SWT? You may to check it out on the swing,
if this is so, it seems there is a solution on the forum, try go through the a topics of the forum.

Bakhtiyor

[Updated on: Wed, 26 November 2014 03:40]

Report message to a moderator

Re: Complete Scout Newbie [message #1487863 is a reply to message #1487745] Wed, 26 November 2014 05:52 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

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 #1488214 is a reply to message #1487863] Wed, 26 November 2014 12:08 Go to previous messageGo to next message
barust Mising name is currently offline barust Mising nameFriend
Messages: 57
Registered: February 2014
Member
On forum search i wrote this: "scout multiple outline SWT" and take 2 results. One of it may be useful for you https://www.eclipse.org/forums/index.php/m/719302/?srch=scout+multiple+outline+SWT#msg_719302

with regards,
Bakhtiyor (Barust)
Re: Complete Scout Newbie [message #1495420 is a reply to message #1488214] Tue, 02 December 2014 07:38 Go to previous messageGo to next message
Urs Beeli is currently offline Urs BeeliFriend
Messages: 573
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Hi Peter

I've had similar issues with SWT and tool buttons. Have a look at the HowTo article I wrote outlining some possible solutions: https://wiki.eclipse.org/Scout/HowTo/3.8/Changing_outlines_with_the_SWT_client

Note however, that the solutions outlined in the article applied to Scout 3.9 (Kepler) and there have been some changes to the Coolbar handling in Scout, so you might need to adapt some of the code. Feel free to ask here, if you get stuck.
Re: Complete Scout Newbie [message #1495730 is a reply to message #1486563] Tue, 02 December 2014 13:12 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
For point 2 and maybe 4 you might want to check:

org.eclipse.scout.rt.client.ui.form.outline.DefaultOutlineTableForm

The form is instanciated in your Desktop:
@Override
protected void execOpened() throws ProcessingException {
  //If it is a mobile or tablet device, the DesktopExtension in the mobile plugin takes care of starting the correct forms.
  if (!UserAgentUtility.isDesktopDevice()) {
    return;
  }

  // outline tree
  DefaultOutlineTreeForm treeForm = new DefaultOutlineTreeForm();
  treeForm.setIconId(Icons.EclipseScout);
  treeForm.startView();

  //outline table
  DefaultOutlineTableForm tableForm = new DefaultOutlineTableForm();
  tableForm.setIconId(Icons.EclipseScout);
  tableForm.startView();

  IOutline firstOutline = CollectionUtility.firstElement(getAvailableOutlines());
  if (firstOutline != null) {
    setOutline(firstOutline);
  }
}


I do not think that you can inject your StringField for the Search with the current version of Scout (this migth evolve in the near future with the Mars release).

But you can write your own DefaultOutlineTableForm.


This might also help you with your point 4: you could propagate the table selection event to your detail form.

.
Re: Complete Scout Newbie [message #1531850 is a reply to message #1495730] Sat, 27 December 2014 17:46 Go to previous messageGo to next message
Peter Pfeifer is currently offline Peter PfeiferFriend
Messages: 213
Registered: November 2014
Senior Member

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
Re: Complete Scout Newbie [message #1536347 is a reply to message #1531850] Tue, 30 December 2014 06:38 Go to previous message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1252
Registered: October 2011
Senior Member
Peter Pfeifer wrote on Sat, 27 December 2014 18:46
Since I have got a little more time to play around with Scout in my vacation, I have to say thanks.

Nice to hear that Wink


Peter Pfeifer wrote on Sat, 27 December 2014 18:46
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.

It is nice to open separated threads for each problem/findings. It helps everyone to follow the topic he is interested in.

If someone find this thread and want to follow some of your unanswered questions:
* 2/ see: Toolbar in Tablepage
* 3/ see: Define Layout of Perspective and its Views

Previous Topic:Executing "store service" with date field adds 'TO_DATE' to the SQL. Function unknow to
Next Topic:If you try the developer preview version Mars M4
Goto Forum:
  


Current Time: Thu Apr 18 03:32:23 GMT 2024

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

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

Back to the top