Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:page>
- <apex:outputPanel id="blockPanel">
- <c:subBlockCmp projectObject="{!projectObject}" />
- </apex:outputPanel>
- </apex:page>
- -----------------------------------------------
- <apex:component controller="ProjectController" language="{!LOWER(projectObject.Primary_Contact__r.Language_Selected__c)}" >
- <script>
- window.onload = function() {
- reloadLabel();
- }
- </script>
- <apex:outputPanel rendered="true">
- <apex:attribute name="projectObject" type="ProjectObject__c" description="This is the projectObject attribute for the component."/>
- <apex:actionFunction action="{!reloadLabel}" name="reloadLabel" rerender="blockPanel"/>
- <apex:outputPanel>
- <apex:inputTextarea value="{!projectObject.SampleText__c}"/>
- </apex:outputPanel>
- </apex:outputPanel>
- </apex:component>
- public class ProjectController{
- public ProjectObject__c projectObject;
- public ProjectController(){
- projectObject = new ProjectObject__c();
- projectObject.SampleText__c = Label.SampleText;
- }
- public void reloadLabel(){
- // Label.SampleText with the changed language attribute in the component
- projectObject.SampleText__c = Label.SampleText;
- }
- }
Add Comment
Please, Sign In to add comment