I seem to be headed in the right direction, but am stuck figuring out how
to make a persistance call given a param being passed from the JSP.
Here's what I have:

item_list.jsp
-------------
<s:link 
beanclass="org.stripesbook.quickstart.action.ItemDetailsActionBean">
       <s:param name="id" value="${item.id}"/>${item.name}
</s:link>

In my action bean, I need to figure out how to take the item.id and use it
as a param to my query in my DefaultHandler.  Right now, I have something
hard-coded:

ItemDetailsActionBean.java
--------------------------
       private final static String VIEW = "/WEB-INF/jsp/item_detail.jsp";

       private Item item;
       /* getter and setter */

       @DefaultHandler
       public Resolution view() {
          item = (Item)Stripersist.getEntityManager()
                  .createQuery("from Item where id = 1").getSingleResult();

                  // forward to item_detail.jsp
           return new ForwardResolution(VIEW);
       }

Debugging shows this is bringing my object back for me.  Even with this
hard-coded, I'm having trouble displaying the results of this (valid) 
object in the JSP.  The object isn't empty, but all its fields are 
printing up as blanks.  What am I doing wrong?

item_detail.jsp
---------------
          <c:if test="${not empty actionBean.item}">
              date: ${item.dateFound}<br/>
              name: ${item.name}<br/>
              city: ${item.cityId}<br/>
              state: ${item.stateId}
          </c:if>


TIA!

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to