Guest User

Untitled

a guest
Feb 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. <aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction"
  2. access="global"
  3. controller="P2EcdependentPicklist_NewRFI">
  4. <!-- call doInit function on component load -->
  5. <aura:handler name="init" value="this" action="{!c.doInit}"/>
  6.  
  7. <aura:attribute name="recordId" type="Id" />
  8. <aura:attribute name="recordtypevalu" type="string" />
  9.  
  10. <!-- aura attributes-->
  11. <aura:attribute name="listControllingValues" type="list" default="[]" description="to store controller field values"/>
  12. <aura:attribute name="listDependingValues" type="list" default="['--- None ---']" description="to store dependent field values"/>
  13. <aura:attribute name="depnedentFieldMap" type="map" description="map to store dependent values with controlling value"/>
  14. <aura:attribute name="bDisabledDependentFld" type="boolean" default="true"/>
  15.  
  16. <aura:attribute name="objDetail" type="contact" default="{'sobjectType' : 'case'}"/>
  17. <aura:attribute name="controllingFieldAPI" type="string" default="RFI_Type__c" description="store field API name of Controller field"/>
  18. <aura:attribute name="dependingFieldAPI" type="string" default="RFI_SubType__c" description="store field API name of dependent field"/>
  19.  
  20. <!--Controller Field-->
  21. <lightning:layoutItem size="12" padding="around-small">
  22. <lightning:select name="controllerFld"
  23. value="{!v.objDetail.RFI_Type__c}"
  24. label="RFI Type"
  25. onchange="{!c.onControllerFieldChange}" aura:id="RFITypeValue" required="true" messageWhenValueMissing="Choose RFI Type Value!">
  26. <aura:iteration items="{!v.listControllingValues}" var="val">
  27. <option value="{!val}">{!val}</option>
  28. </aura:iteration>
  29. </lightning:select>
  30. </lightning:layoutItem>
  31.  
  32. <!--Dependent Field-->
  33. <lightning:layoutItem size="12" padding="around-small">
  34. <lightning:select name="dependentFld"
  35. value="{!v.objDetail.RFI_SubType__c}"
  36. label="RFI SubType"
  37. disabled="{!v.bDisabledDependentFld}" required="true" messageWhenValueMissing="Choose RFI SubType Value!">
  38. <aura:iteration items="{!v.listDependingValues}" var="val" >
  39. <option value="{!val}">{!val}</option>
  40. </aura:iteration>
  41. </lightning:select>
  42. </lightning:layoutItem>
  43. <c:liu_NewRFIOnOpportunity aura:id="childCmp"/>
  44. <lightning:button variant="brand" label="Submit" onclick="{! c.handleClick }" />
Add Comment
Please, Sign In to add comment