O'Reilly logo

Professional Cairngorm™ by Jeremy Wischusen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

17.1. Adding Posts Overview

The add posts feature must have the following features:

  • The add posts view must be restricted to authors. Authors have an access level of 100.

  • The posts area must be associated with categories and the author must be able to select a category when creating the posts. When the post is submitted, the associated category id must be submitted along with the post's text.

  • Authors should not be able to submit a post with a blank title or body.

  • Once the author has clicked the submit button, it should be disabled until a result is returned so that the author cannot submit the post multiple times.

  • If the adding of the post is successful, a message indicating this should be displayed.

  • If the adding of the post is successful, the submit button should be enabled.

  • If the adding of the post is successful, the submission form should be cleared.

  • If the adding of the post is unsuccessful, a message informing the author should be displayed.

  • If the adding of the post is unsuccessful, the form should remain populated so that the author does not have to type in the post again.

You already have a button that provides access to the write view. You can restrict access to this view by detecting the current user's access level and, if it does not equal 100, hiding the button that provides access to the write view.

Categories can be retrieved from the categories table of the database via a service in the FlexBlogDatabaseManager called getCategories. These can then be stored in a property ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required