The 1000 steps program to MDriven Chapter 17
No edit summary
No edit summary
Line 13: Line 13:
Video for chapter 17: https://youtu.be/m1oer_jjQh4
Video for chapter 17: https://youtu.be/m1oer_jjQh4


{| class="wikitable"
531. Change the name of a Association that has  data in it - what happens on evolve with exiting data
|531
 
|Change the name of a Association that has  data in it - what happens on evolve with exiting data
532. Update the versions on MDrivenServer
|-
 
|532
533. Follow the discussion of where foreign keys are stored in the database
|Update the versions on MDrivenServer
 
|-
534. Rename the CarFactory.BrandOfCar and check with changes what would happen
|533
 
|Follow the discussion of where foreign keys are stored in the database
535. Follow the discussion of Former-Names and understand benefit to move data  when things change in the db
|-
 
|534
536. Follow the discussion of the rename-function vs just changing the name
|Rename the CarFactory.BrandOfCar and check with changes what would happen
 
|-
537. In the CarFactoryView - amend the action CreateAndAddCodumentForSales  according to the video
|535
 
|Follow the discussion of Former-Names and understand benefit to move data  when things change in the db
538. Follow the discussion what ViewModel column names that has underscore in  them
|-
 
|536
539. Follow the discussion on whay it is unnecessary to set both ends of an  association in MDriven
|Follow the discussion of the rename-function vs just changing the name
 
|-
540. Amend the expression for CreateAndAddCodumentForSales to set the selected  Car
|537
 
|In the CarFactoryView - amend the action CreateAndAddCodumentForSales  according to the video
541. Add the Cars registration and State to the DocumentForSales grid
|-
 
|538
542. Discover that The we actually use the state machine to create the  paperwork for a sale
|Follow the discussion what ViewModel column names that has underscore in  them
 
|-
543. Clean up the model according to the video
|539
 
|Follow the discussion on whay it is unnecessary to set both ends of an  association in MDriven
544. Set up the rule to stop deletion of the PaperWork as long as a is not in  InOwnershipTransaction
|-
 
|540
545. Create a new Viewmodel named CarDealerPicker - by using UIHints  CopyValueStore autoForm
|Amend the expression for CreateAndAddCodumentForSales to set the selected  Car
 
|-
546. Move the global action into the Views manuGroup
|541
 
|Add the Cars registration and State to the DocumentForSales grid
547. Clean up un needed columns from the DocumentForSales grid
|-
 
|542
548. Add an action in DocumentForSales grid - call it PickBuyer
|Discover that The we actually use the state machine to create the  paperwork for a sale
 
|-
549. Create a new ViewModelAction that bring up our the new CarDealerPicker  viewModel - call that also PickBuyer
|543
 
|Clean up the model according to the video
550. Set the PickBuyer viewmodel action as "Is modal"
|-
 
|544
551. When you show a dialog as modal you must give an expression to decide  when the "Ok" button in the modal should show - set it to  vCurrent_CarDealer->notempty
|Set up the rule to stop deletion of the PaperWork as long as a is not in  InOwnershipTransaction
 
|-
552. When you have a dialig as model - you can also perfom something specific  upon the user pressing OK - This is called the Expression after modal ok. In  our case we want to  vCurrent_DocumentForSales.Buyer:=vModalResult_vCurrent_CarDealer
|545
 
|Create a new Viewmodel named CarDealerPicker - by using UIHints  CopyValueStore autoForm
553. Save model - and upload it to MDrivenServer
|-
 
|546
554. Test to assign a buyer - see that the CarDealer-picker shows - but it is  empty
|Move the global action into the Views manuGroup
 
|-
555. Go to Views/CarDealerPicker - and use the left side actions to create 3  dealers - give them names - save
|547
 
|Clean up un needed columns from the DocumentForSales grid
556. Navigate back to the CarFactoryView and test the Pick buyer button again
|-
 
|548
557. Verify that the DeleteDocumentForSales readonly rule works as designed -  not allowing delete of paperwork in a Ownership transaction
|Add an action in DocumentForSales grid - call it PickBuyer
 
|-
558. Initiate sale of a new car. Verify that you cannot do Initiate sale on a  car that already is in a Ownership transaction
|549
 
|Create a new ViewModelAction that bring up our the new CarDealerPicker  viewModel - call that also PickBuyer
559. Follow the discussion in the video on why the report does not work any  longer.
|-
 
|550
560. Follow the discussion on how to get a access to the servers own adress  from within our model
|Set the PickBuyer viewmodel action as "Is modal"
 
|-
561. Follow the discussion on methods tagged with Eco.ExternalLateBound tag  value
|551
 
|When you show a dialog as modal you must give an expression to decide  when the "Ok" button in the modal should show - set it to  vCurrent_CarDealer->notempty
562. In the report template viewmodel  TheTemplateForCarTransferOwnersdhipDocumentReport change the TemplateUrl  expression to NOT return a hard coded server address but rather ask the system for the correct server address just in time.
|-
 
|552
563. Upload the model and test to produce the document.
|When you have a dialig as model - you can also perfom something specific  upon the user pressing OK - This is called the Expression after modal ok. In  our case we want to  vCurrent_DocumentForSales.Buyer:=vModalResult_vCurrent_CarDealer
 
|-
|553
|Save model - and upload it to MDrivenServer
|-
|554
|Test to assign a buyer - see that the CarDealer-picker shows - but it is  empty
|-
|555
|Go to Views/CarDealerPicker - and use the left side actions to create 3  dealers - give them names - save
|-
|556
|Navigate back to the CarFactoryView and test the Pick buyer button again
|-
|557
|Verify that the DeleteDocumentForSales readonly rule works as designed -  not allowing delete of paperwork in a Ownership transaction
|-
|558
|Initiate sale of a new car. Verify that you cannot do Initiate sale on a  car that already is in a Ownership transaction
|-
|559
|Follow the discussion in the video on why the report does not work any  longer.
|-
|560
|Follow the discussion on how to get a access to the servers own adress  from within our model
|-
|561
|Follow the discussion on methods tagged with Eco.ExternalLateBound tag  value
|-
|562
|In the report template viewmodel  TheTemplateForCarTransferOwnersdhipDocumentReport change the TemplateUrl  expression to NOT return a hard coded server address but rather ask the system for the correct server address just in time.
|-
|563
|Upload the model and test to produce the document.
|}


[[File:AfterChapter17.zip|none|thumb]]
[[File:AfterChapter17.zip|none|thumb]]

Revision as of 06:40, 28 July 2023

This is Chapter 17. If you want to go back to the beginning, you can find it here: Chapter 1

Go back to Chapter 16: The_1000_steps_program_to_MDriven_Chapter_16

Default names, dim default, plural suffix, what happens when the model is changed - is your data lost?

Modal window - pick a seller

Check valid action based on current state with oclIsInState

Make use of GetSystemURL Eco.ExternalLateBound function to make our report work on any server

Video for chapter 17: https://youtu.be/m1oer_jjQh4

531. Change the name of a Association that has data in it - what happens on evolve with exiting data

532. Update the versions on MDrivenServer

533. Follow the discussion of where foreign keys are stored in the database

534. Rename the CarFactory.BrandOfCar and check with changes what would happen

535. Follow the discussion of Former-Names and understand benefit to move data when things change in the db

536. Follow the discussion of the rename-function vs just changing the name

537. In the CarFactoryView - amend the action CreateAndAddCodumentForSales according to the video

538. Follow the discussion what ViewModel column names that has underscore in them

539. Follow the discussion on whay it is unnecessary to set both ends of an association in MDriven

540. Amend the expression for CreateAndAddCodumentForSales to set the selected Car

541. Add the Cars registration and State to the DocumentForSales grid

542. Discover that The we actually use the state machine to create the paperwork for a sale

543. Clean up the model according to the video

544. Set up the rule to stop deletion of the PaperWork as long as a is not in InOwnershipTransaction

545. Create a new Viewmodel named CarDealerPicker - by using UIHints CopyValueStore autoForm

546. Move the global action into the Views manuGroup

547. Clean up un needed columns from the DocumentForSales grid

548. Add an action in DocumentForSales grid - call it PickBuyer

549. Create a new ViewModelAction that bring up our the new CarDealerPicker viewModel - call that also PickBuyer

550. Set the PickBuyer viewmodel action as "Is modal"

551. When you show a dialog as modal you must give an expression to decide when the "Ok" button in the modal should show - set it to vCurrent_CarDealer->notempty

552. When you have a dialig as model - you can also perfom something specific upon the user pressing OK - This is called the Expression after modal ok. In our case we want to vCurrent_DocumentForSales.Buyer:=vModalResult_vCurrent_CarDealer

553. Save model - and upload it to MDrivenServer

554. Test to assign a buyer - see that the CarDealer-picker shows - but it is empty

555. Go to Views/CarDealerPicker - and use the left side actions to create 3 dealers - give them names - save

556. Navigate back to the CarFactoryView and test the Pick buyer button again

557. Verify that the DeleteDocumentForSales readonly rule works as designed - not allowing delete of paperwork in a Ownership transaction

558. Initiate sale of a new car. Verify that you cannot do Initiate sale on a car that already is in a Ownership transaction

559. Follow the discussion in the video on why the report does not work any longer.

560. Follow the discussion on how to get a access to the servers own adress from within our model

561. Follow the discussion on methods tagged with Eco.ExternalLateBound tag value

562. In the report template viewmodel TheTemplateForCarTransferOwnersdhipDocumentReport change the TemplateUrl expression to NOT return a hard coded server address but rather ask the system for the correct server address just in time.

563. Upload the model and test to produce the document.


File:AfterChapter17.zip

Next Chapter: The_1000_steps_program_to_MDriven_Chapter_18

This page was edited 23 days ago on 04/26/2024. What links here