enter image description here

I feel like I've wasted enough time tracking it down.Pretty simple thing.

I have a pageBlockTable. One of the links in it, lets me delete that row. After the row is deleted the table should be rerendered so you can see that it has been removed. Currently the record DOES get deleted, but the table is not rerendered. I tried putting it in an output panel and no luck there. I was wondering if maybe the table is reloading before the record is actually deleteed, causing a 'race' condition type of situation? Anyway, below is the code. Feel free to point out what I am doing wrong.Thanks in advance

 <apex:page controller="PagingTasksController1">
    <apex:form >
        <apex:pageBlock title="Tasks" id="pgBlock">
            <apex:inputText id="searchBox" value="{!searchText}"/>
              <apex:commandButton value="Search" reRender="pgTable,pgBlock" action="{!findTasks}"/>
            <apex:pageBlockTable value="{!Tasks}" var="tsk" id="pgTable" >
          <apex:column >
              <apex:outputLink value="{!URLFOR($Action.Task.Delete, tsk.id,['retURL'='/apex/New_Test_task_Assignment'])}" >Delete</apex:outputLink>

      <apex:column headerValue="Subject">
            <apex:outputField value="{!tsk.Subject}"/>
          <apex:column headerValue="Status">
             <apex:outputField value="{!tsk.Status}"/>
       <apex:column headerValue="Priority">
         <apex:outputField value="{!tsk.Priority}"/>
      <apex:column headerValue="OwnerId">
          <apex:outputField value="{!tsk.OwnerId}"/>

 <apex:enhancedlist type="Activity" height="800" rowsPerPage="50" customizable="False"/>

1 Answer 1


You are not re-rendering the table when you click the outputlink. Since the apex:outputlink component doesn't support the rerender attribute, I would use apex:commandLink instead, and then add rerender="pgBlock" - documentation

  • Pic attached for better understanding. It is working with apex:commandLink but it shows the "Subject" field in URL format which should not be.
    – JJoseph
    Jul 21, 2014 at 12:01
  • @james Please be clearer about what the remaining problem (if any) is. The screen shot looks fine to me.
    – Keith C
    Jul 21, 2014 at 13:42
  • The problem is if i use apex:commandLink then it displays me the "Subject" field in the URL format. The pic attached shown has used apex:outputlink to get this done.So,it's simply that after deleting the record , the pageblocktable is not rendering and the row too gets deleted.So how do i achieve it ??
    – JJoseph
    Jul 22, 2014 at 5:14
  • What do you mean by displaying the subject in the URL format? We're not touching the subject here, only the Action column... Jul 22, 2014 at 5:29
  • @Bachovski What is happening is with me adding apex:commandLink ,the row is not getting deleted.
    – JJoseph
    Jul 22, 2014 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.