You need to sign in to do that
Don't have an account?
Egui
Cannot read visualforce attribute from apex controlleur with custom VF component
Hello,
I'm facing an issue with a custom VF component and custom apex controlleur, the return value when reading attribute from it is still NULL.
Here is the VF component :
<apex:component controller="customControlleur"> <apex:attribute name="attribute" description="" assignTo="{!attribute}" type="String"></apex:attribute> </apex:component>
And the controlleur :
public class customController { public String attribute { get; set; } public customController() { system.debug('&&& attribute ' + attribute ); } }
I also tried what is described here, but with no more luck :
http://www.salesforce.com/us/developer/docs/pages/Content/pages_comp_cust_elements_controllers.htm
Any help would be greatly appreciated.
Thanks !
Here it is :
I hope this is just a typo but your Component refers to 'Custom Controlleur' (French) but the actual posted controller is 'CustomController'
I have also noted that in V27.0, the attribute name= and assignto= value may not be the same literal; that is use:
<apex:attribute name="attribute' assignTo='attr'/>
You're right, this is just a messing up with the language.
Just done another test with the following :
Component :
Controller :
and Page :
but still :
Change your attribute variable to following and check the debug log:
public String attribute {
get;
set {
System.debug('Attribute is : ' + value);
attribute = value;
}
}