You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stuart McGrigor <St...@kintore.co.nz> on 2004/03/16 12:31:25 UTC

html:link vs. html:submit vs. input

The JSP code below prints out a nice list of company names, with links
called Edit and Delete
which call a suitable form with a pair of parameters, one being the action,
the other being an identifying property of the company to played with.

<logic:iterate name="CompanyProfile" property="candidateSystems"
id="aSystem">
  <bean:write name="aSystem" property="fullName"/>
  <%
    // Assemble a hashmap of args for the html:link
    java.util.HashMap editMap = new java.util.HashMap();
    java.util.HashMap delMap = new java.util.HashMap();
    editMap.put("action", "Edit");
    editMap.put("system", ((CandidateSystem) aSystem).getFullName());
    delMap.put("action", "Delete");
    delMap.put("system", ((CandidateSystem) aSystem).getFullName());
    pageContext.setAttribute("editMap", editMap);
    pageContext.setAttribute("delMap", delMap);
  %>
  <html:link page="/editCompanySystem.do" name="editMap"><bean:message
key="button.edit"/></html:link>
  <html:link page="/editCompanySystem.do" name="delMap"><bean:message
key="button.delete"/></html:link>
</logic:iterate>

It all works fine, but I'd much rather have two proper buttons, rather than
links. Is this even possible?

Regards,
Stuart McGrigor


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org