Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

FWExecView, FWLoadModel, FWLoadView and FWMVCMenu

Separates MVC loading, presentation and menu roles.

FWExecView, FWLoadModel, FWLoadView and FWMVCMenuAdvPL
01 · OVERVIEW

Overview

FWLoadModel/FWLoadView retrieve program definitions without necessarily displaying or saving. FWExecView displays the View and returns 0 for OK and 1 for Cancel. A supplied oModelAct must already be active and its operation overrides argument three. FWMVCMenu supplies default MenuDef options; its official example returns that structure despite Nil in the syntax line. The fragment prepares uninvoked calls for an existing owned program. Localized loading uses the name without country suffix. (Sources: refs. 1–4.)

03 · PRACTICAL EXAMPLE

Commented example

// Fragment: owned program already provides ModelDef and ViewDef.
bModel := {|cProgram| FWLoadModel(cProgram)}
bView := {|cProgram| FWLoadView(cProgram)}
bMenu := {|cProgram| FWMVCMenu(cProgram)}
// Do not evaluate: omitted operation defaults to viewing.
bOpen := {|cProgram| FWExecView("Review",cProgram)}
Expected result

Prepared blocks; no model loaded, window opened or data saved. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Define model ownership and cleanup; verify cancellation and permissions.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FWExecView. TDN. Accessed on 2026-10-27.
  2. TOTVS. FWLoadModel. TDN. Accessed on 2026-10-27.
  3. TOTVS. FWLoadView. TDN. Accessed on 2026-10-27.
  4. TOTVS. FWMVCMenu. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha