The 1000 steps program to MDriven Chapter 12

Add an image attribute to brand - make sure it shows in various places. Drop the autoforms - make sure the access-rights for editing checks who can set brand and registration number

Are you looking for the start you find it here Chapter 1, link to chapter 11

Video link: https://youtu.be/N4xW-CS02sE

365 Adopt the Autoform AutoFormBrandOfCar and rename it to ManageBrand

366 Rename the Class action that brings that form up to have the same name as the form

367 Delete the 2 actions that now show errors due to use of vCurrent_<oldname>

368 Delete all the viewModelColumns except the Name

369 Make sure you understand the opt-in-opt-out for actions

370 Add a image - BrandImage :Blob to class BrandOfCar

371 Add a column that shows BrandImage in ManageBrand view

372 Remove the presentation from the BrandImage column

373 Start the application - upload images to the different brands

374 Add a new ViewModel to seek for BrandOfCar, name it BandSeeker, use the UIFirst to get a copy of SeekerAutoForm-logic

375 Set sortorder on Global Action BrandOfCar, make sure  you understand how Action order is handled in menus

376 Drop all the autoforms from the model, note that a lot of actions and viewmodels are now removed from the app

377 Note that that the logic to jump on first click is in effect whenever there is only 1 available navigating action

378 Right click the the BrandOfCar class and check the UsedBy list - find out where BrandOfCar is used and add the BrandImage to these places

379 Make sure you try a few of the ways to find the proper expression for showing the BrandImage from the different contextes, "Add Column", "Add column from model", "manual expression typing"

380 Fix up the NewCar action that does not have a view (since it pointed to an AutoForm that we dropped) - make it show view ProperCarView

381 Add a SingleLinkWithSetter/Picker/Combobox in ProperCarView to set the BrandOfCar link, call the column BrandOfCarForAdmin

382 Note the access issues with ProperCarView, anyone can set the BrandOfCar

383 Fix the ReadOnly expression to only allow admin to change the BrandOfCar

384 Run the app; Check with your two users - a and b - where a is admin and tb is not - verify that you understand the readonly expression

385 Go back to the app - and make the BrandOfCarForAdmin column invisible for anyone not being admin - do this by checking the FollowEnable box behind the VisibleExpression

386 Then we discover that the RegistrationNumber can be changed by anyone... - Fix this by first setting the accessGroup IsAdministrator on the action NewCar

387 Move the readOnly expression from combobox BrandOfCarForAdmin to the readOnly expression for the whole ProperCarView

File:ModelAfterChapter12.zip

Next chapter Chapter 13

This page was edited 25 days ago on 04/12/2024. What links here