Function SET184A
* =======================================================
* Process ........: SET_184
* Function .......: SET184A
* Created on .....: 26/07/00 at 14:43:32
* Description ....: Everything about Web Browselists
* Version.........: 1
*
* Full Description: The purpose of this function is to
* demonstrate the options available for the modification
* of browselists in LANSA for the Web.
*
* Disclaimer: The following material is supplied as an
* example only. No warranty is expressed or implied.
*
*
* Receives: nothing
*
* =======================================================
* Function control options
FUNCTION OPTIONS(*DIRECT *WEBEVENT)
*
* Group and field definitions
*
GROUP_BY NAME(#S_GRPPANL) FIELDS((#S_184FDES *INPUT *NOID) (#S_FUNDES *HIDDEN) (#S_HOSTURL *HIDDEN) (#S_HOSTPRT *HIDDEN) (#STDRENTRY *HIDDEN) (#S_WKURL *HIDDEN))
*
*
DEFINE FIELD(#S_WKURL) TYPE(*CHAR) LENGTH(1) DESC('URL, port, image-path change required')
*
*
DEF_LIST NAME(#S_184AAPP) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
DEF_LIST NAME(#S_184AAPC) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
DEF_LIST NAME(#S_184AENF) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
DEF_LIST NAME(#S_184AADF) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
*
* Mainline
*
*
CHANGE FIELD(#S_FUNDES) TO(*FUNCTION_DESC)
*
EXECUTE SUBROUTINE(LOADLISTS)
*
CASE OF_FIELD(#STDRENTRY)
WHEN VALUE_IS('= *blanks')
CHANGE FIELD(#STDRENTRY) TO(Y)
WHEN VALUE_IS('= Y')
*
* the user may have made a change to:
* #S_IFSPATH, or may have typed a new URL when
* starting the browser
EXECUTE SUBROUTINE(CHK_SYSVAR)
ENDCASE
*
* Determine whether *S_HOSTURL *S_HOSTPRT or *S_IFSPATH
* have been changed or need to be changed
*
* The javascript function GetLocationPort
* in the skeleton for process SET_184 will
* set #S_HOSTURL and #S_HOSTPRT
* to the values typed in by the user on their
* browser. It will do this as the web page is
* being displayed.
*
IF COND('(#S_HOSTURL *NE *S_HOSTURL) *OR (*S_HOSTURL *EQ *blanks) *OR (#S_HOSTPRT *NE *S_HOSTPORT) *OR (*S_IFSPATH *EQ *Blanks)')
* #S_WKURL is used in a condition in component SET184A
* which controls what the screen requests from the user
CHANGE FIELD(#S_WKURL) TO(Y)
ELSE
CHANGE FIELD(#S_WKURL) TO(N)
ENDIF
*
*
REQUEST FIELDS(#S_GRPPANL) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
*
IF COND('1 *EQ 2')
REQUEST BROWSELIST(#S_184AAPP) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
REQUEST BROWSELIST(#S_184AAPC) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
REQUEST BROWSELIST(#S_184AENF) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
REQUEST BROWSELIST(#S_184AADF) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
ENDIF
*
*
SUBROUTINE NAME(LOADLISTS)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Positioning a browselist within a page' ' ' 'Specific' SET184C APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Removing borders and column headings' ' ' 'Essential' SET184D APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Using a background color for the whole' 'browselist' 'Essential' SET184E APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Using a background color for alternate' 'rows' 'Essential' SET184F APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing browselist width, spacing and' 'background' 'Advanced' SET184G APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing layout of browselist row' ' ' 'Specific' SET184H APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing column heading font' 'and colors' 'Essential' SET184M APP)
*
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing font type, size and' 'foreground color' 'Essential' SET184I APC)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing cell width/height' 'and background color ' 'Specific' SET184J APC)
*
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Hyperlinking fields to another' 'function ' 'Essential' SET184K ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Hyperlinking fields to a static page' ' ' ' ' SET184L ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding an image' ' ' ' ' SET184N ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding a hyperlinked image to' 'another function ' ' ' SET184O ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding a hyperlinked image to' 'a static page' ' ' SET184P ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Using checkboxes or radio buttons' 'for entry selection' ' ' SET184Q ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding components in a' 'browselist' ' ' SET184R ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing the input/output mode of' 'fields in a column' ' ' SET184S ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing the input/output mode of' 'fields in a row' ' ' SET184T ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Sorting columns in a browselist' ' ' ' ' SET184U ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Page at a time browselist' ' ' ' ' SET184V ENF)
*
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('A do it yourself browselist' ' ' 'Advanced' SET184W ADF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('More than one input capable' 'browselist in a page' 'Advanced' SET184X ADF)
ENDROUTINE
*
SUBROUTINE NAME(ADDENTRY) PARMS(#S_184DEM1 #S_184DEM2 #S_184RAT #S_184LNK #S_184TYP)
DEFINE FIELD(#S_184TYP) TYPE(*CHAR) LENGTH(003) DESC('List Identifier')
DEFINE FIELD(#S_184DEM1) REFFLD(#S_184DEM)
DEFINE FIELD(#S_184DEM2) REFFLD(#S_184DEM)
USE BUILTIN(BCONCAT) WITH_ARGS(#S_184DEM1 #S_184DEM2) TO_GET(#S_184DEM)
*
CASE OF_FIELD(#S_184TYP)
WHEN VALUE_IS('= APP')
ADD_ENTRY TO_LIST(#S_184AAPP)
WHEN VALUE_IS('= APC')
ADD_ENTRY TO_LIST(#S_184AAPC)
WHEN VALUE_IS('= ENF')
ADD_ENTRY TO_LIST(#S_184AENF)
WHEN VALUE_IS('= ADF')
ADD_ENTRY TO_LIST(#S_184AADF)
ENDCASE
ENDROUTINE
*
* =======================================================
* Subroutine ....: CHK_SYSVAR
* Description ...: Update the Web system variables if reg
* =======================================================
SUBROUTINE NAME(CHK_SYSVAR)
*
DEF_LIST NAME(#PARM_NAME) FIELDS(#S_SVNAME) TYPE(*WORKING)
DEF_LIST NAME(#PARM_VALU) FIELDS(#S_SVCHVAL) TYPE(*WORKING)
CLR_LIST NAMED(#PARM_VALU)
CLR_LIST NAMED(#PARM_NAME)
*
* Update system variables if changed
IF COND('#S_IFSPATH *ne *S_IFSPATH')
CHANGE FIELD(#S_SVNAME) TO('''*S_IFSPATH''')
CHANGE FIELD(#S_SVCHVAL) TO(#S_IFSPATH)
ADD_ENTRY TO_LIST(#PARM_VALU)
ADD_ENTRY TO_LIST(#PARM_NAME)
ENDIF
*
IF COND('#s_hosturl *ne *s_hosturl')
CHANGE FIELD(#S_SVNAME) TO('''*S_HOSTURL''')
CHANGE FIELD(#S_SVCHVAL) TO(#S_HOSTURL)
ADD_ENTRY TO_LIST(#PARM_VALU)
ADD_ENTRY TO_LIST(#PARM_NAME)
ENDIF
*
IF COND('#s_hostprt *ne *s_hostport')
CHANGE FIELD(#S_SVNAME) TO('''*S_HOSTPORT''')
CHANGE FIELD(#S_SVCHVAL) TO(#S_HOSTPRT)
ADD_ENTRY TO_LIST(#PARM_VALU)
ADD_ENTRY TO_LIST(#PARM_NAME)
ENDIF
*
IF COND('(#s_hostprt *ne *s_hostport) or (#s_hosturl *ne *s_hosturl) or (#S_IFSPATH *ne *s_IFSPATH)')
CALL PROCESS(*DIRECT) FUNCTION(SETCHSV) PASS_LST(#PARM_NAME #PARM_VALU)
ENDIF
*
ENDROUTINE
*
* =======================================================
* Process ........: SET_184
* Function .......: SET184A
* Created on .....: 26/07/00 at 14:43:32
* Description ....: Everything about Web Browselists
* Version.........: 1
*
* Full Description: The purpose of this function is to
* demonstrate the options available for the modification
* of browselists in LANSA for the Web.
*
* Disclaimer: The following material is supplied as an
* example only. No warranty is expressed or implied.
*
*
* Receives: nothing
*
* =======================================================
* Function control options
FUNCTION OPTIONS(*DIRECT *WEBEVENT)
*
* Group and field definitions
*
GROUP_BY NAME(#S_GRPPANL) FIELDS((#S_184FDES *INPUT *NOID) (#S_FUNDES *HIDDEN) (#S_HOSTURL *HIDDEN) (#S_HOSTPRT *HIDDEN) (#STDRENTRY *HIDDEN) (#S_WKURL *HIDDEN))
*
*
DEFINE FIELD(#S_WKURL) TYPE(*CHAR) LENGTH(1) DESC('URL, port, image-path change required')
*
*
DEF_LIST NAME(#S_184AAPP) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
DEF_LIST NAME(#S_184AAPC) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
DEF_LIST NAME(#S_184AENF) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
DEF_LIST NAME(#S_184AADF) FIELDS(#S_184DEM #S_184RAT (#S_184LNK *INPUT))
*
* Mainline
*
*
CHANGE FIELD(#S_FUNDES) TO(*FUNCTION_DESC)
*
EXECUTE SUBROUTINE(LOADLISTS)
*
CASE OF_FIELD(#STDRENTRY)
WHEN VALUE_IS('= *blanks')
CHANGE FIELD(#STDRENTRY) TO(Y)
WHEN VALUE_IS('= Y')
*
* the user may have made a change to:
* #S_IFSPATH, or may have typed a new URL when
* starting the browser
EXECUTE SUBROUTINE(CHK_SYSVAR)
ENDCASE
*
* Determine whether *S_HOSTURL *S_HOSTPRT or *S_IFSPATH
* have been changed or need to be changed
*
* The javascript function GetLocationPort
* in the skeleton for process SET_184 will
* set #S_HOSTURL and #S_HOSTPRT
* to the values typed in by the user on their
* browser. It will do this as the web page is
* being displayed.
*
IF COND('(#S_HOSTURL *NE *S_HOSTURL) *OR (*S_HOSTURL *EQ *blanks) *OR (#S_HOSTPRT *NE *S_HOSTPORT) *OR (*S_IFSPATH *EQ *Blanks)')
* #S_WKURL is used in a condition in component SET184A
* which controls what the screen requests from the user
CHANGE FIELD(#S_WKURL) TO(Y)
ELSE
CHANGE FIELD(#S_WKURL) TO(N)
ENDIF
*
*
REQUEST FIELDS(#S_GRPPANL) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
*
IF COND('1 *EQ 2')
REQUEST BROWSELIST(#S_184AAPP) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
REQUEST BROWSELIST(#S_184AAPC) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
REQUEST BROWSELIST(#S_184AENF) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
REQUEST BROWSELIST(#S_184AADF) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
ENDIF
*
*
SUBROUTINE NAME(LOADLISTS)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Positioning a browselist within a page' ' ' 'Specific' SET184C APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Removing borders and column headings' ' ' 'Essential' SET184D APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Using a background color for the whole' 'browselist' 'Essential' SET184E APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Using a background color for alternate' 'rows' 'Essential' SET184F APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing browselist width, spacing and' 'background' 'Advanced' SET184G APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing layout of browselist row' ' ' 'Specific' SET184H APP)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing column heading font' 'and colors' 'Essential' SET184M APP)
*
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing font type, size and' 'foreground color' 'Essential' SET184I APC)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing cell width/height' 'and background color ' 'Specific' SET184J APC)
*
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Hyperlinking fields to another' 'function ' 'Essential' SET184K ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Hyperlinking fields to a static page' ' ' ' ' SET184L ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding an image' ' ' ' ' SET184N ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding a hyperlinked image to' 'another function ' ' ' SET184O ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding a hyperlinked image to' 'a static page' ' ' SET184P ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Using checkboxes or radio buttons' 'for entry selection' ' ' SET184Q ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Embedding components in a' 'browselist' ' ' SET184R ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing the input/output mode of' 'fields in a column' ' ' SET184S ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Changing the input/output mode of' 'fields in a row' ' ' SET184T ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Sorting columns in a browselist' ' ' ' ' SET184U ENF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('Page at a time browselist' ' ' ' ' SET184V ENF)
*
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('A do it yourself browselist' ' ' 'Advanced' SET184W ADF)
EXECUTE SUBROUTINE(ADDENTRY) WITH_PARMS('More than one input capable' 'browselist in a page' 'Advanced' SET184X ADF)
ENDROUTINE
*
SUBROUTINE NAME(ADDENTRY) PARMS(#S_184DEM1 #S_184DEM2 #S_184RAT #S_184LNK #S_184TYP)
DEFINE FIELD(#S_184TYP) TYPE(*CHAR) LENGTH(003) DESC('List Identifier')
DEFINE FIELD(#S_184DEM1) REFFLD(#S_184DEM)
DEFINE FIELD(#S_184DEM2) REFFLD(#S_184DEM)
USE BUILTIN(BCONCAT) WITH_ARGS(#S_184DEM1 #S_184DEM2) TO_GET(#S_184DEM)
*
CASE OF_FIELD(#S_184TYP)
WHEN VALUE_IS('= APP')
ADD_ENTRY TO_LIST(#S_184AAPP)
WHEN VALUE_IS('= APC')
ADD_ENTRY TO_LIST(#S_184AAPC)
WHEN VALUE_IS('= ENF')
ADD_ENTRY TO_LIST(#S_184AENF)
WHEN VALUE_IS('= ADF')
ADD_ENTRY TO_LIST(#S_184AADF)
ENDCASE
ENDROUTINE
*
* =======================================================
* Subroutine ....: CHK_SYSVAR
* Description ...: Update the Web system variables if reg
* =======================================================
SUBROUTINE NAME(CHK_SYSVAR)
*
DEF_LIST NAME(#PARM_NAME) FIELDS(#S_SVNAME) TYPE(*WORKING)
DEF_LIST NAME(#PARM_VALU) FIELDS(#S_SVCHVAL) TYPE(*WORKING)
CLR_LIST NAMED(#PARM_VALU)
CLR_LIST NAMED(#PARM_NAME)
*
* Update system variables if changed
IF COND('#S_IFSPATH *ne *S_IFSPATH')
CHANGE FIELD(#S_SVNAME) TO('''*S_IFSPATH''')
CHANGE FIELD(#S_SVCHVAL) TO(#S_IFSPATH)
ADD_ENTRY TO_LIST(#PARM_VALU)
ADD_ENTRY TO_LIST(#PARM_NAME)
ENDIF
*
IF COND('#s_hosturl *ne *s_hosturl')
CHANGE FIELD(#S_SVNAME) TO('''*S_HOSTURL''')
CHANGE FIELD(#S_SVCHVAL) TO(#S_HOSTURL)
ADD_ENTRY TO_LIST(#PARM_VALU)
ADD_ENTRY TO_LIST(#PARM_NAME)
ENDIF
*
IF COND('#s_hostprt *ne *s_hostport')
CHANGE FIELD(#S_SVNAME) TO('''*S_HOSTPORT''')
CHANGE FIELD(#S_SVCHVAL) TO(#S_HOSTPRT)
ADD_ENTRY TO_LIST(#PARM_VALU)
ADD_ENTRY TO_LIST(#PARM_NAME)
ENDIF
*
IF COND('(#s_hostprt *ne *s_hostport) or (#s_hosturl *ne *s_hosturl) or (#S_IFSPATH *ne *s_IFSPATH)')
CALL PROCESS(*DIRECT) FUNCTION(SETCHSV) PASS_LST(#PARM_NAME #PARM_VALU)
ENDIF
*
ENDROUTINE
*