nevermind the whole problem was I was using rendered instead of c:if
this form using c:if is working great.
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:s="http://jboss.org/schema/seam/taglib"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:c="http://java.sun.com/jsp/jstl/core"
template="/WEB-INF/incl/layout/template.xhtml">
<ui:define name="head">
<style type="text/css">
.login-panel {
border-style: solid;
border-width: 1px;
padding: 1px;
background-color: #FFFFFF;
border-color: #C4C0B9;
}
.login-panel-header {
background-color: #D4CFC7;
background-image: url("#{oxAuthConfigurationService.getImgLocation()}/panel_header_bg.png");
background-position: left top;
background-repeat: repeat-x;
border-style: solid;
border-width: 1px;
padding: 2px;
border-color: #D4CFC7;
color: #000000;
font-family: Arial, Verdana, sans-serif;
font-size: 11px;
font-weight: bold;
}
.login-panel-body {
padding: 10px;
color: #000000;
font-family: Arial, Verdana, sans-serif;
font-size: 11px;
}
</style>
</ui:define>
<ui:define name="pageTitle">
<h:outputText value="#{messages['login.pageTitle']}"/>
</ui:define>
<ui:define name="body">
<table border="0" align="center">
<tr>
<td>
<div>
<h:form id="loginForm">
<s:token/>
<h:panelGroup rendered="#{not identity.loggedIn}">
<div class="login-panel">
<div class="login-panel-header">
<h:outputText value="#{messages['login.login']}"/>
</div>
<div class="login-panel-body">
<ui:param name="client"
value="#{clientService.getClient(sessionAttributes['client_id'])}"/>
<s:div rendered='#{!empty client.getLogoUri()}'>
<h:graphicImage url='#{client.getLogoUri()}'/>
</s:div>
<p class="info">
<!--<h:outputText value="#{messages['login.pleaseLoginHere']}"/>-->
</p>
<c:if test="#{client.getClientName() != 'DCXM'}">
<div class="dialog" oncopy="return false;" onpaste="return false;">
<h:panelGrid columns="3" border="0" rowClasses="prop"
columnClasses="name,value,hint">
<h:outputLabel for="username" value="#{messages['login.username']}"/>
<h:inputText id="username"
value="#{credentials.username}" autocomplete="off"/>
<h:outputText value=""/>
<h:outputLabel for="password" value="#{messages['login.password']}"/>
<h:inputSecret id="password"
value="#{credentials.password}" autocomplete="off"/>
<h:outputText value=""/>
<!-- <h:outputLabel for="rememberMe"
value="#{messages['login.rememberMe']}"/>
<h:selectBooleanCheckbox id="rememberMe"
value="#{rememberMe.enabled}"/>-->
<h:outputText value=""/>
</h:panelGrid>
</div>
</c:if>
<c:if test="#{client.getClientName() == 'DCXM'}">
<div class="dialog" oncopy="return false;" onpaste="return false;" >
<h:panelGrid columns="3" border="0" rowClasses="prop"
columnClasses="name,value,hint">
<h:outputLabel for="username" value="#{messages['login.username']}" style="font-size:20pt"/>
<h:inputText id="username"
value="#{credentials.username}" autocomplete="off" style="width:480px;height:80px;font-size:28pt"/>
<h:outputText value=""/>
<h:outputLabel for="password" value="#{messages['login.password']}" style="font-size:20pt"/>
<h:inputSecret id="password"
value="#{credentials.password}" autocomplete="off" style="width:480px;height:80px;font-size:28pt"/>
<h:outputText value=""/>
<!-- <h:outputLabel for="rememberMe"
value="#{messages['login.rememberMe']}"/>
<h:selectBooleanCheckbox id="rememberMe"
value="#{rememberMe.enabled}"/>-->
<h:outputText value=""/>
</h:panelGrid>
</div>
</c:if>
<s:div rendered='#{!empty client.getPolicyUri()}'>
<p>
<h:outputText value="#{messages['common.agreePolicy']}"/>
<a target="_blank" href='#{client.getPolicyUri()}'>
<h:outputText value="#{messages['common.privacyPolicy']}"/>
</a>
</p>
</s:div>
<s:div rendered='#{!empty client.getTosUri()}'>
<p>
<h:outputText value="#{messages['common.pleaseReadTheTos']}"/>
<a target="_blank" href='#{client.getTosUri()}'>
<h:outputText value="#{messages['common.termsOfService']}"/>
</a>
</p>
</s:div>
<div class="actionButtons" style="overflow: hidden">
<div style="float:left;">
<c:if test="#{client.getClientName() != 'DCXM'}">
<h:commandButton id="loginButton"
value="#{messages['login.login']}"
action="#{authenticator.authenticate}"/>
<s:div id="registerId" style="display:none">
<h:commandButton id="registerButton"
value="#{messages['login.register']}"
action="#{authenticator.authenticate}"/>
</s:div>
</c:if>
<c:if test="#{client.getClientName() == 'DCXM'}">
<h:commandButton id="loginButton"
value="#{messages['login.login']}"
action="#{authenticator.authenticate}" style="width:100px;height:60px;font-size:24pt;"/>
<s:div id="registerId" style="display:none">
<h:commandButton id="registerButton"
value="#{messages['login.register']}"
action="#{authenticator.authenticate}"/>
</s:div>
</c:if>
</div>
<s:div id="forgotpasswordPPdiv" style="float:right;margin-right:77px" rendered="#{client.getClientName() == 'Patient Portal'}">
<input type="button" id="forgotPasswordButton1"
value="Forgot Password"
onclick="navToPatientPortalForgotPassword();" style="width:100px;height:26px;font-size:8pt;white-space:normal"
/>
</s:div>
<s:div id="forgotpasswordDCXMdiv" style="float:right;margin-right:77px" rendered="#{client.getClientName() == 'DCXM'}">
<input type="button" id="forgotPasswordButton2"
value="Forgot Password"
onclick="navToPatientPortalForgotPassword();" style="width:100px;height:60px;font-size:16pt;white-space:normal"
/>
</s:div>
<s:div id="forgotpasswordAPMdiv" style="float:right;margin-right:77px" rendered="#{client.getClientName() == 'Admin Portal'}">
<input type="button" id="forgotPasswordButton3"
value="Forgot Password"
onclick="navToAdminPortalForgotPassword();" style="width:100px;height:26px;font-size:8pt;white-space:normal"
/>
</s:div>
</div>
</div>
</div>
<div class="login-panel">
<s:fragment rendered="#{external_auth_request_uri != Null}">
<a id="externalAuthButton"
href="#{external_auth_request_uri}">
<input type="button" value="Use External Authentification"/>
</a>
</s:fragment>
<s:fragment rendered="#{external_registration_uri != Null}">
<a id="externalRegistrationButton" href="#{external_registration_uri}">
<input type="button" value="Register new user"/>
</a>
</s:fragment>
</div>
</h:panelGroup>
</h:form>
</div>
</td>
</tr>
</table>
<script type="text/javascript">
window.onload = function () {
var userNameField = document.getElementById("loginForm:username");
var passwordField = document.getElementById("loginForm:password");
var userName = '#{!empty loginAction.loginHint ? loginAction.loginHint : ""}';
if (userName) {
userNameField.value = userName;
userNameField.readOnly = true;
passwordField.focus();
} else {
userNameField.focus();
}
var displayRegister = #{display_register_action or sessionAttributes['display_register_action']};
if (displayRegister) {
var registerButton = document.getElementById("loginForm:registerId");
if (registerButton != null) {
registerButton.style.display = 'inline';
}
}
};
function navToPatientPortalForgotPassword(){
var navUrl = "https://dev.medicationconx.com/web/vitality/sign-in?p_p_id=58&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_58_struts_action=%2Flogin%2Fforgot_password";
window.location.href = navUrl;
}
function navToAdminPortalForgotPassword(){
var navUrl = "https://dev.admin.medicationconx.com/web/vcm/sign-in?p_p_id=58&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_58_struts_action=%2Flogin%2Fforgot_password";
window.location.href = navUrl;
}
</script>
</ui:define>
</ui:composition>