You need to sign in to do that
Don't have an account?
Accidently creating two panes after creating new page
The following code launches the new page inside the same window:
public
withsharingclass ContractingOpportunities {
public String Value2Pass { get; set; }
public PageReference generateContract() {
PageReference newPage = page.ContractCreation;
newPage.getParameters().put(
'MyVariable', Value2Pass);
return newPage;
}
public String message { get; set; }
DisplayOpportunities[] opportunities;
publicclass DisplayOpportunities {
publicOpportunity opportunity { get; set; }
public Decimal count { get; set; }
public DisplayOpportunities(Opportunity item) {
this.opportunity = item;
}
}
public
DisplayOpportunities[] getOpportunities() { if (opportunities == null) {
opportunities =
new DisplayOpportunities[]{};
for (Opportunity item :
[
SELECTName, Contract_Type__c, OrderNumber__c, TrackingNumber__c, CurrentGenerators__c
FROMOpportunity
ORDER
BY Contract_Type__c DESC
]) { opportunities.add(
new DisplayOpportunities(item)); } }
return opportunities; }
}
Suggestions on how to make the newPage launch cleanly?
The snippet above is the controller for a VF page.