Skip to content

Instantly share code, notes, and snippets.

Avatar

Joe Young jyoung

View GitHub Profile
@jyoung
jyoung / TOH Navigation Bar Click
Created Mar 15, 2018
LANSA Tour Of Heroes Navigation Bar Click Event
View TOH Navigation Bar Click
evtroutine handling(#NavigationBarPanel.Clicked) view(#pView)
#ApplicationController.NavigateTo( #pView )
endroutine
@jyoung
jyoung / TOH Show View
Created Mar 15, 2018
LANSA Tour Of Heroes Show View
View TOH Show View
mthroutine name(ShowView)
define_map for(*INPUT) class(#PRIM_ALPH) name(#pViewId)
define_com class(#PRIM_ALPH) name(#lPreviousViewId)
if (#mViews<#pViewId> *Is *NULL)
#SYS_WEB.Alert( ("Missing &1").Substitute( #pViewId ) )
return
endif
@jyoung
jyoung / TOH Copy Parameters
Created Mar 15, 2018
LANSA Tour Of Heroes Copy URL Parameters
View TOH Copy Parameters
* copy known query parameters to the navigation parameters
for each(#lParameter) in(#SYS_WEB.URLParameters)
case of_field(#lParameter.Name.UpperCase)
when (= TRACE)
#mParameters<#lParameter.Name> := #lParameter.Value
when (= DEVELOPER)
#mParameters<#lParameter.Name> := #lParameter.Value
when (= DEBUG)
#mParameters<#lParameter.Name> := #lParameter.Value
@jyoung
jyoung / TOH Url Changed
Created Mar 15, 2018
LANSA Tour Of Heroes URL Changed Event
View TOH Url Changed
evtroutine handling(#SYS_WEB.URLChanged)
define_com class(#PRIM_ALPH) name(#lViewId)
#lViewId := #ApplicationController.GetURLParameter( VIEW ).UpperCase
#SYS_APPLN.TraceMessageText( ("URL Changed. View: &1").Substitute( #lViewId ) )
if (#lViewId = *BLANKS)
#lViewId := TOHDSHP01
endif
@jyoung
jyoung / TOH Web Page View Panels
Created Mar 13, 2018
LANSA Tour Of Heroes Pt 2 View Panel Definitions
View TOH Web Page View Panels
* =====================================================================================
* VIEW PANELS
* =====================================================================================
define_com class(#DashboardViewPanel2) name(#DashboardPanel) parent(#ViewContainerPanel) visible(False) displayposition(2) tabposition(2)
define_com class(#HeroesViewPanel2) name(#HeroesPanel) parent(#ViewContainerPanel) visible(False)
define_com class(#HeroDetailViewPanel2) name(#HeroDetailPanel) displayposition(3) parent(#ViewContainerPanel) visible(False) tabposition(3)
@jyoung
jyoung / TOH Web Page Create Instance
Last active Mar 13, 2018
LANSA Tour Of Heroes Pt 2 Adding Views to Collection
View TOH Web Page Create Instance
evtroutine handling(#COM_OWNER.CreateInstance)
#mViews<TOHDSHP01> <= #DashboardPanel
#mViews<TOHHROP01> <= #HeroesPanel
#mViews<TOHHROP03> <= #HeroDetailPanel
endroutine
@jyoung
jyoung / TOH Navigation Bar
Created Mar 13, 2018
LANSA Tour Of Heroes Pt 2 Navigation Bar
View TOH Navigation Bar
function options(*DIRECT)
begin_com role(*EXTENDS #PRIM_PANL) displayposition(1) height(57) left(0) tabposition(1) top(0) width(500) layoutmanager(#MainPanelLayout)
* =====================================================================================
* LAYOUTS
* =====================================================================================
define_com class(#PRIM_TBLO) name(#MainPanelLayout)
define_com class(#PRIM_TBLO.Row) name(#LayoutRow1) displayposition(1) parent(#MainPanelLayout)
define_com class(#PRIM_TBLO.Column) name(#LayoutColumn1) displayposition(1) parent(#MainPanelLayout)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem1) alignment(CenterLeft) column(#LayoutColumn1) manage(#DashboardLabel) parent(#MainPanelLayout) row(#LayoutRow1) sizing(ContentWidth) flow(Right) marginbottom(5) marginleft(5) marginright(5) margintop(5)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem2) alignment(CenterLeft) column(#LayoutColumn1) manage(#HeroesLabel) parent(#MainPanelLayout) row(#LayoutRow1) sizing(Co
@jyoung
jyoung / TOH Heroes View Panel
Created Mar 13, 2018
LANSA Tour Of Heroes Pt 2 Heroes View Panel
View TOH Heroes View Panel
function options(*DIRECT)
begin_com role(*EXTENDS #ViewPanel) style(#Style1) layoutmanager(#Layout1)
define_com class(#PRIM_VS.Style) name(#Style1) borderbottom(1) borderbrush(#Brush1) borderleft(1) borderright(1) bordertop(1)
define_com class(#PRIM_VS.SolidBrush) name(#Brush1) color(0:255:58)
define_com class(#PRIM_TBLO) name(#Layout1)
define_com class(#PRIM_TBLO.Row) name(#LayoutRow1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Column) name(#LayoutColumn1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem1) alignment(TopLeft) column(#LayoutColumn1) manage(#Label1) parent(#Layout1) row(#LayoutRow1) sizing(None)
@jyoung
jyoung / TOH Web Page
Created Mar 13, 2018
LANSA Tour Of Heroes Pt 2 Web Page
View TOH Web Page
begin_com role(*EXTENDS #PRIM_WEB) layoutmanager(#MainPanelLayout) theme(#PrimaryTheme)
* =====================================================================================
* STYLES
* =====================================================================================
define_com class(#PRIM_VS.Style) name(#Style1) borderbottom(1) borderbrush(#Brush1) borderleft(1) borderright(1) bordertop(1)
define_com class(#PRIM_VS.SolidBrush) name(#Brush1) color(2:255:30)
* =====================================================================================
* LAYOUTS
* =====================================================================================
@jyoung
jyoung / TOH Dashboard View Panel
Last active Mar 13, 2018
LANSA Tour Of Heroes Pt 2 Dashboard View Panel
View TOH Dashboard View Panel
function options(*DIRECT)
begin_com role(*EXTENDS #ViewPanel) style(#Style1) layoutmanager(#Layout1)
define_com class(#PRIM_VS.Style) name(#Style1) borderbottom(1) borderbrush(#Brush1) borderleft(1) borderright(1) bordertop(1)
define_com class(#PRIM_VS.SolidBrush) name(#Brush1) color(0:15:255)
define_com class(#PRIM_TBLO) name(#Layout1)
define_com class(#PRIM_TBLO.Row) name(#LayoutRow1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Column) name(#LayoutColumn1) displayposition(1) parent(#Layout1)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem1) alignment(TopLeft) column(#LayoutColumn1) manage(#Label1) parent(#Layout1) row(#LayoutRow1) sizing(None)
You can’t perform that action at this time.