Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A lookup helper is simply a class that implements org.kuali.ricekfs.kns.lookup.LookupableHelperServiceLookupableHelperService declares a large number of methods to define (~44), though. As we'll see, we don't have redefine all of those, and definitely, some are more used than others. Let's take a look at the most customized LookupableHelperService methods.

...

Thankfully, we do have something to inherit from: two helper classes that we can extend, org.kuali.ricekfs.kns.lookup.AbstractLookupableHelperServiceImpl and org.kuali.ricekfs.kns.lookup.KualiLookupableHelperServiceImpl. We'll also take a look at LookupUtils, which has handy static methods for looking up business objects.

...

KualiLookupableHelperServiceImpl extends AbstractLookupableHelperServiceImpl to make a concrete class - that is, it implements getSearchResults() and reimplements a more functional version of getSearchResultsUnbounded(). It defers, ultimately, to the default implementation of org.kuali.ricekfs.kns.service.LookupService, which does basic searching in the persistence store, using OJB queries.

...

Code Block
xml
xml
<bean id="accountLookupableHelperService"
class="org.kuali.kfs.coa.businessobject.lookup.KualiAccountLookupableHelperServiceImpl"
	scope="prototype" parent="lookupableHelperService" />

<bean id="accountLookupable" class="org.kuali.ricekfs.kns.lookup.KualiLookupableImpl"
	scope="prototype">
	<property name="lookupableHelperService">
            <ref bean="accountLookupableHelperService" />
	</property>
</bean>

...