lenya-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject cvs commit: cocoon-lenya/src/webapp/lenya usecase.xmap
Date Fri, 22 Aug 2003 19:01:24 GMT
egli        2003/08/22 12:01:24

  Modified:    src/webapp/lenya usecase.xmap
  Log:
  Added the upload usecase matcher.
  Removed the pipelines for resourcenotfound and sax in the
  handle-error pipeline because they should not occur in the
  usecase macher unless there is a genuine error. In that
  case we want to see the stack trace.
  
  Revision  Changes    Path
  1.77      +19 -13    cocoon-lenya/src/webapp/lenya/usecase.xmap
  
  Index: usecase.xmap
  ===================================================================
  RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/usecase.xmap,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -r1.76 -r1.77
  --- usecase.xmap	21 Aug 2003 16:43:37 -0000	1.76
  +++ usecase.xmap	22 Aug 2003 19:01:24 -0000	1.77
  @@ -11,6 +11,7 @@
       <map:matchers default="wildcard"/>
       <map:actions>
         <map:action name="save" logger="sitemap.action.save" src="org.apache.lenya.cms.cocoon.acting.HTMLFormSaveAction"
/>
  +      <map:action name="asset-upload" logger="sitemap.action.upload" src="org.apache.lenya.cms.cocoon.acting.AssetUploadAction"
/>
       </map:actions>
   
       <map:selectors>
  @@ -461,7 +462,8 @@
         <!-- ********  /HTML Form Editor *********************************** -->
         <!-- ************************************************************** -->
   
  -
  +	<!-- This matcher is very specific for unipublic and should -->
  +	<!-- probably go away -->
   	<map:match pattern="upload" type="usecase">
   
   	  <map:match pattern="showscreen" type="step">
  @@ -478,18 +480,16 @@
   
   	  <map:match type="step" pattern="upload">
   	    <map:act type="file-upload">
  -	      <!-- if the action suceeds it returns the referer and we
  -	      simply redirect to it. -->
   	      <map:redirect-to uri="{request:requestURI}"/>
   	    </map:act>
  -	    <!-- otherwise the action could not validate some of the
  -	    input and we present the upload form again --> 
   	    <map:generate type="serverpages" src="content/authoring/upload-image.xsp"/>
   	    <map:transform src="xslt/authoring/upload-image.xsl"/>
   	    <map:serialize/>
   	  </map:match>
   	</map:match>
   
  +	<!-- This is the generic asset upload matcher and should be -->
  +	<!-- used for all publiations --> 
           <map:match pattern="asset" type="usecase">
   
             <map:match pattern="showscreen" type="step">
  @@ -500,6 +500,20 @@
               </map:call>
             </map:match>
   
  +          <map:match pattern="upload" type="step">
  +            <map:act type="asset-upload">
  +              <map:parameter name="task-id" value="{request-param:task-id}"/>
  +              <map:redirect-to session="true" uri="{request:requestURI}"/>
  +            </map:act>
  +          </map:match>
  +
  +          <map:match pattern="insert" type="step">
  +            <map:act type="task">
  +              <map:parameter name="task-id" value="{request-param:task-id}"/>
  +              <map:redirect-to session="true" uri="{request:requestURI}"/>
  +            </map:act>
  +          </map:match>
  +
             <map:match pattern="remove" type="step">
               <map:act type="task">
                 <map:parameter name="task-id" value="{request-param:task-id}"/>
  @@ -932,14 +946,6 @@
   	    <map:transform src="xslt/exception/parent_node_not_found.xsl"/>
   	    <map:call resource="style-cms-page"/>
             </map:when>
  -	  <map:when test="resourcenotfound">
  -	    <map:transform src="xslt/exception/not_published_yet.xsl"/>
  -	    <map:call resource="style-cms-page"/>
  -	  </map:when>
  -	  <map:when test="sax">
  -	    <map:transform src="xslt/exception/not_published_yet.xsl"/>
  -	    <map:call resource="style-cms-page"/>
  -	  </map:when>
           </map:select>
           <map:serialize type="html"/>
         </map:handle-errors>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org


Mime
View raw message