Thanks for the reply, I looked further,
My guess, I am facing this problem because on jsp I am looping thr the
thresholdCollection
--------------------------
<logic:iterate name="reconThresholdEditForm" id="ReconThresholdBO"
property="reconRuleBO.thresholdCollection" indexId="counter" type=
"admin.ui.bo.ReconThresholdBO">
<b><bean:write name="ReconThresholdBO" property="thresholdOpertr"
/></b>
<html:text name="ReconThresholdBO" property="thresholdValue"
size="30" maxlength="30"/>
<html:hidden name="ReconThresholdBO" property="thresholdID"/>
</logic:iterate>
------------------------------------------------
This is giving me multiple input text <input type="text" name="
thresholdValue" maxlength="30" size="30" value="1000000.00">
So from form name is not clear that it is from reconThresholdEditForm.
reconRuleBO.thresholdCollection.
I tried
<html:text name="reconThresholdEditForm" property=
"reconRuleBO.thresholdCollection"/>
<html:text name="reconThresholdEditForm" property=
"reconRuleBO.thresholdCollection.newThresholdVal"/>
first gives me address as expected, second gives class cast exception.
What I want is after submit I get back ReconRuleBO with collection of
ReconThresholBO with new values. Any suggestion is highly appreciated.
Thanks
Manisha
Laurie Harper <[EMAIL PROTECTED]>
Sent by: news <[EMAIL PROTECTED]>
01/02/2008 03:09 PM
Please respond to
"Struts Users Mailing List" <[email protected]>
To
[email protected]
cc
Subject
Re: Question regarding action form
Manisha M Sathe wrote:
> I have a action form
>
> public class ReconThresholdEditForm extends ValidatorForm
> {
> ...
> private ReconRuleBO reconRuleBO = new ReconRuleBO();
> ...
> }
>
> ReconRuleBO has collection of thresholdsBOs
>
> public class ReconRuleBO {
> ...
> private Collection thresholdCollection = new ArrayList();
> }
>
> public class ReconThresholdBo {
> private String thresholdValue;
> }
>
>
> In my JSP I am displaying Rule and looping through all threshold
> collection and displaying the thresholdValue. The problem I am facing is
> when user submits the form, how can I get these threshold values in the
> action form ?
> I am getting reconRuleBO as null.
>
> Thanks and regards
> Manisha
Since you show your fields having static initializers, the only way to
get a null reference there is if it's being overwritten. I'm not sure
why Struts would be doing that.
I would suggest starting by adding tracing to the setter method to find
out where/when it's being called with a null value. Then try simplifying
your code and/or JSP until you isolate the cause.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]