You need to sign in to do that
Don't have an account?
Harsha Shri
Rerender issue in Visualforce page commandbutton
Hi All,
I am having rerender issue in VF page.
Problem:
when I am putting reRender and rendred together in a commandbutton, when clicking on commandbutton it is not redirecting to the actual page what I mentioned on pagereference method.
This is my code
Apex class:
Please suggest me where it is going wrong
Thanks in Advance
I am having rerender issue in VF page.
Problem:
when I am putting reRender and rendred together in a commandbutton, when clicking on commandbutton it is not redirecting to the actual page what I mentioned on pagereference method.
This is my code
Apex class:
public class SaveRecords{ public PageReference saveToCollege() { Boolean saved = false; saved = Class2.saveCollegeData(WrapperData.result,collegeId); if(saved) { PageReference pg=new PageReference('/'+collegeId ); return pg; } } }VF Page code:
<apex:page> <apex:form> <apex:pageBlock id="mySelectedPB1"> some code </apex:pageBlock> <apex:commandButton action="{!linkToProject}" value="Link to Project" rerender="mySelectedPB1" rendered="{!if(WrapperData.result != null,true,false)}"/> </apex:form> </apex:page>
Please suggest me where it is going wrong
Thanks in Advance
you are missing function 'linkToProject' and wrapper class(WrapperData.result) in apex controller and have to mention controller in your vfp like this
Regards
Shubham
Hi Shubham
I shared sample code from my VF page. I am using controller class in page tag. My problem is when I click on commandbutton it is saving records but not navigating to what I mentioned in pagereference ethod
Try this,
Regards
Shubham
Hi Shubham,
I tried that. It is not working