function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kmorf_entransformkmorf_entransform 

actionRegion

when i use actionRegion the text of outputlabel changes. why does the text change and how can i fix it. here is the code.

for example, the text  for <apex:outputlabel value="Projects" for="values" />  appears different than

<apex:outputField value="{!proj.Name}"/>



<apex:page controller="editProject" >
<apex:form >
<apex:pageBlock >
 <apex:pageBlockButtons >
        <apex:commandButton value="Save" action="{!save}"/>
        <apex:commandButton value="Cancel" action="{!cancel}"/>
        
      </apex:pageBlockButtons>  

  
      <apex:pageBlockSection >
          <apex:pageblocksectionItem >
          <apex:actionRegion >
          <apex:outputlabel value="Projects" for="values" />         
         <apex:selectList value="{!projName}" size="1" id="values">             
        <apex:actionSupport event="onchange" action="{!filterProj}" reRender="op" />              
        <apex:selectOptions value="{!allProj}"/>          
        </apex:selectList>  
        </apex:actionRegion>  
         
        </apex:pageblocksectionItem>    
      
      </apex:pageBlockSection>
      
      
      <apex:outputPanel id="op" >
      <apex:pageBlock >
          <apex:pageBlockSection columns="2">
          <apex:outputField value="{!proj.Name}"/>
          <apex:outputField value="{!proj.Expense_Budget__c}"/>
          <apex:outputField value="{!proj.Billable_hours__c}"/>
          <apex:outputField value="{!proj.Location__c}"/>
     </apex:pageBlockSection>
    </apex:pageBlock>
   
    
    <apex:pageBlock title="Edit Project">
           
         
    <apex:pageBlockSection >
        <apex:pageBlockSectionItem >
            <apex:actionRegion >
            <apex:outputlabel value="Status " for="values" />          
           <apex:selectList value="{!status}" size="1" id="values">             
            <apex:actionSupport event="onchange" reRender="newvalue" />              
            <apex:selectOptions value="{!projStatus}"/>          
            </apex:selectList>
            </apex:actionRegion>
       </apex:pageBlockSectionItem>   
       </apex:pageBlockSection> 
       
       <apex:outputpanel id="newvalue">
       <apex:outputpanel rendered="{!status == '--Other--'}">       
                
        <div style="position:relative;left:0px;"> 
        <apex:outputlabel value="new value  " for="newval1"/>                            
          <apex:inputText value="{!status}" id="newval1"/>              
              </div>            
        </apex:outputpanel>
        </apex:outputpanel>
           
         
           
        </apex:pageBlock>
        </apex:outputPanel>
        </apex:pageBlock>
         
</apex:form>  
</apex:page>

 

Big EarsBig Ears

Can you try shifting the actionregion tags to just surround the input component?

 

Like so:

 

<apex:pageblocksectionItem >
   <apex:outputlabel value="Projects" for="values" />
   <apex:actionregion>
      <apex:selectList value="{!projName}" size="1" id="values">             
         <apex:actionSupport event="onchange" action="{!filterProj}" reRender="op" />              
         <apex:selectOptions value="{!allProj}"/>          
      </apex:selectList>  
   </apex:actionRegion>  
</apex:pageblocksectionItem>