The pupose of having config file is:
- to increases the productive, as developer is able to focus on business logic rather than navigation control and common function such as populators.
- to redirect in server side to navigate to specific token page.
ReservationProcessConfig.xml has token view and its implementation. In addition to that, other features such as populators are defined within the token view section.
After GWT.create(ReservationProcessConfig.class); the list of views (history token) is saved in memory. Once token changed, onHistoryChanged is invoked and particular view is instantiated. The functions related to that view are performed such as RPC call to get Day content, and RPC call to get populator
The lazy instantiation for each view is applied to help to load view quickly.
Sample of config file:
<?xml version="1.0" encoding="UTF-8"?>
<application>
<views>
<!-- home -->
<view name="home" class="com.ihg.reservation.client.navigation.HomeView">
<properties>
<property name="populators">
<map>
<entry key="roomPreferencePopulator">com.ihg.populators.RoomPreferencePopulator </entry>
<entry key="brandsPopulator">com.ihg.populators.BrandsPopulator</entry>
</map>
</property>
</properties>
</view>
<!-- roomrate -->
<view name="roomrate" class="com.ihg.reservation.client.navigation.RoomRateView">
</view>
</views>
</application>
Change History:
Author: Michael Wang, initial draft
No comments:
Post a Comment