Advertisement
Guest User

Untitled

a guest
May 4th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. <apex:inputCheckbox value="{!SLC.selected}" styleClass="SLC {!SLO.Id}" disabled="true">
  2. <apex:actionSupport event="onchange" rerender="dataToDisplay" />
  3. </apex:inputCheckbox>
  4.  
  5. public void setSelected(Boolean selected){
  6. this.selected=selected;
  7. system.debug('modif SLC : '+this.name);
  8. if(owner!=null){
  9. if(selected){
  10. // add in map
  11. }
  12. else{
  13. // remove from map
  14. }
  15.  
  16. <apex:page controller="myController">
  17. <apex:form >
  18. <apex:actionFunction action="{!doSmthg}" name="functionToLaunch" rerender="toReRender"/>
  19.  
  20. <div>
  21. <apex:inputCheckbox value="{!checked}" onchange="functionToLaunch"/>
  22. <label>Click-me</label>
  23. </div>
  24.  
  25. <apex:pageBlock id="toReRender" >
  26. <apex:outputtext >{!value}</apex:outputtext>
  27. <span>{!indice}</span>
  28. </apex:pageBlock>
  29. </apex:form>
  30. </apex:page>
  31.  
  32. public with sharing class myController{
  33. // fields
  34. public String value {get; set;}
  35. public Boolean checked {get; set;}
  36. public DateTime indice {get; set;}
  37.  
  38. // constructor - initialization
  39. public CampaignVFManagerController_test1(){
  40. value='Nothing yet';
  41. indice=datetime.now();
  42. }
  43.  
  44. // methods
  45. public void doSmthg(){
  46. indice=datetime.now();
  47. if(checked){
  48. value = 'i have been checked';
  49. }
  50. else{
  51. value = 'i have been unchecked';
  52. }
  53. }
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement