Package com.centraview.common

Examples of com.centraview.common.EntityList


        DisplayList displaylistSession = ( DisplayList )session.getAttribute( "displaylist") ;

        DisplayList displaylist = ( DisplayList )request.getAttribute( "displaylist") ;

        EntityList DL = new EntityList();
        ListGenerator lg = ListGenerator.getListGenerator(dataSource);
        if( displaylist == null  )
        {

          String searchString = "ADVANCE:SELECT entityid FROM vendor  ";
          DL = ( EntityList )lg.getEntityList( userobjectd.getIndividualID(), 1,listpreference.getRecordsPerPage() , searchString ,listpreference.getSortElement());
          if (DL == null)
          {
            DL = new EntityList();
          }

          DisplayList DL1 = lg.getDisplayList(DL.getListID() );
          DL1.setListType("Vendor");
          DL.setListType("Vendor");
          DL.setPrimaryTable("vendor");
          DL1.setTotalNoOfRecords(DL.size());
          DL.setTotalNoOfRecords(DL.size());
        }
        else
        {
          String searchSession = displaylistSession.getSearchString();
          String searchrequest = displaylist.getSearchString();

          if(searchSession == null)
            searchSession = "";
          if(searchrequest == null)
            searchrequest = "";

          if (( (displaylistSession.getListID() == displaylist.getListID() ) &&
                ( displaylist.getDirtyFlag() == false ) &&
                ( displaylist.getStartAT() >= displaylistSession.getBeginIndex() ) &&
                ( displaylist.getEndAT()<=displaylistSession.getEndIndex() ) &&
                (displaylist.getSortMember().equals(displaylistSession.getSortMember()) &&
                (displaylist.getSortType()==(displaylistSession.getSortType())) &&
                (searchSession.equals(searchrequest)) )) ||
                displaylist.getAdvanceSearchFlag() == true)
          {
            DL = (EntityList)displaylistSession;
            DL.setListType("Vendor");
            DL.setPrimaryTable("vendor");
            DL.setTotalNoOfRecords(DL.size());
            request.setAttribute("displaylist" , displaylistSession );
          }
          else
          {
            DL = ( EntityList )lg.getEntityList( displaylist );
            DisplayList DL1 = lg.getDisplayList(DL.getListID() );
            DL1.setListType("Vendor");
            DL.setListType("Vendor");
            DL.setPrimaryTable("vendor");
            DL1.setTotalNoOfRecords(DL.size());
            DL.setTotalNoOfRecords(DL.size());
          }
        }


        Set listkey = DL.keySet();
        Iterator it =  listkey.iterator();
        while( it.hasNext() )
        {
          String str = ( String )it.next();

          StringMember sm=null;
          ListElement ele  = ( ListElement )DL.get( str );
          sm = ( StringMember )ele.get("Name" );
          sm.setRequestURL("openPopup('ViewEntityDetail.do?rowId="+ele.getElementID()+"&listId="+DL.getListID()+"')");
          sm = ( StringMember )ele.get("PrimaryContact" );
          IntMember im = (IntMember) ele.get("IndividualID");
          sm.setRequestURL("openPopup('ViewIndividualDetail.do?rowId="+((Integer)im.getMemberValue()).intValue()+"&listId="+DL.getListID()+"')");
          sm = ( StringMember )ele.get("Website");
          sm.setRequestURL("openWindowWithTool('"+sm.getDisplayString()+"')");
          sm = ( StringMember )ele.get("Email" );
          sm.setRequestURL("openWindows('mail/Compose.do?to="+sm.getDisplayString()+"',720,585,'')");
        }
View Full Code Here


  public void ejbRemove()  { }
  public void ejbCreate() throws CreateException{ }

  public EntityList getAllEntityList( int userId, HashMap preference)
  {
    EntityList  entityList = null;
    try
    {
      InitialContext ic = CVUtility.getInitialContext();
      ContactListLocalHome home = (ContactListLocalHome)ic.lookup("local/ContactList");
      ContactListLocal remote =  home.create();
View Full Code Here

TOP

Related Classes of com.centraview.common.EntityList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.