You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/06/15 16:02:11 UTC

DO NOT REPLY [Bug 29575] New: - html:image tag throws "bean not found" exception

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29575>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29575

html:image tag throws "bean not found" exception

           Summary: html:image tag throws "bean not found" exception
           Product: Struts
           Version: 1.1 Final
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: dev@struts.apache.org
        ReportedBy: reg@clara.co.uk


There seems to be a bug in the <html:image> tag.  I am trying to use it with 
the tags-html-el tld, but it does not seem to effect it if I revert to tags-
html.  I am also using the jstl core and format tag libs.

I have a form bean set up with a String property called submit that I expect 
the value attribute of the image tag to be put into.

<html:image
   pageKey="std.but.prev.src"
   titleKey="std.but.prev"
   value="prev"
   property="submit"/>

However, when I click on this I get a exception:

java.lang.IllegalArgumentException: No bean specified
	at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor
(PropertyUtils.java:837)
	at org.apache.commons.beanutils.BeanUtils.setProperty
(BeanUtils.java:934)
	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
	at org.apache.struts.action.RequestProcessor.processPopulate
(RequestProcessor.java:821)
	at org.apache.struts.action.RequestProcessor.process
(RequestProcessor.java:254)

I have not named a bean on the form tag, because the this works fine for all 
the other elements.  In fact if I change this to a <html:submit> tag this 
works fine.

If I have both a <html:submit> tag and a <html:image> tag on the page and  
click the submit button first (it return to the same action and JSP), the 
image no longer throws the exception, However, the form bean still contains 
the value from when the submit tag was clicked.

Reg

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