Hello,

I really need some help with Struts ; there must be something I do not
get right (I'm still unexperienced ...). I'm "loosing" indexed form
properties.

I have a form ('StrategyForm') with an indexed property ('signals'). See
below:

public class StrategyForm extends ValidatorActionForm implements
java.io.Serializable {

.../...
        public Object[] getSignals() {
                return signals;
        }
        
        public void setSignals(Object[] signals) {
                this.signals = signals;
        }
}

I have a JSP  iterating on the 'signals' property (using Struts-Layout).

A first Struts action populates the 'signals' property of the form
(among others) and forwards to the JSP. The last statement of the action
logs the form on the console (with a toString() call on the form). See
the result above (the end of the line shows 'signals' set to a non-null
array) :

21:31:17,533 INFO  [StrategyAction] customExecute() : Terminated with 
form com.rubis.web.system.StrategyForm ID = 6 code = NEX label = nex
signals = [Ljava.lang.Object;@69094

Back in the JSP, I hit a submit button that launches a second Struts
action, which FIRST statement logs the form :

21:34:07,078 INFO  [SubmitStrategyAction] customExecute() : Terminated
with form com.rubis.web.system.StrategyForm ID = 6 code = NEX label =
nex signals = null

The 'signals' property has been set to null while other properties such
as ID or label are still there. The 'reset' method of the form sets it
to null as required).

I tried the same kind of stuff with a DynaValidatorActionForm instead of
my custom StrategyForm : same result.

I've also tried to change the type of 'signals' to an ArrayList instead
of an array (with a 'reset' method creating the signals property to a
empty array list). Same result : the property was set to null.

Then, instead of using a form property, I tried to save a 'signals'
attribute in the request during the first action.Went right. But the
second action does not show it (debug traces).

What is that I'm doing wrong ?

Thanks for your help. I get a little crazy on this.

Fred 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to