@URLAction(onPostback = false) public void init() throws Exception { showBanner = true; if (countries == null || countries.isEmpty()) { countries = aapService.getAllCountries(); } if (stateList == null || stateList.isEmpty()) { livingStateList = stateList = aapService.getAllStates(); } // Copy Logged In user to selectedUserForEditing selectedUserForEditing = new UserDto(); Calendar cal = Calendar.getInstance(); cal.set(Calendar.YEAR, 1981); selectedUserForEditing.setDateOfBirth(cal.getTime()); if (selectedUserForEditing.getStateVotingId() != null) { enableDistrictCombo = true; enableParliamentConstituencyCombo = true; parliamentConstituencyList = aapService.getAllParliamentConstituenciesOfState( selectedUserForEditing.getStateVotingId()); districtList = aapService.getAllDistrictOfState(selectedUserForEditing.getStateVotingId()); if (selectedUserForEditing.getDistrictVotingId() != null) { enableAssemblyConstituencyCombo = true; assemblyConstituencyList = aapService.getAllAssemblyConstituenciesOfDistrict( selectedUserForEditing.getDistrictVotingId()); } } if (selectedUserForEditing.getStateLivingId() != null) { enableLivingDistrictCombo = true; enableLivingParliamentConstituencyCombo = true; livingParliamentConstituencyList = aapService.getAllParliamentConstituenciesOfState( selectedUserForEditing.getStateLivingId()); livingDistrictList = aapService.getAllDistrictOfState(selectedUserForEditing.getStateLivingId()); if (selectedUserForEditing.getDistrictLivingId() != null) { enableLivingAssemblyConstituencyCombo = true; livingAssemblyConstituencyList = aapService.getAllAssemblyConstituenciesOfDistrict( selectedUserForEditing.getDistrictLivingId()); } } }