nested:iterate or logic: iterate with multibox??

Discussion in 'Java' started by runescience, Feb 9, 2006.

  1. runescience

    runescience Guest

    Hi all:

    Im not sure which to use with this problem, so ill just wing it out...
    I am prepopulating an array of QueryResults from the data base.

    class QueryResults {
    boolean selected; //a bool value from database
    // use to set box to checked or unchecked.
    String col1data;
    String col2data;
    }

    This QueryResults bean lives in:
    class QueryResultsFormBean extends ActionForm {
    QueryResults[] queryRes;
    String jspFld1;
    String jspFld2;
    String jspFld3;
    }

    The action execute() is pulling things out of the data base and filling
    in the form data:
    public class QueryInitAction extends Action {
    .........
    QueryResultsFormBean myForm = (QueryResultsFormBean)form;
    db.moveDataHelper(myForm);
    }

    Now when i get to the actual jsp I tried the following:

    <logic:iterate
    id="element"
    property="queryRes" // the name of the attribute on the ActionForm
    type="com.blah.QueryResults">
    <TR>
    <TD>
    <html:multibox property="selected">tape6
    <bean:write name="element" />
    </html:multibox>
    </TD>
    <TD>
    <bean:write name="element" property="jspFld1" />
    //jspFld1is on the ActionForm
    </TD>
    ..........
    </TR>
    </logic:iterate>

    I think im missing the name attribute somewhere along the line??? Or
    should I be using the nested tag?
     
    runescience, Feb 9, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. FD
    Replies:
    0
    Views:
    823
  2. Gogo
    Replies:
    1
    Views:
    2,107
    Sudsy
    Sep 4, 2003
  3. Zhao

    logic:iterate in struts

    Zhao, Sep 11, 2003, in forum: Java
    Replies:
    2
    Views:
    8,410
    Sudsy
    Sep 11, 2003
  4. Zhao
    Replies:
    11
    Views:
    44,089
    pmckeen
    Jul 7, 2009
  5. John
    Replies:
    4
    Views:
    925
    RedGrittyBrick
    Apr 1, 2008
Loading...

Share This Page