Personalizzazione avanzata > Business Logic Customization > Reservation Service > Using the Reservation Client Tools
  
Using the Reservation Client Tools
Reservation client tools are available to simplify the implementation of reservations in the Windchill user interface.
Simple additions to an action window JSP file automatically include the implementation steps described in Typical Reservation Service Implementation Steps in Using the Reservation Service.
To include reservations in an action window, add the following lines to the JSP file:
Declare the reservation tag library:
<%@ taglib prefix="rwiz" uri="http://www.ptc.com/windchill/taglib/reservation"%>
Use the configureReservation tag:
<rwiz:configureReservation reservationType="modify" enforcedByService="<true|false>"
adminOverride="<true|false>" workflowOverride="<true|false>"/>
The reservationType parameter is required and currently must be set to modify. The remaining parameters are optional and can be set to true or false (the default is false).
For more information, see the Windchill Javadoc description of the Reservation class.
For an example of how the reservation client tool is used, see Sample Code: Reservation Service in Adding the Undo Reservation Action to a Menu.
Using the Update Count Client Tools
In addition to reserving an object, another form of concurrency control is validation of an object’s update count.
Every Windchill object stored in the database has an update count value that is incremented whenever the object is updated. Validating that an object’s update count remains the same from the start to the end of an action guarantees that a concurrent update has not occurred.
If an object’s update count increases between the time an action starts and just before it attempts to save its changes, then a concurrent update has occurred and any attempt to save the object either fails or overwrites the concurrent updates.
Update count client tools provide a simple way to implement update count validation in a Windchill action. These can be used separately or jointly with reservation client tools.
When an update count validation error occurs the following informative message is given:
To include update counts in an action window, add the following lines to the JSP file:
Declare the reservation tag library:
<%@ taglib prefix="rwiz" uri="http://www.ptc.com/windchill/taglib/reservation"%>
Use the handleUpdateCount tag:
<rwiz:handleUpdateCount/>
For an example of how the update count client tool is used, see Sample Code: Reservation Service in Adding the Undo Reservation Action to a Menu.