function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
parasparas 

call a string list from page editor to display the list

Hi,
 
I  have a list of type string and have some value in that list . i want those values to be displayed on the page .So i am calling this string list from the page editor :my code goes like this
 
public List<String> getDisplayTags()
{
List<AccountTag> tags= [select Name from AccountTag];
List<String> StringList= new List<String>();
List<AccountTag> finallist= new List<AccountTag>();
   for(Integer j=0;j<tags.size();j++)
   {
   StringList.add(tags[j].Name);
   System.debug('StringList='+StringList);
   }
   System.debug('StringList before sorting='+StringList);
   StringList.sort();
   System.debug('StringList='+StringList);
     for(Integer i=0;i<StringList.size();i++)
      {
     
     
       if(StringList[i]==StringList[i+1])
        {
       
         count=count+1;
         System.debug('Count='+Count);
         if(count>=2)
           {
            UniqueStringList.add(StringList[i]);
            System.debug('UniqueStringList='+UniqueStringList);
           }
        }
     
return UniqueStringList;
      }

      
I am getting an error :
Error: Unknown property 'String.Name'
LumingLuming
how did you define UniqueStringList?
parasparas
i defined it as List<String> UniqueStringList =new List<String>();


Message Edited by paras on 11-25-2008 07:45 PM