2

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?

  • @lopex Is Categoria a class name? – manjit5190 Oct 9 '15 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(){} } – lopez.regalado.fj Oct 9 '15 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 Oct 9 '15 at 12:51
  • Writing an answer so that anyone else with same issue can can find it in future. – manjit5190 Oct 9 '15 at 13:06
3

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

0

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

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.