Skip to content

Instantly share code, notes, and snippets.

<s:layout-component name="body">
<p>item details</p>
<c:if test="${not empty actionBean.item}">
<c:choose>
<c:when test="${actionBean.item.lost == true}">
<s:link beanclass="org.stripesbook.quickstart.action.ItemListActionBean" event="listLost">Go Back to the List</s:link><br/>
</c:when>
<c:otherwise>
<s:link beanclass="org.stripesbook.quickstart.action.ItemListActionBean" event="listFound">Go Back to the List</s:link><br/>
package org.stripesbook.quickstart.action;
// my imports
// java imports
import java.util.List;
// 3rd party imports
import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
public Resolution findByName() {
logger.debug("*** in findByName()");
Session sess = org.stripesbook.quickstart.util.DAO.getSession();
if (filter != null && filter.length() > 0) {
items = sess.createCriteria(Item.class)
.add(Restrictions.ilike("name", filter+"%"))
.list();