struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darryl Smith <dsm...@nesmi.com>
Subject html:image vs html:submit
Date Thu, 08 Jul 2004 20:33:44 GMT
In an attempt to avoid using LookupDispatchAction:

I planned on just using form.getAction(), which works with submit 
buttons, but when I try it with an image button its a different story.

Here's my setup

public class CartForm extends ActionForm {
    private final Map values = new HashMap();
    private String action;
   
    // gets & sets
}

<td class="cart-detail"><html:image property="action" 
src="images/DeleteLineItem.gif">delete</html:image></td>
<td class="cart-detail"><html:submit 
property="action">delete</html:submit></td>

If I click on the button, it will process work correctly, if I click the 
image I get a nice stack trace

java.lang.IllegalArgumentException: No bean specified
	org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:837)
	org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934)
	org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
	org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
	org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
	org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
	org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
	org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

 
Anyone have any ideas?

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


Mime
View raw message