I encounter an issue where I use one of my inner classes in an apex:attribute of a VisualForce Component.
Based on this thread: Reference inner class in Visualforce component I refactored my code to work with an interface beside my initial inner class, now I have the following :
My interface :
public interface MyInterface {
Boolean getOne();
Boolean getTwo();
}
My class implementing it :
public class MyImp implements MyInterface {
public Boolean one{ get; set; }
public Boolean two { get; set; }
public Boolean getOne() {
return one;
}
public Boolean getTwo() {
return two;
}
}
My component :
<apex:component>
<apex:attribute name="entry" type="MyInterface " description=""/>
<!-- Different tests I made -->
{!entry} <!-- work but got all information on my object -->
{!entry.getOne()} <!-- does not work -->
{!entry.one} <!-- does not work -->
{!entry.getOne} <!-- does not work -->
</apex:component>
Unfortunately, it still does not work, as I cannot use my class properties in my VisualForce Page. I always encounter the issue of Unknown properties or Unknown functions depending on how my component is written.
I'm pretty sure that there is something obvious that I'm missing but I cannot find a solution for this.
Thanks for your help!