• SN SF
  • NEWBIE
  • 30 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies
Hi -

I have a VF page that has two tabs (tab1 and tab2) . We have used two VF components to build the page 

I receive below code at the bottom of the page
1. when I switch from tab1 to tab2 (below is the code I receive )
window.parent.SfdcApp.Visualforce.viewstate.ViewInstance.reload();
2. When I change pagination from selectlist  (below is the code I receive )  
 try{window.scrollTo(0,0);}finally{window.parent.SfdcApp.Visualforce.viewstate.ViewInstance.reload();}
3. When I click on any button (SAVE , SAVE & NEXT , SAVE & PREVIOUS) 
try{window.scrollTo(0,0);}finally{window.parent.SfdcApp.Visualforce.viewstate.ViewInstance.reload();}

It looks like everytime the page is loaded I get this code .I am not sure from where these tags are coming . can somone help me on this ?
Regards ,
SN
  • October 15, 2020
  • Like
  • 0
Hi ,
I have a VF page that displays bulk records , We have used standard set conroller to implement pagination . At times we receive following error message on  click of "Next "button
"This page uses a QueryLocator that is invalid. There is a limit of 50 QueryLocators per user. "" .

The "Next" button calls below method -
public void next() {        
        if(!readOnly) {
            savenew();        
       }       
        if(Status) {
            setCon.next();
       }
    }



Can someone tell me why do we get this error? and the possible ways to resolve this issue?

Regards,
SN
 
  • September 25, 2020
  • Like
  • 0
Hi ,

I am getting below exception when I click on SAVE& NEXT button on VF page . I have traced the logs for the user and all I could see is "/apex/Exception" in the logs and nothing else . There is no error captured and I am not sure what is the reason for throwing exception . Can someone help me on this?

User-added imageRegards,
SN
  • September 25, 2020
  • Like
  • 0
Hi -

I have a VF page with following structure . I included a Selectlist inside a PageBlockButton, so that user can set the pagination from bottom and top of the page 
When I set the page size  from top dropdown list it works fine . However when I update the page size from bottom , it doesn't work ..it just refresh and reset back to the previous value 
For ex : When the page is loaded I will set the page size to "5" from top dropdown list , the same value will be displayed on botton dropdown list ., now i will change the page size to "10" in bottom dropdown list . It will reset back to "5"

CODE:
<apex:actionFunction name="refreshPageSize1" action="{!refreshPageSize1}" status="fetchStatus" reRender="PBID" oncomplete="window.scrollTo(0,0);"/>

<apex:pageblockButtons style="width:100%;">
<div align="Right" style="margin-Top:10px;" >                     
<apex:outputPanel > 
    <apex:outputPanel >                      
    <apex:actionStatus id="fetchStatus" >
    <apex:facet name="start" >
    <img src="/img/loading.gif" />                    
    </apex:facet>
    </apex:actionStatus> &nbsp;&nbsp;&nbsp;
    </apex:outputPanel>
    
    <apex:outputText >
    {!(setCon.pageNumber * size)+1-size}-{!IF((setCon.pageNumber * size)>noOfRecords, noOfRecords,
     (setCon.pageNumber * size))} of {!noOfRecords} 
    </apex:outputText> &nbsp;&nbsp;&nbsp;
    
    <apex:selectList value="{!size}" multiselect="false" size="1" onchange="refreshPageSize1();" styleClass="dropdown_btn" >
    <apex:selectOptions value="{!paginationSizeOptions}"/>
    </apex:selectList> 

<apex:commandButton status="fetchStatus" rerender="PBID" value="prev” action="{!prev}" />
<apex:commandButton status="fetchStatus" rerender="PBID" value = “Nxt" action="{!nxt}" />                     
<apex:commandButton status="fetchStatus" rerender="PBID" value =”SAVE" action="{!save}" /> 
</apex:outputPanel>
</div>
</apex:pageblockButtons>

Can someone please help me on this ?

Thanks in Advance !

Regards,
SN

 
  • September 23, 2020
  • Like
  • 0
Hello ,
I have a VF page page that works fine when I try to update 10-15 records at a time . But I get Exception message when I try to update 20+ records . When I checked the Debug logs , I could see below Error message ' Apex CPU time Limit execced . 
 APEX CPU TIME LIMIT EXCEEDED

Although to overcome this I have implemented Pagination , so that user can adjust the page size and update lesser records at a time.
But I just want to know  -
1. The reason behind hitting this CPU time Limit Error ?
2. Other efficient ways to resolve this issue ?
3. What is best approach OR procedure to be following to display and process BULK records through VF page 

Can someone please guide me on this?

Thanks,
SN
  • September 15, 2020
  • Like
  • 0
Hello -

I have a VF Page with two Tabs (Tab1 and Tab2 ) , In each tab I am using VF components to display the data . When I initially load the Vf page , it will land on Tab1 .When I click on Tab 2 , it displays the data correctly , but after few seconds the data vanishes (i.e., the data disappears and it displays a blank screen )

Can someone help me on this?

Code Snippet -
<apex:form id="formId"  style="{!if(customStyle != null,if(guMessage == null,'width:100em;border-collapse:collapse;padding-inline-start:-80em;margin-left:-150px;margin-top:-60px;','width:100em;border-collapse:collapse;padding-inline-start:-80em;margin-left:160px;margin-top:60px;'),'width:100%')}" >
        <apex:actionFunction name="callTab1" action="{!tab1}" rerender="PBID"/>
        <apex:actionFunction name="callTab2" action="{!tab2}" rerender="PBID"/> 
        <apex:actionFunction name="refreshPageSize1" action="{!refreshPageSize1}" status="fetchStatus" reRender="" oncomplete="window.scrollTo(0,0);"/>
       <apex:pageBlock id="PBID" rendered="{!$CurrentPage.parameters.id != null && guMessage == null}" >
        <apex:pageMessages id="msg1" ></apex:pageMessages> 
           <apex:outputPanel rendered="{!if(gu == 'us' || gu =='canada' ,true,false)}">
                <apex:tabPanel switchType="client" value="{!selectedTab}"
                               id="AccountTabPanel" tabClass="activeTab" 
                               inactiveTabClass="inactiveTab"  headerSpacing="10"> 
                <apex:tab label="Tab1" name="Tab1Details" id="Tab1ID" style="background-color:white;border:0;font-family: Verdana;" ontabenter="callTab1();" >
                <c:MetricBlockComponent metvalues="{!MetricBlock_Tab1}" > </c:MetricBlockComponent>                           
                </apex:tab>
                    <apex:tab label="Tab2" name="Tab2Details" id="Tab2ID" style="background-color:white;border:0;font-family: Verdana;" ontabenter="callTab2();" >
                  <c:LocalDemoComponent metvalues="{!MetricBlock_Tab2}" > </c:LocalDemoComponent> 
                    </apex:tab>
                   
                </apex:tabPanel>
            </apex:outputPanel>
  • September 10, 2020
  • Like
  • 0
Hi ,
I have a VF page that displays bulk records , We have used standard set conroller to implement pagination . At times we receive following error message on  click of "Next "button
"This page uses a QueryLocator that is invalid. There is a limit of 50 QueryLocators per user. "" .

The "Next" button calls below method -
public void next() {        
        if(!readOnly) {
            savenew();        
       }       
        if(Status) {
            setCon.next();
       }
    }



Can someone tell me why do we get this error? and the possible ways to resolve this issue?

Regards,
SN
 
  • September 25, 2020
  • Like
  • 0
Hi ,

I am getting below exception when I click on SAVE& NEXT button on VF page . I have traced the logs for the user and all I could see is "/apex/Exception" in the logs and nothing else . There is no error captured and I am not sure what is the reason for throwing exception . Can someone help me on this?

User-added imageRegards,
SN
  • September 25, 2020
  • Like
  • 0
Hi -

I have a VF page with following structure . I included a Selectlist inside a PageBlockButton, so that user can set the pagination from bottom and top of the page 
When I set the page size  from top dropdown list it works fine . However when I update the page size from bottom , it doesn't work ..it just refresh and reset back to the previous value 
For ex : When the page is loaded I will set the page size to "5" from top dropdown list , the same value will be displayed on botton dropdown list ., now i will change the page size to "10" in bottom dropdown list . It will reset back to "5"

CODE:
<apex:actionFunction name="refreshPageSize1" action="{!refreshPageSize1}" status="fetchStatus" reRender="PBID" oncomplete="window.scrollTo(0,0);"/>

<apex:pageblockButtons style="width:100%;">
<div align="Right" style="margin-Top:10px;" >                     
<apex:outputPanel > 
    <apex:outputPanel >                      
    <apex:actionStatus id="fetchStatus" >
    <apex:facet name="start" >
    <img src="/img/loading.gif" />                    
    </apex:facet>
    </apex:actionStatus> &nbsp;&nbsp;&nbsp;
    </apex:outputPanel>
    
    <apex:outputText >
    {!(setCon.pageNumber * size)+1-size}-{!IF((setCon.pageNumber * size)>noOfRecords, noOfRecords,
     (setCon.pageNumber * size))} of {!noOfRecords} 
    </apex:outputText> &nbsp;&nbsp;&nbsp;
    
    <apex:selectList value="{!size}" multiselect="false" size="1" onchange="refreshPageSize1();" styleClass="dropdown_btn" >
    <apex:selectOptions value="{!paginationSizeOptions}"/>
    </apex:selectList> 

<apex:commandButton status="fetchStatus" rerender="PBID" value="prev” action="{!prev}" />
<apex:commandButton status="fetchStatus" rerender="PBID" value = “Nxt" action="{!nxt}" />                     
<apex:commandButton status="fetchStatus" rerender="PBID" value =”SAVE" action="{!save}" /> 
</apex:outputPanel>
</div>
</apex:pageblockButtons>

Can someone please help me on this ?

Thanks in Advance !

Regards,
SN

 
  • September 23, 2020
  • Like
  • 0
Hello ,
I have a VF page page that works fine when I try to update 10-15 records at a time . But I get Exception message when I try to update 20+ records . When I checked the Debug logs , I could see below Error message ' Apex CPU time Limit execced . 
 APEX CPU TIME LIMIT EXCEEDED

Although to overcome this I have implemented Pagination , so that user can adjust the page size and update lesser records at a time.
But I just want to know  -
1. The reason behind hitting this CPU time Limit Error ?
2. Other efficient ways to resolve this issue ?
3. What is best approach OR procedure to be following to display and process BULK records through VF page 

Can someone please guide me on this?

Thanks,
SN
  • September 15, 2020
  • Like
  • 0
Hello -

I have a VF Page with two Tabs (Tab1 and Tab2 ) , In each tab I am using VF components to display the data . When I initially load the Vf page , it will land on Tab1 .When I click on Tab 2 , it displays the data correctly , but after few seconds the data vanishes (i.e., the data disappears and it displays a blank screen )

Can someone help me on this?

Code Snippet -
<apex:form id="formId"  style="{!if(customStyle != null,if(guMessage == null,'width:100em;border-collapse:collapse;padding-inline-start:-80em;margin-left:-150px;margin-top:-60px;','width:100em;border-collapse:collapse;padding-inline-start:-80em;margin-left:160px;margin-top:60px;'),'width:100%')}" >
        <apex:actionFunction name="callTab1" action="{!tab1}" rerender="PBID"/>
        <apex:actionFunction name="callTab2" action="{!tab2}" rerender="PBID"/> 
        <apex:actionFunction name="refreshPageSize1" action="{!refreshPageSize1}" status="fetchStatus" reRender="" oncomplete="window.scrollTo(0,0);"/>
       <apex:pageBlock id="PBID" rendered="{!$CurrentPage.parameters.id != null && guMessage == null}" >
        <apex:pageMessages id="msg1" ></apex:pageMessages> 
           <apex:outputPanel rendered="{!if(gu == 'us' || gu =='canada' ,true,false)}">
                <apex:tabPanel switchType="client" value="{!selectedTab}"
                               id="AccountTabPanel" tabClass="activeTab" 
                               inactiveTabClass="inactiveTab"  headerSpacing="10"> 
                <apex:tab label="Tab1" name="Tab1Details" id="Tab1ID" style="background-color:white;border:0;font-family: Verdana;" ontabenter="callTab1();" >
                <c:MetricBlockComponent metvalues="{!MetricBlock_Tab1}" > </c:MetricBlockComponent>                           
                </apex:tab>
                    <apex:tab label="Tab2" name="Tab2Details" id="Tab2ID" style="background-color:white;border:0;font-family: Verdana;" ontabenter="callTab2();" >
                  <c:LocalDemoComponent metvalues="{!MetricBlock_Tab2}" > </c:LocalDemoComponent> 
                    </apex:tab>
                   
                </apex:tabPanel>
            </apex:outputPanel>
  • September 10, 2020
  • Like
  • 0