• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to track?

 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

for example,i am displaying 10 records in jsp like below,

//let assume their may be 10 tokens
<html:text property="name"value="<%=stt.nextToken()%>" readonly="true" size="3" style="background-color:#eee"/>

if i try to get all the values..how can i get?..i get in my ActionFrom..like below

declaring variable ..String name=null;

public void setName(String name){
this.name=name;
}

public String getName(){//only one value stored..where is remaing?
return name;
}


how can i get all the properties..

please anyone can explain me


thanks & regards,
seetharaman
[ April 08, 2008: Message edited by: Bear Bibeault ]
 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JavaBean Indexed Property.
 
Joe Ess
Bartender
Pie
Posts: 9266
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To explain what Gowher means, have a look at this FAQ entry.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ess,

i have to display bean:write value in text box..so that any changes i can store the database..but when i try to put it into the value attribute i get error..waht to do now? please tell me the solution
----------------------------------------------
<logic:iterate id="employee" name="vector">

<tr align="left">
<td ><html:text property="compoffadded" value="<bean:write name="employee" property="compoffadded" />">
</html:text>
</td>
</tr>
</logic:iterate>

-----------------------------

thanks & regards,
seetharaman
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i got the answare from merril's statement

"The whole point of using an html:text tag as opposed to <input type="text"> is so that the input element will be populated with the value of the corresponding property of the ActionForm bean. If you provide no value attribute, struts does this automatically."


thanks & regards,
seetharaman
 
Joe Ess
Bartender
Pie
Posts: 9266
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by seetharam venk:
i have to display bean:write value in text box..so that any changes i can store the database..but when i try to put it into the value attribute i get error..waht to do now? please tell me the solution


You need to Tell The Details. This code doesn't look like what you posted before. It doesn't look like the FAQ entry I linked to. You don't tell us what error you got.
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ess,

sorry...yesterday i placed this message wrongly...

now i am studing indexed property

thanks & regards,
seetharaman
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic