1 件の回答
there are mainly two ways to pass parameters
- As url parameters . this works with any page and controller
- Other is using a shared controller (only works if both pages has the exact same conrollers and extensions
url parameters
public Pagereference gotonewpage()
{
PageReference pageRef = Page.existingPageName;
pageRef.getParameters().put('msg','success');
return PageRef
}
shared controller
when you share the contoller you can access all the class varables of the shared controller pageref.setRedirect(false) specify not to reset values on page redirectpublic Pagereference gotonewpage()
{
PageReference pageRef = Page.existingPageName;
pageref.setRedirect(false)
return PageRef
}