You need to sign in to do that
Don't have an account?
pramod1.3932219482734224E12
How to pass value from component controller to page controller?
Component: <apex:component controller="componentController">
<apex:attribute name="value" required="true" type="object" description="need to pass selectedValue to page."/>
</apex:component>
Component Controller:
public class componentController{
public String selectedValue {get; set;}
}
Page:
<apex:page controller="pageController">
<apex:form > <apex:outputText value="{!selectedValue}/>
</apex:page>
Page Controller:
public class pageController {
public String selectedValue {get; set;}
}
<apex:attribute name="value" required="true" type="object" description="need to pass selectedValue to page."/>
</apex:component>
Component Controller:
public class componentController{
public String selectedValue {get; set;}
}
Page:
<apex:page controller="pageController">
<apex:form > <apex:outputText value="{!selectedValue}/>
</apex:page>
Page Controller:
public class pageController {
public String selectedValue {get; set;}
}
Agustina Garcia
You would need to use a single controller for the component and the page, and call in the page to the componet. Look at this example, and the result if we open the page in the browser.