All,
I've created a Visualforce component which takes an instance of an Apex wrapper class as an attribute. However, when I attempt to insert the component into a VF page, I get the following error when trying to save:
Wrong type for attribute <c:ea1_outcomeaction action="com.sun.faces.application.MethodBindingMethodExpressionAdapter@e94c054f">. Expected EA1_OutcomeAction, found MethodBindingMethodExpressionAdapter
The type "EA1_OutcomeAction" is the wrapper class. To debug, I've commented out all of the wrapper class out and all of the contents of the component (with the exception of the attribute declaration) and I'm still getting this error. It seems like a pretty deep Java error. Has anybody else seen this before?
Wrapper class
public with sharing class EA1_OutcomeAction{
//Completely commented everything out.
}
Component Markup
<apex:component >
<apex:attribute name="action" type="EA1_OutcomeAction" Description="The instance of Apex Class OutcomeAction"/>
</apex:component
Page Code
<apex:page controller="EA1_DummyCode">
<c:EA1_OutcomeAction action="{!act}"/>
</apex:page>
Page Controller
public with sharing class EA1_DummyCode {
public EA1_OutcomeAction act{get; set;}
}