3

I havee this variable in my controller

public Categoria cat {Get;Set;}

If I print this one {!cat} in my visualforce the result is:

Categoria:[isSelect=true, nombre=asdasdad]

The problem is when I try to access to the element isSelect

if i use {!Cat.isSelect} I get an error (Unknown Property)

what is the problem?

4
  • @lopex Is Categoria a class name?
    – manjit5190
    Commented Oct 9, 2015 at 12:47
  • yes, is a inner class inside the extension controller public class Categoria{ Boolean isSelect {get;set;} String nombre {get;set;} public Categoria(){} } Commented Oct 9, 2015 at 12:48
  • 1
    As you said that it is an inner class, I believe you the inner class isSelect should be public and also it should have {get;set;} i.e. it should be defined as public class Categoria { public String isSelect {get;set;} public String nombre{get;set;} } Please add public access modifier
    – manjit5190
    Commented Oct 9, 2015 at 12:51
  • Writing an answer so that anyone else with same issue can can find it in future.
    – manjit5190
    Commented Oct 9, 2015 at 13:06

2 Answers 2

4

As you said that it is an inner class, I believe you the inner class variable isSelect should be public and also it should have getter setter.

It should be defined as

public class Categoria 
{ 
     public String isSelect {get;set;} 
     public String nombre{get;set;} 
} 

Please add public access modifier

1

Solved.I forgot the access modifier 'public' in the inner class.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .