Usina BRAdvPL Guide
Sign in
← All topics
CLASSPublished

FWFormView

FWFormView():New()

Defines the presentation layer of a Protheus MVC routine.

MVCInterface
01 · OVERVIEW

Overview

Builds the visual layer of an MVC routine and connects its interface components to the corresponding model substructures.

02 · SYNTAX

Syntax

FWFormView():New()
03 · PRACTICAL EXAMPLE

Basic view definition

Static Function ViewDef()
    Local oView := FWFormView():New()
    oView:SetModel(FWLoadModel("CADPROD"))
    oView:AddField("VIEW_MASTER", FWFormStruct(2, "SB1"), "MASTER")
Return oView
Expected result

The view loads the model and connects a field component to the MASTER submodel.

BEST PRACTICES
  • Keep presentation concerns in the view.
  • Associate each component with the correct submodel.

Related content

REFERENCES
  1. TOTVS. AdvPL using MVC. Official 134-page PDF documentation, generated June 1, 2018; related content reviewed August 2, 2026.
Status
Published
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