[STRUTS] multi-value fields in <html:hidden>

Discussion in 'Java' started by Hole, Oct 10, 2006.

  1. Hole

    Hole Guest

    Hi all!

    In a form bean I've the following array attributes (multiple text input
    field of an advanced search form)

    private String[] topic = new String[INPUTS_MAX];
    private String[] topicvalue = new String[INPUTS_MAX];
    private String[] categories = new String[INPUTS_MAX];

    Now, I've implemented pagination so I need to propagate these values,
    in the eventuality the user has performed an advanced search (I shot a
    query to database every time the user change the page)

    Here any getter:

    public String[] getTopic() {
    return topic;
    }

    public String getTopic(int key) {

    return topic[key];
    }

    In the jsp, here my attempt to keep the multi-value fields:

    <html:hidden name="searchForm" property="topic" />

    <html:hidden name="searchForm" property="topicvalue" />
    <html:hidden name="searchForm" property="categories" />

    This doesn't work. I've just found the indexes properties in STRUTS and
    I've started reading a faq document.
    Is this the right way (using indexed properties)? or I need a different
    strategy to solve my problem?

    Thanks in advance!
     
    Hole, Oct 10, 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. msa
    Replies:
    2
    Views:
    13,360
  2. Chanchal
    Replies:
    1
    Views:
    1,727
    Manish Pandit
    Oct 9, 2006
  3. Rick
    Replies:
    3
    Views:
    8,587
    Alexey Smirnov
    Apr 13, 2010
  4. George
    Replies:
    2
    Views:
    193
    Leonardo Rodríguez
    May 6, 2004
  5. Replies:
    0
    Views:
    312
Loading...

Share This Page