This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes html:text inside logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:text inside logic:iterate" Watch "html:text inside logic:iterate" New topic
Author

html:text inside logic:iterate

Hiroyuki Suzuki
Greenhorn

Joined: Jul 25, 2007
Posts: 24
hello there again..
this is a continuation on my post earlier about hmtl:multibox

this is my JSP

ActionForm for text

the text "bitrateText" will produce 5 rows..
My problem is when I enter values on Row1 text,
when I click submit, the value I entered is also visible on Row2-5 text.

Maybe, because Im only using one name for html:text which is "bitrateText"
How can I make this different for each text so that only text that has value on it will be submitted?

Please help me guys..
Arigatou..
Ranjit Gopinathan
Ranch Hand

Joined: Jul 03, 2007
Posts: 46
You can achieve this using indexed property.

Try this link Indexed Property Example
Hiroyuki Suzuki
Greenhorn

Joined: Jul 25, 2007
Posts: 24
Hello Ranjit...
Thanks for the info..

Ive made some revision on my JSP



for my html:text, i used item1 for its name...

for my Actionform


i also define bitrateTxt in my actionform

but, when i try to execute it,
an error occurs
avax.servlet.ServletException: Bean items1 のプロパティ bitrateTxt に対するゲッターメソッドがありません
which means no getter method for Bean item1 property bitrate.

What is wrong with my code?
please help me
Hiroyuki Suzuki
Greenhorn

Joined: Jul 25, 2007
Posts: 24
hello guys..
I have already solved this problem


for html:text

↓ changed into this


in my actionform
i declared bitrateTxt as


it works properly now
Varun Selva
Ranch Hand

Joined: Jun 17, 2012
Posts: 42

Hiroyuki Suzuki wrote:hello guys..
I have already solved this problem


for html:text

↓ changed into this


in my actionform
i declared bitrateTxt as


it works properly now



If we build the string inside the property attribute, Not working.
But below code is working fine.








Varun Selva
 
jQuery in Action, 2nd edition
 
subject: html:text inside logic:iterate
 
Similar Threads
Javascript - Arraylist
html:checkbox or html:multibox
How to use checkbox in iterate tag ?
Still on Validation
On htm:multibox