Permalink
Browse files

Criando método include; criando modo edit

  • Loading branch information...
1 parent c00970a commit 321b676a30fec023660ca7bcbcc7dc29db66bc54 @brandizzi committed Feb 6, 2012
@@ -12,6 +12,7 @@
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
+ <portlet-mode>EDIT</portlet-mode>
</supports>
<portlet-info>
<title>Portlet "Hello, World"</title>
@@ -15,6 +15,16 @@
public void doView(RenderRequest renderRequest, RenderResponse renderResponse)
throws IOException, PortletException {
String path = "/view.jsp";
+ include(path, renderRequest, renderResponse);
+ }
+ @Override
+ public void doEdit(RenderRequest renderRequest, RenderResponse renderResponse)
+ throws IOException, PortletException {
+ String path = "/edit.jsp";
+ include(path, renderRequest, renderResponse);
+ }
+ public void include(String path, RenderRequest renderRequest, RenderResponse renderResponse)
+ throws IOException, PortletException {
PortletContext context = getPortletContext();
PortletRequestDispatcher dispatcher = context.getRequestDispatcher(path);
dispatcher.include(renderRequest, renderResponse);

0 comments on commit 321b676

Please sign in to comment.