Agreed but this is just my little effort for anyone who has similar requirements.
<code> [i-Level Change] To allow to store the status of the BizObj, under Classes | iBizness.vcx | iBizObj | Modify | Class menu
New Property: nViewStatus | Visibility: Public | Description: Status of the view connected to this BizObj | click Add | click Close
New Method: ViewStatus | Visibility: Public | Description: Returns the Status of the view connected to this BizObj | click Add | click Close
Properties | Others | nViewStatus: 0 Properties | Methods | ViewStatus
RETURN iif(thisform.bomaccounts.nviewstatus = 0, IIF(thisform.bomaccounts.ischanged(), "Edited", "View"), "Adding")
OR
RETURN iif(thisform.bomaccounts.nviewstatus = 0, IIF(thisform.bomaccounts.ischanged(), 1, 0), 2)
[i-Level Change] To allow to store the status of the BizObj, under Classes | iBizness.vcx | iBizObj | Modify | Properties | Methods | AfterNew: LPARAMETERS tuRetVal DODEFAULT(tuRetVal) THIS.nViewStatus = 1 AfterSave: LPARAMETERS tuRetVal DODEFAULT(tuRetVal) THIS.nViewStatus = 0 AfterCancel: LPARAMETERS tuRetVal DODEFAULT(tuRetVal) THIS.nViewStatus = 0 </code>
<i><font color="#663300"><i><font color="#663300">I'll definately give it a try. Thanks. Just a thought, maybe if it is useful then how about adding properties in BO for the Add and Edit. If both are false then it is View.</font></i>
No, this won't be part of the framework. If you want to implement modal editing, then you should do it in your i-layer classes. But it is contrary to the whole design of Codebook apps. </font></i>
Regards Bhavbhuti ©2002 Bhavbhuti Nathwani |