Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Struts How to handle the list dynamically in struts inside logic:iterate tag
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Varsha Patil
How to handle the list dynamically in struts inside logic:iterate tag
0 Answer(s)      2 years and 10 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. 

Advertisement
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 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 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
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 Handle Event Handlers?
How to Handle Event Handlers?  How to Handle Event Handlers
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
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 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
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
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 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
multiple selections list in Struts
multiple 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
ultiple selections list in Struts
ultiple selections list in Struts  How to create a multiple selections list in Struts? and retrive seleted values
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
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 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
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 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
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
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 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 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
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
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
 

 

 

DMCA.com