+ Start a Discussion
Paras JainParas Jain 

Unable to Rerender Previous and First Button of VF Page...

hi My Previous & First buttton is not working correctly.. i am unable to find the problem,....
VF CODE....
<apex:page controller="PicklistPicker_Class1" sidebar="false" showHeader="false">
    <style>

        .previ1{
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: -10px 1px;
            margin: 0;
            padding: 0;
            width: 9px;
            height: 10px;
        }
        .previoff1
        {
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: -10px -10px;
            margin: 0;
            padding: 0;
            width: 9px;
            height: 10px;
        }
        .first1 {
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: 0 1px;
            width: 9px;
            height: 10px;
        }
        .next1 {
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: -17px 1px;
            width: 9px;
            height: 10px;
        }
        .last1{
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: -27px 1px;
            width: 9px;
            height: 10px;
        }
        .nextoff1 {
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: -17px -10px;
            width: 9px;
            height: 10px;
        }
        .lastoff1 {
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: -27px -10px;
            width: 9px;
            height: 10px;
        }
        .firstoff1 {
            background-image: url('{!URLFOR($Resource.paginationArrows)}');
            background-repeat: no-repeat;
            background-position: 0 -10px;
            width: 9px;
            height: 10px;
        }
        
        .pbHeader{
            font-size:14px;
        }
        .pbBody{
            font-size:15px;
        }
        .detailList{
            font-size:14px;
        }
        .bPageTitle{
            border: 1px solid lightgray;
            padding-bottom: 15px;
            background-color: #fafafa;
            margin-left:9%;
            margin-right:9%;
        }
        .pageType {
            font-size: 38px !important;
            margin-left: 12% !important;
            padding-bottom: 20px;
        }
        .mainTitle{
            width: 200%;
        }
        .bPageBlock {
            background-color: white !important;
            font-size:14px;
        }
        .apexp{
            margin-left:9%;
            margin-right:9%;
        }
        .message{
            margin-left:9%;
            margin-right:9%;
        }
</style>

<script>
function doSearch(thisId){
searchServer(thisId.value);
}
</script>


   <apex:form > <div align="right" ><apex:commandLink style="font-weight:bold; text-decoration:none;" action="{!gotosite}" value="Home"/>&nbsp;&nbsp;&nbsp;<apex:commandLink style="font-weight:bold; text-decoration:none;" action="{!blog}" value=" Blog"/>&nbsp;&nbsp;&nbsp;<apex:commandLink style="margin-right:11%; font-weight:bold; text-decoration:none;" action="{!Logout}" value=" Logout"/></div></apex:form>
        <div style="margin-left:9%;"><apex:image url="{!$Resource.GrantSourceLogo}"/></div>
<apex:form >
<apex:actionFunction name="searchServer" action="{!InputTextType}" reRender="pbt1">
        <apex:param name="accName" value="" />
    </apex:actionFunction>
<apex:outputPanel rendered="{!errormsgnew}">
      <script type="text/javascript">
       {
       window.alert("Please sign in");
       window.parent.location.href ="http://testgrant-grantsource.cs16.force.com/apex/UserLoginVF";
      
    }
    </script>
  </apex:outputPanel>
    <apex:actionFunction name="searchServer" action="{!InputTextType}" reRender="pbt1">
        <apex:param name="accName" value="" />
    </apex:actionFunction>
        <apex:pageBlock id="pbs">
          <Table>
              <tr>
                 <td>  Select Field: &nbsp; &nbsp;  
                    <apex:selectList value="{!SelectedField}" multiselect="false" size="1" >
                         <apex:selectOption itemValue="Zip/Postal Code" itemLabel="Zip/Postal Code"  />
                         <apex:selectOption itemValue="Areas of Interest/Expertise" itemLabel="Areas of Interest/Expertise"  />
                     </apex:selectList>
                  </td>
                  <td>
                         &nbsp; &nbsp;             
                     <apex:commandButton value="OK" action="{!shwhide}"  reRender="frm2"/>
                  </td>
              </tr>
          </Table>
       </apex:pageBlock>
       </apex:form>
        <apex:form id="frm2">
        <apex:pageBlock id="pgb2"  rendered="{!bool}">
            <apex:pageBlockSection id="pgbs2">
               <apex:outputPanel rendered="{!ShwBlock}" >
                  Enter Zip Code:&nbsp;&nbsp;&nbsp;
                    <apex:inputText id="ipZip" value="{!putZip}" required="true"/>
               </apex:outputPanel>
               <apex:outputPanel rendered="{!ShwBlock2}">
                    <apex:selectList id="ddlASType" value="{!SelectedAppraisalType}" size="1" >
                        <apex:selectOptions value="{!AppraisalTypeList}" />
                    </apex:selectList>
               </apex:outputPanel>
                  <apex:commandButton value="Click to Search Records" action="{!search}"  status="stat" reRender="frm3"/>
                 </apex:pageBlockSection>
        </apex:pageBlock>
    </apex:form>
    <apex:form id="frm3">
    <apex:pageBlock id="pb12">
    &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
   &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
   &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
   &nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;
   Grant Writer Name: &nbsp; &nbsp;
   <apex:inputText alt="Search for Grant Writer Records" value="{!InputTextType }" onkeyup="doSearch(this)"  id="searchinput"/>
    <apex:outputPanel id="region">
    <apex:pageBlockTable value="{!showworkshop}" var="txt" id="pbt1" >
            <apex:column value="{!txt.Name}"/>
            <apex:column value="{!txt.User__r.Name}"/>
            <apex:column value="{!txt.Email__c}"/>
            <apex:column value="{!txt.Seeking__c}"/>
            <apex:column value="{!txt.Zip_Postal_Code__c}"/>
        </apex:pageBlockTable>
        </apex:outputPanel>
        </apex:pageBlock>
       <apex:pageBlock > <!-- This section is responsible for providing the Pagination -->
       
            <apex:panelGrid rendered="{!hasValues}" columns="4" id="columstyle" style="margin-left: 50%;" >
                <apex:actionSupport event="onclick" reRender="pbt1" />
                  <apex:outputText style="text-decoration: none;color: black;"  rendered="{!!hasPrevious }" ><img src="{!URLFOR($Resource.s)}" class="firstoff1" alt="First Page"/>&nbsp;&nbsp;<img src="{!URLFOR($Resource.s)}" class="previoff1" alt="Previoff"/>Previous</apex:outputText>
                
                <apex:commandLink action="{!first}" style="text-decoration: none;color: black;"  rendered="{!hasPrevious}" status="fetchStatus" reRender="pb12" ><img src="{!URLFOR($Resource.s)}" title="First Page" alt="First Page" class="first1" /></apex:commandlink>
                <apex:commandLink id="quicksave" action="{!previous}" style="text-decoration: none;color: black;"  rendered="{!hasPrevious }" status="fetchStatus" reRender="pb12"><img src="{!URLFOR($Resource.s)}" title="Previous" alt="Previous" class="previ1"/>Previous</apex:commandlink>
                <apex:commandLink action="{!next}" style="text-decoration: none;color: black;" rendered="{!hasNext}" status="fetchStatus" reRender="pb12" >Next<img src="{!URLFOR($Resource.s)}" title="Next" alt="Next" class="next1"/></apex:commandlink>
                <apex:commandLink action="{!last}" style="text-decoration: none;color: black;"   rendered="{!hasNext}" status="fetchStatus" reRender="pb12"><img src="{!URLFOR($Resource.s)}" title="Last Page" alt="Last Page" class="last1"/></apex:commandlink>
                
                <apex:outputText style="text-decoration: none;color: black;"  rendered="{!!hasNext}" >Next <img src="{!URLFOR($Resource.s)}" class="nextoff1" alt="Next"/>&nbsp;&nbsp;<img src="{!URLFOR($Resource.s)}" class="lastoff1" alt="Last Page"/></apex:outputText>
                
                <apex:outputpanel >
                    <apex:actionstatus id="fetchStatus">
                        <apex:facet name="start">
                            <div class="waitingSearchDiv" id="el_loading" style="background-color: #fbfbfb;height: 100%;opacity:0.65;width:100%;">
                                <div class="waitingHolder" style="top: 60%; width: 500px;left:40%;position:fixed;height: 500px;">
                                    <img class="waitingImage" src="{!URLFOR($Resource.Loading)}" title="Please Wait..." />
                                    <span class="waitingDescription">Please Wait...</span>
                                </div>
                            </div>
                        </apex:facet>
                    </apex:actionstatus>
                </apex:outputpanel>
            </apex:panelGrid>  
                
        </apex:pageBlock>
     </apex:form>
 </apex:page>




Please help me solve my problem.my email id is parasjainlucky@gmail.com
 
Suneel#8Suneel#8
What is the behaviour you are observing?
Suneel#8Suneel#8
Refer below links for Pagination.You have Standard Controller methods to move back and forth between the ages.Below links provide you detailed information regarding them.Please check

http://www.infallibletechie.com/2014/05/simple-pagination-using-apex-in.html
http://forceguru.blogspot.in/2011/04/pagination-in-salesforce.html
Paras JainParas Jain
But i need more then 10000 records at a time. .in standard set controller there are only 10k records come
Suneel#8Suneel#8
You can check the below workaroun in that case

http://kuldeeptyagi.blogspot.in/2011/05/salesforce-work-around-to-overcome-1000.html#comment-form