Adobe 65007312 Programming Guide - Page 201
Customizing the Web Gallery UI, Add a binding to a control
UPC - 883919154398
View all Adobe 65007312 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 201 highlights
CHAPTER 11: Web Gallery Plug-ins: A Tutorial Example Customizing the Web Gallery UI 201 6. After the pagination code, add the link that actually retrieves the large image to be shown: Customizing the Web Gallery UI The next step is to customize the control panel of the Web Gallery page so that users can adjust values in the model data that we have defined, and allow changes that the user makes to be shown immediately in the Web Gallery browser using Live Update. To demonstrate these techniques, we will add an entry to the Site Info section of the panel that will allow users to modify the main title of the page, shown in the main frame. We will allow the user to edit the title string using a text-edit control in the Site Info section of the main control panel, or using in-place edit in the preview panel. Add a binding to a control 1. Add a variable to the data model to hold the title text. In the galleryInfo.lrweb file, add these lines to the model entry: ["metadata.siteTitle.value"] = "MySample", ["appearance.siteTitle.cssID"] = "#siteTitle", The second value associates the title with a style-sheet ID. 2. Add a views entry to the table returned by the galleryInfo.lrweb file: views = function( controller, f ) local LrView = import "LrView" local bind = LrView.bind local multibind = f.multibind return { labels = f:panel_content { bind_to_object = controller, f:subdivided_sections { f:labeled_text_input { title = "MySample", value = bind "metadata.siteTitle.value end, The Site Info section of the control panel on the Web Gallery page corresponds to the labels return value of the views function. We are creating a labeled_text_input control in this section, and binding its value to the data-model value that holds the site-title text.