Hello Support.
I need to confirm the ability for Aware IM to implement a certain functionality concerning dynamic form generation.
The Project: An online reporting & building management system.
Problem: Login page - easy navigation through 'click' reduction.
Details: Our reporting & building management system will be configured to automatically generate end of month reports. An email notificaiton will be sent to a list of registered users, with the instructions to click a link and be directed to a login page.
The million dollar question: Concerning the email notification, would it be possible to embed in the URL link, the user name to instruct Aware IM to create the login page with the username form attribute populated (with the username), and the focus on the password form attribute. This may seem 'frivolous', but necessary for our clientelle.
Dynamic Form Creation
Are you looking for something like that ?
http://localhost:8080/AwareIM/logon.do? ... ingMode=on
This URL brings me into testing mode of my BusinessSpace DispoSys.
http://localhost:8080/AwareIM/logon.do? ... ingMode=on
This URL brings me into testing mode of my BusinessSpace DispoSys.
-
- Posts: 7523
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
The URL that Hubertus recommends will bring you into the system directly bypassing the login altogether. But, as far as I understand, you want users to specify the password and populate the user name automatically?
This cannot be done using the standard login page. However, you can modify the standard login page to support pre-population (see the code below - highlighted lines are those you have to add to the standard logonOp.jsp page). Then do the following:
1. Copy and paste the code below and create your own file with jsp extension, for example myLogin.jsp.
2. Put this file into the AwareIMRoot/Tomcat/shared/webapps/AwareIM directory
3. Embed the following URL into the text of your e-mail:
http://yourhost:8080/AwareIM/myLogin.jsp?username=xxx
where instead of "xxx" you will have the name of your user.
So here is the code:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/cc-forms.tld" prefix="forms" %>
<%@ taglib uri="/WEB-INF/cc-controls.tld" prefix="ctrl" %>
<%@ taglib uri="/WEB-INF/cc-utility.tld" prefix="util" %>
<%@ page import="com.bas.webapp.actions.LogonNoValidationBean" %>
<html>
<head>
<util:jsp directive="includes"/>
</head>
<body onload="init()" topmargin="10" >
<%
String customName = (String) request.getParameter ("username");
if (customName != null)
{
LogonNoValidationBean bean = (LogonNoValidationBean) session.getAttribute ("LogonNoValidationBean");
if (bean == null)
{
bean = new LogonNoValidationBean ();
session.setAttribute ("LogonNoValidationBean", bean);
}
bean.setUsername (customName);
}
%>
<ctrl:headline caption="Logon" detail="Specify credentials for logging into the system" />
<br>
<forms:message caption="Error" severity="error" formid="err"/>
<forms:message caption="Information" severity="information" formid="info"/>
<table border="0" width="100%" >
<tr>
<td align="center" >
<html:form action="/logonOp.do" focus="username" >
<html:hidden name="LogonNoValidationBean" property="domain" />
<forms:form type="edit" locale="true" caption="logon.title" formid="frmLoginOp" width="300">
<forms:text label="Logon.username" property="username" size="16" maxlength="70" required="true" />
<forms:password label="Logon.password" property="password" size="16" maxlength="70"/>
<forms:buttonsection align="right">
<forms:button styleId="btnLogon" name="btnLogon" src="fw/def/image/buttons/app/buttons/btnLogon1.gif"/>
</forms:buttonsection>
</forms:form>
</html:form>
</td>
</tr>
</table>
<util:jsp directive="endofpage"/>
</body>
</head>
</html>
This cannot be done using the standard login page. However, you can modify the standard login page to support pre-population (see the code below - highlighted lines are those you have to add to the standard logonOp.jsp page). Then do the following:
1. Copy and paste the code below and create your own file with jsp extension, for example myLogin.jsp.
2. Put this file into the AwareIMRoot/Tomcat/shared/webapps/AwareIM directory
3. Embed the following URL into the text of your e-mail:
http://yourhost:8080/AwareIM/myLogin.jsp?username=xxx
where instead of "xxx" you will have the name of your user.
So here is the code:
<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/cc-forms.tld" prefix="forms" %>
<%@ taglib uri="/WEB-INF/cc-controls.tld" prefix="ctrl" %>
<%@ taglib uri="/WEB-INF/cc-utility.tld" prefix="util" %>
<%@ page import="com.bas.webapp.actions.LogonNoValidationBean" %>
<html>
<head>
<util:jsp directive="includes"/>
</head>
<body onload="init()" topmargin="10" >
<%
String customName = (String) request.getParameter ("username");
if (customName != null)
{
LogonNoValidationBean bean = (LogonNoValidationBean) session.getAttribute ("LogonNoValidationBean");
if (bean == null)
{
bean = new LogonNoValidationBean ();
session.setAttribute ("LogonNoValidationBean", bean);
}
bean.setUsername (customName);
}
%>
<ctrl:headline caption="Logon" detail="Specify credentials for logging into the system" />
<br>
<forms:message caption="Error" severity="error" formid="err"/>
<forms:message caption="Information" severity="information" formid="info"/>
<table border="0" width="100%" >
<tr>
<td align="center" >
<html:form action="/logonOp.do" focus="username" >
<html:hidden name="LogonNoValidationBean" property="domain" />
<forms:form type="edit" locale="true" caption="logon.title" formid="frmLoginOp" width="300">
<forms:text label="Logon.username" property="username" size="16" maxlength="70" required="true" />
<forms:password label="Logon.password" property="password" size="16" maxlength="70"/>
<forms:buttonsection align="right">
<forms:button styleId="btnLogon" name="btnLogon" src="fw/def/image/buttons/app/buttons/btnLogon1.gif"/>
</forms:buttonsection>
</forms:form>
</html:form>
</td>
</tr>
</table>
<util:jsp directive="endofpage"/>
</body>
</head>
</html>
Aware IM Support Team
Thanks for the replies
Thank you and will give this a try.