<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
    "http://struts.apache.org/dtds/struts-config_1_3.dtd">

<!-- Descriptions: This file contains specific struts components for an demographic module
  History: Created 				10/20/2004	(DNS   lev)
     Added CustomRequestProcessor		04/25/2005	Muddaiah Ranga
     Plugged in Tiles			04/26/2005	Muddaiah ranga
-->
<struts-config>

  <!-- ====================== Form Bean Definitions ======================= -->
  <form-beans>
    <form-bean name="insuranceMedicareForm" type="gov.va.med.esr.ui.demographic.action.InsuranceMedicareForm"/>
    <form-bean name="insuranceInfoForm" type="gov.va.med.esr.ui.demographic.action.InsuranceInfoForm"/>
    <form-bean name="demographicAddressesForm" type="gov.va.med.esr.ui.demographic.action.DemographicAddressesForm"/>
    <form-bean name="demographicOverviewForm" type="gov.va.med.esr.ui.demographic.action.DemographicOverviewForm"/>
    <form-bean name="demographicPersonalForm" type="gov.va.med.esr.ui.demographic.action.DemographicPersonalForm"/>
    <form-bean name="demographicIdentityTraitsForm" type="gov.va.med.esr.ui.demographic.action.DemographicIdentityTraitsForm"/>
    <form-bean name="submittedIdentityTraitsForm" type="gov.va.med.esr.ui.demographic.action.SubmittedIdentityTraitsForm"/>	  
    <form-bean name="associationInfoForm" type="gov.va.med.esr.ui.demographic.action.PersonAssociationInfoForm"/>
    <form-bean name="enrollmentForm" type="gov.va.med.esr.ui.ee.action.EnrollmentForm"/>
  </form-beans>

  <!-- ===================================== Exception Handling Definitions  -->
  <global-exceptions>
  </global-exceptions>

  <!-- ===================================== Global forwards Definitions  -->
  <global-forwards>
  </global-forwards>

  <!-- ====================== Action Bean Definitions ===================== -->
  <action-mappings type="gov.va.med.fw.ui.struts.ServiceBrokerActionMapping">
    <action path="/demographicAddresses"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="demographicAddressesForm"
            input="demographicAddAddress"
            scope="request"
            validate="true"
            parameter="methodName">
      <set-property property="validateOnMethod" value="update"/>
      <forward name="demographicAddresses" path=".view.demographicAddresses"/>
      <forward name="demographicAddAddress" path=".view.demographicAddAddress"/>
      <forward name="demographicOverview" path="/demographicOverview.do?methodName=Overview&amp;infoMessage=updateAddress" redirect="true"/>
      <forward name="cancel" path="/demographicOverview.do?methodName=Overview" redirect="true"/>
      <forward name="noDataChanged" path="/demographicOverview.do?methodName=Overview&amp;infoMessage=message.dataNotChanged" redirect="true"/>
      <forward name="address508Notes" path=".view.demographicAddress508Notes"/>
    </action>
    <action path="/demographicAddressesHistory"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="historyForm"
            scope="request"
            parameter="methodName">
      <forward name="history" path=".view.demographicAddressesHistory"/>
      <forward name="return" path="/demographicOverview.do?methodName=Overview&amp;actionType=ADDRESS" redirect="true"/>
      <!--forward name="return" path=".view.demographicAddressOverview" redirect="true"/-->
    </action>
    <action path="/demographicOverview"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="demographicOverviewForm"
            scope="request"
            parameter="methodName">
      <forward name="demographicOverview" path=".view.demographicOverview"/>
      <forward name="demographicAddressOverview" path=".view.demographicAddressOverview"/>
    </action>
    <action path="/demographicPersonal"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="demographicPersonalForm"
            input="demographicPersonal"
            scope="request"
            validate="true"
            parameter="methodName">
      <set-property property="validateOnMethod" value="update,continueEnter"/>
      <forward name="demographicPersonal" path=".view.demographicPersonal"/>
      <forward name="demographicOverview" path="/demographicOverview.do?methodName=Overview&amp;infoMessage=updatePerson" redirect="true"/>
      <forward name="cancel" path="/demographicOverview.do?methodName=Overview" redirect="true"/>
      <forward name="noDataChanged" path="/demographicOverview.do?methodName=Overview&amp;infoMessage=message.dataNotChanged" redirect="true"/>
      <forward name="personal508Notes" path=".view.demographicPersonal508Notes"/>
    </action>
    <action path="/demographicPersonalHistory"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="historyForm"
            scope="request"
            parameter="methodName">
      <forward name="history" path=".view.demographicPersonalHistory"/>
      <forward name="return" path="/demographicPersonal.do?methodName=Personal" redirect="true"/>
    </action>
    <action path="/demographicIdentityTraits"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="demographicIdentityTraitsForm"
            input="demographicIdentityTraits"
            scope="request"
            validate="true"
            parameter="methodName">
      <set-property property="validateOnMethod" value="update"/>
      <forward name="demographicIdentityTraits" path=".view.demographicIdentityTraits"/>
      <forward name="demographicOverview" path="/demographicOverview.do?methodName=Overview&amp;infoMessage=updateIdentityTraits" redirect="true"/>
      <forward name="cancel" path="/demographicOverview.do?methodName=Overview" redirect="true"/>
      <forward name="noDataChanged" path="/demographicOverview.do?methodName=Overview&amp;infoMessage=message.dataNotChanged" redirect="true"/>
    </action>
    <action path="/demographicIdentityTraitsSubmitted"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="submittedIdentityTraitsForm"
            scope="request"
            parameter="methodName">
      <forward name="submitted" path=".view.demographicIdentityTraitsSubmitted"/>
      <forward name="return" path="/demographicIdentityTraits.do?methodName=Identity+Traits" redirect="true"/>
    </action>	  
    <action path="/demographicIdentityTraitsHistory"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="historyForm"
            scope="request"
            parameter="methodName">
      <forward name="history" path=".view.demographicIdentityTraitsHistory"/>
      <forward name="return" path="/demographicIdentityTraits.do?methodName=Identity+Traits" redirect="true"/>
    </action>
    <action path="/displayAssociation"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            scope="request"
            validate="false"
            parameter="overview">

      <forward name="display" path=".association.overview"/>
    </action>
    <action path="/addAssociation"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="associationInfoForm"
            scope="request"
            validate="true"
            parameter="methodName"
            input="display">

      <set-property property="validateOnMethod" value="addAssociate"/>

      <forward name="display" path=".association.add"/>
      <forward name="overview" path="/displayAssociation.do" redirect="true"/>
      <forward name="overviewWithMessage" path="/displayAssociation.do?infoMessage=addAssoication" redirect="true"/>
      <forward name="noDataChanged" path="/displayAssociation.do?infoMessage=message.dataNotChanged" redirect="true"/>
    </action>

    <action path="/updateAssociation"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="associationInfoForm"
            scope="request"
            validate="true"
            parameter="methodName"
            input="display">

      <set-property property="validateOnMethod" value="updateAssociate"/>

      <forward name="display" path=".association.update"/>
      <forward name="overview" path="/displayAssociation.do" redirect="true"/>
      <forward name="overviewWithMessage" path="/displayAssociation.do?infoMessage=updateAssociation" redirect="true"/>
      <forward name="noDataChanged" path="/displayAssociation.do?infoMessage=message.dataNotChanged" redirect="true"/>
    </action>

    <action path="/associationHistory"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="historyForm"
            scope="request"
            parameter="methodName">
      <forward name="history" path=".association.history"/>
      <forward name="return" path="/displayAssociation.do" redirect="true"/>
    </action>

    <action path="/insuranceInfoDisplay"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="insuranceInfoForm"
            scope="request"
            validate="false"
            parameter="display">
      <forward name="success" path=".insurance.overview"/>
    </action>

    <action path="/editInsurance"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="insuranceInfoForm"
            scope="request"
            validate="true"
            parameter="methodName"
            input="success">
      <set-property property="validateOnMethod" value="update"/>
      <forward name="success" path=".insurance.edit"/>
      <forward name="delete" path=".insurance.edit"/>
      <forward name="overview" path="/insuranceInfoDisplay.do?infoMessage=updateInsurance" redirect="true"/>
      <forward name="cancel" path="/insuranceInfoDisplay.do"/>
      <forward name="olerror" path="/insuranceInfoDisplay.do"/>
      <forward name="noDataChanged" path="/insuranceInfoDisplay.do?infoMessage=message.dataNotChanged" redirect="true"/>
    </action>

    <action path="/addInsurance"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="insuranceInfoForm"
            scope="request"
            validate="true"
            parameter="methodName"
            input="success">
      <set-property property="validateOnMethod" value="add"/>
      <forward name="overview" path="/insuranceInfoDisplay.do?infoMessage=addInsurance" redirect="true"/>
      <forward name="success" path=".insurance.add"/>
      <forward name="addMedicare" path="/editMedicare.do?methodName=editMedicare"/>
      <forward name="cancel" path="/insuranceInfoDisplay.do"/>
      <forward name="olerror" path="/insuranceInfoDisplay.do"/>
      <forward name="noDataChanged" path="/insuranceInfoDisplay.do?infoMessage=message.dataNotChanged" redirect="true"/>
    </action>

    <action path="/editMedicare"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="insuranceMedicareForm"
            scope="request"
            validate="true"
            parameter="methodName"
            input="success">
      <set-property property="validateOnMethod" value="update"/>
      <forward name="success" path=".insurance.edit.medicare"/>
      <forward name="delete" path=".insurance.edit.medicare"/>
      <forward name="overview" path="/insuranceInfoDisplay.do?infoMessage=updateInsurance" redirect="true"/>
      <forward name="cancel" path="/insuranceInfoDisplay.do"/>
      <forward name="olerror" path="/insuranceInfoDisplay.do"/>
      <forward name="noDataChanged" path="/insuranceInfoDisplay.do?infoMessage=message.dataNotChanged" redirect="true"/>
    </action>

    <action path="/insuranceHistory"
            type="gov.va.med.fw.ui.struts.ServiceDelegatingActionProxy"
            name="historyForm"
            scope="request"
            parameter="methodName">
      <forward name="history" path=".insurace.history"/>
    </action>

  </action-mappings>

  <!-- ===================================== Message Resources Definitions  -->
  <message-resources parameter="CommonMessages,WebHelpMessages,BreadCrumbMessages,RuleMessages,DemographicMessages,DemographicFieldMap"
                     factory="gov.va.med.fw.ui.struts.CustomPropertyMessageResourcesFactory"/>
  <message-resources key="demog" parameter="DemographicMessages" factory="gov.va.med.fw.ui.struts.CustomPropertyMessageResourcesFactory"/>

  <!-- ====================== Plug Ins Configuration ====================== -->

  <!-- ========== TilesPlugin settings ===================================== -->
  <plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="/WEB-INF/edb_tiles-defs.xml,/WEB-INF/demographic/tiles-defs.xml"/>
    <set-property property="moduleAware" value="true"/>
    <set-property property="definitions-factory-class" value="gov.va.med.fw.ui.struts.CustomTilesFactorySet"/>
  </plug-in>

  <!-- ========== ValidatorPlugin settings ===================================== -->
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/demographic/validation.xml"/>
    <set-property property="stopOnFirstError" value="true"/>
  </plug-in>
</struts-config>