Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <apex:outputPanel styleClass="black" layout="block">
- <apex:pageblocksection title=" Driver Details" showheader="true" collapsible="true" columns="2">
- <apex:outputfield value="{!FF.Name}"/>
- <apex:outputfield value="{!FF.Opportunity_Name__r.Name}"/>
- <apex:outputText value="Any Driver who drives more than 12 times any one year:" style="font-weight: bold;" />
- </apex:pageblocksection>
- </apex:outputPanel>
- <apex:outputPanel styleClass="black" layout="block" style="overflow: auto; width: 100%;">
- <apex:pageblocksection showheader="false" collapsible="true" id="childList" columns="1" >
- <apex:variable var="rowNum" value="{!ZERO}" />
- <apex:outputLabel value="No Drivers currently register. Click below to Add one." rendered="{!NOT(hasChildren)}"/>
- <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%" >
- <apex:column headerValue=" ">
- <apex:variable var="rowNum" value="{!rowNum + 1}" />
- <apex:commandLink value="Delete" action="{!removeFromList}" rerender="childList, messages" immediate="true">
- <apex:param name="removeIndex" assignTo="{!removeIndex}" value="{!rowNum}" />
- </apex:commandLink>
- </apex:column>
- <apex:column headerValue="Driver Name" >
- <apex:inputField value="{!driv.Driver_Name__c}" style="width: 120px; height: 20px"/>
- </apex:column>
- <apex:column headerValue="DOB" >
- <apex:inputField value="{!driv.Date_of_Birth__c}" style="width: 80px; height: 20px"/>
- </apex:column>
- <apex:column headerValue="Gender" >
- <apex:inputField value="{!driv.Gender__c}" style="width: 80px; height: 20px"/>
- </apex:column>
- <apex:column headerValue="License Class" >
- <apex:inputField value="{!driv.Class_of_License__c}" style="width: 80px; height: 20px" />
- </apex:column>
- <apex:column headerValue="License No." >
- <apex:inputField value="{!driv.Licence_Number__c}" style="width: 80px; height: 20px" />
- </apex:column>
- this.FF = [SELECT Id, Name, Opportunity_Name__r.Name FROM Fact_Finder__c WHERE Id =:ApexPages.currentPage().getParameters().get('FFId')];
- this.childList = [SELECT Id,
- Motor_Fact_Finder_No__c,
- Driver_Name__c,
- Date_of_Birth__c,
- Gender__c,
- Class_of_License__c,
- Licence_Number__c
- child.Motor_Fact_Finder_No__c = FF.Id;
- child.Opportunity_Name__c = FF.Opportunity_Name__r.Name;
- child.Accidents__c= 'No';
- child.Claims_last_5_years__c= 'No';
- child.Convictions__c= 'No';
- child.Licence_Suspended_or_Cancelled__c= 'No';
- child.Claims_Bonus__c= 'No';
- child.Restricted_Nominated_Driver_Policy__c= 'No';
- child.Is_the_driver_less_than_25__c= 'No';
- return child;
- public EditableList(ApexPages.StandardController stdController) {
- this();
- this.mysObject = (sObject)stdController.getRecord();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement