Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.69 KB | None | 0 0
  1. </script>
  2.  
  3. <apex:actionFunction name="show" action="{!search1}" reRender="None">
  4. <apex:param name="show1" assignTo="{!contactids}" value=""/>
  5. </apex:actionFunction>
  6.  
  7.  
  8. <apex:actionFunction name="showRiskFactors" action="{!search}" reRender="oid" status="status"/>
  9. <apex:pageMessages />
  10. <apex:pageBlock >
  11. <apex:outputlabel value="Event"/>
  12. <apex:selectList value="{!ownership}" size="1" style="width: 200px;" onchange="showRiskFactors();">
  13. <apex:selectOptions value="{!ownershipOptions}"/>
  14. </apex:selectList>
  15. <apex:commandButton value="search" action="{!search}" rerender="oid" status="status"/>
  16. <apex:actionStatus id="status" >
  17. <apex:facet name="start" >
  18. <div style="width: 500px;">
  19. <img src="/img/loading.gif" />
  20. </div>
  21. </apex:facet>
  22. </apex:actionStatus>
  23. </apex:pageBlock>
  24.  
  25. <apex:pageblock id="oid" >
  26.  
  27. <apex:pageblocktable value="{!conlist}" var="con" >
  28. <apex:column style="width:5%;">
  29.  
  30. <apex:inputCheckbox onchange="show('{!con.id}'); return false;"/>
  31. </apex:column>
  32. <apex:column headerValue="Name" value="{!con.name}"/>
  33. <apex:column headerValue="Event" value="{!con.event__c}"/>
  34.  
  35. </apex:pageblocktable>
  36. <apex:pageBlockButtons location="bottom">
  37. <apex:commandButton value="Select" onclick="goInside(); return false;" style="width:60px;"/>
  38. <apex:commandButton value="Cancel" onclick="window.top.parent.close();" style="width:60px;"/>
  39. </apex:pageBlockButtons>
  40. <apex:pageBlockTable value="{!string1}" var="s">
  41.  
  42.  
  43. </apex:pageBlockTable>
  44. </apex:pageBlock>
  45.  
  46. </apex:form>
  47.  
  48. system.debug('--set1--'+set1);
  49.  
  50. }
  51.  
  52. public librtyasiaproject1()
  53. {
  54. set1=new set<string>();
  55. conlist=new list<contact>();
  56. conlist=[select id,name,event__c from contact where event__c!=null];
  57. }
  58.  
  59. public List<SelectOption> getownershipOptions()
  60. {
  61. List<SelectOption> options = new List<SelectOption>();
  62. options.add(new selectOption('None','--- None ---'));
  63. Schema.DescribeFieldResult fieldResult = contact.event__c.getDescribe();
  64. List<Schema.picklistEntry> ple = fieldResult.getPicklistValues();
  65. for(Schema.picklistEntry f:ple)
  66. {
  67. options.add(new selectOption(f.getLabel(),f.getValue()));
  68. }
  69. return Options;
  70. }
  71.  
  72. public void search() {
  73. conlist=new list<contact>();
  74. conlist=[select id,name,event__c from contact where event__c=:ownership ];
  75. system.debug('---conlist-->'+conlist);
  76.  
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement