Index: trunk/grails-app/controllers/InventoryLocationDetailedController.groovy
===================================================================
--- trunk/grails-app/controllers/InventoryLocationDetailedController.groovy	(revision 957)
+++ trunk/grails-app/controllers/InventoryLocationDetailedController.groovy	(revision 958)
@@ -3,4 +3,6 @@
 @Secured(['ROLE_AppAdmin', 'ROLE_Manager', 'ROLE_InventoryManager'])
 class InventoryLocationDetailedController extends BaseController {
+
+    def filterService
 
     // the delete, save and update actions only accept POST requests
@@ -13,5 +15,22 @@
     def list = {
         params.max = Math.min( params.max ? params.max.toInteger() : 10,  100)
-        [ inventoryLocationInstanceList: InventoryLocation.list( params ), inventoryLocationInstanceTotal: InventoryLocation.count() ]
+        def associatedPropertyMax = 1000
+        def associatedPropertyValues = [:]
+        def inventoryStoreNameQuery = 'select distinct a.name from InventoryStore a where a.isActive = ? order by a.name'
+        associatedPropertyValues.inventoryStoreList = InventoryStore.executeQuery(inventoryStoreNameQuery, [true], [max:associatedPropertyMax])
+
+        if(!params.filter) {
+            return [inventoryLocationInstanceList: InventoryLocation.list(params),
+                    inventoryLocationInstanceTotal: InventoryLocation.count(),
+                    associatedPropertyValues: associatedPropertyValues,
+                    filterParams: params]
+        }
+
+        // filterPane:
+        return[ inventoryLocationInstanceList: filterService.filter( params, InventoryLocation ),
+                inventoryLocationInstanceTotal: filterService.count( params, InventoryLocation ),
+                associatedPropertyValues: associatedPropertyValues,
+                filterParams: com.zeddware.grails.plugins.filterpane.FilterUtils.extractFilterParams(params),
+                params:params ]
     }
 
@@ -74,5 +93,5 @@
                 def version = params.version.toLong()
                 if(inventoryLocationInstance.version > version) {
-                    
+
                     inventoryLocationInstance.errors.rejectValue("version", "default.optimistic.locking.failure")
                     render(view:'edit',model:[inventoryLocationInstance:inventoryLocationInstance])
Index: trunk/grails-app/views/inventoryLocationDetailed/list.gsp
===================================================================
--- trunk/grails-app/views/inventoryLocationDetailed/list.gsp	(revision 957)
+++ trunk/grails-app/views/inventoryLocationDetailed/list.gsp	(revision 958)
@@ -6,4 +6,5 @@
         <meta name="layout" content="main" />
         <title>InventoryLocation List</title>
+        <filterpane:includes />
         <nav:resources override="true"/>
     </head>
@@ -13,59 +14,84 @@
         </div>
         <div class="body">
-            <g:if test="${flash.message}">
-            <div class="message">${flash.message}</div>
-            </g:if>
-            <div class="list">
-                <table>
-                    <thead>
+            <g:render template="/shared/messages" />
+
+            <filterpane:currentCriteria domainBean="InventoryLocation"
+                                        action="list"
+                                        dateFormat="EEE, dd-MMM-yyyy"
+                                        removeImgDir="images"
+                                        removeImgFile="bullet_delete.png"
+                                        title="Search"/>
+
+            <div class="paginateButtons">
+                Results: ${inventoryLocationInstanceList.size()} / ${inventoryLocationInstanceTotal}
+                <span class="searchButtons">
+                    <filterpane:filterButton text="Search" appliedText="Change Search" />
+                </span>
+            </div>
+
+            <br />
+
+            <g:if test="${inventoryLocationInstanceList.size() > 0}">
+                <div class="list">
+                    <table>
+                        <thead>
                         <tr>
-                        
-                            <g:sortableColumn property="id" title="Id" />
 
-                            <g:sortableColumn property="name" title="Name" />
+                            <g:sortableColumn property="id" title="Id" params="${filterParams}" />
 
-                            <th>Inventory Store</th>
+                            <g:sortableColumn property="name" title="Name" params="${filterParams}" />
 
-                            <g:sortableColumn property="isActive" title="Is Active" />
+                            <g:sortableColumn property="inventoryStore" title="Inventory Store" params="${filterParams}" />
+
+                            <g:sortableColumn property="isActive" title="Is Active" params="${filterParams}" />
 
                             <th></th>
-                        
+
                         </tr>
-                    </thead>
-                    <tbody>
-                    <g:each in="${inventoryLocationInstanceList}" status="i" var="inventoryLocationInstance">
-                        <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
+                        </thead>
+                        <tbody>
+                        <g:each in="${inventoryLocationInstanceList}" status="i" var="inventoryLocationInstance">
+                            <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}">
 
-                        
-                            <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
-                                ${fieldValue(bean:inventoryLocationInstance, field:'id')}
-                            </td>
-                        
-                            <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
-                                ${fieldValue(bean:inventoryLocationInstance, field:'name')}
-                            </td>
-                        
-                            <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
-                                ${fieldValue(bean:inventoryLocationInstance, field:'inventoryStore')}
-                            </td>
-                        
-                            <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
-                                ${fieldValue(bean:inventoryLocationInstance, field:'isActive')}
-                            </td>
 
-                            <td class="notClickable">
-                                <g:link action="show" id="${inventoryLocationInstance.id}">
-                                    <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
-                                </g:link>
-                            </td>
-                        
-                        </tr>
-                    </g:each>
-                    </tbody>
-                </table>
+                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
+                                    ${fieldValue(bean:inventoryLocationInstance, field:'id')}
+                                </td>
+
+                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
+                                    ${fieldValue(bean:inventoryLocationInstance, field:'name')}
+                                </td>
+
+                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
+                                    ${fieldValue(bean:inventoryLocationInstance, field:'inventoryStore')}
+                                </td>
+
+                                <td onclick='window.location = "${request.getContextPath()}/inventoryLocationDetailed/show/${inventoryLocationInstance.id}"'>
+                                    ${fieldValue(bean:inventoryLocationInstance, field:'isActive')}
+                                </td>
+
+                                <td class="notClickable">
+                                    <g:link action="show" id="${inventoryLocationInstance.id}">
+                                        <img  src="${resource(dir:'images/skin',file:'database_go.png')}" alt="Show" />
+                                    </g:link>
+                                </td>
+
+                            </tr>
+                        </g:each>
+                        </tbody>
+                    </table>
+                </div>
+            </g:if>
+
+            <div class="paginateButtons">
+                <g:paginate total="${inventoryLocationInstanceTotal}" params="${filterParams}" />
             </div>
-            <div class="paginateButtons">
-                <g:paginate total="${inventoryLocationInstanceTotal}" />
-            </div>
+
+            <filterpane:filterPane domainBean="InventoryLocation"
+                                   title="Search"
+                                   action="list"
+                                   class="overlayPane"
+                                   associatedProperties="inventoryStore.name"
+                                   filterPropertyValues="${['inventoryStore.name':[values: associatedPropertyValues.inventoryStoreList]]}" />
         </div>
     </body>
