473,405 Members | 2,176 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to handle dynamically the list in 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.
Dec 30 '11 #1
0 1272

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: nc | last post by:
My iterator can find my collection when my Action class calls my jsp directly, however when my Action class calls an html file that is set up with IFrames (one of which is loading that same jsp), I...
4
by: Piotr Sawuk | last post by:
First off, thanks for the help, this group was a great support for my efforts of learning c++. However, yet again I plan to throw away what I programmed and re-use a little more of what stl has to...
1
by: LinuxTester | last post by:
If I'm in the rwong newsgroup, please point me where to post I'm plunging into the world of JSP development and I'm wanting to improve on this type of logic: <% int rowCount = 0; %>...
26
by: Swroteb | last post by:
Hi there, I've got a reasonably sized list of objects that I'd like to pull out all combinations of five elements from. Right now I have a way to do this that's quite slow, but manageable. I...
4
by: eksamor | last post by:
I have a simple linked list: struct element { struct element *next; int start; }; struct list { struct element *head;
15
by: Macca | last post by:
Hi, My app needs to potentially store a large number of custom objects and be able to iterate through them quickly. I was wondering which data structure would be the most efficient to do this,a...
1
by: nagarwal | last post by:
hi frnds, I am facing a prblm in displaying the contents of an ArrayList which contains 'String' Objects using logic:iterate tag.. example: in the Action : String s=null; String s1=null;...
1
by: prathna | last post by:
Hi .. I have a logic:iterate tag which will display 5 rows each row with a drop downlist and 2 textfields.now by default all the rows will be shown.how do i hide all the rows except the first...
5
by: globalrev | last post by:
if i want a list with all numbers between x and y is there a way to do this with an inbult function. i mean i can always construct a function to do this but is there soemthing like: nbrs =...
3
by: Tyro | last post by:
I have built a database that is updated daily with new items. Each new item needs to be given to someone on our team to work on. I would like to automatically assign the new items to the team...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.