Documentation Archive Developer
Search
Table of Contents Previous Section

Adding Date and Number Formats

String elements have dateformat and numberformat attributes just like text field elements. Create bindings for the Date Released and Revenue strings so that dateReleased and revenue values are displayed the way they are in the Main page.

  1. Add the date format "%d %b %Y" to the Date Released string.

  2. Add the number format "$ #,##0.00" to the Revenue string.

Navigating from MovieDetails to Main

Now add a hyperlink to the MovieDetails page so users can navigate back to the Main page from MovieDetails.

  1. Add a hyperlink to the bottom of the page.

  2. Label it MovieSearch.

  3. Bind the hyperlink's pageName attribute to the text (including the quotes) "Main".

    Recall that the pageName attribute is a mechanism for navigating to another page without writing code. By setting the attribute to "Main", you're telling the application to open the MovieSearch page when the hyperlink is clicked.

Running Movies

Be sure that all your project's files are saved (including the components in WebObjects Builder), and build and run your application. In the Main page, select a movie and click the Movie Details link. The MovieDetails page should display all the movie's information.

Table of Contents Next Section