0

class code:

public list<innerclass> inclass= new list<innerclass>();
 public class innerclass
    {
        public string accountid{get; set;}
        public string accountname{get; set;}
        public set<string> Rid=new set<string>();
        public set<string> Rvalue =new set<string>();
        public innerclass(string Accountid1,String accountname1,list<string> Rid1,list<string> Rvalue1)
        {
            if(Rid.containsAll(Rid1)==False)
            {
                accountname=accountname1;
                Accountid=Accountid1;
                Rid.addall(Rid1);
                rvalue.addAll(rvalue1);
            }
        } 
    }

vf page code:

<apex:column headerValue="name" value="{!av.accountname}"/>
     <apex:column value="{!av.Rid}"/> 

 </apex:PageBlockTable>

But it gives

error:Error Error: Unknown property 'checkbox4.innerclass.rid'

0

There are two problems:

  • Rid is a collection (a Set) not a single value so that is a design problem; hard to see what your innerclass aims to do i.e. why you want multiple values there
  • To make it accessible in Visualforce it needs to be exposed as an Apex Property just as accountname is exposed

Best you edit your question to explain more what you are trying to do to get a more definite answer.

PS

If you make Rid a property you can output the multiple values using e.g.:

<apex:column>
    <apex:repeat value="{!av.Rid}" var="item">
        {!item}<br/>
    </apex:repeat>
</apex:column>
| improve this answer | |
  • I want only set of rid to page – satishh Dec 2 '16 at 11:10
  • Is it possible or not??? – satishh Dec 2 '16 at 11:39
  • @satishh I've added a PS. – Keith C Dec 2 '16 at 12:19
  • thanks @ps but Rid is a set which is present inside inner class – satishh Dec 2 '16 at 12:28
  • @satishh Yes I realise that and have given you all the information I can. If its not enough wait for a better answer. – Keith C Dec 2 '16 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.