+ Start a Discussion
Baktash H.Baktash H. 

Problems with actionregion

Hello,

my action region does not really work and i don't know why.

 


        <apex:actionRegion>
                 <apex:dataTable id="tableid" value="{!list}" var="i">
                            <apex:column value="{!i.Field__c}"/>
                </apex:dataTable>
                <apex:inputTextarea value="{!newRecord}" /><br/>
                <apex:commandLink value="Add" action="{!add}" rerender="tableid"/>
        </apex:actionRegion>

 

This simple script only should add a new record to the list and refresh the table.

It does the action but the whole page refreshs.

Does anyone see my mistake?

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

Does your add action method set the redirect on the returned page reference to true?

All Answers

bob_buzzardbob_buzzard

Does your add action method set the redirect on the returned page reference to true?

This was selected as the best answer
Baktash H.Baktash H.

yes

 

       PageReference pageRef = new PageReference('/apex/currentPage');
       pageRef.setRedirect(true);
       return pageRef;  

 

Thank you for that hint.

It was a PageReference function, but that was wrong. now it is a void function and it works very well.