Multiple List Maintenance Form Example  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Multiple List Maintenance Form Example

Postby SBarnes » Thu Sep 15, 2016 4:05 pm

Hi All,

Is there an example plugin that uses JiwaApplication.MultiListMaintenance.UserInterface that is similar to the Widget List plugin that Mike kindly provided and I have been able to follow and create maintenance screens from?

If one doesn't exist is there somewhere in the Jiwa code base that could be viewed a .net reflection tool that would be enough to get me started, as I realize creating one from scratch could be quite involved?

What I am trying to achieve is a screen with two tabs the first will be a list driven off a table and once these values are updated, they could then be used into the second tab to calculate values for user but still give them the option to override the values and then write the data back to the database from both tabs. I know how to create the necessary entities to read and write to the database and the corresponding Jiwa collections needed for these.

I have already worked out that the Business logic property of the form has a lists property attached to it so I am assuming this is part of how the form works.

Any help you could give would be appreciated as always.

Thanks.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Multiple List Maintenance Form Example  Topic is solved

Postby SBarnes » Sun Sep 18, 2016 1:25 pm

Well I've been able answer my own question.

Attached is a copy of a multi list maintenance screen plugin that is an extension of Mike's original widget plugin, that now does widgets and gadgets. The gadgets is a direct copy of widgets just to a different database table called Gadgets, the script is in the documents for the plugin.

The difference to the list screen is indeed the Lists property of the business logic object and also calling AddList on the form such as the two lines of code below, this call does all the work of adding the tabs and creating the jiwa grids for the list, the grid then gets associated to the list by being placed in its tag property.

this.AddList<Widget, WidgetCollection>(new WidgetCollection(), "Widgets");
this.AddList<Gadget, GadgetCollection>(new GadgetCollection(), "Gadgets");

The rest of the code then is largely a duplication of the events for the two grids and lists based upon Mike's original example, the only difference was I had to add constructors to the Widget and Gadget objects to set the RecID to a guid at creation and write this value back into the grid column in the line change events.

Hopefully someone find this proof of concept example useful. To use it you will need to add the plugin under forms maintenance and then add a menu item through the interface.
Attachments
plugin.zip
Multi list sample
(182.56 KiB) Downloaded 605 times
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191

Re: Multiple List Maintenance Form Example

Postby SBarnes » Fri Aug 14, 2020 8:10 am

Updated version for Jiwa 7.2.1, be sure to run the sql script under documents.
Attachments
Plugin Sample Plugin - Multi List Maintenance.xml
Widgets and Gadgets Plugin
(296.44 KiB) Downloaded 459 times
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1696
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 191


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests