Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.13 KB | None | 0 0
  1. <apex:outputPanel styleClass="black" layout="block">
  2. <apex:pageblocksection title=" Driver Details" showheader="true" collapsible="true" columns="2">
  3. <apex:outputfield value="{!FF.Name}"/>
  4. <apex:outputfield value="{!FF.Opportunity_Name__r.Name}"/>
  5. <apex:outputText value="Any Driver who drives more than 12 times any one year:" style="font-weight: bold;" />
  6. </apex:pageblocksection>
  7. </apex:outputPanel>
  8. <apex:outputPanel styleClass="black" layout="block" style="overflow: auto; width: 100%;">
  9. <apex:pageblocksection showheader="false" collapsible="true" id="childList" columns="1" >
  10. <apex:variable var="rowNum" value="{!ZERO}" />
  11. <apex:outputLabel value="No Drivers currently register. Click below to Add one." rendered="{!NOT(hasChildren)}"/>
  12. <apex:pageBlockTable value="{!children}" var="driv" rendered="{!hasChildren}" columnsWidth="5%,10%,5%,5%,5%,5%,5%,5%,5%,5%,5%,5%,10%,5%,5%,5%,10%" >
  13. <apex:column headerValue=" ">
  14. <apex:variable var="rowNum" value="{!rowNum + 1}" />
  15. <apex:commandLink value="Delete" action="{!removeFromList}" rerender="childList, messages" immediate="true">
  16. <apex:param name="removeIndex" assignTo="{!removeIndex}" value="{!rowNum}" />
  17. </apex:commandLink>
  18. </apex:column>
  19. <apex:column headerValue="Driver Name" >
  20. <apex:inputField value="{!driv.Driver_Name__c}" style="width: 120px; height: 20px"/>
  21. </apex:column>
  22. <apex:column headerValue="DOB" >
  23. <apex:inputField value="{!driv.Date_of_Birth__c}" style="width: 80px; height: 20px"/>
  24. </apex:column>
  25. <apex:column headerValue="Gender" >
  26. <apex:inputField value="{!driv.Gender__c}" style="width: 80px; height: 20px"/>
  27. </apex:column>
  28. <apex:column headerValue="License Class" >
  29. <apex:inputField value="{!driv.Class_of_License__c}" style="width: 80px; height: 20px" />
  30. </apex:column>
  31. <apex:column headerValue="License No." >
  32. <apex:inputField value="{!driv.Licence_Number__c}" style="width: 80px; height: 20px" />
  33. </apex:column>
  34.  
  35. this.FF = [SELECT Id, Name, Opportunity_Name__r.Name FROM Fact_Finder__c WHERE Id =:ApexPages.currentPage().getParameters().get('FFId')];
  36.  
  37. this.childList = [SELECT Id,
  38. Motor_Fact_Finder_No__c,
  39. Driver_Name__c,
  40. Date_of_Birth__c,
  41. Gender__c,
  42. Class_of_License__c,
  43. Licence_Number__c
  44.  
  45. child.Motor_Fact_Finder_No__c = FF.Id;
  46. child.Opportunity_Name__c = FF.Opportunity_Name__r.Name;
  47. child.Accidents__c= 'No';
  48. child.Claims_last_5_years__c= 'No';
  49. child.Convictions__c= 'No';
  50. child.Licence_Suspended_or_Cancelled__c= 'No';
  51. child.Claims_Bonus__c= 'No';
  52. child.Restricted_Nominated_Driver_Policy__c= 'No';
  53. child.Is_the_driver_less_than_25__c= 'No';
  54. return child;
  55.  
  56. public EditableList(ApexPages.StandardController stdController) {
  57. this();
  58. this.mysObject = (sObject)stdController.getRecord();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement