This example describes how to create a form that lets users remove an asset from a project. The active project ID is passed to the form handler. The asset name appears next to a checkbox with the label: Discard this asset? When the checkbox is selected, the asset is saved to the form handler asset property. By setting assetAction to the value of the DISCARD_ASSET_ACTION property, you indicate that the specified asset is removed from the specified project. A button at the bottom of the form invokes the handlerDiscardAssets method.
<dspel:importbean bean="/atg/epub/servlet/ProjectFormHandler"/>
<dspel:form formid="discardForm" action="${actionURL}" method="post">
<dspel:input type="hidden" bean="ProjectFormHandler.projectId"
value="${currentProjectId}"/>
Discard this asset? <c:out value="="${assetURI.displayName}"/>
<dspel:input type="checkbox" bean="ProjectFormHandler.asset"
value="${assetURI}"/>
<dspel:input type="hidden" bean="ProjectFormHandler.assetAction"
beanvalue="ProjectFormHandler.DISCARD_ASSET_ACTION"/>
<dspel:input type="hidden" bean="ProjectFormHandler.discardAssets"
value="Remove this Asset from this Project"/>
</dspel:form>
