Propert units
Goal:
Create a user interface which allows internal users AND folks filling out an occupancy permit application to create unit objects and link them to a particular property in the database
Example: I have a rental duplex. It’s property is 300 Gas Line Way. It has two units: A and B. Unit B’s address is actually 280 Gas Line Way since it has a separate door. When I apply for a permit, I want to be able to enter in each unit into the system and register them as rental units.
Work steps
- Study search for properties page used in the ce action request flow
requestCEActionFlow_chooseProperty.xhtml
You’ll want to start with this page, allow the user to select a property. Dump that property into a new member variable on the SessionBean - Study the
PropertyUnit
class which already exists. Its member variables map to the database columns of thepropertyunit
table. - Study existing methods on
PropertyIntegrator
related to units. There are two unfinished methods that you can write:updatePropertyUnit
anddeletePropertyUnit
- Flesh out the page called
unitManage.xhtml
and build your GUI on this page. So, the user selects a property and then the next button should send the user tounitManage.xhtml
and its backing bean should know what property is currently active. - On this
unitManage.xhtml
we want a data table of all existing units already registered on the property (use the appropriate method on the PropertyIntegrator calledgetPropertyUnitList
). Then give the user a button for adding a new Unit. Supply the necessary fields to load up each of the member variables onPropertyUnit
business object. - When the user clicks a submit button, write the unit to the DB in the integrator class and update the table for the user
Study the textBlockManage.xhtml
page as a reference: This page combines data table of current text blocks (paragraphs), an add form, and an update form. Notice the use of the <p:ajax...
primefaces tag for ajax updating fields. Read about prime faces ajax on line.