struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Jaffa" <jaffa...@hotmail.com>
Subject Re: Struts 1.0 and Nested Tags. with Added Classes
Date Thu, 18 Apr 2002 17:20:49 GMT
Please i need alot of help here.

i have the following code


<bean:define id="conditionsList" type="java.util.ArrayList"
name="conditionsList" />

<logic:iterate id="theSCBean" name="conditionsList"
type="com.cci.dv.formBean.SpecialConditionsBean">
    <html:form action="/compliance/MainSpecialConditions" target="CONTENT">
        <html:select property="pgmIDArray">
            <nested:nest property="programs" name="theSCBean">
                <nested:define property="programs" id="programs"/>
                <nested:options collection="programs" property="programID"
labelProperty="pgmName" />
            </nested:nest>
        </html:select>
    </logic:iterate>
</html:form>


I recieve the following error.
java.lang.IllegalArgumentException: Null property value for 'programs'


What am i doing wrong.

Just to let u know that programs is an ArrayList in SpecialConditionsBean.


thank u for you help.

Daniel Jaffa












public class SpecialConditionsBean extends ActionForm implements
formInterface, Serializable {

    // Procs: pageID 96 for pgmName get and 95 for put special conditions.

 public SpecialConditionsBean() {}

    private String updateInsert = "";
    private String mapTo = "";
    private int caseID = 0;
 private int userID = 0;
 private String today = "";
 private int pgmID = 0;
 private String pgmName = "";
 private int modalID = 0;
 private int durTypeID = 0;
 private int setDuration = 0;
 private int minDuration = 0;
 private int maxDuration = 0;
 private int condTypeID = 0;
 private String condTypeDesc = "";
 private int regionID = 0;
 private ArrayList programs;
 private String selected = "";

 //these need array props also:
 private int[] pgmIDArray;
 private int[] modalIDArray;
 private int[] durTypeIDArray;
 private int[] setDurationArray;
 private int[] minDurationArray;
 private int[] maxDurationArray;
 private int[] condTypeIDArray;
 private String[] selectedArray;

 public String getUpdateInsert () { return updateInsert;}
    public String getMapTo () { return mapTo;}
    public int getCaseID () { return caseID;}
 public int getUserID () { return userID;}
 public String getToday () { return today;}
 public String getPgmName () { return pgmName;}
 public int getPgmID () { return pgmID;}
 public int getModalID () { return modalID;}
 public int getDurTypeID () { return durTypeID;}
 public int getSetDuration () { return setDuration;}
 public int getMinDuration () { return minDuration;}
 public int getMaxDuration () { return maxDuration;}
 public int getCondTypeID () { return condTypeID;}
 public String getSelected () { return selected;}
 public String getCondTypeDesc () { return condTypeDesc;}

 public int[] getPgmIDArray () { return pgmIDArray;}
 public int[] getModalIDArray () { return modalIDArray;}
 public int[] getDurTypeIDArray () { return durTypeIDArray;}
 public int[] getSetDurationArray () { return setDurationArray;}
 public int[] getMinDurationArray () { return minDurationArray;}
 public int[] getMaxDurationArray () { return maxDurationArray;}
 public int[] getCondTypeIDArray () { return condTypeIDArray;}
 public String[] getSelectedArray () { return selectedArray;}

 public int getRegionID () { return regionID;}
 public ArrayList getPrograms () { return programs;}

 //sets
 public void setUpdateInsert (String updateInsert) { this.updateInsert
=updateInsert;}
    public void setMapTo (String mapTo) { this.mapTo =mapTo;}
    public void setCaseID (int caseID) { this.caseID =caseID;}
 public void setUserID (int userID) { this.userID =userID;}
 public void setToday (String today) { this.today =today;}
 public void setPgmName (String pgmName) { this.pgmName =pgmName;}
 public void setSelected (String selected) { this.selected =selected;}
 public void setCondTypeDesc (String condTypeDesc) { this.condTypeDesc
=condTypeDesc;}

 public void setPgmIDArray (int[] pgmIDArray) { this.pgmIDArray
=pgmIDArray;}
 public void setModalIDArray (int[] modalIDArray) { this.modalIDArray
=modalIDArray;}
 public void setDurTypeIDArray (int[] durTypeIDArray) { this.durTypeIDArray
=durTypeIDArray;}
 public void setSetDurationArray (int[] setDurationArray) {
this.setDurationArray =setDurationArray;}
 public void setMinDurationArray (int[] minDurationArray) {
this.minDurationArray =minDurationArray;}
 public void setMaxDurationArray (int[] maxDurationArray) {
this.maxDurationArray =maxDurationArray;}
 public void setCondTypeIDArray (int[] condTypeIDArray) {
this.condTypeIDArray =condTypeIDArray;}
 public void setSelectedArray (String[] selectedArray) { this.selectedArray
=selectedArray;}

 public void setPgmID (int pgmID) { this.pgmID =pgmID;}
 public void setModalID (int modalID) { this.modalID =modalID;}
 public void setDurTypeID (int durTypeID) { this.durTypeID =durTypeID;}
 public void setSetDuration (int setDuration) { this.setDuration
=setDuration;}
 public void setMinDuration (int minDuration) { this.minDuration
=minDuration;}
 public void setMaxDuration (int maxDuration) { this.maxDuration
=maxDuration;}
 public void setCondTypeID (int condTypeID) { this.condTypeID =condTypeID;}
 public void setRegionID (int regionID) { this.regionID =regionID;}
 public void setPrograms (ArrayList programs) { this.programs =programs;}

    public String toString() {
  StringBuffer sb = new StringBuffer("SpecialConditionsBean[");
  sb.append("CaseID = ").append(caseID).append(",");
  sb.append("UserID = ").append(userID).append(",");
  sb.append("Today = ").append(today).append(",");
  sb.append("PgmID = ").append(pgmID).append(",");
  sb.append("PgmName = ").append(pgmName).append(",");
  sb.append("ModalID = ").append(modalID).append(",");
  sb.append("DurTypeID = ").append(durTypeID).append(",");
  sb.append("SetDuration = ").append(setDuration).append(",");
  sb.append("MinDuration = ").append(minDuration).append(",");
  sb.append("MaxDuration = ").append(maxDuration).append(",");
  sb.append("CondTypeID = ").append(condTypeID).append(",");
  sb.append("CondTypeDesc = ").append(condTypeDesc).append(",");
  sb.append("RegionID = ").append(regionID).append(",");
  sb.append("Selected = ").append(selected).append(",");
  if(programs != null) {
   if(programs.size() > 0)  {
    ProgramsBean pb;
    for(int i = 0; i < programs.size(); i++)  {
     pb = (ProgramsBean)programs.get(i);
     sb.append(pb.getPgmName());
       }
      }
     }
  sb.append("]");
  return (sb.toString());
 }




public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request) {

        ActionErrors errors = new ActionErrors();


  return errors;
    }

} // SpecialConditionsBean


package com.cci.dv.formBean;

import java.util.*;
import java.io.*;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import javax.servlet.http.HttpServletRequest;

public class ProgramsBean extends ActionForm implements formInterface,
Serializable {

    // define the default constructor
 public ProgramsBean() {}

    private int returnCode = 0;
 private int caseID = 0;
 private int roleID = 0;
 private int pgmCaseID = 0;
 private int appearTypeID = 0;
 private String pgmName = "";
 private String condTypeDesc = "";
 private int condTypeID = 0;
 private int setDuration = 0;
 private int minDuration = 0;
 private int maxDuration = 0;
 private String durTypeDesc = "";
 private String pgmStatusFlag = "";
 private String closedReasonDesc = "";
 private String courtDate = "";
    private String updateInsert = "";
    private String mapTo = "";
    private int showCompButton = 0;
    private int programID = 0;
    private int regionID = 0;

 public int getCaseID () { return caseID;}
 public int getRoleID () { return roleID;}
 public int getPgmCaseID () { return pgmCaseID;}
 public int getAppearTypeID () { return appearTypeID;}
 public String getPgmName () { return pgmName;}
 public String getCondTypeDesc () { return condTypeDesc;}
 public int getCondTypeID () { return condTypeID;}
 public int getSetDuration () { return setDuration;}
 public int getMinDuration () { return minDuration;}
 public int getMaxDuration () { return maxDuration;}
 public String getDurTypeDesc () { return durTypeDesc;}
 public String getPgmStatusFlag () { return pgmStatusFlag;}
 public String getClosedReasonDesc () { return closedReasonDesc;}
 public String getCourtDate () { return courtDate;}
 public int getReturnCode() { return returnCode; }
    public String getUpdateInsert () { return updateInsert;}
    public String getMapTo () { return mapTo;}
    public int getShowCompButton() { return showCompButton; }
    public int getProgramID () { return programID;}
    public int getRegionID () { return regionID;}

 //sets
 public void setCaseID (int caseID) { this.caseID =caseID;}
 public void setRoleID (int roleID) { this.roleID =roleID;}
 public void setPgmCaseID (int pgmCaseID) { this.pgmCaseID =pgmCaseID;}
 public void setAppearTypeID (int appearTypeID) { this.appearTypeID
=appearTypeID;}
 public void setPgmName (String pgmName) { this.pgmName =pgmName;}
 public void setCondTypeDesc (String condTypeDesc) { this.condTypeDesc
=condTypeDesc;}
 public void setCondTypeID (int condTypeID) { this.condTypeID =condTypeID;}
 public void setSetDuration (int setDuration) { this.setDuration
=setDuration;}
 public void setMinDuration (int minDuration) { this.minDuration
=minDuration;}
 public void setMaxDuration (int maxDuration) { this.maxDuration
=maxDuration;}
 public void setDurTypeDesc (String durTypeDesc) { this.durTypeDesc
=durTypeDesc;}
 public void setPgmStatusFlag (String pgmStatusFlag) { this.pgmStatusFlag
=pgmStatusFlag;}
 public void setClosedReasonDesc (String closedReasonDesc) {
this.closedReasonDesc =closedReasonDesc;}
 public void setCourtDate (String courtDate) { this.courtDate =courtDate;}
    public void setReturnCode(int returnCode) {
this.returnCode=returnCode; }
    public void setUpdateInsert (String updateInsert) { this.updateInsert
=updateInsert;}
    public void setMapTo (String mapTo) { this.mapTo =mapTo;}
    public void setShowCompButton(int showCompButton) {
this.showCompButton=showCompButton; }
    public void setProgramID (int programID) { this.programID =programID;}
    public void setRegionID (int regionID) { this.regionID =regionID;}



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message