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!
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!