How to handle the list dynamically in struts inside logic:iterate tag

Ads
 

How to handle the list dynamically in struts inside logic:iterate tag

I am having following code in JSP
<table>
<tr>
<logic:iterate name="loginForm" id="inutParams" property="inutParams" indexId="i">
<tr>
<td><bean:write name="inutParams"/>:</td>

<td><html:text size="50" name="loginForm" property="inutParamsvalues"/></td>
</tr>
</logic:iterate>
<td>

</td>
</tr>
</table>


my struts config with dyna form is:
<form-bean name="loginForm" type="org.apache.struts.validator.DynaValidatorFor m">
<form-property name="username" type="java.lang.String" />
<form-property name="password" type="java.lang.String" />
<form-property name="dbNameList" type="java.util.List" />
<form-property name="firstname" type="java.lang.String" />
<form-property name="lastname" type="java.lang.String" />
<form-property name="gettingstart" type="java.lang.String" />
<form-property name="errormsg" type="java.lang.String" />
<form-property name="region" type="java.lang.String" />
<form-property name="spname" type="java.lang.String" />
<form-property name="query" type="java.lang.String" />
<form-property name="headerList" type="java.util.List" />
<form-property name="finalList" type="java.util.List" />
<form-property name="recordList" type="java.util.List" />
<form-property name="errorMsg" type="java.lang.String" />
<form-property name="spDetails" type="java.util.List" />
<form-property name="inutParams" type="java.util.List" />
<form-property name="inutParamsvalues" type="java.util.List" />

</form-bean>


In my action I wish to take the values from list named inutParamsvalues.

DynaValidatorForm bean = (DynaValidatorForm) form;
inputParamVal = (List) bean.get("inutParamsvalues");
System.out.println("-------Size-----"+inputParamVal.size());
for(int i=0;i<inputParamVal.size();i++)
{
System.out.println("In UserAction::fetchSP() ::inputParamVal="+inputParamVal.get(i));
} 


I am getting the inputParamVal list in action as null.Instead It should give the values entered by user in those many textfields.

pls anyone have any Idea.
Pls note that the list inutParams doesn't have exact number of values...It may vary from 1 to 15. 
View Answers

Ads









Related Tutorials/Questions & Answers:
How to handle the list dynamically in struts inside logic:iterate tag
How to handle the list dynamically in struts inside logic:iterate tag ...:iterate name="loginForm" id="inutParams" property="inutParams" indexId="i"> <...; </table> my struts config with dyna form is: <form-bean name
how to retreive data dynamically from mysql to drop down list
how to retreive data dynamically from mysql to drop down list   sir, i created a table in mysql and i inserted some values into the table through... the data of a particular column in a table into drop down list dynamically
Advertisements
how to add data dynamically from database into a dropdown list in a jsp
how to add data dynamically from database into a dropdown list in a jsp ... name should also be included in the list dynamically and any updating... list.In that first list is for department and the 2nd list for the names
Tag Inside Table in HTML
Tag Inside Table in HTML       The Tutorial illustrates an example from Tag Inside Table in HTML.In this code we define a HTML page and show you to create a tag inside a Table
Accessing dynamically created variables inside a function
Accessing dynamically created variables inside a function  Hi, I'm sure this is a stupid question but I've been trying to find the solution for days... to set a variable dynamically like so: $pid = $GET['p_id']; This part goes
How to change the checkbox value dynamically.
How to change the checkbox value dynamically.  Hi, I am using struts 1.2 checkbox tag. Requirement is on page load the value must be "true"(checked). And after loading the page i am uncheking the check box and again loading
Regarding struts tag and struts dojo tags.
Regarding struts tag and struts dojo tags.  Hi, in the auto completer example, auto completer tag is of dojo library. So how does prefix of struts library provide that tag. In my code if i do the same : <td><s
how to handle MySQLIntegrityConstraintViolationException?
how to handle MySQLIntegrityConstraintViolationException?  Cannot add or update a child row: a foreign key constraint fails (outerdb.outerpatient, CONSTRAINT outerpatient_ibfk_1 FOREIGN KEY (xrayno) REFERENCES xray (xrayno
How to handle enter key in javascript
How to handle enter key in javascript  Can any one tell me how to handle the enter key event on a Button in HTML. Like in my simple HTML page i want... just need to place your code within the and tag. As given below... <form
Include tag example in Struts
Include tag example in Struts   hi... sir. This is sreenu sir. I am learning struts2 but i have a small doubt i am using include tag. ex... include tag ..... is not displayed pls telll me sir.? i using this tag using
how to add panel inside frame?
how to add panel inside frame?  I prepared a Frame with two labels and text fields and one button.when ever user clicks on the button two text fields should be appear(those text fields should be added to the panel) .I want
How to use java.net.URLConnection to fire and handle HTTP requests?
How to use java.net.URLConnection to fire and handle HTTP requests?  How to use java.net.URLConnection to fire and handle HTTP requests
How to change the data in the table dynamically ?
How to change the data in the table dynamically ?  This is my code. I... then the data displayed in the table below should get sorted dynamically in this jsp page... datastore = DatastoreServiceFactory.getDatastoreService(); Query q = new Query
How does Java handle integer overflows and underflows?
How does Java handle integer overflows and underflows?   hi, How does Java handle integer overflows and underflows? Thanks
How to dynamically build a JSON object with Python
How to dynamically build a JSON object with Python  Hi, I have many..., I want full proof method to make json dynamically with Python. How to do this? How to dynamically build a JSON object with Python? Thanks   Hi
How to dynamically build a JSON object with Python
How to dynamically build a JSON object with Python  Hi, I have many..., I want full proof method to make json dynamically with Python. How to do this? How to dynamically build a JSON object with Python? Thanks   Hi
In JSP page, inside a javascript function, can I place a java code using scriptlet tag?
checkListValue() using scriptlet tag inside the javascript function closeWind... kept inside the java script function gets executed. Pl help how to fix this issue...In JSP page, inside a javascript function, can I place a java code using
how to include an html page inside a tab
how to include an html page inside a tab  how to include an static html page inside a tab(in jquery)   Please visit the following links...;actually i want to knw how to include an google page inside a tab(suppose in 2nd
How to change value of div using Ajax in struts.
How to change value of div using Ajax in struts. In this example, we will introduce you to how to change value of div tag using Ajax in struts, without...; charset=UTF-8"%> <%@taglib uri="/struts-tags" prefix
struts dropdown list
struts dropdown list   In strtus how to set the dropdown list values... page using struts ? please send me jsp code... sample code: **Action... = MasterDataDAO.getValues(list); request.setAttribute("masterlist", masterList
Struts 2 Action Tag
Struts 2 Action Tag "action" Tag in Struts 2 is used by developer to call... action name. Struts 2 Action Tag is one of the Data Tags, which are used.... Following example will further explain the complete use of Struts 2 Action
How to handle Transaction IN and OUT in Inventory using java
How to handle Transaction IN and OUT in Inventory using java  Hi Everyone, I have an Inventory Database(Oracle 10g), where when the items... in the database with one submit. Now the problem is i have no idea how to do
dynamically how to change attiribute values in xml
dynamically how to change attiribute values in xml   Hi, I am facing the problem to update the Attribute values in XML file.dynamically how... dynamically like 1 or 2 or 3 . Any one please help me resolve the issue.It is very
how to display selected checkboxes dynamically using jsp
how to display selected checkboxes dynamically using jsp  Hi friends i have a requirement that : in my JSP page i have radio buttons followed by the DB fields..when i click SUBMIT button,if the field(or record
how to get UIView by tag
how to get UIView by tag  In IOS application how to get a view by the tag id? Thanks   Hi, You can get this with the help of the function 'viewWithTag''. Following example code is getting the UILabel object from
how to use image tag in jsp
how to use image tag in jsp  How to use image tag in JSP
How do I handle the reaction of a circle and a semi-circle colliding in java?
How do I handle the reaction of a circle and a semi-circle colliding in java?  How do I handle the reaction of a circle and a semi-circle colliding in java
How to display gridview details to labels dynamically?
How to display gridview details to labels dynamically?  I am using SQLDataSource to connect to MySQL. I have a gridview that retrieves information from MySQL database based on a selected id(dropdownlist). I need to display
Can i use Scriptlets inside javascript,if so how?
Can i use Scriptlets inside javascript,if so how?  Can i use Scriptlets inside javascript,if so how
How to read data dynamically from keyboard to array in flex
How to read data dynamically from keyboard to array in flex  How to read data dynamically from keyboard to array in flex
how to dynamically create one file with any example in php
how to dynamically create one file with any example in php  how to dynamically create one file with any example in php

Ads