Stas Shvabsky

Greenhorn
+ Follow
since Feb 02, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Stas Shvabsky

I found a way around. Now I use regular <input type="hidden" value="<bean:write name='address'/>">
It works.
17 years ago
Hi

I have an Action Form with the following code

private String[] emails = null;
private String email = null;

public void setEmails(String[] emails){
this.emails = emails;
}

public String[] getEmails(){
return this.emails;
}

public String getEmail(){
return this.email;
}

public void setEmail(String email){
this.email = email;
}

... etc ...

I initialize array in DispatchAction

form.setEmails(user.getUserEmails());


then I iterate trought the email collection

<logic:iterate id="address" property="emails">
<tr>
<td><bean:write name="address"/></td>
<td><html:hidden property="email" value="<bean:write name='address'/>"/>

last row does not converts to value of address instead of it prints the same row in encoded mode like:
<input type="hidden" name="email" value="<bean:write name='address'/>">

what am I doing wrong?
17 years ago
Thank you it works
17 years ago
Do you use exadel studio plugin for eclipse (http://www.exadel.com/web/portal/home)?
They provide very nise grafic interface for editinig web.xml, struts-config.xml and many other files. It can help you to locate problem

Hope it helps
17 years ago
Hi.
I have a list of 0 or more of them assigned to the user. I need to show all sectors in the table.

First column is name of the sector second one is checkbox. Checkbox is checked if sector assigned to user. So format should be like this

<table>
<tr>
<td>Sector 1 name</td>
<td><input type="checkbox" value="Sector 1 id"></td>
</tr>
<tr>
<td>Sector 2 name</td>
<td><input type="checkbox" value="Sector 2 id"></td>
</tr>
...
</table>

How can I do it in Struts
17 years ago