You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Kothari, Rahul" <Ra...@bofasecurities.com> on 2005/06/22 18:13:11 UTC
java.lang.IllegalArgumentException: No bean specified , when I submit using nested:tags
Each CpExternalCreditRating object has another object inside it which I
access from the front end using nested:tags as follows...
<nested:iterate id="externalRatings" property="externalRatings"
indexId="i">
<nested:hidden property="cpPartyId"/>
<nested:hidden
property="appCreditRatingSource.creditRatingSourceId"/>
</nested:iterate>
The display works fine but I get the exception when I try to submit the
page.
Here is my struts-config.xml
<form-bean name="updateCpRatingForm"
type="com.web.form.UpdateCpRatingForm" >
<form-property name="cpPartyId"
type="java.lang.String"/>
<form-property name="externalRatings"
type="java.util.List"/>
</form-bean>
public class UpdateCpRatingForm extends DynaValidatorForm {
/**
* override the reset method....its called before hitting Action
*/
List externalRatings = null;
private Map values = new HashMap();
public void reset(ActionMapping mapping, HttpServletRequest
request) {
super.reset(mapping, request);
externalRatings = ListUtils.lazyList(new ArrayList(), new
ExternalRatingBeanFactory());
this.set("externalRatings",externalRatings);
}
public void setValue(String key, Object value) {
this.set(key, value);
}
public Object getValue(String key) {
return this.get(key);
}
public Map getAllValues() {
return this.getMap();
}
class ExternalRatingBeanFactory implements Factory {
/**
* Create a new instance of the TradeAdjBean object
*/
public Object create() {
return new CpExternalCreditRating();
}
}
}
Please help.
Rahul