Skip to content

Commit

Permalink
Fixing initialization of portlet context and enhancing the test portlet
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/cocoon/trunk@27537 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cziegeler committed Mar 4, 2004
1 parent 91c8ed8 commit bf93796
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Expand Up @@ -62,7 +62,7 @@ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
*
* @version CVS $Id: PortalContextProviderImpl.java,v 1.2 2004/01/23 01:26:04 crossley Exp $
* @version CVS $Id: PortalContextProviderImpl.java,v 1.3 2004/03/04 10:10:59 cziegeler Exp $
*/
public class PortalContextProviderImpl
implements PortalContextProvider {
Expand Down Expand Up @@ -94,9 +94,13 @@ public class PortalContextProviderImpl
/**
* Constructor
*/
public PortalContextProviderImpl(Map objectModel) { // these are the minimum modes that the portal needs to support this.modes = this.getDefaultModes();
// these are the minimum states that the portal needs to support this.states = this.getDefaultStates();
// set info this.info = "Apache Cocoon/1.0";
public PortalContextProviderImpl(Map objectModel) {
// these are the minimum modes that the portal needs to support
this.modes = this.getDefaultModes();
// these are the minimum states that the portal needs to support
this.states = this.getDefaultStates();
// set info
this.info = "Apache Cocoon/1.0";
this.properties = new HashMap();
this.init(objectModel);
}
Expand Down
Expand Up @@ -61,7 +61,7 @@ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
*
* @author <a href="mailto:cziegeler@apache.org">Carsten Ziegeler</a>
*
* @version CVS $Id: TestPortlet.java,v 1.3 2004/03/04 09:17:04 cziegeler Exp $
* @version CVS $Id: TestPortlet.java,v 1.4 2004/03/04 10:10:59 cziegeler Exp $
*/
public class TestPortlet implements Portlet {

Expand Down Expand Up @@ -96,6 +96,9 @@ public void render(RenderRequest req, RenderResponse res)
Writer writer = res.getWriter();
writer.write("<h1>Simple TestPortlet</h1>\n");
writer.write("<p>This is a Cocoon test portlet.</p>\n");
writer.write("<p>I'm running in: " + req.getPortalContext().getPortalInfo());
writer.write("<p>Current portlet mode: " + req.getPortletMode() + "</p>");
writer.write("<p>Current window state: " + req.getWindowState() + "</p>");
}

}

0 comments on commit bf93796

Please sign in to comment.