Pass a parameter to the *constructor* of an ActionForm

M

milkyway

Hello out there again,


Thought I would add a few more details to the problem :)

I am using the indexed property approcach from sun: at
http://struts.apache.org/faqs/indexedprops.html

I have gotten the sample for the "Nested Properties" example to work.
This basically uses the following in the .jsp file:

<bean:write name="bean" property="labelValue[1].label" />

But for me, I need a list of labels. This list varies dynamically
(retrieved from a database). The problem is how to pass a parameter in
so that I can vary the list. The example uses an ActionForm to get the
data and mine has worked fine whenever I can initialize the contents of
a bean from the constructor of an ActionForm.

Is it possible to pass a parameter to the constructor of an action
form? Is it possible to access the request class from the constructor
of an action form?

IF so, how can this be done?

TIA
 
A

AllIsPossible

Hi - this is just a normal bean. Just setting the parameter with the
<jsp:setProperty name="..." ...>
worked.
 

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

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,233
Latest member
AlyssaCrai

Latest Threads

Top