posting data from view to resource