<sun:page id="page1">
    <!beforeCreate
    setResourceBundle(key="i18n" bundle="com.sun.enterprise.tools.admingui.resources.Strings")
	setResourceBundle(key="help" bundle="com.sun.enterprise.tools.admingui.resources.Helplinks")
    />     
   <event>
        <!beforeCreate
        setPageSessionAttribute(key="configName", value="$requestParameter{configName}");
        getSecuritySettings(ConfigName="#{configName}", Audit=>$attribute{audit}, Principal=>$attribute{principal}, Password=>$attribute{password}, RoleMapping=>$attribute{roleMapping}, Mapped=>$attribute{mapped}, Realm=>$attribute{realm}, Module=>$attribute{module}, Jacc=>$attribute{jacc}, Properties=>$page{props});
        getTableList(Properties="#{props}", TableList=>$attribute{tableList});
        />   
    </event>   
    #include "shared/restart.inc"
    <sun:html id="html2">
        <sun:head id="propertyhead" title="$resource{i18n.security.Security}">
            <sun:script url="../js/restart.js" />
        </sun:head>
        <sun:body id="body3" onLoad="javascript: synchronizeRestartRequired('#{requestScope.restartRequired}', '#{sessionScope.restartRequired}')">
            <sun:form id="propertyForm">
#include treeBreadcrumbs.inc
#include "alertMsg.inc"
                <!-- Page Title -->
                <sun:title id="propertyContentPage" title="$resource{i18n.security.Security}" 
                helpText="$resource{i18n.security.SecurityPageHelp}">
                    <sun:button id="loadDefaults" style="margin-left: 8pt"  primary="#{false}"  text="$resource{i18n.button.LoadDefaults}" >    
                        <!command
                            getSecurityDefaultAttributes(
                            ConfigName="#{configName}", 
                            Audit=>$attribute{audit}, 
                            Principal=>$attribute{principal}, 
                            Password=>$attribute{password}, 
                            RoleMapping=>$attribute{roleMapping}, 
                            Mapped=>$attribute{mapped}, 
                            Realms=>$attribute{realm}, 
                            Modules=>$attribute{module},
                            Jaccs=>$attribute{jacc}); 
                            />
                    </sun:button>
                    <!-- Buttons  -->                    
                    <!facet pageButtonsTop>
#include "configuration/securityButtons.inc"
                    </facet>  
                    </sun:title>
                    <!-- PropertySheet .... -->
                    <sun:propertySheet id="propertySheet">			 
                        <!-- Text Field section -->               
                        <sun:propertySheetSection id="propertSectionTextField">
                            <event>
                              <!beforeCreate
                                getSecurityManager(objectName="com.sun.appserv:type=java-config,config=#{configName},category=config", securityManagerEnabled=>$attribute{securityManagerStatus});
                                getRealms(ConfigName="#{configName}", Realms=>$attribute{realms}); 
                                getJaccs(ConfigName="#{configName}", Jacc=>$attribute{jaccs});
                                getAuditModules(ConfigName="#{configName}", AuditModules=>$attribute{aModules});
                              />   
                            </event>
                            <sun:property id="securityManagerProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.SecurityManager}">                           
                                <sun:checkbox label="Enabled" selected="#{requestScope.securityManagerStatus}" > 
                               </sun:checkbox>
                            </sun:property>                       
                            <sun:property id="auditLoggingProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.AuditLogging}" helpText="$resource{i18n.security.AuditLoggingHelp}">                           
                                <sun:checkbox label="Enabled" selected="#{requestScope.audit}" /> 
                            </sun:property>                        
                          <sun:property id="defaultRealmProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.DefaultRealm}" helpText="$resource{i18n.security.DefaultRealmHelp}">
                                <sun:dropDown id="DefaultRealm" items="$attribute{realms}" selected="#{requestScope.realm}">
                                </sun:dropDown>
                            </sun:property>
                            <sun:property id="defaultPrincipalProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.DefaultPrincipal}" helpText="$resource{i18n.security.DefaultPrincipalHelp}">
                                <sun:textField id="DefaultPrincipal" columns="$int{55}" text="#{requestScope.principal}"/> 
                            </sun:property>    
                            <sun:property id="defaultPrincipalPasswordProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.DefaultPrincipalPassword}" helpText="$resource{i18n.security.DefaultPrincipalPasswordHelp}">
                                <sun:textField id="DefaultPrincipalPassword" columns="$int{55}" text="#{requestScope.password}"/> 
                            </sun:property>    
                          <sun:property id="jaccProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.Jacc}" helpText="$resource{i18n.security.JaccHelp}">
                                <sun:dropDown id="Jacc" items="$attribute{jaccs}" selected="#{requestScope.jacc}">
                                </sun:dropDown>
                            </sun:property>                         
                         <sun:property id="auditModulesProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.AuditModules}" helpText="$resource{i18n.security.AuditModulesHelp}">
                                <sun:listbox id="AuditModules" items="$attribute{aModules}" selected="#{requestScope.module}" rows="$int{4}">
                                </sun:listbox>
                            </sun:property>   
                           <sun:property id="roleMappingProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.RoleMapping}" helpText="$resource{i18n.security.RoleMappingHelp}">                           
                                <sun:checkbox label="Enabled" selected="#{requestScope.roleMapping}" /> 
                            </sun:property>                        
                            <sun:property id="mappedPrincipalClassProp"  labelAlign="left" noWrap="#{true}" overlapLabel="#{false}" label="$resource{i18n.security.MappedPrincipalClass}" helpText="$resource{i18n.security.MappedPrincipalClassHelp}">
                                <sun:textField id="MappedPrincipalClass" columns="$int{55}" text="#{requestScope.mapped}"/> 
                            </sun:property>    
                                        
                            "<br /><br />
                        </sun:propertySheetSection>

                    </sun:propertySheet>    
#include "propertyTable.inc"
                <sun:title id="propertyContentPage2">     
                    <!facet pageButtonsBottom>
#include "configuration/securityButtons.inc"
                    </facet>  
                </sun:title>
	<sun:hidden id="helpKey" value="$resource{help.security}" />
            </sun:form>
        </sun:body>
#include "changeButtonsJS.inc"         
    </sun:html>
</sun:page>
