if (currentAppli != null && currentRes != null) {
if (currentRes.getBaseDn() != null) {
ApplicationContext ctx = WebApplicationContextUtils
.getWebApplicationContext(pageContext
.getServletContext());
LdapTreeBuilder ldapTreeBuilder = (LdapTreeBuilder) ctx
.getBean("ldapTreeBuilder");
ldapTreeBuilder.setConnection(currentAppli.getConnection());
Set s = ldapTreeBuilder.getMandatoryAttributes(currentRes
.getBaseDn());
if (s == null) {
for (Iterator it2 = currentRes.getAttributes()
.iterator(); it2.hasNext();) {
Attribute a = (Attribute) it2.next();