Author: julien(a)jboss.com
Date: 2008-07-01 17:51:03 -0400 (Tue, 01 Jul 2008)
New Revision: 11242
Added:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/DestroyObjectAction.java
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Appender.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Logger.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/public/style.css
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/server/PresentationClientServlet.java
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/page-structure.xml
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/portlet.xml
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java
Log:
add explicit refresh capabiities on windows
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -32,6 +32,7 @@
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.i18n.client.DateTimeFormat;
import org.jboss.portal.presentation.ajax.client.model.update.ModelUpdate;
import org.jboss.portal.presentation.ajax.client.model.AjaxObject;
import org.jboss.portal.presentation.ajax.client.utils.Bootstrap;
@@ -41,6 +42,7 @@
import java.util.Map;
import java.util.HashMap;
+import java.util.Date;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
@@ -122,9 +124,12 @@
/** . */
private Element container;
+ private DateTimeFormat format;
+
private SimpleAppender()
{
container = getElement();
+ format = DateTimeFormat.getFormat("HH:mm:ss:SSSS");
//
// DOM.setStyleAttribute(container, "width", "auto");
@@ -135,12 +140,12 @@
setStylePrimaryName("log");
}
- public void append(Level level, String category, String msg)
+ public void append(Level level, Date time, String category, String msg)
{
Element div = DOM.createDiv();
//
- DOM.setInnerHTML(div, level + " " + category + " " + msg);
+ DOM.setInnerHTML(div, level + " " + format.format(time) + "
" + category + " " + msg);
//
DOM.appendChild(container, div);
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxWindow.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -27,6 +27,7 @@
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.DOM;
@@ -38,6 +39,7 @@
import org.jboss.portal.presentation.ajax.client.protocol.OpaqueWindowAction;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxRequest;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxResponse;
+import org.jboss.portal.presentation.ajax.client.protocol.DestroyObjectAction;
import org.jboss.portal.presentation.ajax.client.utils.Tools;
import org.jboss.portal.presentation.ajax.client.utils.Logger;
@@ -55,6 +57,9 @@
private static final Logger log = Logger.getLogger(AjaxWindow.class);
/** . */
+ private MetaWidget meta;
+
+ /** . */
private Label title;
/** . */
@@ -74,7 +79,55 @@
Label title = new Label("Window " + getId());
HTML markup = new HTML();
VerticalPanel widget = new VerticalPanel();
- widget.add(title);
+ Button close = new Button("close", new ClickListener()
+ {
+ public void onClick(Widget widget)
+ {
+ DestroyObjectAction action = new DestroyObjectAction(getId());
+ AjaxRequest request = new AjaxRequest();
+ request.setAction(action);
+
+ //
+ final PresentationClientRemoteAsync remote =
(PresentationClientRemoteAsync)GWT.create(PresentationClientRemote.class);
+ ServiceDefTarget endpoint = (ServiceDefTarget)remote;
+ String moduleRelativeURL = GWT.getModuleBaseURL() + "remote";
+ endpoint.setServiceEntryPoint(moduleRelativeURL);
+
+ //
+ remote.process(request, new AsyncCallback()
+ {
+ public void onFailure(Throwable throwable)
+ {
+ }
+
+ public void onSuccess(Object o)
+ {
+ AjaxResponse response = (AjaxResponse)o;
+// for (int i = 0; i < response.getStaleObjects().length; i++)
+// {
+// String staleObject = response.getStaleObjects()[i];
+//
+// AjaxObject stale = getContext().getObject(staleObject);
+//
+// if (stale != null)
+// {
+// log.info("Going to refresh portlet window " +
staleObject);
+// stale.refresh(true);
+// }
+// else
+// {
+// log.info("No stale window found for " +
staleObject);
+// }
+//
+// }
+ }
+ });
+ }
+ });
+ MetaWidget meta = new MetaWidget(this);
+ meta.add(title);
+ widget.add(meta);
+ widget.add(close);
widget.add(markup);
//
Added:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java
(rev 0)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/MetaWidget.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -0,0 +1,163 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.model;
+
+import com.google.gwt.user.client.ui.SimplePanel;
+import com.google.gwt.user.client.ui.PopupPanel;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.Widget;
+import com.google.gwt.user.client.ui.FlowPanel;
+import com.google.gwt.user.client.ui.VerticalPanel;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.Event;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.Element;
+import org.jboss.portal.presentation.ajax.client.utils.Logger;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class MetaWidget extends FlowPanel
+{
+
+ /** . */
+ private Timer timer;
+
+ /** . */
+ private AjaxObject object;
+
+ /** . */
+ private Widget popup;
+
+ public MetaWidget(AjaxObject object)
+ {
+ this.object = object;
+
+ //
+ DOM.sinkEvents(getElement(), Event.MOUSEEVENTS);
+ }
+
+ public void create()
+ {
+
+ }
+
+ public void destroy()
+ {
+
+ }
+
+ public void onBrowserEvent(Event event)
+ {
+ final Logger log = Logger.getLogger(MetaWidget.class + "." +
object.getId());
+ switch (DOM.eventGetType(event))
+ {
+ case Event.ONMOUSEMOVE:
+ break;
+ case Event.ONMOUSEOVER:
+ Element from = DOM.eventGetFromElement(event);
+ if (!isDescendant(getElement(), from))
+ {
+ if (timer == null)
+ {
+ timer = new Timer()
+ {
+ public void run()
+ {
+ log.info("Creating popup widget");
+
+
+ VerticalPanel popup = new VerticalPanel();
+
+ popup.add(new Button("Refresh", new ClickListener()
+ {
+ public void onClick(Widget widget)
+ {
+ object.refresh(true);
+ }
+ }));
+
+
+ MetaWidget.this.popup = popup;
+ add(popup);
+ }
+ };
+ timer.schedule(4000);
+ log.info("Scheduling");
+ }
+ else
+ {
+ log.info("Will not schedule because it is already
scheduled");
+ }
+ }
+ else
+ {
+ log.info("Will not schedule because the from element is
descendant");
+ }
+ break;
+ case Event.ONMOUSEOUT:
+ Element to = DOM.eventGetToElement(event);
+ if (!isDescendant(getElement(), to))
+ {
+ if (timer != null)
+ {
+ log.info("Unscheduling");
+ timer.cancel();
+ log.info("Timer cancelled");
+ if (popup != null)
+ {
+ remove(popup);
+ log.info("Removed popup");
+ }
+ timer = null;
+ popup = null;
+ log.info("Unscheduled");
+ }
+ }
+ break;
+ }
+ }
+
+ private boolean isDescendant(Element current, Element element)
+ {
+ if (current == element)
+ {
+ return true;
+ }
+
+ //
+ for (int i = DOM.getChildCount(current) - 1;i >= 0;i--)
+ {
+ if (isDescendant(DOM.getChild(current, i), element))
+ {
+ return true;
+ }
+ }
+
+ //
+ return false;
+ }
+}
Added:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/DestroyObjectAction.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/DestroyObjectAction.java
(rev 0)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/DestroyObjectAction.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.ajax.client.protocol;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
+ * @version $Revision: 630 $
+ */
+public class DestroyObjectAction extends AjaxAction
+{
+
+ /** . */
+ private String objectId;
+
+ public DestroyObjectAction(String objectId)
+ {
+ this.objectId = objectId;
+ }
+
+ public DestroyObjectAction()
+ {
+ }
+
+ public String getObjectId()
+ {
+ return objectId;
+ }
+
+ public void setObjectId(String objectId)
+ {
+ this.objectId = objectId;
+ }
+}
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Appender.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Appender.java 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Appender.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.presentation.ajax.client.utils;
+import java.util.Date;
+
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
* @version $Revision: 630 $
@@ -29,6 +31,6 @@
public interface Appender
{
- void append(Level level, String category, String msg);
+ void append(Level level, Date time, String category, String msg);
}
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Logger.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Logger.java 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/utils/Logger.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -27,6 +27,7 @@
import java.util.Set;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Date;
/**
* @author <a href="mailto:julien@jboss-portal.org">Julien
Viet</a>
@@ -47,6 +48,33 @@
/**
* Returns a logger.
*
+ * @param category the logger category
+ * @return the logger
+ * @throws IllegalArgumentException if the clazz argument is null
+ */
+ public static Logger getLogger(String category) throws IllegalArgumentException
+ {
+ if (category == null)
+ {
+ throw new IllegalArgumentException("No null category accepted");
+ }
+
+ //
+ Logger logger = (Logger)loggers.get(category);
+
+ //
+ if (logger == null)
+ {
+ loggers.put(category, logger = new Logger(category));
+ }
+
+ //
+ return logger;
+ }
+
+ /**
+ * Returns a logger.
+ *
* @param clazz the logger key
* @return the logger
* @throws IllegalArgumentException if the clazz argument is null
@@ -67,16 +95,7 @@
}
//
- Logger logger = (Logger)loggers.get(name);
-
- //
- if (logger == null)
- {
- loggers.put(name, logger = new Logger(name));
- }
-
- //
- return logger;
+ return getLogger(name);
}
public static void registerAppender(Appender appender)
@@ -115,12 +134,15 @@
}
//
+ Date now = new Date();
+
+ //
for (Iterator i = appenders.iterator();i.hasNext();)
{
Appender appender = (Appender)i.next();
//
- appender.append(level, category, msg);
+ appender.append(level, now, category, msg);
}
}
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/public/style.css
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/public/style.css 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/public/style.css 2008-07-01
21:51:03 UTC (rev 11242)
@@ -16,11 +16,13 @@
}
.pf-Title {
+cursor:default;
border: 1px solid black;
padding: 1px;
}
.pf-Markup {
+cursor:default;
border: 1px solid black;
padding: 1px;
}
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/server/PresentationClientServlet.java
===================================================================
---
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/server/PresentationClientServlet.java 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/server/PresentationClientServlet.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -28,6 +28,7 @@
import org.jboss.portal.presentation.ajax.client.protocol.OpaqueWindowAction;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxResponse;
import org.jboss.portal.presentation.ajax.client.protocol.AjaxRequest;
+import org.jboss.portal.presentation.ajax.client.protocol.DestroyObjectAction;
import org.jboss.portal.presentation.ajax.client.model.update.ModelUpdate;
import org.jboss.portal.presentation.ajax.server.model.AjaxViewPortContext;
import org.jboss.portal.presentation.ajax.server.protocol.AjaxActionDecoderContext;
@@ -46,6 +47,7 @@
import org.jboss.portal.presentation.protocol.codec.ActionEncoder;
import org.jboss.portal.presentation.protocol.codec.ActionDecoder;
import org.jboss.portal.presentation.protocol.ProtocolAction;
+import org.jboss.portal.presentation.protocol.DestroyUIObjectAction;
import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.WebRequest;
@@ -210,6 +212,31 @@
return new AjaxResponse();
}
}
+ else if (action instanceof DestroyObjectAction)
+ {
+ DestroyObjectAction ajaxAction = (DestroyObjectAction)action;
+
+ DestroyUIObjectAction destroyAction = new
DestroyUIObjectAction(ajaxAction.getObjectId());
+
+ // Now we execute
+ PresentationServer server = getPresentationServer();
+
+ PresentationClientImpl client = createPresentationClient();
+
+ PresentationRequest prequest = new PresentationRequest(destroyAction);
+
+ try
+ {
+ server.process(client, prequest);
+ }
+ catch (PresentationServerException e)
+ {
+ e.printStackTrace();
+ }
+
+ //
+ return new AjaxResponse();
+ }
else
{
return new AjaxResponse();
Modified:
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/page-structure.xml
===================================================================
---
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/page-structure.xml 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/page-structure.xml 2008-07-01
21:51:03 UTC (rev 11242)
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<context-def
xmlns="urn:jboss:portal:presentation:page:1.0"
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="">
<simple-layout>
<window-def name="windowA">
<portlet ref="/portal-server.Catalog"/>
@@ -28,6 +29,9 @@
<portlet ref="/portal-server.PublicParameterPortlet3"/>
</window-def>
</simple-layout>
+ <window-def name="windowH">
+ <portlet ref="/portal-server.SessionCounter"/>
+ </window-def>
</simple-layout>
<page-def name="child-page-1">
<simple-layout>
Modified:
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/portlet.xml
===================================================================
---
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/portlet.xml 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/portal/src/main/artifacts/presentation-portal-war/WEB-INF/portlet.xml 2008-07-01
21:51:03 UTC (rev 11242)
@@ -28,6 +28,21 @@
version="2.0">
<portlet>
+ <description>Session Counter Portlet</description>
+ <portlet-name>SessionCounter</portlet-name>
+ <display-name>Session Counter Portlet</display-name>
+
<portlet-class>org.jboss.portal.portlet.samples.basic.SessionCounterPortlet</portlet-class>
+ <supports>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>VIEW</portlet-mode>
+ </supports>
+ <portlet-info>
+ <title>Session Counter</title>
+ <keywords>sample,basic</keywords>
+ </portlet-info>
+ </portlet>
+
+ <portlet>
<description>Catalog Portlet</description>
<portlet-name>Catalog</portlet-name>
<display-name>Catalog Portlet</display-name>
@@ -73,7 +88,7 @@
</supports>
<portlet-info>
<title>Public Parameter Portlet</title>
- <keywords>sample,test</keywords>
+ <keywords>sample,basic</keywords>
</portlet-info>
<supported-public-render-parameter>foo</supported-public-render-parameter>
<supported-public-render-parameter>bar</supported-public-render-parameter>
@@ -88,7 +103,7 @@
</supports>
<portlet-info>
<title>Public Parameter Portlet</title>
- <keywords>sample,test</keywords>
+ <keywords>sample,basic</keywords>
</portlet-info>
<supported-public-render-parameter>foo</supported-public-render-parameter>
<supported-public-render-parameter>juu</supported-public-render-parameter>
@@ -103,7 +118,7 @@
</supports>
<portlet-info>
<title>Public Parameter Portlet</title>
- <keywords>sample,test</keywords>
+ <keywords>sample,basic</keywords>
</portlet-info>
<supported-public-render-parameter>bar</supported-public-render-parameter>
<supported-public-render-parameter>juu</supported-public-render-parameter>
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -44,6 +44,7 @@
import org.jboss.portal.presentation.protocol.ViewUIObjectAction;
import org.jboss.portal.presentation.protocol.LinkActivation;
import org.jboss.portal.presentation.protocol.ProtocolResponse;
+import org.jboss.portal.presentation.protocol.DestroyUIObjectAction;
import org.jboss.portal.presentation.server.PresentationRequest;
import org.jboss.portal.presentation.server.PresentationResponse;
import org.jboss.portal.presentation.server.PresentationServer;
@@ -129,6 +130,13 @@
{
return new PresentationResponse(new ShowUIObjectResponse(targetId));
}
+ else if (objectAction instanceof DestroyUIObjectAction)
+ {
+ targetNode.getParent().destroyChild(targetNode.getName());
+
+ //
+ return new PresentationResponse(new ShowUIObjectResponse(targetId));
+ }
else if (objectAction instanceof LinkActivation)
{
throw new NotYetImplemented();
Modified:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java
===================================================================
---
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java 2008-07-01
21:19:51 UTC (rev 11241)
+++
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java 2008-07-01
21:51:03 UTC (rev 11242)
@@ -206,7 +206,7 @@
}
else
{
- throw new NotYetImplemented();
+ throw new NotYetImplemented("Cannot get id of object " + o);
}
}