You need to sign in to do that
Don't have an account?
Problem with page Redirect
Hello everybody,
Im Creating an application form where i have Application__c object in force.com and i break that into several pages in visualforce like courses offered in one page personal details in one page, Educational details in one page and my targt is when i select a course and click the next button i want to get the Personal Details page but im unable to getting it i tried alot but its displaying the current page it self if any body aware of this can u pls help me
Courses offerd page :
(courses url :https://..... /apex/appcrses)
( personaldetails url :https://..... /apex/sample1)
<apex:page standardController="Application__c" showHeader="false" sidebar="false" tabStyle="Application__c" extensions="appext1" >
<style>
.activeTab {background-color: #236FBD; color:white; background-image:none}
.inactiveTab { background-color: lightgrey; color:black; background-image:none}
</style>
<u><font style="Verdana" size="6" color="green"> <b>COURSE DETAILS</b> </font></u><br></br><br></br>
<apex:tabPanel switchType="client" selectedTab="Streams" id="theTabPanel">
<apex:tab label="B.Tech" name="B.Tech" id="tabdetails" >
<apex:form style="align=Center">
<apex:selectRadio value="{!btech}" layout="pageDirection">
<apex:selectOptions value="{!items}" rendered="true"/>
</apex:selectRadio>
</apex:form>
</apex:tab>
<apex:tab label="M.Tech" name="M.Tech" id="tabContact">
<apex:form style="align=Center">
<apex:selectRadio value="{!mtech}" layout="pageDirection">
<apex:selectOptions value="{!items}" rendered="true"/>
</apex:selectRadio>
</apex:form>
</apex:tab>
<apex:tab label="Pharmacy" name="Pharmacy" id="tabOpp">
<apex:form style="align=Center">
<apex:selectRadio value="{!pharma}" layout="pageDirection">
<apex:selectOptions value="{!pitems}" rendered="true"/>
</apex:selectRadio>
</apex:form>
</apex:tab>
<apex:tab label="Arts" name="Arts" id="tabOpenAct">
<apex:form style="align=Center">
<apex:selectRadio value="{!arts}" layout="pageDirection">
<apex:selectOptions value="{!artitems}" rendered="true"/>
</apex:selectRadio>
</apex:form>
</apex:tab>
<apex:tab label="Other" name="others" id="tabNoteAtt">
<apex:form style="align=Center">
<apex:selectRadio value="{!other}" layout="pageDirection">
<apex:selectOptions value="{!otheritems}" rendered="true"/>
</apex:selectRadio>
</apex:form>
</apex:tab><apex:form >
<apex:commandButton value="SAVE and NEXT " action="{!next}" /></apex:form>
</apex:tabPanel>
</apex:page>
class
public class appext1
{
Application__c application;
// ApexPages.StandardController Controller = new ApexPages.StandardController(application);
public appext1(ApexPages.StandardController controller)
{
this.application=(Application__c)controller.getRecord();
}
string courses;
public string lastcourses;
public string laststreams;
......
.......
.........
public pageReference next()
{
lastcourses=courses;
/* String newPageUrl = '/apex/sample1';
PageReference newPage =new PageReference(newPageUrl);
*/
PageReference newPage = page.sample1;
newPage.setRedirect(true);
return newPage;
}
}
Try putting
<apex:messages/>
in your page. At least you'll see validation errors or the like. These could prevent your nav method from executing.
D.
thank u very much For ur help i got the Solution atlast . I JUST ADDED this apex code
newPage = Page.sample1;
newPage.getParameters().put('id', application.id);
newPage.setRedirect(true);
return newPage;
and gave onchange action for radio buttons and i got the solution