[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to pass a hidden field and get the value?

Posted on 2007-10-01
3
Medium Priority
?
2,442 Views
Last Modified: 2013-11-24
Hi,

I populate a List the shows the results as:

<c:forEach var="fmlistItem" items="${fmlist}">
<input type="radio" name="fund_manager_code" value="<c:out value="${fmlistItem.managerDescription}" />"/><c:out value="${fmlistItem.managerDescription}" /><br/>
</c:forEach>

The List consists of bean type DecDiv that has five fields but I just show one field fund_manager_code and I
want to pass the fundManagerId of this DecDiv object that was selected....

Now, the item, fmlistItem has another field that is: fundManagerId ...
I need to pass this id as a hidden field from this form... how I do that?

I tried this:(didn' work? for some reason it is alwasy printing out 1)

<c:forEach var="fmlistItem" items="${fmlist}">
<input type="radio" name="fund_manager_code" value="<c:out value="${fmlistItem.managerDescription}" />"/><c:out value="${fmlistItem.managerDescription}" /><br/>
<input type="hidden" name="fund_manager_id" value="<c:out value="${fmlistItem.fundManagerId}" />"/>
</c:forEach>


Could you please let me know how I pass that?

Thanks.
0
Comment
Question by:_Esam
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
elfe69 earned 500 total points
ID: 19993292
You should set the value of each item in your forEach list to its corresponding fundManagerId, try this:

<c:forEach var="fmlistItem" items="${fmlist}">
<input type="radio" name="fund_manager_code" value="<c:out value="${fmlistItem.fundManagerId}" />"/><c:out value="${fmlistItem.managerDescription}" /><br/>
</c:forEach>
0
 

Author Comment

by:_Esam
ID: 19993740
I see what you did ...excellent...

Thanks much...

Regards,
_Esam..
0
 
LVL 11

Expert Comment

by:elfe69
ID: 19994152
You're welcome !
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question