continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcconn...@apache.org
Subject svn commit: r438552 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java resources/xwork.xml
Date Wed, 30 Aug 2006 17:28:37 GMT
Author: jmcconnell
Date: Wed Aug 30 10:28:37 2006
New Revision: 438552

URL: http://svn.apache.org/viewvc?rev=438552&view=rev
Log:
found a simpler way of getting the needed object in the jsp tag, whole lot more general, turns
out we could easily just snag the container from the application context of the actioncontext

Removed:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/interceptor/ContinuumInterceptor.java
Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java
    maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java?rev=438552&r1=438551&r2=438552&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/view/jsp/ui/IfAuthorizedTag.java
Wed Aug 30 10:28:37 2006
@@ -1,5 +1,9 @@
 package org.apache.maven.continuum.web.view.jsp.ui;
 
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.xwork.PlexusLifecycleListener;
+
 import com.opensymphony.xwork.ActionContext;
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.ContinuumException;
@@ -47,9 +51,11 @@
     {
         ActionContext context = ActionContext.getContext();
 
+        PlexusContainer container = (PlexusContainer)context.getApplication().get( PlexusLifecycleListener.KEY
) ;
+
         try
         {
-            Continuum continuum = (Continuum) context.getSession().get( "continuum" );
+            Continuum continuum = (Continuum) container.lookup( Continuum.ROLE );
 
             if ( continuum != null )
             {
@@ -61,6 +67,10 @@
             {
                 throw new JspTagException("continuum object is null!");
             }
+        }
+        catch ( ComponentLookupException cle)
+        {
+            throw new JspTagException( "unable to locate " + Continuum.ROLE, cle);
         }
         catch ( ContinuumException e )
         {

Modified: maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml?rev=438552&r1=438551&r2=438552&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml (original)
+++ maven/continuum/trunk/continuum-webapp/src/main/resources/xwork.xml Wed Aug 30 10:28:37
2006
@@ -7,10 +7,8 @@
     <interceptors>
       <interceptor name="exception-logging" class="exceptionLogging"/>
       <interceptor name="user" class="userInterceptor"/>
-      <interceptor name="continuum" class="continuumInterceptor"/>
       <interceptor-stack name="defaultContinuumStack">
         <interceptor-ref name="user"/>
-        <interceptor-ref name="continuum"/>
         <interceptor-ref name="exception-logging"/>
         <!--<interceptor-ref name="defaultStack"/>-->
 
@@ -295,7 +293,7 @@
     </action>
 
     <action name="removeSchedule" class="schedule" method="remove">
-      <result name="success" type="chain">schedules</result>          
+      <result name="success" type="chain">schedules</result>
     </action>
 
 



Mime
View raw message