Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. public PageReference editDynamicProperties() {
  2. PageReference editpr = Page.AnotherPage;
  3.  
  4. Map<string, string> params = editpr.getParameters();
  5. params.put('oppId', opportunityFromController.Id);
  6. // Attempt to remove the &inline query string parameter, but it isn't present yet.
  7. if(params.containsKey('inline')) {
  8. params.remove('inline');
  9. }
  10. editpr.setRedirect(true);
  11. System.debug(LoggingLevel.Info,'editDynamicProperties() redirecting to ' + editpr);
  12. return editpr;
  13. }
  14.  
  15. public PageReference editDynamicProperties() {
  16. PageReference editpr = Page.AnotherPage;
  17.  
  18. Map<string, string> params = editpr.getParameters();
  19. params.put('oppId', opportunityFromController.Id);
  20.  
  21. editpr.setRedirect(true);
  22. return editpr;
  23. }
  24.  
  25. public Component.Apex.OutputPanel getDynamicPropertyControls() {
  26. //...
  27.  
  28. Component.Apex.PageBlockButtons pbButtons = new Component.Apex.PageBlockButtons();
  29. pb.childComponents.add(pbButtons);
  30.  
  31. Component.Apex.CommandButton editCommandButton = new Component.Apex.CommandButton();
  32. editCommandButton.value='Edit';
  33. //editCommandButton.expressions.action = '{!editDynamicProperties}';
  34. editCommandButton.expressions.action = '{!stubAction}';
  35.  
  36. editCommandButton.rerender= new Set<string>{'dynamicForm'};
  37. editCommandButton.oncomplete= 'window.top.location.href = ''+editDynamicProperties().getUrl()+''';
  38. pbButtons.childComponents.add(editCommandButton);
  39.  
  40. //...
  41. }
  42.  
  43. <apex:outputLink value="{!$Page.somePage}?oppId={!opportunityFromController.Id}" target="_top">click here</apex:outputLink>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement