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

H

Hole

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!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top