|Re: Re-use Table class used in TablePage and in Form [message #1816811 is a reply to message #1816799]
||Thu, 07 November 2019 13:33
|| Andre Wegmueller
Registered: September 2012
Location: Baden-Dättwil, Switzerla...
You try to re-use the same table in a TablePage and in a Form, additionally you probably want to re-use the same service to fill that table in the TablePage and in the Form (I guess that's why you asked about the @Data annotation), right?
Well, i have bad and good news :-)
The bad news is, even when you use the same AbstractMyTable class in your TablePage and in your Form the Scout SDK generates two different RowData classes for the table. Thus you cannot fill them with the same service method. As a workaround you could make a service method that returns a plain Java bean, use that same service in the TablePage and in the Form and map the properties from the bean manually to the table.
The good news is, you can re-use a TablePage in a Form with the AbstractPageField. We have discussed that approach in this thread. By implementing the execInitField() method of the PageField you can set some columns to visibleGranted=false, so they show up in the TablePage, but not in the form.
Eclipse Scout Homepage | Documentation | GitHub
Powered by FUDForum
. Page generated in 0.01995 seconds