Liferay Spring MVC Edit Mode
<p>This is my @RequestMapping("VIEW"). If the param is null. it will direct to edit mode</p>

<pre><code>@Controller(value = "viewController")
@RequestMapping("VIEW")
public class viewController {
    @RenderMapping
     public void handleRenderRequest(RenderRequest request,RenderResponse response,Model model){
            PortletMode mode = request.getPortletMode();
            PortletPreferences prefs = request.getPreferences();
            String server = prefs.getValue("server", "");
            request.setAttribute("server", server);
            System.out.println("server: " +server)`enter code here`;
            if(server == null || server == "")
            {
               //go to edit mode
            }
       }
}
</code></pre>