MACROMEDIA COLDFUSION MX 7.0.2-USING COLDFUSION MX WITH FLEX 2 Guide de l'utilisateur Page 217

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 256
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 216
Create a dynamic link 217
1. In Source mode, enter the following click property in the <mx:LinkButton> tag (in
bold):
<mx:LinkButton x="30" y="250" label="Select an item and click here for
full post"
click="navigateToURL(new
URLRequest(dgTopPosts.selectedItem.postLink));"/>
The value of the link field of the selected item in the DataGrid control,
dgTopPosts.selectedItem.postLink, is specified in the argument to the
navigateToURL() method, which is called when the user clicks the LinkButton control.
The
navigateToURL() method loads a document from the specified URL in a new
browser window.
2. Save the file, wait until Flex Builder finishes compiling the application, and click the Run
button.
A browser opens and runs the application. Click an item in the DataGrid control and then
click the LinkButton control. A new browser window should open and display the blog
page with the full post.
In this lesson, you used a WebService component to call and pass method parameters to a
SOAP-based web service. You then bound the data returned by the web service to a DataGrid
and a LinkButton control. To learn more, see the following topics in Flex 2 Developer’s Guide:
Chapter 44, “Understanding RPC Components”
Chapter 45, “Using RPC Components
NOTE
The navigateToURL() method takes a URLRequest object as an argument, which in
turn takes a URL string as an argument.
Vue de la page 216
1 2 ... 212 213 214 215 216 217 218 219 220 221 222 ... 255 256

Commentaires sur ces manuels

Pas de commentaire