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

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









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
select tag in Struts2 to handle Enums - Struts
select tag in Struts2 to handle Enums  I have an java enum in my object. I am trying to set its values from struts2 select tag. I tried with "#list... to handle enums in struts2 select tag ?   Hi friend, Code to solve
Advertisements
How to Use Struts 2 token tag - Struts
How to Use Struts 2 token tag  Hi , I want to stop re-submiiting... 'token' tag for it, but not able to find out how does it works, I' ve put tag... page, or do i need to map anything on my struts.xml file ? I am using struts 2
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
struts html tag - Struts
struts html tag  Hi, the company I work for use an "id" tag on their tag like this: How can I do this with struts? I tried and they don't work
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
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 add another option to the select tag using struts2 tag - Struts
How to add another option to the select tag using struts2 tag  Hi, How to add another option to select tag using tag. My scenario is : If the logged in user is admin then drop down should contain the normal list
Struts Tag Lib - Struts
Struts Tag Lib  Hi i am a beginner to struts. i dont have... Defines a tag library and prefix for the custom tags used in the JSP page. JSP Syntax Examples in Struts : Description The taglib
How to Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
getting result in table dynamically - Struts
getting result in table dynamically  How do i get result in tabular format dynamically using our own tags
Struts tag - Struts
Struts tag  I am new to struts, I have created a demo struts application in netbean, Can any body please tell me what are the steps to add new tags to any jsp page
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
how to insert list box in java script dynamically and elements retrieving from database like oracle
how to insert list box in java script dynamically and elements retrieving from database like oracle  Hi, how to dynamically increase size of list... insert new course in a table.. It should be seen in my list box..ADS
how to insert list box in java script dynamically and elements retrieving from database like oracle
how to insert list box in java script dynamically and elements retrieving from database like oracle  hi all, how can i insert elements into java script list box retrieving from Database. whenever I insert any element in the Db
Activity display dynamically depend on the locale on Struts
Activity display dynamically depend on the locale on Struts  i want to display activities dynamically which can be increase or decrease on struts 2 and that depend on the Locale (like English or French) . dynamically means user
action tag - Struts
action tag  Is possible to add parameters to a struts 2 action tag? And how can I get them in an Action Class. I mean: xx.jsp Thank you
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 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
Struts ForwardAction vs Forward tag in jsp - Struts
Struts ForwardAction vs Forward tag in jsp  difference between struts ForwardAction class and Forward tag in jsp
C:Redirect Tag - Struts
C:Redirect Tag  I am trying to use the jstl c:redirect tag in conjuction with a struts 2 action. I am trying to do something like What I am... some application initialization to place (in the form of a Struts action) so
struts logic:iterate tag
struts logic:iterate tag  Hi All, I am writing a look up jsp which is using logc:iterate every thing is fine except this the problem here is unable to go inside the tag. Here is the stack trace I am getting. [#|2010-10-27T00
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
Html tag inside out implicit object
Html tag inside out implicit object   ... a html tag inside a out object. out object is used to display the content on the browser. To make this program run use out object inside which define some html
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
logic iterate tag - Struts
logic iterate tag  Hey I am displaying the values in a jsp called categoryView.jsp using logic iterate tag as Now properties... CategoryForm.java to ViewCategoryForm.java. How do I separate both of the form beans
Display Tag Related - Struts
Display Tag Related  Hi, I am using display:column to display list of values on my jsp and i want to sort those values. sorting is working for all the attributes if i specify sortable = "true". but i have to display one column
Achor tag. Struts2 code - Struts
Achor tag. Struts2 code  Hi All, How to send the values form one jsp page to another using anchor tag (or any which is similar to achor) in Struts? Please help me. I am waiting for the answer. Regards, Sandeep
tree tag in struts2 - Struts
tree tag in struts2  I have an arraylist of values retrieved from the database and i want all the values in the arraylist to be viewed in a subtree... are also list and the values in thier lists are as follows. INDIA has Bangalore
Struts nested tag Example
Struts nested tag Example       The tag library ?nested? is included in Struts... tag library and how you can use it. We can manage nested beans easily
ultiple selections list in Struts
ultiple selections list in Struts  How to create a multiple selections list in Struts? and retrive seleted values
drop down list in Struts
drop down list in Struts  How to create a drop down list in Struts
multiple selections list in Struts
multiple selections list in Struts  How to create a multiple selections list in Struts? and retrive seleted values
Achor tag. Struts2 code - Struts
Achor tag. Struts2 code  Hi All, How to send the values form one jsp page to another using anchor tag (or any which is similar to achor) in Struts? Please help me. I am waiting for the answer. Regards, Sandeep  
Struts Tag:
Struts Tag:       bean:struts Tag... configuration objects. This tag retrieve the value of the specified Struts... will learn to use the Struts Html<bean:struts>tag.  We will cover
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 Struts Works
How Struts Works       The basic purpose of the Java Servlets in struts is to handle requests...;LoginAction">.  This tag tells the Struts ActionServlet that whenever
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 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
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 - Struts
Struts  how to handle errors in struts
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 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
contains for list in struts2 - Struts
contains for list in struts2  Is there any way to check in the list or for existence of an enum ? Something like list.contains(string). iterating over list I want to do something like Display x display y
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... of Struts 2 Action Tag: (example)ADS_TO_REPLACE_2
creating list in dropdown using struts - Struts
creating list in dropdown using struts   creating list in dropdown using struts : In action class list.add(new LabelValueBean("ID","Name")); In Jsp * Select Item Select In Form : getter
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 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

Ads