我需要从actionMapping代码调用确定的renderMapping方法:
@ActionMapping(value = "update")
public String update(ActionRequest request, ActionResponse response) {
return "update";//how to call method update that is below instead of view method
}
@RenderMapping(value = "update")
public String update(RenderRequest request, RenderResponse response) {
return "updateForm";
}
@RenderMapping()
public String view(RenderRequest request, RenderResponse response) {
return forward;
}
您可以在actionMapping方法中设置要渲染的视图(调用渲染方法),如下所示:
response.getRenderParameters().setValue("view", "myView");
myView应该是您要显示的视图。这将调用render方法映射“myView”。
顺便说一下,我很确定你在问题上写错了标签。这将关注Liferay 6.x而不是liferay 7 :-)
干杯。