Java Code Examples for ims.core.vo.PersonAddress.setAddressSearchText()

The following are Jave code examples for showing how to use setAddressSearchText() of the ims.core.vo.PersonAddress class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: AvoinApotti   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onImbPostCodeSearchClick() throws PresentationLogicException 
{
	// Address provider helper
	IAddressProvider l_addressprovider = engine.getAddressProvider();
	if(l_addressprovider == null)
		throw new PresentationLogicException("Please Configure Address Provider");

	PersonAddress personAddress = new PersonAddress();
	PersonAddress[] personAddressResult = new PersonAddress[0];
			
	//Funtionality
	//To initiate search, the user will use either the poscode field or an additional address search field located on the right of the poscode field
	//The poscode field will initiate a search of type POSTCODE
	//the additional address search field will initiate a search of type BROWSE with input ADDR
			
	try
	{			
		if (form.txtAddressSearchText().getValue() != null && !form.txtAddressSearchText().getValue().equals(""))
		{
			personAddress.setAddressSearchText(form.txtAddressSearchText().getValue());// search criteria comma delimited.
			form.getGlobalContext().Core.setAddressSearchType("SEARCH");
		}
		else
		{
			engine.showMessage("Please enter a post code or keywords from the first or second line of the address.");
			return;
		}
		personAddressResult = (PersonAddress[])l_addressprovider.getAddress(personAddress,form.getGlobalContext().Core.getAddressSearchType(),"",""); // return result or ambiglist
	}
	catch (PresentationLogicException pe)
	{
		engine.showMessage(pe.getMessage());
	}
	
	//fill out rest of address fields if somthing found
	if (personAddressResult != null && personAddressResult.length == 1)
	{
		//exact match
		form.getLocalContext().setaddressResult(personAddressResult[0]);
		displayAddress();
	}
	else
	{
		form.getGlobalContext().Core.setAddressSearchText(form.txtAddressSearchText().getValue());
		form.getGlobalContext().Core.setPersonAddress(personAddress);
		engine.open(form.getForms().Core.AddressSelection);
	}						
}
 
Example 2
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onImbPdsSearchPostcodeClick() throws PresentationLogicException 
{
	tabPDSSearchContainer tabPDSSearch = form.lyrSearch().tabPDSSearch();
	IAddressProvider l_addressprovider = engine.getAddressProvider();
	if(l_addressprovider == null)
		throw new PresentationLogicException("Please Configure Address Provider");

	PersonAddress personAddress = new PersonAddress();
	PersonAddress[] personAddressResult = new PersonAddress[0];

	try
	{			
		if (tabPDSSearch.txtPdsSearchPostcode().getValue() != null && !tabPDSSearch.txtPdsSearchPostcode().getValue().equals(""))
		{
			personAddress.setAddressSearchText(tabPDSSearch.txtPdsSearchPostcode().getValue());
			form.getGlobalContext().Core.setAddressSearchType("SEARCH");
		}
		else
		{
			engine.showMessage("Please enter a post code or keywords from the first or second line of the address.","Warning", MessageButtons.OK, MessageIcon.WARNING); //WDEV-21356
			return;
		}
		personAddressResult = (PersonAddress[])l_addressprovider.getAddress(personAddress,form.getGlobalContext().Core.getAddressSearchType(),"",""); // return result or ambiglist
	}
	catch (PresentationLogicException pe)
	{
		engine.showMessage(pe.getMessage(),"Error", MessageButtons.OK, MessageIcon.ERROR); //WDEV-21356
	}

	if (personAddressResult != null && personAddressResult.length == 1)
	{
		form.getLocalContext().setAddressResult(personAddressResult[0]);
	}
	else
	{
		form.getGlobalContext().Core.setAddressSearchText(tabPDSSearch.txtPdsSearchPostcode().getValue());
		form.getGlobalContext().Core.setPersonAddress(personAddress);
		engine.open(form.getForms().Core.AddressSelection);
	}
}
 
Example 3
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onImbLocalSearchPoscodeClick() throws PresentationLogicException 
{
	tabLocalSearchContainer tabLocalSearch = form.lyrSearch().tabLocalSearch();
	IAddressProvider l_addressprovider = engine.getAddressProvider();
	if(l_addressprovider == null)
		throw new PresentationLogicException("Please Configure Address Provider");

	PersonAddress personAddress = new PersonAddress();
	PersonAddress[] personAddressResult = new PersonAddress[0];

	try
	{			
		if (tabLocalSearch.txtLocalSearchPostcode().getValue() != null && !tabLocalSearch.txtLocalSearchPostcode().getValue().equals(""))
		{
			personAddress.setAddressSearchText(tabLocalSearch.txtLocalSearchPostcode().getValue());
			form.getGlobalContext().Core.setAddressSearchType("SEARCH");
		}
		else
		{
			engine.showMessage("Please enter a post code or keywords from the first or second line of the address.","Warning", MessageButtons.OK, MessageIcon.WARNING); //WDEV-21356
			return;
		}
		personAddressResult = (PersonAddress[])l_addressprovider.getAddress(personAddress,form.getGlobalContext().Core.getAddressSearchType(),"",""); // return result or ambiglist
	}
	catch (PresentationLogicException pe)
	{
		engine.showMessage(pe.getMessage(),"Error", MessageButtons.OK, MessageIcon.ERROR); //WDEV-21356
	}

	if (personAddressResult != null && personAddressResult.length == 1)
	{
		form.getLocalContext().setAddressResult(personAddressResult[0]);
	}
	else
	{
		form.getGlobalContext().Core.setAddressSearchText(tabLocalSearch.txtLocalSearchPostcode().getValue());
		form.getGlobalContext().Core.setPersonAddress(personAddress);
		engine.open(form.getForms().Core.AddressSelection);
	}
}
 
Example 4
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onImbPostCodeSearchClick() throws PresentationLogicException 
{
	// Address provider helper
	IAddressProvider l_addressprovider = engine.getAddressProvider();
	if(l_addressprovider == null)
		throw new PresentationLogicException("Please Configure Address Provider");

	PersonAddress personAddress = new PersonAddress();
	PersonAddress[] personAddressResult = new PersonAddress[0];
			
	//Funtionality
	//To initiate search, the user will use either the poscode field or an additional address search field located on the right of the poscode field
	//The poscode field will initiate a search of type POSTCODE
	//the additional address search field will initiate a search of type BROWSE with input ADDR
			
	try
	{			
		if (form.txtAddressSearchText().getValue() != null && !form.txtAddressSearchText().getValue().equals(""))
		{
			personAddress.setAddressSearchText(form.txtAddressSearchText().getValue());// search criteria comma delimited.
			form.getGlobalContext().Core.setAddressSearchType("SEARCH");
		}
		else
		{
			engine.showMessage("Please enter a post code or keywords from the first or second line of the address.");
			return;
		}
		personAddressResult = (PersonAddress[])l_addressprovider.getAddress(personAddress,form.getGlobalContext().Core.getAddressSearchType(),"",""); // return result or ambiglist
	}
	catch (PresentationLogicException pe)
	{
		engine.showMessage(pe.getMessage());
	}
	
	//fill out rest of address fields if somthing found
	if (personAddressResult != null && personAddressResult.length == 1)
	{
		//exact match
		form.getLocalContext().setaddressResult(personAddressResult[0]);
		displayAddress();
	}
	else
	{
		form.getGlobalContext().Core.setAddressSearchText(form.txtAddressSearchText().getValue());
		form.getGlobalContext().Core.setPersonAddress(personAddress);
		engine.open(form.getForms().Core.AddressSelection);
	}						
}
 
Example 5
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onImbPostCodeSearchClick() throws PresentationLogicException 
{
	// Address provider helper
	IAddressProvider l_addressprovider = engine.getAddressProvider();
	if(l_addressprovider == null)
		throw new PresentationLogicException("Please Configure Address Provider");

	PersonAddress personAddress = new PersonAddress();
	PersonAddress[] personAddressResult = new PersonAddress[0];
			
	//Funtionality
	//To initiate search, the user will use either the poscode field or an additional address search field located on the right of the poscode field
	//The poscode field will initiate a search of type POSTCODE
	//the additional address search field will initiate a search of type BROWSE with input ADDR
			
	try
	{			
		if (form.txtAddressSearchText().getValue() != null && !form.txtAddressSearchText().getValue().equals(""))
		{
			personAddress.setAddressSearchText(form.txtAddressSearchText().getValue());// search criteria comma delimited.
			form.getGlobalContext().Core.setAddressSearchType("SEARCH");
		}
		else
		{
			engine.showMessage("Please enter a post code or keywords from the first or second line of the address.");
			return;
		}
		personAddressResult = (PersonAddress[])l_addressprovider.getAddress(personAddress,form.getGlobalContext().Core.getAddressSearchType(),"",""); // return result or ambiglist
	}
	catch (PresentationLogicException pe)
	{
		engine.showMessage(pe.getMessage());
	}
	
	//fill out rest of address fields if somthing found
	if (personAddressResult != null && personAddressResult.length == 1)
	{
		//exact match
		form.getLocalContext().setaddressResult(personAddressResult[0]);
		Date dateFrom = form.ccEffectiveDates().getDateFrom();
		Date dateTo = form.ccEffectiveDates().getDateTo();
		displayAddress();
		setPostCodeStatus();
		form.ccEffectiveDates().setEffectiveDates(dateFrom, dateTo);
		//WDEV-23175
		form.getLocalContext().setpostcodeValidated(true);
	}
	else
	{
		form.getGlobalContext().Core.setAddressSearchText(form.txtAddressSearchText().getValue());
		form.getGlobalContext().Core.setPersonAddress(personAddress);
		engine.open(form.getForms().Core.AddressSelection);
	}						
}
 
Example 6
Project: openMAXIMS   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onImbPostCodeSearchClick() throws PresentationLogicException 
{
	// Address provider helper
	IAddressProvider l_addressprovider = engine.getAddressProvider();
	if(l_addressprovider == null)
		throw new PresentationLogicException("Please Configure Address Provider");

	PersonAddress personAddress = new PersonAddress();
	PersonAddress[] personAddressResult = new PersonAddress[0];
			
	//Funtionality
	//To initiate search, the user will use either the poscode field or an additional address search field located on the right of the poscode field
	//The poscode field will initiate a search of type POSTCODE
	//the additional address search field will initiate a search of type BROWSE with input ADDR
			
	try
	{			
		if (form.txtAddressSearchText().getValue() != null && !form.txtAddressSearchText().getValue().equals(""))
		{
			personAddress.setAddressSearchText(form.txtAddressSearchText().getValue());// search criteria comma delimited.
			form.getGlobalContext().Core.setAddressSearchType("SEARCH");
		}
		else
		{
			engine.showMessage("Please enter a post code or keywords from the first or second line of the address.");
			return;
		}
		personAddressResult = (PersonAddress[])l_addressprovider.getAddress(personAddress,form.getGlobalContext().Core.getAddressSearchType(),"",""); // return result or ambiglist
	}
	catch (PresentationLogicException pe)
	{
		engine.showMessage(pe.getMessage());
	}
	
	//fill out rest of address fields if somthing found
	if (personAddressResult != null && personAddressResult.length == 1)
	{
		//exact match
		form.getLocalContext().setaddressResult(personAddressResult[0]);
		displayAddress();
	}
	else
	{
		form.getGlobalContext().Core.setAddressSearchText(form.txtAddressSearchText().getValue());
		form.getGlobalContext().Core.setPersonAddress(personAddress);
		engine.open(form.getForms().Core.AddressSelection);
	}						
}
 
Example 7
Project: openmaxims-linux   File: Logic.java   Source Code and License Vote up 4 votes
@Override
protected void onImbPostCodeSearchClick() throws PresentationLogicException 
{
	// Address provider helper
	IAddressProvider l_addressprovider = engine.getAddressProvider();
	if(l_addressprovider == null)
		throw new PresentationLogicException("Please Configure Address Provider");

	PersonAddress personAddress = new PersonAddress();
	PersonAddress[] personAddressResult = new PersonAddress[0];
			
	//Funtionality
	//To initiate search, the user will use either the poscode field or an additional address search field located on the right of the poscode field
	//The poscode field will initiate a search of type POSTCODE
	//the additional address search field will initiate a search of type BROWSE with input ADDR
			
	try
	{			
		if (form.txtAddressSearchText().getValue() != null && !form.txtAddressSearchText().getValue().equals(""))
		{
			personAddress.setAddressSearchText(form.txtAddressSearchText().getValue());// search criteria comma delimited.
			form.getGlobalContext().Core.setAddressSearchType("SEARCH");
		}
		else
		{
			engine.showMessage("Please enter a post code or keywords from the first or second line of the address.");
			return;
		}
		personAddressResult = (PersonAddress[])l_addressprovider.getAddress(personAddress,form.getGlobalContext().Core.getAddressSearchType(),"",""); // return result or ambiglist
	}
	catch (PresentationLogicException pe)
	{
		engine.showMessage(pe.getMessage());
	}
	
	//fill out rest of address fields if somthing found
	if (personAddressResult != null && personAddressResult.length == 1)
	{
		//exact match
		form.getLocalContext().setaddressResult(personAddressResult[0]);
		displayAddress();
	}
	else
	{
		form.getGlobalContext().Core.setAddressSearchText(form.txtAddressSearchText().getValue());
		form.getGlobalContext().Core.setPersonAddress(personAddress);
		engine.open(form.getForms().Core.AddressSelection);
	}						
}