• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem using EL in html:button onclick

 
Stas Shvabsky
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Stas Shvabsky
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found a way around. Now I use regular <input type="hidden" value="<bean:write name='address'/>">
It works.
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see you found your "solution", but I can't quite figure out what you were trying to do. It looks like your form has a single String property named email but now your html page is going to have multiple hidden fields with the property name email.

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic