From portal-commits at lists.jboss.org Tue Jul 1 17:51:04 2008 Content-Type: multipart/mixed; boundary="===============0987089752897956282==" MIME-Version: 1.0 From: portal-commits at lists.jboss.org To: portal-commits at lists.jboss.org Subject: [portal-commits] JBoss Portal SVN: r11242 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model and 7 other directories. Date: Tue, 01 Jul 2008 17:51:03 -0400 Message-ID: --===============0987089752897956282== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/presentat= ion/ajax/client/model/MetaWidget.java modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentat= ion/ajax/client/protocol/DestroyObjectAction.java Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentat= ion/ajax/client/PresentationClientAgent.java modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentat= ion/ajax/client/model/AjaxWindow.java modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentat= ion/ajax/client/utils/Appender.java modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentat= ion/ajax/client/utils/Logger.java modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentat= ion/ajax/public/style.css modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentat= ion/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/present= ation/portal/PresentationServerImpl.java modules/presentation/trunk/portal/src/main/java/org/jboss/portal/present= ation/portal/model/ModelAdapter.java Log: add explicit refresh capabiities on windows Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/pr= esentation/ajax/client/PresentationClientAgent.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/client/PresentationClientAgent.java 2008-07-01 21:19:51 UTC (rev = 11241) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/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 Julien Viet @@ -122,9 +124,12 @@ /** . */ private Element container; = + private DateTimeFormat format; + private SimpleAppender() { container =3D getElement(); + format =3D 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 m= sg) { Element div =3D DOM.createDiv(); = // - DOM.setInnerHTML(div, level + " " + category + " " + msg); + DOM.setInnerHTML(div, level + " " + format.format(time) + " " + c= ategory + " " + msg); = // DOM.appendChild(container, div); Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/pr= esentation/ajax/client/model/AjaxWindow.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/client/model/AjaxWindow.java 2008-07-01 21:19:51 UTC (rev 11241) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/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.OpaqueWindowActi= on; 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.DestroyObjectAct= ion; 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 =3D Logger.getLogger(AjaxWindow.class); = /** . */ + private MetaWidget meta; + + /** . */ private Label title; = /** . */ @@ -74,7 +79,55 @@ Label title =3D new Label("Window " + getId()); HTML markup =3D new HTML(); VerticalPanel widget =3D new VerticalPanel(); - widget.add(title); + Button close =3D new Button("close", new ClickListener() + { + public void onClick(Widget widget) + { + DestroyObjectAction action =3D new DestroyObjectAction(getId()= ); + AjaxRequest request =3D new AjaxRequest(); + request.setAction(action); + + // + final PresentationClientRemoteAsync remote =3D (PresentationCl= ientRemoteAsync)GWT.create(PresentationClientRemote.class); + ServiceDefTarget endpoint =3D (ServiceDefTarget)remote; + String moduleRelativeURL =3D GWT.getModuleBaseURL() + "remote"; + endpoint.setServiceEntryPoint(moduleRelativeURL); + + // + remote.process(request, new AsyncCallback() + { + public void onFailure(Throwable throwable) + { + } + + public void onSuccess(Object o) + { + AjaxResponse response =3D (AjaxResponse)o; +// for (int i =3D 0; i < response.getStaleObjects().lengt= h; i++) +// { +// String staleObject =3D response.getStaleObjects()[i= ]; +// +// AjaxObject stale =3D getContext().getObject(staleOb= ject); +// +// if (stale !=3D null) +// { +// log.info("Going to refresh portlet window " + st= aleObject); +// stale.refresh(true); +// } +// else +// { +// log.info("No stale window found for " + staleObj= ect); +// } +// +// } + } + }); + } + }); + MetaWidget meta =3D 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/prese= ntation/ajax/client/model/MetaWidget.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/client/model/MetaWidget.java (rev 0) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/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 Julien Viet + * @version $Revision: 630 $ + */ +public class MetaWidget extends FlowPanel +{ + + /** . */ + private Timer timer; + + /** . */ + private AjaxObject object; + + /** . */ + private Widget popup; + + public MetaWidget(AjaxObject object) + { + this.object =3D object; + + // + DOM.sinkEvents(getElement(), Event.MOUSEEVENTS); + } + + public void create() + { + + } + + public void destroy() + { + + } + + public void onBrowserEvent(Event event) + { + final Logger log =3D Logger.getLogger(MetaWidget.class + "." + objec= t.getId()); + switch (DOM.eventGetType(event)) + { + case Event.ONMOUSEMOVE: + break; + case Event.ONMOUSEOVER: + Element from =3D DOM.eventGetFromElement(event); + if (!isDescendant(getElement(), from)) + { + if (timer =3D=3D null) + { + timer =3D new Timer() + { + public void run() + { + log.info("Creating popup widget"); + + + VerticalPanel popup =3D new VerticalPanel(); + + popup.add(new Button("Refresh", new ClickListener() + { + public void onClick(Widget widget) + { + object.refresh(true); + } + })); + + + MetaWidget.this.popup =3D popup; + add(popup); + } + }; + timer.schedule(4000); + log.info("Scheduling"); + } + else + { + log.info("Will not schedule because it is already schedu= led"); + } + } + else + { + log.info("Will not schedule because the from element is des= cendant"); + } + break; + case Event.ONMOUSEOUT: + Element to =3D DOM.eventGetToElement(event); + if (!isDescendant(getElement(), to)) + { + if (timer !=3D null) + { + log.info("Unscheduling"); + timer.cancel(); + log.info("Timer cancelled"); + if (popup !=3D null) + { + remove(popup); + log.info("Removed popup"); + } + timer =3D null; + popup =3D null; + log.info("Unscheduled"); + } + } + break; + } + } + + private boolean isDescendant(Element current, Element element) + { + if (current =3D=3D element) + { + return true; + } + + // + for (int i =3D DOM.getChildCount(current) - 1;i >=3D 0;i--) + { + if (isDescendant(DOM.getChild(current, i), element)) + { + return true; + } + } + + // + return false; + } +} Added: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/prese= ntation/ajax/client/protocol/DestroyObjectAction.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/client/protocol/DestroyObjectAction.java = (rev 0) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/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 Julien Viet + * @version $Revision: 630 $ + */ +public class DestroyObjectAction extends AjaxAction +{ + + /** . */ + private String objectId; + + public DestroyObjectAction(String objectId) + { + this.objectId =3D objectId; + } + + public DestroyObjectAction() + { + } + + public String getObjectId() + { + return objectId; + } + + public void setObjectId(String objectId) + { + this.objectId =3D objectId; + } +} Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/pr= esentation/ajax/client/utils/Appender.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/client/utils/Appender.java 2008-07-01 21:19:51 UTC (rev 11241) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/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 Julien Viet * @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/pr= esentation/ajax/client/utils/Logger.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/client/utils/Logger.java 2008-07-01 21:19:51 UTC (rev 11241) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/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 Julien Viet @@ -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 IllegalArgumentE= xception + { + if (category =3D=3D null) + { + throw new IllegalArgumentException("No null category accepted"); + } + + // + Logger logger =3D (Logger)loggers.get(category); + + // + if (logger =3D=3D null) + { + loggers.put(category, logger =3D 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 =3D (Logger)loggers.get(name); - - // - if (logger =3D=3D null) - { - loggers.put(name, logger =3D new Logger(name)); - } - - // - return logger; + return getLogger(name); } = public static void registerAppender(Appender appender) @@ -115,12 +134,15 @@ } = // + Date now =3D new Date(); + + // for (Iterator i =3D appenders.iterator();i.hasNext();) { Appender appender =3D (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/pr= esentation/ajax/public/style.css =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/public/style.css 2008-07-01 21:19:51 UTC (rev 11241) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/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/pr= esentation/ajax/server/PresentationClientServlet.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/server/PresentationClientServlet.java 2008-07-01 21:19:51 UTC (re= v 11241) +++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presenta= tion/ajax/server/PresentationClientServlet.java 2008-07-01 21:51:03 UTC (re= v 11242) @@ -28,6 +28,7 @@ import org.jboss.portal.presentation.ajax.client.protocol.OpaqueWindowActi= on; 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.DestroyObjectAct= ion; 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.AjaxActionDecode= rContext; @@ -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 =3D (DestroyObjectAction)action; + + DestroyUIObjectAction destroyAction =3D new DestroyUIObjectAction= (ajaxAction.getObjectId()); + + // Now we execute + PresentationServer server =3D getPresentationServer(); + + PresentationClientImpl client =3D createPresentationClient(); + + PresentationRequest prequest =3D new PresentationRequest(destroyA= ction); + + 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/portal/src/main/artifacts/presentation-porta= l-war/WEB-INF/page-structure.xml 2008-07-01 21:19:51 UTC (rev 11241) +++ modules/presentation/trunk/portal/src/main/artifacts/presentation-porta= l-war/WEB-INF/page-structure.xml 2008-07-01 21:51:03 UTC (rev 11242) @@ -1,7 +1,8 @@ + xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" + name=3D""> @@ -28,6 +29,9 @@ + + + Modified: modules/presentation/trunk/portal/src/main/artifacts/presentation= -portal-war/WEB-INF/portlet.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/portal/src/main/artifacts/presentation-porta= l-war/WEB-INF/portlet.xml 2008-07-01 21:19:51 UTC (rev 11241) +++ modules/presentation/trunk/portal/src/main/artifacts/presentation-porta= l-war/WEB-INF/portlet.xml 2008-07-01 21:51:03 UTC (rev 11242) @@ -28,6 +28,21 @@ version=3D"2.0"> = + Session Counter Portlet + SessionCounter + Session Counter Portlet + org.jboss.portal.portlet.samples.basic.SessionCounter= Portlet + + text/html + VIEW + + + Session Counter + sample,basic + + + + Catalog Portlet Catalog Catalog Portlet @@ -73,7 +88,7 @@ Public Parameter Portlet - sample,test + sample,basic foo bar @@ -88,7 +103,7 @@ Public Parameter Portlet - sample,test + sample,basic foo juu @@ -103,7 +118,7 @@ Public Parameter Portlet - sample,test + sample,basic bar juu Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/= presentation/portal/PresentationServerImpl.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presen= tation/portal/PresentationServerImpl.java 2008-07-01 21:19:51 UTC (rev 1124= 1) +++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presen= tation/portal/PresentationServerImpl.java 2008-07-01 21:51:03 UTC (rev 1124= 2) @@ -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(targe= tId)); } + else if (objectAction instanceof DestroyUIObjectAction) + { + targetNode.getParent().destroyChild(targetNode.getName()); + + // + return new PresentationResponse(new ShowUIObjectResponse(targe= tId)); + } else if (objectAction instanceof LinkActivation) { throw new NotYetImplemented(); Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/= presentation/portal/model/ModelAdapter.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presen= tation/portal/model/ModelAdapter.java 2008-07-01 21:19:51 UTC (rev 11241) +++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presen= tation/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); } } = --===============0987089752897956282==--