Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

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

Ads

 
 

Share on Google+Share on Google+

Varsha Patil
How to handle the list dynamically in struts inside logic:iterate tag
0 Answer(s)      5 years and 7 months ago
Posted in : Struts
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. 
Ads
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
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
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
How to Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
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
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
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 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
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
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 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
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
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 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
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
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
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
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
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
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
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
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 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
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
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 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
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
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