1 Reply Latest reply on Apr 2, 2007 4:36 PM by smithbstl

    DataModelSelection returning null


      I am having problems with a DataModelSelection. I have an s:link in a table column and when I execute the action, the row data is not being injected into the DataModelSelection. What I am attempting to do is create nested tables where an Address list is in the parent table and matching service requests are in the child table, so there is no page navigation involved at this point.

      Here is the page

       <f:facet name="header">
       <tr:outputText value="#{msgs['AddressList.addressNumber']}"/>
       <s:link id="viewRequests" action="#{addressListing.findRequests}" value="View Requests"/>

      Here is the SFSB
      I am Beginning a conversation when the first datamodel(foundAddresses) is populated, then ending the conversation when the second (requests) is populated via the DataModelSelection(selectedAddress) object from the first DataModel (foundAddresses)

      public class AddressListing implements com.stlouiscity.csb.ejb.address.AddressListingLocal {
       @PersistenceContext(unitName="CSB_Oracle", type=EXTENDED)
       private EntityManager em;
       private Address address;
       private List<StructureAddress> foundAddresses;
       private StructureAddress selectedAddress;
       private List<ServiceRequest> requests;
       private List<String> streetDirections;
       * Creates a new instance of AddressListing
       public AddressListing() {
       public void findAddresses() {
       if (address.getStreetName() != null) {
       System.out.println("Address Is NOT NULL");
       //Find StructureAddress
       Query q = em.createQuery("Select a From StructureAddress a Where" +
       " (a.structureAddressPK.houseNumber = :houseNumber OR :houseNumber IS NULL) AND" +
       " (a.structureAddressPK.houseSuffix = :suffix OR :suffix IS NULL) AND" +
       " (a.nlc.streetDirection = :streetDirection OR :streetDirection IS NULL) AND" +
       " (lower(a.nlc.streetName) LIKE :street OR :street IS NULL)");
       q.setParameter("street",address.getStreetName().toLowerCase() + "%");
       foundAddresses = q.getResultList();
       } else if (addressLookup.getAddressLookupId() != null) {
       Query query = em.createNamedQuery("Select a from AddressLookup where a.addressLookupId = :addressLookupId");
       query.setParameter("addressLookupId", addressLookup.getAddressLookupId());
       foundAddresses = query.getResultList();
       } else {
       System.out.println("Address IS NULL");
       public void findRequests() {
       System.out.println("*********Made it to findRequests*********");
       if (selectedAddress != null) {
       System.out.println("Selected Address: " + selectedAddress.toString());
       //Find Request
       Query q = em.createQuery("Select p.serviceRequestCollection From ParcelAddress p Where" +
       " (p.address = :address)");
       requests = q.getResultList();
       } else {
       System.out.println("Selected Address IS NULL");
       public void fillStreetDirections() {
       Query query = em.createQuery("SELECT DISTINCT n.streetDirection FROM Nlc n WHERE n.streetDirection IS NOT NULL");
       streetDirections = query.getResultList();
       @Remove @Destroy
       public void destroy() {