[ http://issues.apache.org/struts/browse/WW-1347?page=comments#action_37857 
] 
            
Ted Husted commented on WW-1347:
--------------------------------

Here's another real-life example of using extends 

Before 

<action name="listInvoice" 
class="com.eplus.app.invoice.action.InvoiceCrudAction" method="list">
               <interceptor-ref name="listStack"/>
                 <result name="CRUD-list" 
type="freemarker">/template/eplus/metaDataList.ftl</result>
       </action>

       <action name="editInvoice" 
class="com.eplus.app.invoice.action.InvoiceCrudAction">
               <interceptor-ref name="editStack"/>
       </action>
      
  <action name="saveInvoice" 
class="com.eplus.app.invoice.action.InvoiceCrudAction" method="save">
               <interceptor-ref name="crudStack"/>
       </action>
       <action name="deleteInvoice" 
class="com.eplus.app.invoice.action.InvoiceCrudAction" method="delete">
               <interceptor-ref name="crudStack"/>
       </action>

 After

      <action name="*Invoice" 
class="com.eplus.app.invoice.action.InvoiceCrudAction">
               <interceptor-ref name="editStack"/>
       </action>

     <action name="listInvoice" exends="*Invoice"  method="list">
               <interceptor-ref name="listStack"/>
                 <result name="CRUD-list" 
type="freemarker">/template/eplus/metaDataList.ftl</result>
       </action>

Along the same lines, another useful XML feature is class aliases.

<class-ref name="InvoiceCrudAction" 
class="com.eplus.app.invoice.action.InvoiceCrudAction"/>

     <action name="listInvoice" class="InvoiceCrudAction" method="list">
               <interceptor-ref name="listStack"/>
                 <result name="CRUD-list" 
type="freemarker">/template/eplus/metaDataList.ftl</result>
       </action>

       <action name="editInvoice" class="InvoiceCrudAction">
               <interceptor-ref name="editStack"/>
       </action>
      
     <action name="saveInvoice" class="InvoiceCrudAction" method="save">
               <interceptor-ref name="crudStack"/>
       </action>

       <action name="deleteInvoice" class="InvoiceCrudAction" method="delete">
               <interceptor-ref name="crudStack"/>
       </action>


> SAF1 Features to Implement
> --------------------------
>
>                 Key: WW-1347
>                 URL: http://issues.apache.org/struts/browse/WW-1347
>             Project: Struts 2
>          Issue Type: Task
>          Components: Documentation
>            Reporter: Ted Husted
>         Assigned To: Don Brown
>             Fix For: 2.0.0
>
>
>  
>  * Wildcard Action Mappings - Complete
>  *  DynaForm as Model Object
>  *  Extends for action mappings

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to