Static Function ViewDef()
Local oModel := FWLoadModel( 'POC001' )
Local oViewPad := FWLoadView( 'POC001' )
Local oStruLoc := FWFormStruct(2, 'XXX',{|cCampo| ALLTRIM(cCampo) $ "XX_FILIAL|XX_NUM|XX_PRODUTO" })
Local oStruCab := oViewPad:GetViewStruct('VIEW_CAB') // Busca Estrutura do padrão
Local oStruItem := oViewPad:GetViewStruct('VIEW_DETAIL')// Busca Estrutura do padrão
Local oView := Nil
oView := FWFormView():New()
oView:SetModel(oModel)
oView:AddField('VIEW_CAB' , oStruCab , 'XXMASTER' )
oView:AddField('VIEW_LOC' , oStruLoc , 'XXLOC' )
oView:AddGrid( 'VIEW_DETAIL' , oStruItem, 'XXDETAIL' )
oView:CreateHorizontalBox( 'SUPERIOR', 20 )
oView:CreateHorizontalBox( 'MEIO' , 10 )
oView:CreateHorizontalBox( 'INFERIOR', 70 )
oView:SetOwnerView( 'VIEW_CAB' , 'SUPERIOR' )
oView:SetOwnerView( 'VIEW_LOC' , 'MEIO' )
oView:SetOwnerView( 'VIEW_DETAIL' , 'INFERIOR' )
Return oView |