File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes how to track? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to track?" Watch "how to track?" New topic
Author

how to track?

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Feb 07, 2005
Posts: 643
Use JavaBean Indexed Property.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8914
    
    8

To explain what Gowher means, have a look at this FAQ entry.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Jan 28, 2008
Posts: 5575

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

Joined: Oct 29, 2001
Posts: 8914
    
    8

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

Joined: Jan 28, 2008
Posts: 5575

Hi Ess,

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

now i am studing indexed property

thanks & regards,
seetharaman
 
GeeCON Prague 2014
 
subject: how to track?