MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Especificações Página 382

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 504
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 381
382 Data Sources
8. Every time the user changes the selection, Dreamweaver calls the
inspectDynamicDataRef() function to determine whether the new selection is dynamic
text or a tag with a dynamic attribute. If it is dynamic text, Dreamweaver displays the
bindings for the current selection in the Bindings panel.
9. Using the Dynamic Data or the Dynamic Text dialog box or the Bindings panel, it’s
possible to change the data format for a dynamic text object or a dynamic attribute that the
user has already added to the page. When the format changes, Dreamweaver calls the
generateDynamicDataRef() function to get the string to insert into the user’s document
and passes that string to the
formatDynamicDataRef() function (see
formatDynamicDataRef()” on page 405). The string that the
formatDynamicDataRef()
function returns is inserted in the user’s document.
A simple data source example
This extension adds a custom data source to the Bindings panel for Macromedia ColdFusion
documents. Users can specify the variable they want from the new data source.
This example creates a data source called MyDatasource, which includes a MyDatasource.js
JavaScript file, a MyDatasource_DataRef.edml file, and MyDatasource Variable command
files to implement a dialog box for users to enter the name of a specific variable. The
MyDatasource example is based on the implementation of the Cookie Variable data source
and the URL Variable data source. The files for these data sources reside in the Configuration/
DataSources/ColdFusion folder.
You create this data source by performing the following steps:
Creating the data source definition file
Creating the EDML file
Creating the JavaScript file that implements the Data Sources API functions
Creating the supporting command files for user input
Testing the new data source
Creating the data source definition file
The data source definition file tells Dreamweaver the name of the data source as it will appear
in the Bindings Plus (+) menu and also tells Dreamweaver where to find the supporting
JavaScript files for the data source implementation.
Vista de página 381
1 2 ... 377 378 379 380 381 382 383 384 385 386 387 ... 503 504

Comentários a estes Manuais

Sem comentários