salesforce Lightning

所需积分/C币:50 2017-03-31 18:02:06 4.7MB PDF
87
收藏 收藏
举报

salesforce lightning 开发官方文档
CONTENTS Chapter 1: What is the Lightning Component Framework? What is Salesforce Lightning? Why Use the Lightning Component Framework? Open Source Aura Framework Components Events 1223334 Using the developer Console Online Content Chapter 2: Quick Start Before You begin 7 Create a Standalone Lightning App Optional: Install the Expense Tracker App 9 Create an Expense Object 10 Step 1: Create A Static Mockup....,......... ,,12 Step 2: Create A Component for User Input ,,14 Step 3 Load the Expense data 19 Step 4: Create a Nested Component 21 Step 5: Enable Input for New Expenses 23 Step 6: Make the App Interactive With Events 25 Create a Component for Salesforce and Lightning Experience Summary 28 30 Load the contacts 31 Fire the Events ,.34 Chapter 3: Creating Components ..37 Create Lightning Components in the Developer Console.............. 38 Lightning Bundle Configurations Available in the Developer Console 39 Component Markup .40 Component Namespace.,.,.,,,,,,,,,,,,,,,,,,,,., Using the Default Namespace in Organizations with No Namespace Set...,..42 Using Your Organizations Namespace........ ,,,,,.,,,42 Using a Namespace in or from a Managed Package ,.,,42 Creating a Namespace in Your Organization ...43 Namespace Usage Examples and Reference .43 Component Bundles........... 46 Component IDs 47 HTML in Components 垂 48 CSS in Components 48 Contents Component Attribute 50 Component Composition ,,,,,.,,.51 Component bod .,.53 Component Facets 54 Best Practices for Conditional Markup 55 Component Versioning...... 04B。 56 ng Expressions ,..57 Dynamic Output in Expressions ,,.58 Conditional expression 59 Data Binding Between Components 59 Value providers 64 Expression Evaluati 69 Expression Operators Reference 70 Expression Functions Reference 73 Using labels 76 Using Custom Labels 77 Input Component Labels ······..···.··· 78 Dynamically populating label parameters.,.......... ,,,78 Getting labels in JavaScript .79 Setting label Values via a Parent Attribute .....80 Localization ,,81 Providing component documentation ,,,,,,,,,,,,,,82 Working with Base Lightning Components ,,,,84 Base Lightning Components Considerations ,,,,,,。,,,,,,86 Event Handling in Base Lightning Components 88 Working with Ul Components .,,,90 Event Handling in UI Components 92 Using the Ul Components 鲁B垂 93 Supporting Accessibility..... 94 Button labels 95 Audio Messages ..95 Forms Fields, and labels 95 Events .96 Menus 96 Chapter 4: Using Components........... ,..97 Jse Lightning Components in Lightning Experience and Salesforce .....98 Configure Components for Custom Tabs ..,98 Add Lightning Components as Custom Tabs in Lightning Experience........99 Add Lightning Components as Custom Tabs in Salesforce 100 Contigure Components for Custom Actions 101 Configure Components for Record-Specific Actions .102 Lightning Component Actions 画画面 .........108 Get Your Lightning Components Ready to Use on Lightning Pages ,108 Contents Configure Components for Lightning pages and the lightning app builder 109 Lightning Component Bundle Design Resources ,,,.,10 Contigure Components for Lightning Experience Record Pages..........171 Create Components for Lightning for Outlook and Lightning for Gmail (Betal..... 113 Create Dynamic Picklists for Your Custom Components ,,.,17 Tips and Considerations for Configuring Components for Lightning Pages and the Lightning pp Build 119 Ise Lightning Components in Community Builder ,120 Configure Components for Communities 120 Create Custom Theme layout Components for Communities ,,,.121 Create Custom Search and Profile Menu Components for Communities 123 Create Custom Content Layout Components for Communities 124 Add Components to Apps................ ,,,,,,,,,126 Use Lightning Components in Visualforce Pages 127 Add Lightning Components to Any app with Lightning Out (Betal 128 Lightning Out Requirements 129 ightning Out dependence 130 Lightning Out Markup Authentication from Lightning Out 133 Share Lightning Out Apps with Non-Authenticated Users 133 Lightning Out Considerations and Limitations................ 134 Chapter 5: Communicating with Events 136 Actions and events 137 Handling Events with Client-Side Controllers ,,,,,,,,,,,,,,,,..,138 Component Events 140 Component Event Propagation 140 Create Custom Component Events Fire Component Events....... ,,,,.,,142 Handling Component Events..... 142 Component Event Example 148 lication events 50 Application Event Propagation...,........ 151 Create Custom Application Events 152 Fire Application EVe 152 Handling Application Events 153 Application Event EXample 155 Event Handling lifecycle 157 dvanced Events Example 159 Firing Lightning Events from Non-Lightning Code 163 Events best practice 164 Events Anti-Patterns 165 Events Fired During the rendering lifecycle .........165 Events Handled In Salesforcel and Lightning Experience ,,,,.,,,168 Contents System Events 169 Chapter 6: Creating Apps ...171 App Overview 172 Designing App UI 172 Creating App Templates 172 Developing secure Code ,173 Content Security policy Overview Writing Secure Code with Locker Service.......,.......... 174 Sharing JavaScript Code Across Components...……………………….177 Salesforce Lightning CLI 179 Styling App 188 Using the salesforce lightning design System in Apps.........,... 189 Using External Co 190 More Readable Styling Markup with the join Expression 191 Tips for CSS in Components ..,,192 Vendor prefixes 192 Styling with Design Tokens ..,,193 Using Javascript 214 Using External JavaScript Libraries ,,,,,,,,,,,,。,.,.,215 Working with Attribute Values in JavaScript 217 Working with a Component Body in JavaScript ,218 Working with Events in JavaScript 219 Sharing javascript code in a Component Bundle ,.,.,221 Moditying the DOM .,,223 Client-Side re the dom 224 nvaking Actions on Component Initialization .........,.....227 Modifying Components Outside the framework Lifecycle ............ 228 Validating Fields........ .,228 Throwing and Handling Errors 230 Calling Component Methods.....,.. ,,,,,.,,232 Using JavaScript Promises ....,....233 Making apl calls from Components ...235 Create CSP Trusted Sites to Access Third-Party APls .236 JavaScript Cookbook 237 ally Creating Components 237 Detecting Data Changes with Change Handlers 240 Components by id 241 ynamically Adding Event Handlers 241 ynamically Showing or Hiding Mark 242 Adding and Removing Styles 242 Which Button Was pressed? 244 ∪ sing Apex ..244 reating Server-Side Logic with Controllers 245 Contents Creating Components ,,252 Working with Salesforce Records 垂垂 .,,252 Testing Your Apex Code ,,,,,,,..,,260 Making APl Calls from Apex 261 Lightning data Service (Developer Preview) 261 Loading a record .263 Saving a record 264 Creating a Record .266 Deleting a Record ···4···· .270 Record changes 272 Errors 273 Considerations and limitations 274 Lightning Data Service Example .,,274 Saverecordresult 279 Lightning Container (Developer Preview) .,..280 Using a Third-Party Framework 281 Sending messages to and from the app 282 Handling errors in your Container........ ,,,,,,,,,,,,,.,,,,,..284 Lightning Container Limits 285 Implement an Example 44 286 Controlling Access........... 288 Application Access Control ,,,,,,,,,,,,,,,,,,,,,,,,..291 Interface access contro 291 Component Access Control ,,,,,,,,,,,,,,,,,,291 Attribute access control .291 Event access control ,,292 Using object-Oriented Development 292 What is Inherited? .,,292 Inherited Component Attributes .,293 Abstract Components 295 Interf 295 Inheritance rules.,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,,.296 Caching with Storage Service ,.296 Initializing Storage Ser 297 Using the AppCache ....298 Distributing Applications and Compone 298 Chapter 7: Debugging ,...300 ible Debug Mode for Lightning Cor 301 Salesforce Lightning Inspector Chrome Extension 301 Install Salesforce Lightning Insp 302 Salesforce Lightning Inspector ...,...,.302 og Messages... 面画面 315 Contents Chapter 8: Fixing Performance Warnings ..,,,,,,316 Kaura: it>--Clean Unrendered Body 。..,.317 <aura: iteration>-Multiple Items Set ..318 Chapter 9: Reference 321 Reference Doc app.... ,,,,.322 Supported aura: attribute Types ,,,322 Basic Types..,,,,,,,,,,,,, .,.323 Object Types 324 Standard and Custom Object Types .325 Collection Types........ ,,,,,,,,,,,325 Custom Apex Class Types 327 Framework-Specitic Types 327 aura: application ,,,,.,.328 aura: component 329 aura: dependency 331 aurg: event ,,.332 aurg interface 332 aura method 垂鲁·垂垂 .,333 aura set 334 Setting Attributes Inherited from a Super Component 334 Setting Attributes on a Component Reference ,,,,,,,,,,,335 Setting Attributes Inherited from an Interface................. 336 Component Reterence 336 dUrd: expression 337 aura: html 337 aura if 338 aura: iteration 338 aura rendel r 静非 ,,,,,,,,,,,.,.339 aura: template 340 aura: text ..340 aura: unescapedHtml ,,,340 Storage: init 341 force: canvasApp ,,,,,,,,,,.342 force: inputField 343 force: outputField 344 force recordedil ,,。,,,,.,345 orce: recordPreview( Developer preview) .,.346 force record view 347 forceChatter feed ,,348 chatter fullfed 349 350 force Community: navigation MenuBase ,,,,,,,.350 force Community: routeLink 352 Contents ightning: avatar ,,353 ightning: badge 354 ightning: button ....... ,,,,,,,,..,354 lightning: button Group 356 lightning: butonlcon ,.356 lightning: buton Menu (Betal .358 htning: card 360 lightning: container 361 lightning formatteddate Time(Beta) 363 ightning: formattedNumber(beta 垂卷垂 .364 lightning: icon ,,,,,,,,,,,366 ghtning: input Beta 367 ightning: nputRichText (Beta 373 lightning: layout 374 lightning: layoutltem 376 lightning menuitem(Beta) 377 lightning: select ,,,,,,,,378 htning: spinner ,。,.,,,381 lightning: tab(Beta) 382 lightning tablet (Beta ..,,,.,......,.....,,.........383 ightning textarea........... ,,,,,,,,,,,,,.,,,,,,..385 Itng: require ...... 387 ui: action Menuitem 388 utton ,,,,,,,,,,.,,390 ui checkboxMenultem 392 ui: inputCheckbox 393 U: inputcurrency 395 ui inputDate ........ ,,398 Ui: inputDateTime 400 inputDefaultError 402 puTeR 405 Ui inputNumber ,,,,,,,,,,,,,,,,,,,,407 ui: inputPhone 409 ui inputRadio 412 Ui: inputRichText ....414 ui: inputsecret 416 ui: inputselect 418 ui: inputSelectOption ,,423 Ui: inputText ., .,,424 UI: inputI extArea 426 Ui: inputURL 428 U:menU。 431 ui: menuitem 434 Ui: menuitem Separator ..435 Contents ui menulist 436 Ui: menuTrigger .,,438 ui: menuTriggerLink........ ,,,,,,,,,.,,439 UI: message 440 ui: outputCheckbox 441 outputcurrency 443 Ui: outputDate 444 Ui: oUtputDateT ime 446 i: outputEmail 447 ui: oUtputNumber 垂卷垂 .449 ui: outputPhone .,,450 ui: outputRichText 451 ui: outputText,….,………..452 ui: output e× tArea... ..453 Ui: outputUR 455 ui radioMenultem .,,456 ui: scrollerWrapper ,,,.458 Ul: spInner,.,,,,,。, .,,,,,,,,,,,,。,,,,...459 Interface Reference ..460 Event reference 461 force: closeQuickAction,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,461 orce createRecord 462 force editRecord 463 force: navigate Tocomponent (Beta ,,,,,,,,,,,,,463 orce: navigatetolist 464 force: navigate ToobjectH ,,465 force: navigateToRelated List 465 force: navigateTosobject ,,,,,,,,,,,,,,465 force: navigate TOURL ,466 force record Save 467 force recordSaveSuccess 467 force: refresh View ,,,,,,,,,,,,,,,,,,,,.468 force show Toast ,,469 force Community: analyticsInteraction ,.469 forceCommunity: route Change ...,,....470 lightning: open Files 面画 471 Itng: selectSobject ....... ,,,,,,,,,,471 g: sendMessage 472 ui: clear Errors 472 Ul: collapse 473 ui: expand 473 Ui: menuFOCUSChange 474 ui menuSelect a000 474 Ui menu Press........ 475

...展开详情
试读 127P salesforce Lightning
立即下载
限时抽奖 低至0.43元/次
身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
salesforce Lightning 50积分/C币 立即下载
1/127
salesforce Lightning第1页
salesforce Lightning第2页
salesforce Lightning第3页
salesforce Lightning第4页
salesforce Lightning第5页
salesforce Lightning第6页
salesforce Lightning第7页
salesforce Lightning第8页
salesforce Lightning第9页
salesforce Lightning第10页
salesforce Lightning第11页
salesforce Lightning第12页
salesforce Lightning第13页
salesforce Lightning第14页
salesforce Lightning第15页
salesforce Lightning第16页
salesforce Lightning第17页
salesforce Lightning第18页
salesforce Lightning第19页
salesforce Lightning第20页

试读结束, 可继续阅读

50积分/C币 立即下载