How To : Using HTML Resources in an Application

Page Status: Beta

Back to Concepts and HOW TOs

Contents

[edit] Description

This document describes how to add an HTML resource (a View element) to the HTML control within your Bungee-powered applications.

[edit] Prerequisites

Introduction to Bungee Builder
Overview : Building a Bungee-powered Application
Understanding Control Bindings
Binding a Control to an Object

[edit] Procedure

To make HTML resources available to your application, you first add a ResourceProject to your solution. Then you must upload the HTML files and add them to the ResourceProject. After adding HTML files to a ResourceProject, you can add the HTML resource to an HTML control.

[edit] Adding a Resource to a ResourceProject

To add a ResourceProject:

  1. Connect to a WebDAV (Web-based Distributed Authoring and Versioning) folder on the Bungee Connect server and upload your images.
    1. In Windows, open My Network Places.
    2. Click Add a network place.
    3. When the wizard appears,
      1. Click Next.
      2. Select Choose another network location and click Next.
      3. Type the name of the WebDAV folder, https://webdav.bungeeconnect.com, and click Next.
      4. Type your user name and password.
      5. When the WebDAV folder opens, drag your HTML files from a local folder into the WebDAV folder. Your HTML files are now located on the Bungee Connect server.
  2. In Bungee Builder, add a ResourceProject to your solution.
    1.  Right-click on your solution and select Add Project.
    2. In the dialog box that's displayed,
      1. For Type, select ResourceProject.
      2. In Project Name, type the name for the ResourceProject.
      3. Click OK. The ResourceProject is listed under the solution along with the other project types.
    3. Right-click on the ResourceProject and select Import Resource.
    4. In the file browser, locate the directory containing your HTML files.
    5. Select the HTML files you want to import into the ResourceProject and click OK. This copies the HTML files from the WebDAV folder into your ResourceProject.
    6. In your solution, expand the ResourceProject to see the HTML object for the HTML files you imported.

[edit] Adding Dependencies to an HTML Resource

You can created a list of files on which your HTML Resource is dependent. The files in the dependency list are moved to Production along with the HTML Resource when you move your the project containing the HTML Resource to Production. Dependent files can be uploaded to your project area using the steps above.

To add files to an HTML Resource's dependency list:

  1. In the Solution Explorer, select the HTML Resource.
  2. On the Solution Explorer toolbar, click the first icon on the left.
  3. In the dialog box that's displayed, click Add.
  4. In the dialog box that's displayed, browse for the file you want to add to the dependency list.
  5. Click OK
  6. Repeat steps 3-5 to add more files to the dependency list.
  7. Click OK.

[edit] Adding an HTML Control

To add an HTML object to an HTML control:

  1. From the Toolbox, drag HTML onto your form.
  2. In the Property Editor, for HTML Object, click the ellipsis button.
  3. In the dialog box that's displayed, expand your ResourceProject and select the appropriate HTML object.
  4. Click OK

Note If your HTML control has an HTML Object set on it, and is also bound to a string, the HTML Object will take precedent and be rendered instead of the bound string.

[edit] Error Handling

 

[edit] Examples

 

[edit] Next Steps

Simulating or Testing Your Project or Application

[edit] Tags

    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.