You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Rama, Shreekanth (K.)" <sr...@ford.com> on 2003/12/18 14:30:55 UTC

Using Iterate Tag !

Hi All, 

	I am new to struts world.
	I have a problem in the iterate tag. Here's the code snippet..
	<logic:iterate id="currRecord" name="createAbstractForm"
property="reqdEquipmentList" indexId="rowCount">

	<TR CLASS="V10B">
	<TD>
		<html:text name="currRecord" property="seqNum"  size="4"
maxlength="5" indexed="true"/>
	</TD>
	<TD>
		<html:text name="currRecord" property="GSAComp"  size="20"
maxlength="40" indexed="true"/>
	</TD>
	<TD>
		<html:text name="currRecord" property="GSAMinReq"  size="18"
maxlength="35" indexed="true"/>
	</TD>
	</logic:iterate>


My reset method & other methods in the createAbstractForm class are: 

	public void reset(ActionMapping mapping, HttpServletRequest request)
{

		reqdEquipmentList = new ArrayList();
		
		this.rowCount = request.getParameter("rowCount");
	
		int count = 0;
		if (rowCount != null) {
			count = Integer.parseInt(rowCount);

				for (int i = 0; i < count; i++) {
					reqdEquipmentList.add(new
RequiredEquipmentVO());
		}
	}

	public void setRowCount(String string) {
		this.rowCount = string;
	}
	public String getRowCount() {
		if (this.reqdEquipmentList != null) {
			return "" + reqdEquipmentList.size();
		}
		return rowCount;
   }

	public ArrayList getReqdEquipmentList() {
		return reqdEquipmentList;
	}
	public void setReqdEquipmentList(ArrayList reqdEquipmentList) {
		this.reqdEquipmentList = reqdEquipmentList;
	}


	I am not able to get the values entered on the screen back in action
class
	Any one, please help tell me what is wrong in the settings or code. 

Thanks & Regards
Shree


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