Author: julien(a)jboss.com
Date: 2007-11-17 08:53:01 -0500 (Sat, 17 Nov 2007)
New Revision: 8987
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java
Log:
improve get markup of window
Modified:
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java
===================================================================
---
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17
13:50:07 UTC (rev 8986)
+++
branches/UIServer/core/src/main/org/jboss/portal/core/presentation/server/PresentationServerImpl.java 2007-11-17
13:53:01 UTC (rev 8987)
@@ -26,6 +26,7 @@
import org.jboss.portal.presentation.server.Processor;
import org.jboss.portal.presentation.server.PresentationServer;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.model.state.ModelLoader;
import org.jboss.portal.core.controller.Controller;
import org.jboss.portal.core.controller.ControllerContext;
@@ -115,12 +116,9 @@
public void setProcessor(Processor processor)
{
this.processor = processor;
- }
+ }
- /**
- *
- */
- public String getMarkup(RequestContext context, UIWindow window) throws Exception
+ public WindowContent render(RequestContext context, UIWindow window) throws Exception
{
PortalObjectId windowId = null;
RenderWindowCommand rwc = new RenderWindowCommand(windowId);
@@ -135,7 +133,8 @@
{
if (response instanceof MarkupResponse)
{
- return ((MarkupResponse)response).getContent();
+ MarkupResponse markupResp = (MarkupResponse)response;
+ return new WindowContent(-1, markupResp.getTitle(),
markupResp.getContent());
}
else if (response != null)
{
Modified:
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java
===================================================================
---
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java 2007-11-17
13:50:07 UTC (rev 8986)
+++
branches/UIServer/uiserver/src/main/org/jboss/portal/presentation/server/PresentationServer.java 2007-11-17
13:53:01 UTC (rev 8987)
@@ -24,6 +24,7 @@
import org.jboss.portal.presentation.RequestContext;
import org.jboss.portal.presentation.model.UIWindow;
+import org.jboss.portal.presentation.model.content.WindowContent;
import org.jboss.portal.presentation.model.state.ModelLoader;
/**
@@ -46,7 +47,7 @@
* @return the markup of the window
* @throws Exception for now a generic exception
*/
- String getMarkup(RequestContext context, UIWindow window) throws Exception;
+ WindowContent render(RequestContext context, UIWindow window) throws Exception;
/**
*
Show replies by date