JBoss Portal SVN: r11379 - examples/trunk/SimplestHelloWorld/src/main/webapp/WEB-INF.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-09 14:31:39 -0400 (Wed, 09 Jul 2008)
New Revision: 11379
Added:
examples/trunk/SimplestHelloWorld/src/main/webapp/WEB-INF/jboss-portlet.xml
Log:
Adding missing file
Added: examples/trunk/SimplestHelloWorld/src/main/webapp/WEB-INF/jboss-portlet.xml
===================================================================
--- examples/trunk/SimplestHelloWorld/src/main/webapp/WEB-INF/jboss-portlet.xml (rev 0)
+++ examples/trunk/SimplestHelloWorld/src/main/webapp/WEB-INF/jboss-portlet.xml 2008-07-09 18:31:39 UTC (rev 11379)
@@ -0,0 +1,30 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
+<portlet-app>
+ <app-id>SimplestHelloWorld</app-id>
+</portlet-app>
\ No newline at end of file
16 years, 3 months
JBoss Portal SVN: r11378 - in examples/trunk/JSFHelloUser: src/main/java/org/jboss/portal/portlet/samples and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-09 14:04:24 -0400 (Wed, 09 Jul 2008)
New Revision: 11378
Removed:
examples/trunk/JSFHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
Modified:
examples/trunk/JSFHelloUser/.project
examples/trunk/JSFHelloUser/pom.xml
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/default-object.xml
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet-instances.xml
examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet.xml
Log:
Starting up JSF Hello User
Modified: examples/trunk/JSFHelloUser/.project
===================================================================
--- examples/trunk/JSFHelloUser/.project 2008-07-09 18:00:40 UTC (rev 11377)
+++ examples/trunk/JSFHelloUser/.project 2008-07-09 18:04:24 UTC (rev 11378)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>HelloWorld</name>
+ <name>JSFHelloUser</name>
<comment></comment>
<projects>
</projects>
Modified: examples/trunk/JSFHelloUser/pom.xml
===================================================================
--- examples/trunk/JSFHelloUser/pom.xml 2008-07-09 18:00:40 UTC (rev 11377)
+++ examples/trunk/JSFHelloUser/pom.xml 2008-07-09 18:04:24 UTC (rev 11378)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.example</groupId>
- <artifactId>JSPHelloUser</artifactId>
+ <artifactId>JSFHelloUser</artifactId>
<packaging>war</packaging>
<name />
<version>0.0.1</version>
Deleted: examples/trunk/JSFHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
===================================================================
--- examples/trunk/JSFHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2008-07-09 18:00:40 UTC (rev 11377)
+++ examples/trunk/JSFHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2008-07-09 18:04:24 UTC (rev 11378)
@@ -1,78 +0,0 @@
-/******************************************************************************
- * 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.portlet.samples;
-
-import java.io.IOException;
-
-import javax.portlet.ActionRequest;
-import javax.portlet.ActionResponse;
-import javax.portlet.GenericPortlet;
-import javax.portlet.PortletException;
-import javax.portlet.PortletRequestDispatcher;
-import javax.portlet.RenderRequest;
-import javax.portlet.RenderResponse;
-import javax.portlet.UnavailableException;
-
-public class JSPHelloUserPortlet extends GenericPortlet
-{
-
- public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException
- {
- String sYourName = (String) request.getParameter("yourname");
- if (sYourName != null)
- {
- request.setAttribute("yourname", sYourName);
- PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
- prd.include(request, response);
- }
- else
- {
- PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/welcome.jsp");
- prd.include(request, response);
- }
- }
-
- public void processAction(ActionRequest aRequest, ActionResponse aResponse) throws PortletException, IOException,
- UnavailableException
- {
- String sYourname = (String) aRequest.getParameter("yourname");
- aResponse.setRenderParameter("yourname", sYourname);
- }
-
- protected void doHelp(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException,
- UnavailableException
- {
- rResponse.setContentType("text/html");
- PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/help.jsp");
- prd.include(rRequest, rResponse);
- }
-
- protected void doEdit(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException,
- UnavailableException
- {
- rResponse.setContentType("text/html");
- PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/edit.jsp");
- prd.include(rRequest, rResponse);
- }
-
-}
Modified: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/default-object.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/default-object.xml 2008-07-09 18:00:40 UTC (rev 11377)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/default-object.xml 2008-07-09 18:04:24 UTC (rev 11378)
@@ -30,10 +30,10 @@
<parent-ref>default</parent-ref>
<if-exists>overwrite</if-exists>
<page>
- <page-name>JSPHelloUser</page-name>
+ <page-name>JSFHelloUser</page-name>
<window>
- <window-name>JSPHelloUserWindow</window-name>
- <instance-ref>JSPHelloUserInstance</instance-ref>
+ <window-name>JSFHelloUserWindow</window-name>
+ <instance-ref>JSFHelloUserInstance</instance-ref>
<region>center</region>
<height>0</height>
</window>
Modified: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet-instances.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet-instances.xml 2008-07-09 18:00:40 UTC (rev 11377)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet-instances.xml 2008-07-09 18:04:24 UTC (rev 11378)
@@ -27,8 +27,8 @@
<deployments>
<deployment>
<instance>
- <instance-id>JSPHelloUserInstance</instance-id>
- <portlet-ref>JSPHelloUserPortlet</portlet-ref>
+ <instance-id>JSFHelloUserInstance</instance-id>
+ <portlet-ref>JSFHelloUserPortlet</portlet-ref>
</instance>
</deployment>
</deployments>
\ No newline at end of file
Modified: examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet.xml 2008-07-09 18:00:40 UTC (rev 11377)
+++ examples/trunk/JSFHelloUser/src/main/webapp/WEB-INF/portlet.xml 2008-07-09 18:04:24 UTC (rev 11378)
@@ -5,7 +5,7 @@
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
version="2.0">
<portlet>
- <portlet-name>JSPHelloUserPortlet</portlet-name>
+ <portlet-name>JSFHelloUserPortlet</portlet-name>
<portlet-class>
org.jboss.portal.portlet.samples.JSPHelloUserPortlet
</portlet-class>
@@ -16,7 +16,7 @@
<mode>help</mode>
</supports>
<portlet-info>
- <title>JSP Hello User Portlet</title>
+ <title>JSF Hello User Portlet</title>
</portlet-info>
</portlet>
</portlet-app>
\ No newline at end of file
16 years, 3 months
JBoss Portal SVN: r11377 - in examples/trunk/SimplestHelloWorld: src/main/java/org/jboss/portal/portlet/samples and 1 other directory.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-09 14:00:40 -0400 (Wed, 09 Jul 2008)
New Revision: 11377
Modified:
examples/trunk/SimplestHelloWorld/.project
examples/trunk/SimplestHelloWorld/src/main/java/org/jboss/portal/portlet/samples/SimplestHelloWorldPortlet.java
Log:
Changing project name (Eclipse)
Modified: examples/trunk/SimplestHelloWorld/.project
===================================================================
--- examples/trunk/SimplestHelloWorld/.project 2008-07-09 17:59:15 UTC (rev 11376)
+++ examples/trunk/SimplestHelloWorld/.project 2008-07-09 18:00:40 UTC (rev 11377)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>SimplestHelloWorldPortlet</name>
+ <name>SimplestHelloWorld</name>
<comment></comment>
<projects>
</projects>
Modified: examples/trunk/SimplestHelloWorld/src/main/java/org/jboss/portal/portlet/samples/SimplestHelloWorldPortlet.java
===================================================================
--- examples/trunk/SimplestHelloWorld/src/main/java/org/jboss/portal/portlet/samples/SimplestHelloWorldPortlet.java 2008-07-09 17:59:15 UTC (rev 11376)
+++ examples/trunk/SimplestHelloWorld/src/main/java/org/jboss/portal/portlet/samples/SimplestHelloWorldPortlet.java 2008-07-09 18:00:40 UTC (rev 11377)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * 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. *
16 years, 3 months
JBoss Portal SVN: r11376 - examples/trunk/JSPHelloUser.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-09 13:59:15 -0400 (Wed, 09 Jul 2008)
New Revision: 11376
Modified:
examples/trunk/JSPHelloUser/.project
Log:
Change porject name in Eclipse
Modified: examples/trunk/JSPHelloUser/.project
===================================================================
--- examples/trunk/JSPHelloUser/.project 2008-07-09 17:57:18 UTC (rev 11375)
+++ examples/trunk/JSPHelloUser/.project 2008-07-09 17:59:15 UTC (rev 11376)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>HelloWorld</name>
+ <name>JSPHelloUser</name>
<comment></comment>
<projects>
</projects>
16 years, 3 months
JBoss Portal SVN: r11375 - in examples/trunk/JSPHelloUser/src/main: webapp/WEB-INF and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-09 13:57:18 -0400 (Wed, 09 Jul 2008)
New Revision: 11375
Added:
examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/jboss-portlet.xml
Modified:
examples/trunk/JSPHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/portlet.xml
examples/trunk/JSPHelloUser/src/main/webapp/jsp/edit.jsp
examples/trunk/JSPHelloUser/src/main/webapp/jsp/help.jsp
Log:
minor
Modified: examples/trunk/JSPHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java
===================================================================
--- examples/trunk/JSPHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2008-07-09 17:54:14 UTC (rev 11374)
+++ examples/trunk/JSPHelloUser/src/main/java/org/jboss/portal/portlet/samples/JSPHelloUserPortlet.java 2008-07-09 17:57:18 UTC (rev 11375)
@@ -41,7 +41,6 @@
String sYourName = (String) request.getParameter("yourname");
if (sYourName != null)
{
- request.setAttribute("yourname", sYourName);
PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/jsp/hello.jsp");
prd.include(request, response);
}
@@ -52,13 +51,6 @@
}
}
- public void processAction(ActionRequest aRequest, ActionResponse aResponse) throws PortletException, IOException,
- UnavailableException
- {
- String sYourname = (String) aRequest.getParameter("yourname");
- aResponse.setRenderParameter("yourname", sYourname);
- }
-
protected void doHelp(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException,
UnavailableException
{
@@ -75,4 +67,12 @@
prd.include(rRequest, rResponse);
}
+ public void processAction(ActionRequest aRequest, ActionResponse aResponse) throws PortletException, IOException,
+ UnavailableException
+ {
+ String sYourname = (String) aRequest.getParameter("yourname");
+ aResponse.setRenderParameter("yourname", sYourname);
+ }
+
+
}
Added: examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/jboss-portlet.xml
===================================================================
--- examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/jboss-portlet.xml (rev 0)
+++ examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/jboss-portlet.xml 2008-07-09 17:57:18 UTC (rev 11375)
@@ -0,0 +1,30 @@
+<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ ~ JBoss, a division of Red Hat ~
+ ~ Copyright 2006, 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. ~
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
+
+<!DOCTYPE portlet-app PUBLIC
+ "-//JBoss Portal//DTD JBoss Portlet 2.6//EN"
+ "http://www.jboss.org/portal/dtd/jboss-portlet_2_6.dtd">
+
+<portlet-app>
+ <app-id>JSPHelloUser</app-id>
+</portlet-app>
\ No newline at end of file
Modified: examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/portlet.xml
===================================================================
--- examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/portlet.xml 2008-07-09 17:54:14 UTC (rev 11374)
+++ examples/trunk/JSPHelloUser/src/main/webapp/WEB-INF/portlet.xml 2008-07-09 17:57:18 UTC (rev 11375)
@@ -6,17 +6,15 @@
version="2.0">
<portlet>
<portlet-name>JSPHelloUserPortlet</portlet-name>
- <portlet-class>
- org.jboss.portal.portlet.samples.JSPHelloUserPortlet
- </portlet-class>
+ <portlet-class>org.jboss.portal.portlet.samples.JSPHelloUserPortlet</portlet-class>
<supports>
- <mime-type>text/html</mime-type>
- <mode>view</mode>
- <mode>edit</mode>
- <mode>help</mode>
+ <mime-type>text/html</mime-type>
+ <portlet-mode>view</portlet-mode>
+ <portlet-mode>edit</portlet-mode>
+ <portlet-mode>help</portlet-mode>
</supports>
<portlet-info>
- <title>JSP Hello User Portlet</title>
+ <title>JSP Hello User Portlet</title>
</portlet-info>
</portlet>
</portlet-app>
\ No newline at end of file
Modified: examples/trunk/JSPHelloUser/src/main/webapp/jsp/edit.jsp
===================================================================
--- examples/trunk/JSPHelloUser/src/main/webapp/jsp/edit.jsp 2008-07-09 17:54:14 UTC (rev 11374)
+++ examples/trunk/JSPHelloUser/src/main/webapp/jsp/edit.jsp 2008-07-09 17:57:18 UTC (rev 11375)
@@ -1,2 +1,2 @@
<div class="portlet-section-header">Edit mode</div>
-<div class='Portlet-section-body">This is the edit mode, a convenient place to let the user change his portlet preferences.</div>
\ No newline at end of file
+<div class="portlet-section-body">This is the edit mode, a convenient place to let the user change his portlet preferences.</div>
\ No newline at end of file
Modified: examples/trunk/JSPHelloUser/src/main/webapp/jsp/help.jsp
===================================================================
--- examples/trunk/JSPHelloUser/src/main/webapp/jsp/help.jsp 2008-07-09 17:54:14 UTC (rev 11374)
+++ examples/trunk/JSPHelloUser/src/main/webapp/jsp/help.jsp 2008-07-09 17:57:18 UTC (rev 11375)
@@ -1,2 +1,2 @@
<div class="portlet-section-header">Help mode</div>
-<div class='Portlet-section-body">This is the help mode, a convenient place to give the user some help information.</div>
\ No newline at end of file
+<div class="portlet-section-body">This is the help mode, a convenient place to give the user some help information.</div>
\ No newline at end of file
16 years, 3 months
JBoss Portal SVN: r11374 - examples/trunk.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-07-09 13:54:14 -0400 (Wed, 09 Jul 2008)
New Revision: 11374
Added:
examples/trunk/JSFHelloUser/
Log:
JSF Hello User Portlet
Copied: examples/trunk/JSFHelloUser (from rev 11373, examples/trunk/JSPHelloUser)
16 years, 3 months
JBoss Portal SVN: r11373 - modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/dnd.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-09 12:35:12 -0400 (Wed, 09 Jul 2008)
New Revision: 11373
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/dnd/DnDPanel.java
Log:
fix the droppable selection that was not taking in account the window scroll values
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/dnd/DnDPanel.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/dnd/DnDPanel.java 2008-07-09 16:28:31 UTC (rev 11372)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/dnd/DnDPanel.java 2008-07-09 16:35:12 UTC (rev 11373)
@@ -117,7 +117,7 @@
);
//
- updateDroppable(x, y);
+ updateDroppable(x + Window.getScrollLeft(), y + Window.getScrollTop());
//
// DOM.setCapture(element);
@@ -148,7 +148,7 @@
" on element " + element);
//
- updateDroppable(x, y);
+ updateDroppable(x + Window.getScrollLeft(), y + Window.getScrollTop());
}
//
16 years, 3 months
JBoss Portal SVN: r11372 - modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-09 12:28:31 -0400 (Wed, 09 Jul 2008)
New Revision: 11372
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java
Log:
a bit of javadoc
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java 2008-07-09 16:19:56 UTC (rev 11371)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/AgentContext.java 2008-07-09 16:28:31 UTC (rev 11372)
@@ -30,6 +30,9 @@
import com.google.gwt.user.client.rpc.AsyncCallback;
/**
+ * The context of the agent which is the interface to be used to perform global
+ * actions.
+ *
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
*/
@@ -45,8 +48,33 @@
/** . */
PresentationClientAgent agent;
- public void process(AjaxAction action)
+ /**
+ * Process the action and perform a refresh.
+ *
+ * @param action the action
+ * @throws IllegalArgumentException if the action is null
+ */
+ public void process(AjaxAction action) throws IllegalArgumentException
{
+ process(action, true);
+ }
+
+ /**
+ * Process the action and optionally performs a refresh. If the refresh is not
+ * performed we assume that the caller will perform a refresh by itself.
+ *
+ * @param action the action to process
+ * @param refresh true if a refresh is required
+ * @throws IllegalArgumentException if the action is null
+ */
+ public void process(AjaxAction action, final boolean refresh) throws IllegalArgumentException
+ {
+ if (action == null)
+ {
+ throw new IllegalArgumentException("No null action accepted");
+ }
+
+ //
AjaxRequest request = new AjaxRequest();
request.setAction(action);
@@ -88,9 +116,11 @@
objectContext.update(response.getModelUpdates());
//
- objectContext.getRoot().refresh(false);
+ if (refresh)
+ {
+ objectContext.getRoot().refresh(false);
+ }
}
});
}
-
}
16 years, 3 months
JBoss Portal SVN: r11371 - in modules/presentation/trunk: ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol and 4 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-09 12:19:56 -0400 (Wed, 09 Jul 2008)
New Revision: 11371
Added:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/MoveObjectAction.java
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/server/PresentationClientServlet.java
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/layout/LayoutElement.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java
modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
Log:
basic DnD working
Modified: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java 2008-07-09 15:14:30 UTC (rev 11370)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/model/AjaxLayout.java 2008-07-09 16:19:56 UTC (rev 11371)
@@ -33,6 +33,7 @@
import java.util.Map;
import org.jboss.portal.presentation.ajax.client.Constants;
+import org.jboss.portal.presentation.ajax.client.protocol.MoveObjectAction;
import org.jboss.portal.presentation.ajax.client.dnd.Draggable;
import org.jboss.portal.presentation.ajax.client.dnd.Droppable;
@@ -144,11 +145,17 @@
log.info("Moving window " + window.getId() + " from parent " + parent.getId() + " to layout " + getId());
//
- parent.removeChild(window);
+ MoveObjectAction action = new MoveObjectAction(window.getId(), getId());
//
- addChild(window);
+ getContext().getAgentContext().process(action);
+// //
+// parent.removeChild(window);
+//
+// //
+// addChild(window);
+
//
return true;
}
Added: modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/MoveObjectAction.java
===================================================================
--- modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/MoveObjectAction.java (rev 0)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/protocol/MoveObjectAction.java 2008-07-09 16:19:56 UTC (rev 11371)
@@ -0,0 +1,67 @@
+/******************************************************************************
+ * 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 MoveObjectAction extends AjaxAction
+{
+
+ /** . */
+ private String sourceId;
+
+ /** . */
+ private String destinationId;
+
+ public MoveObjectAction(String sourceId, String destinationId)
+ {
+ this.sourceId = sourceId;
+ this.destinationId = destinationId;
+ }
+
+ public MoveObjectAction()
+ {
+ }
+
+ public String getSourceId()
+ {
+ return sourceId;
+ }
+
+ public void setSourceId(String sourceId)
+ {
+ this.sourceId = sourceId;
+ }
+
+ public String getDestinationId()
+ {
+ return destinationId;
+ }
+
+ public void setDestinationId(String destinationId)
+ {
+ this.destinationId = destinationId;
+ }
+}
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-09 15:14:30 UTC (rev 11370)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/server/PresentationClientServlet.java 2008-07-09 16:19:56 UTC (rev 11371)
@@ -29,6 +29,7 @@
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.protocol.MoveObjectAction;
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;
@@ -48,6 +49,7 @@
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.presentation.protocol.MoveUIObjectAction;
import org.jboss.portal.web.ServletContextDispatcher;
import org.jboss.portal.web.ServletContainer;
import org.jboss.portal.web.WebRequest;
@@ -135,19 +137,19 @@
public AjaxResponse process(AjaxRequest request)
{
- AjaxAction action = request.getAction();
+ AjaxAction ajaxAction = request.getAction();
//
ActionDecoder decoder = (ActionDecoder)getServletContext().getAttribute("ActionDecoder");
//
- System.out.println("handling action " + action);
+ System.out.println("handling action " + ajaxAction);
//
ProtocolAction protocolAction = null;
- if (action instanceof OpaqueWindowAction)
+ if (ajaxAction instanceof OpaqueWindowAction)
{
- OpaqueWindowAction windowAction = (OpaqueWindowAction)action;
+ OpaqueWindowAction windowAction = (OpaqueWindowAction)ajaxAction;
//
@@ -182,13 +184,20 @@
protocolAction = decoder.decode(new AjaxActionDecoderContext(WebRequest.Verb.GET, path, queryParameterMap, body));
}
- else if (action instanceof DestroyObjectAction)
+ else if (ajaxAction instanceof DestroyObjectAction)
{
- DestroyObjectAction ajaxAction = (DestroyObjectAction)action;
+ DestroyObjectAction destroyObjectAction = (DestroyObjectAction)ajaxAction;
- protocolAction = new DestroyUIObjectAction(ajaxAction.getObjectId());
+ protocolAction = new DestroyUIObjectAction(destroyObjectAction.getObjectId());
}
+ else if (ajaxAction instanceof MoveObjectAction)
+ {
+ MoveObjectAction moveObjectAction = (MoveObjectAction)ajaxAction;
+ //
+ protocolAction = new MoveUIObjectAction(moveObjectAction.getSourceId(), moveObjectAction.getDestinationId());
+ }
+
//
if (protocolAction != null)
{
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-09 15:14:30 UTC (rev 11370)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java 2008-07-09 16:19:56 UTC (rev 11371)
@@ -30,6 +30,7 @@
import org.jboss.portal.presentation.portal.model.content.PageContentContextImpl;
import org.jboss.portal.presentation.portal.model.layout.LayoutStore;
import org.jboss.portal.presentation.portal.model.layout.LayoutElement;
+import org.jboss.portal.presentation.portal.model.layout.LayoutStructure;
import org.jboss.portal.presentation.impl.state.structural.adapter.StructuralAdapter;
import org.jboss.portal.presentation.portal.content.protocol.ContentAction;
import org.jboss.portal.presentation.portal.content.ContentHandlerRegistry;
@@ -47,6 +48,7 @@
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.protocol.MoveUIObjectAction;
import org.jboss.portal.presentation.server.PresentationRequest;
import org.jboss.portal.presentation.server.PresentationResponse;
import org.jboss.portal.presentation.server.PresentationServer;
@@ -197,6 +199,31 @@
//
return new PresentationResponse(response, contentResponse.getStaleObjects());
}
+ else if (objectAction instanceof MoveUIObjectAction)
+ {
+ MoveUIObjectAction moveAction = (MoveUIObjectAction)objectAction;
+
+ //
+ LayoutStructure destinationElt = (LayoutStructure)structuralAdapter.getNode(moveAction.getDestinationId());
+
+ //
+ LayoutElement sourceElt = layoutStore.findElementByRef(targetNode.getId());
+
+ //
+ if (sourceElt == null)
+ {
+ throw new RuntimeException("Could not find move source " + targetId);
+ }
+
+ //
+ destinationElt.add(sourceElt);
+
+ //
+ System.out.println("Should move " + targetNode + " to " + destinationElt);
+
+ //
+ return new PresentationResponse(new ShowUIObjectResponse("blah"));
+ }
}
//
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutElement.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutElement.java 2008-07-09 15:14:30 UTC (rev 11370)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutElement.java 2008-07-09 16:19:56 UTC (rev 11371)
@@ -22,8 +22,6 @@
******************************************************************************/
package org.jboss.portal.presentation.portal.model.layout;
-import org.jboss.portal.common.NotYetImplemented;
-
import java.io.Serializable;
/**
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java 2008-07-09 15:14:30 UTC (rev 11370)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java 2008-07-09 16:19:56 UTC (rev 11371)
@@ -47,6 +47,30 @@
return elements;
}
+ public void add(LayoutElement element)
+ {
+ if (element == null)
+ {
+ throw new IllegalArgumentException("No null element can be added");
+ }
+
+ // Sanity check
+ if (element.structure == null)
+ {
+ throw new IllegalArgumentException("Element should be owned in an existing structure");
+ }
+
+ // Remove + Sanity check
+ if (!element.structure.elements.remove(element))
+ {
+ throw new IllegalArgumentException("The element previous structure should contain this element");
+ }
+
+ //
+ element.structure = this;
+ elements.add(element);
+ }
+
public SimpleElement addObjectElement(String objectRef)
{
SimpleElement item = new SimpleElement(objectRef);
Modified: modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java
===================================================================
--- modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-07-09 15:14:30 UTC (rev 11370)
+++ modules/presentation/trunk/presentation/src/main/java/org/jboss/portal/presentation/protocol/MoveUIObjectAction.java 2008-07-09 16:19:56 UTC (rev 11371)
@@ -28,8 +28,26 @@
*/
public class MoveUIObjectAction extends UIObjectAction
{
- public MoveUIObjectAction(String targetId)
+
+ /** . */
+ private final String destinationId;
+
+ public MoveUIObjectAction(String targetId, String destinationId)
{
super(targetId);
+
+ //
+ if (destinationId == null)
+ {
+ throw new IllegalArgumentException("No null destination id accepted");
+ }
+
+ //
+ this.destinationId = destinationId;
}
+
+ public String getDestinationId()
+ {
+ return destinationId;
+ }
}
16 years, 3 months
JBoss Portal SVN: r11370 - modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-07-09 11:14:30 -0400 (Wed, 09 Jul 2008)
New Revision: 11370
Modified:
modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java
Log:
better logging display
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-09 14:56:01 UTC (rev 11369)
+++ modules/presentation/trunk/ajax/src/main/java/org/jboss/portal/presentation/ajax/client/PresentationClientAgent.java 2008-07-09 15:14:30 UTC (rev 11370)
@@ -31,6 +31,7 @@
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.Timer;
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.util.Bootstrap;
@@ -56,18 +57,35 @@
/** . */
private PresentationClientRemoteAsync proxy;
+ private final AppenderWidget appender = new AppenderWidget();
+
PresentationClientRemoteAsync getProxy()
{
return proxy;
}
+ private Timer timer = new Timer()
+ {
+ public void run()
+ {
+ updateAppenderPosition();
+ }
+ };
+
+ private void updateAppenderPosition()
+ {
+ RootPanel.get().setWidgetPosition(appender, 0, Window.getClientHeight() + Window.getScrollTop() - 160);
+ appender.setWidth(Window.getClientWidth() + "px");
+ }
+
public void onModuleLoad()
{
- AppenderWidget appender = new AppenderWidget();
- RootPanel.get().add(appender, 0, Window.getClientHeight() - 128);
DOM.setIntStyleAttribute(appender.getElement(), "zIndex", 1);
+ RootPanel.get().add(appender);
+ updateAppenderPosition();
Logger.registerAppender(appender);
log.info("Added logger");
+ timer.scheduleRepeating(50);
//
final AbsolutePanel bottom = new AbsolutePanel();
16 years, 3 months