troubleshooting Question

I wanted to display address,city,state,zip,phone basing on location property 'group'.

Avatar of saikumarstl
saikumarstl asked on
JSP
4 Comments1 Solution275 ViewsLast Modified:
I wanted to display address,city,state,zip,phone basing on location property 'group'.
Currenlty, I was able to display address,city,state,zip,phone irrespecitve of the group. But I wanted to
sort basing on group and wanted to display in the folloing format. Can you please correct the following code
in struts. I wanted to iterate through 'locationList' and sort by group code(codes are like 01, 02, 03 etc.,).

Group 05
-----------
Address                 City        State ZIP      Contact Phone   Group
144 E. Baltic Ave     St. Louis  MO  63132  314-444-4425    05
300 Page Avenue    Olivette    MO  63011  314-409-4453   05
44 N. Kingshighway  St. Louis  MO  63311  314-422-0434   05

--------------------------------------------------------------------------------

Group 04
-----------
Address                   City         State  ZIP     Contact Phone  Group
300 Old Hwy 21        Dothan     AL    14677  444-698-7896   04
344 Butler Hill Rd.     Andalusia  AL   15609  444-877-1234   04

--------------------------------------------------------------------------------
<logic:iterate name="locationList"  id="location" scope="request">
       <tr height="24">
        <td class="branchCell" align="center">          
        <bean:write name="location" property="group"/>
        </td>
        <td class="branchCell">
          <bean:write name="location" property="address"/>
        </td>
        <td class="branchCell">
          <bean:write name="location" property="city"/>
        </td>
        <td class="branchCell">
          <bean:write name="location" property="stateProv.desc"/>
        </td>
        <td class="branchCell">
          <bean:write name="location" property="zipCode"/>
        </td>
        <td class="branchCell">
          <bean:write name="location" property="contactPhone"/>
        </td>
       </tr>
      </logic:iterate>
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros