basic (not as cool as joomla) version of enqueueMessages works
added an ability to define the object from the form