[jboss-svn-commits] JBoss Portal SVN: r5374 - trunk/core/src/main/org/jboss/portal/core/controller/command
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Oct 9 13:28:09 EDT 2006
Author: julien at jboss.com
Date: 2006-10-09 13:28:07 -0400 (Mon, 09 Oct 2006)
New Revision: 5374
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/command/MoveWindowCommand.java
Log:
update the page navigational state on a window ajax DnD
Modified: trunk/core/src/main/org/jboss/portal/core/controller/command/MoveWindowCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/command/MoveWindowCommand.java 2006-10-09 17:19:55 UTC (rev 5373)
+++ trunk/core/src/main/org/jboss/portal/core/controller/command/MoveWindowCommand.java 2006-10-09 17:28:07 UTC (rev 5374)
@@ -24,7 +24,12 @@
import org.jboss.portal.core.controller.command.info.CommandInfo;
import org.jboss.portal.core.controller.command.info.ActionCommandInfo;
import org.jboss.portal.core.controller.ControllerException;
+import org.jboss.portal.core.controller.ControllerCommand;
+import org.jboss.portal.theme.page.WindowContext;
+import org.jboss.portal.theme.navigation.PageNavigationalState;
+import java.util.Iterator;
+
/**
* @author <a href="mailto:julien at jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
@@ -65,33 +70,27 @@
public void execute() throws ControllerException
{
- System.out.println("windowRef = " + windowRef);
- System.out.println("fromRegion = " + fromRegionId);
- System.out.println("fromPos = " + fromPos);
- System.out.println("toRegion = " + toRegionId);
- System.out.println("toPos = " + toPos);
+ // For now just update the navigational state of the page
+ PageNavigationalState pns = (PageNavigationalState)getContext().getAttribute(ControllerCommand.NAVIGATIONAL_STATE_SCOPE, page.getId());
-// // For now just update the navigational state of the page
-// PageNavigationalState pns = (PageNavigationalState)getContext().getAttribute(ControllerCommand.NAVIGATIONAL_STATE_SCOPE, page.getId());
-//
-// //
-// for (Iterator i = pns.getWindowContexts().iterator();i.hasNext();)
-// {
-// WindowContext windowCtx = (WindowContext)i.next();
-// String windowRegion = windowCtx.getRegionName();
-// if (windowRef.equals(windowCtx.getId()))
-// {
-// windowCtx.setRegionName(toRegion);
-// windowCtx.setOrder(toPos);
-// }
-// else if (fromRegion.equals(windowRegion) && fromPos < windowCtx.getOrder())
-// {
-// windowCtx.setOrder(windowCtx.getOrder() - 1);
-// }
-// else if (toRegion.equals(windowRegion) && toPos <= windowCtx.getOrder())
-// {
-// windowCtx.setOrder(windowCtx.getOrder() + 1);
-// }
-// }
+ //
+ for (Iterator i = pns.getWindowContexts().iterator();i.hasNext();)
+ {
+ WindowContext windowCtx = (WindowContext)i.next();
+ String windowRegion = windowCtx.getRegionName();
+ if (windowRef.equals(windowCtx.getId()))
+ {
+ windowCtx.setRegionName(toRegionId);
+ windowCtx.setOrder(toPos);
+ }
+ else if (fromRegionId.equals(windowRegion) && fromPos < windowCtx.getOrder())
+ {
+ windowCtx.setOrder(windowCtx.getOrder() - 1);
+ }
+ else if (toRegionId.equals(windowRegion) && toPos <= windowCtx.getOrder())
+ {
+ windowCtx.setOrder(windowCtx.getOrder() + 1);
+ }
+ }
}
}
More information about the jboss-svn-commits
mailing list