Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
code changes to make the aplication work for managed packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
kamatvs committed Oct 31, 2011
1 parent dbd3707 commit c02b632
Show file tree
Hide file tree
Showing 20 changed files with 240 additions and 165 deletions.
6 changes: 4 additions & 2 deletions src/classes/ActionPlanTemplates.cls
Expand Up @@ -158,7 +158,8 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
}

// Send the user to the detail page for the new account.
PageReference newPage = new PageReference( '/apex/ActionPlanTemplateDetail?Id=' + apt.Id );
PageReference newPage = Page.ActionPlanTemplateDetail;
newPage.getParameters().put('Id', apt.Id);
newPage.setRedirect( true );
return newPage;
}
Expand Down Expand Up @@ -197,7 +198,8 @@ OF THE POSSIBILITY OF SUCH DAMAGE.
}
else{
// Send the user to the detail page for the new account.
newPage = new PageReference( '/apex/ActionPlanTemplateDetail?Id=' + actionPlanTemplate.Id );
newPage = Page.ActionPlanTemplateDetail;
newPage.getParameters().put('Id', actionPlanTemplate.Id);
newPage.setRedirect( true );
}

Expand Down
2 changes: 1 addition & 1 deletion src/classes/ActionPlansUtilities.cls
Expand Up @@ -460,7 +460,7 @@ public with sharing class ActionPlansUtilities{
*/
public PageReference saveAndNew(){
saveAp();
PageReference newPage = new PageReference( '/apex/ActionPlanCreation?' + 'clone=1' );
PageReference newPage = new PageReference( Page.ActionPlanCreation + '?clone=1' );
newPage.setRedirect( true );

return newPage;
Expand Down
6 changes: 5 additions & 1 deletion src/classes/ImportTemplateController.cls
Expand Up @@ -52,7 +52,11 @@ public with sharing class ImportTemplateController{
try{
String templateId = importUtil.processImportedDocument( this.attachment );

return new Pagereference( '/apex/ActionPlanTemplateDetail?id=' + templateId );
PageReference newPage = Page.ActionPlanTemplateDetail;
newPage.getParameters().put('Id', templateId);

return newPage ;

}catch( Exception ex ){
//we initialize again the attachment when an error ocurres to prevent viewstate size errors
this.attachment = new Attachment();
Expand Down

0 comments on commit c02b632

Please sign in to comment.