                   ;; TODO: diable submit button after submitting
                   :onClick (fn [e]
                              (let [expression (clojure.string/trim (-> (@refs "expressionname") .getDOMNode .-value))
-                                   payload (merge {:methodConfigurationNamespace (config "namespace")
-                                                   :methodConfigurationName (config "name")
+                                   payload (merge {:methodConfigurationNamespace (:namespace config-id)
+                                                   :methodConfigurationName (:name config-id)
                                                    :entityType (entity "entityType")
                                                    :entityName (entity "name")}
                                                   (when-not (clojure.string/blank? expression) {:expression expression}))]

    ))


(defn- render-launch-button [state refs entity workspace-id config on-success]
  (when-not (:launch-result @state)
          [:div {:style {:fontSize "106%" :lineHeight 1 :textAlign "center"}}
           [:div {:style {:padding "0.7em 0" :cursor "pointer"

                        filtered-entities)}])]
        (style/create-form-label "Define Expression")
        (style/create-text-field {:ref "expressionname" :placeholder "leave blank for default"})
        (render-launch-button state refs selected-entity workspace-id config-id on-success)])]))


(react/defc Page
