Web Connection User's Guide
Now you can use the HelloFileWrapper class to build a Web
Connection part that uses an instance of the file wrapper. This part
will substitute two text strings for the attributes HelloText and
GoodbyeText of the file wrapper
HelloFileWrapper1.
- In the VisualAge Organizer, create a new part. For Part
type, select Web Connection part.
- Open the Composition Editor on the new part. You should see a
single subpart, a Page.
- Delete the Page part.
- Select Add Part from the Options menu.
- Specify HelloFileWrapper for the Class Name.
- Select OK to add the part and close the Add Part window.
- Place the HTML file wrapper, HelloFileWrapper1, within the
free-form surface.
- Go to the Web Connection category and select Text. Place the Text
part within the free-form surface.
- Open the settings of the Text part. Set the partName to
read TextforHello. Set the object to read
Hello, World!
- Make a connection from the HelloText attribute of the
HelloFileWrapper1 part to the string attribute of the
Text part.
- Go to the Web Connection category and select Text. Place the Text
part within the free-form surface.
- Open the settings of the Text part. Set the partName to
read TextforBye. Set the object to read
Goodbye, World!
- Make a connection from the GoodbyeText attribute of the
HelloFileWrapper1 part to the string attribute of the
Text part.
- Save the part. Select the test button,
, to test the part.
- After the page loads, the text Hello, World! and Goodbye,
World! appears in your Web browser at the location of the substitution
tags that you specified in the HTML document.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]