   [entity-key property-key]
   nil)
 
-(defn get-condition-matched-entities
+(defn condition-matched-entities-and-page
   [entity-key]
   (if (and (= (get-in *request* [:params :command]) "search") (empty? (:entity-param-errors *request*)))
     (let [pages      (->> (-> (->> (if-let [conditions (not-empty (keep (partial condition entity-key) (search-condition-property-keys entity-key)))]

    (binding [*request* request]
      (handler request))))

(defn base64-encode
  [plain]
  (String. (base64/encode (.getBytes (pr-str plain) "UTF-16")) "US-ASCII"))

(defn index-controller
  [entity-key uri-parameters]
  (with-db-transaction'
    (apply index-view entity-key (condition-matched-entities-and-page entity-key))))

(defn select-controller
  [entity-key uri-parameters]
  (with-db-transaction'
    (apply select-view entity-key (condition-matched-entities-and-page entity-key))))

(defn new-controller
  [entity-key uri-parameters]
