• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

how to track?

 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use JavaBean Indexed Property.
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ess,

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

now i am studing indexed property

thanks & regards,
seetharaman
 
Arthur, where are your pants? Check under this tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic