I have an app for which I rolled my own login screen. I recently decided to use the Security Login capability in place of my own. I followed the proper videos and nearly got all working. After creating the new login component and embedding the original main component, I changed the Index.a5w file to point to the Login component instead of the Main component. My new error is attached which says that the tmpl_MAIN.alias sub-element does not exist. I don't know what value to use for the alias. I tried "LOGIN", but that sent the web app into an infinite loop that wouldn't let me enter the login credentials. Can anyone help me here?
Here are the Index.a5w contents:
Delete tmpl_MAIN
DIM tmpl_MAIN as P
tmpl_MAIN = a5w_load_component("Login") ''SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE (LOAD:Main)
'Override settings start -----------------------------------------
with tmpl_MAIN
.alias = "MAIN"
_dialogFilename = "Login"
end with
'Override settings end -----------------------------------------
delete x_MAIN
dim x_MAIN as p
x_MAIN = a5w_run_Component(tmpl_MAIN) 'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE (RUN:tmpl) (EDIT:Main)
?x_MAIN.Output.Head.JavaScript
?x_MAIN.Output.Head.CSS_Link
?x_MAIN.Output.Head.Title
%>
<!--Alpha Five Temporary Code Start - Will be automatically removed when page is published -->
<!--CSS for tmpl -->
<link rel="stylesheet" type="text/css" href="file:///C:/Program Files (x86)/a5V12/css/iOS/style.css">
<!--Alpha Five Temporary Code End -->
</head>
<body class=iOSPage><%a5 ?x_MAIN.Output.Body.Dialog2_HTML %>
</body></html>
Here are the Index.a5w contents:
Delete tmpl_MAIN
DIM tmpl_MAIN as P
tmpl_MAIN = a5w_load_component("Login") ''SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE (LOAD:Main)
'Override settings start -----------------------------------------
with tmpl_MAIN
.alias = "MAIN"
_dialogFilename = "Login"
end with
'Override settings end -----------------------------------------
delete x_MAIN
dim x_MAIN as p
x_MAIN = a5w_run_Component(tmpl_MAIN) 'SYSTEM GENERATED COMMENT - PLEASE DO NOT REMOVE (RUN:tmpl) (EDIT:Main)
?x_MAIN.Output.Head.JavaScript
?x_MAIN.Output.Head.CSS_Link
?x_MAIN.Output.Head.Title
%>
<!--Alpha Five Temporary Code Start - Will be automatically removed when page is published -->
<!--CSS for tmpl -->
<link rel="stylesheet" type="text/css" href="file:///C:/Program Files (x86)/a5V12/css/iOS/style.css">
<!--Alpha Five Temporary Code End -->
</head>
<body class=iOSPage><%a5 ?x_MAIN.Output.Body.Dialog2_HTML %>
</body></html>
Comment