com.cappuccinonet.strutscx.prototype.presentation.action
Class InfoDeleteAction
java.lang.Object
|
+--Action
|
+--com.cappuccinonet.strutscx.action.StrutsCXBaseAction
|
+--com.cappuccinonet.strutscx.prototype.presentation.action.InfoDeleteAction
- public class InfoDeleteAction
- extends StrutsCXBaseAction
This Action class controlls the delete process of an entry/ a dataset.
This Action reads in properties out of the /WEB-INF/properties.xml.
Make sure this file is present and the following parameters are
set:
- section.info.xml.xx - the XML file, where xx stands for
the respective locale.
- section.info.xsl.html4.delete - the XSL stylesheet.
This class checks for two parameters, too. This are
- WARN:does not delete; this is the parameter which should be send
at first to this Action.
- DELETE: this fullfills the delete process. Afterwards it sets the
FULLFILLED flag to true.
- FULLFILLED: this basically reacts the same way like WARN. Depending
on the stylesheet this will present a different view.
This is what the XSL stylesheet should look like:
<xsl:choose>
<xsl:when test="//request/action = 'FULLFILLED'">
Deleted the entry!
<form action="/strutscx/infolist.do;jsessionid={$jsessionid}" method="POST">
<input type="Submit" name="Go!" value="Go back to list"/>
</form>
</xsl:when>
<xsl:when test="//request/action = 'WARN'">
Attention: Do you really want to delete the entry?
<form action="/strutscx/infosingle.do;jsessionid={$jsessionid}" method="POST">
<input type="hidden" name="entryId" value="{//request/entryId}"/>
<input type="Submit" name="Go!" value="Gosh no!"/>
</form>
<form action="/strutscx/infodelete.do;jsessionid={$jsessionid}" method="POST">
<input type="hidden" name="action" value="DELETE"/>
<input type="hidden" name="entryId" value="{//request/entryId}"/>
<input type="Submit" name="Go!" value="Yes I will delete!"/>
</form>
</xsl:when>
</xsl:choose>
- Version:
- v0.4, 2003.02.01
- Author:
- Bernhard Woehrlin, IT.CappuccinoNet.com
- See Also:
- Serialized Form
|
Field Summary |
private static java.lang.String |
THIS_CLASS
a String with this Classname used for system messages |
|
Method Summary |
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
This is the implementation of the abstract perform() method
of the BaseAction. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
THIS_CLASS
private static final java.lang.String THIS_CLASS
- a String with this Classname used for system messages
- See Also:
- Constant Field Values
InfoDeleteAction
public InfoDeleteAction()
execute
public ActionForward execute(ActionMapping mapping,
ActionForm form,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- This is the implementation of the abstract perform() method
of the BaseAction.
- Specified by:
execute in class StrutsCXBaseAction
- Parameters:
mapping - the ActionMapping used to select this instance.form - the optional ActionForm bean for this request (if any).request - the HTTP request we are processing.response - the HTTP response we are creating.
'
- Returns:
- ActionForward the location where control will be forwarded
after this request is processed.
- Throws:
IOException - if an input/output error occurs.
ServletException - if a servlet exception occurs.- See Also:
StrutsCXConstants
© 2002, IT.CappuccinoNet.com - compiled 20020207:2326