Sun Java System Messenger Express 6 2005Q4 Customization Guide

ProcedureTo Include LDAP Attribute on Displayed Address Book Search Result

Steps
  1. Include the LDAP attribute pager to the list of LDAP attributes in the config attribute local.service.http.ldapaddresssearchattrs using the configutil utility:

    configutil -o local.service.http.ldapaddresssearchattrs -v "cn, mail, sn, telephoneNumber, pager"


    Note –

    Restart the Messaging server for the changes to take effect.


  2. Add the following line to the s_SearchCtrl() function in the lookup.fs file:


    ....
    '&nbsp;<select name="attr"\>\\n' +
    ....
    '<option value="'+ main.attr_list['telephonenumber']+
    '"\>Phone #</option\>\\n' +
    '<option value="'+ 
    main.attr_list['pager']+
    '""\>Pager #</option\>\\n' +
    '</select\>\\n' +
    ....
    
                   
  3. Add the following lines to the getSearchResults() function in the lookup.js file:


    if(forGroup) s = '<form name="form"\>\\n' + main.tableStart +
    ....
    '<td width=1% nowrap\><nobr\>' + main.font() + 
    (pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+
    '<td width=1% nowrap\><nobr\>' + 
    main.font() + (pab ?    i18n_lu['pager'] : i18n['ldap pager']) +'</td\>
    else s = '</form\><form name="form"\>\\n' + main.tableStart +
    '<td width=1% nowrap\><nobr\>' + main.font() +
     (pab ? i18n_lu['work'] : i18n['ldap phone']) '</td\>\\n'+
    '<td width=1% nowrap\><nobr\>' + 
    main.font() + (pab ?    i18n_lu['pager'] : i18n['ldap pager']) +'</td\>
    
    ....
    
    
                   
  4. Add the following lines to the lookup.js file:


    ....
    if (list[i].telephoneNumber)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].telephoneNumber) + '</td\>\\n';
    else if (list[i].telephonenumber)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].telephonenumber) + '</td\>\\n';
    else
    s += blank;
    if (list[i].pager)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].pager) + '</td\>\\n';
    else if (list[i].pager)
    s += '<td nowrap\>' + main.font() +
    main.unescape_crlf(list[i].pager) + '</td\>\\n';
    else
    s += blank;
    
    s += '\\n';
    }
    ....
    
    
                   
  5. Add the following line to the updatePabAttrList() function in the main.js file:


    ....
    attr_list['telephonenumber']=
    pabFrame.attrs?pabFrame.attrs.telephonenumber.name:'telephonenumber';
    attr_list['pager']=
    pabFrame.attrs?pabFrame.attrs.pager.name:'pager';
    ....