Hi, 

First let me say kudos to the project team for such a great product.  I love 
the product, and couldn't be happier that it doesn't allow someone to connect 
to a DB, as I am a strong believer in n-tier architecture.

Background of the situation:
I have a situation where my jsp is used for searching, and showing results on 
the same page.  I got the results working quickly w/ the displaytag library.

My struts ActionForm subclass contains the criteria used for searching, then an 
ArrayList of DTOs called results, which is used to render the table rows.  

I need to render an editable text field in a column. Not a problem, I can use 
my TableDecorator extension for this, or insert the html directly by leaving 
off the column's property attribute.

Problem:
When I submit the form after editing rows in the table, my ActionForm subclass 
does not have the results' rows bound back to the searchForm.results list when 
the Action gets it.  

Here's my jsp snippet:

<display:table  name="searchForm.results" pagesize="10" 
                id="searchForm.results" sort="list" 
requestURI="/materialSearch.do"
                
decorator="com.<companyspecific>.web.ui.decorators.SearchResultsDecorator">
    <display:column property="serialNumber" sortable="true" title="S/N"/>
    <display:column property="cpn" sortable="true" title="CPN"/>
    <display:column property="keyword" title="Keyword"/>
    <display:column property="description" title="Description"/>
</display:table>

Here's my SearchResultDecorator method (which does properly display the value 
returned from the action):
public Object getKeyword()
{
        String lHtml = null;
        Object lRowVal = getCurrentRowObject();
        MaterialForm lForm = (MaterialForm)lRowVal;
        String lKwd = lForm.getKeyword();
        lHtml = "<input type=\"text\" name=\"keyword\" value=\"" + lKwd +"\">";
        return lHtml;
}


I think it has something to do with the fact that the struts <logic:iterate> 
tags will index the names in the table rows like "keyword[3]" etc, but I'm not 
sure how to get
Thanks in advance for any help you can provide.

- Eric



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to