Advertisement
Guest User

struts.xml

a guest
Nov 12th, 2014
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.72 KB | None | 0 0
  1.    
  2.  
  3.     <?xml version="1.0" encoding="UTF-8"?>
  4.      
  5.     <!DOCTYPE struts PUBLIC
  6.                    "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN"
  7.                    "http://struts.apache.org/dtds/struts-2.1.dtd">
  8.      
  9.     <struts>
  10.             <package name="default" extends="tiles-default">
  11.      
  12.                     <!-- All actions concerning an Object-->
  13.      
  14.                     <!-- Action that displays the list of objects. -->
  15.                     <action name="ShowObjectList" class="de.nak.cars.action.ShowObjectListAction">
  16.                             <result name="STUDENT" type="tiles">objectListStudent</result>
  17.                             <result name="LECTURER" type="tiles">objectListLecturer</result>
  18.                             <result name="NONE" type="redirect">login?noAuthorities</result>
  19.                     </action>
  20.      
  21.                     <!-- Shows the empty form for a new object. -->
  22.                     <action name="AddObject">
  23.                             <result type="tiles">objectForm</result>
  24.                     </action>
  25.      
  26.                     <!-- Saves the new or updated object into the database and shows the object
  27.                            list again. -->
  28.                     <action name="SaveObject" class="de.nak.cars.action.ObjectAction"
  29.                            method="save">
  30.                             <result type="redirect">ShowObjectList.action</result>
  31.                             <result type="tiles" name="input">objectForm</result>
  32.                     </action>
  33.      
  34.                     <!-- Loads a existing object and shows it in the object form. -->
  35.                     <action name="EditObject" class="de.nak.cars.action.ObjectAction"
  36.                            method="load">
  37.                             <result type="tiles">objectForm</result>
  38.                             <result type="chain" name="input">ShowObjectList</result>
  39.                     </action>
  40.      
  41.      
  42.                     <!-- All actions concerning a attachedObject -->
  43.      
  44.                     <action name="ShowObject" class="de.nak.cars.action.ObjectAction"
  45.                            method="load">
  46.                             <result type="tiles">objectForm</result>
  47.                             <result name="input" type="tiles">attachedObjectForm</result>
  48.                     </action>
  49.      
  50.                     <!-- Shows the empty form for a new attachedObject. -->
  51.                     <action name="AddAttachedObject" class="de.nak.cars.action.ShowAttachedObjectAction">
  52.                             <result type="tiles">attachedObjectForm</result>
  53.                             <result name="input" type="tiles">objectForm</result>
  54.                     </action>
  55.      
  56.                     <!-- Loads a existing attachedObject and shows it in the attachedObject form. -->
  57.                     <action name="EditAttachedObject" class="de.nak.cars.action.AttachedObjectAction"
  58.                            method="load">
  59.                             <result type="tiles">attachedObjectForm</result>
  60.                             <result type="tiles" name="input">objectForm</result>
  61.                     </action>
  62.      
  63.                     <!-- Saves the new or updated attachedObject into the database and shows the
  64.                            object again. -->
  65.                     <action name="SaveAttachedObject" class="de.nak.cars.action.AttachedObjectAction"
  66.                            method="save">
  67.                             <result name="success" type="redirect">ShowObject.action</result>
  68.                             <result type="tiles" name="input">attachedObjectForm</result>
  69.                     </action>
  70.      
  71.             </package>
  72.     </struts>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement