am new to using the ui framework , and am trying to follow a Tutorial but am getting this error when i click to submit a request. here is my controller
package org.openmrs.module.facelist.page.controller;
import java.util.List;
import org.openmrs.User;
import org.openmrs.module.facelist.SocialStaus;
import org.openmrs.module.facelist.Service.SocialService;
import org.openmrs.ui.framework.UiUtils;
import org.openmrs.ui.framework.annotation.SpringBean;
import org.openmrs.ui.framework.page.PageModel;
import org.springframework.web.bind.annotation.RequestParam;
public class StatusesPageController {
public void get(@SpringBean SocialService service , PageModel model){
List<SocialStaus> updates = service.getStatusUpdates();
model.put("statuses", updates );
}
public String post(@SpringBean SocialService service,
@RequestParam("user") User user,
@RequestParam("status") String status, UiUtils ui
){
SocialStaus social = new SocialStaus(user, status);
service.postStatusUpdate(social);
return "redirect:" + ui.pageLink("facelist", "statuses");
}
}
and here is my gsp
<form method = "post">
<input type = "hidden" name = "user" value = "${context.authenticatedUser.userId}" >
<textarea rows="2" cols="60" name = "status"></textarea>
<br>
<input type = "submit" value = "Post"/>
</form>
There are ${statuses.size()} status supdates
and here is the error log