Amit,
Forgot this line before content below:
#set($userPrincipal=$request.getUserPrincipal())
Randy
Randy Watler wrote:
Amit,
Hope this helps:
Randy
...
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr height="82">
<td width="312" height="82"><img width="312" height="82"
src="content/layout/images/bannerleft.jpg" border="0"></td>
<td width="100%" height="82"
background="content/layout/images/banner.jpg">
<table width="100%" cellpadding="0" cellspacing="0"
border="0">
<tr height="82">
#if($myPage.defaultSkin != "nologin")
#if($userPrincipal)
#if(!$request.getSession().getAttribute("com.myco.user"))
#set($userPrincipalName=$userPrincipal.getName())
#if($userPrincipalName.indexOf("@") != -1)
#set($userPrincipalName=$userPrincipalName.substring(0,$userPrincipalName.indexOf("@")))
#end
<td height="82" class="Login">Welcome
${userPrincipalName}!</td>
$request.getSession().setAttribute("com.myco.user",$userPrincipalName)
#end
<!-- 10/06/2004 - temporarily remove logout
graphics and capability
<td height="82" class="Login"><a
href='$response.encodeURL("${request.getContextPath()}/login/logout")'
class="LoginLink"><img src="content/layout/images/logout.jpg"
border="0"></a></td>
-->
#else
#set($RETRYCOUNT='org.apache.jetspeed.login.retrycount')
#set($DESTINATION='org.apache.jetspeed.login.destination')
#set($USERNAME='org.apache.jetspeed.login.username')
#set($PASSWORD='org.apache.jetspeed.login.password')
#set($retryCount=$request.getSession().getAttribute($RETRYCOUNT))
#if($retryCount > 0)
<td height="82"
class="LoginError">Invalid username or password,<br>($retryCount
attempts), please try again:</td>
#end
<td height="82">
<form method="POST"
action='$response.encodeURL("${request.getContextPath()}/login/proxy")'
style="display:inline">
<input type="hidden"
name="$DESTINATION" value="${request.getRequestURL()}">
<table cellpadding="0"
cellspacing="0" border="0">
<tr><td
class="Login">Username</td><td><input type="text" size="15"
name="$USERNAME" onkeypress='var
focus=false;if(window.event){focus=(window.event.keyCode==13);}else
if(event){focus=(event.which==13);}if(focus)document.forms[0].elements[2].focus();'></td></tr>
<tr><td
class="Login">Password</td><td><input type="password" size="15"
name="$PASSWORD" onkeypress='var
submit=false;if(window.event){submit=(window.event.keyCode==13);}else
if(event){submit=(event.which==13);}if(submit)document.forms[0].submit();'></td></tr>
</table>
</form>
</td>
<td height="82" class="Login"><a
href='javascript:document.forms[0].submit();' class="LoginLink"><img
src="content/layout/images/login.jpg" border="0"></a></td>
#end
#end
<td width="100%" height="82" align="center"><img
src="content/layout/images/logo.gif" border="0"></td>
</tr>
</table>
</td>
<td width="4" height="82"><img width="4" height="82"
src="content/layout/images/bannerright.jpg" border="0"></td>
</tr>
</table>
...
Shah Amit wrote:
Hi all,
I need to put the login fields on the banner area which implies I
have to put them in the decorator. Now I use the existing mechanism
shipped with jetspeed without anychange, and till now I had the
"login portlet" that ships with jetspeed as a place holder.
In the login portlet, action for the html form is generated via c:url
taglibrary so it takes care of encoding it. How can I do it in
velocity :-( because the decorators are written in velocity.
Any helps, guidelines...
Thanks,
Amit
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]