Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > [STRUTS] multi-value fields in <html:hidden>

Thread Tools

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

Posts: n/a
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!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
epydoc: How to add new fields as the building fields? Cyril.Liu Python 0 12-02-2008 05:01 AM
print struct fields and its member structs' fields recursively, generically call_me_anything C++ 4 09-30-2007 10:12 PM
Newbie - Reading a file with delimited fields, storing first two fields in a hash AMT2K5 Perl Misc 1 11-08-2005 01:06 AM
how to copy from fields to other fields middletree ASP General 1 11-05-2003 06:24 PM
Netscape hidden fields - array - multiple fields with same name Javascript 0 07-17-2003 03:05 PM