You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shane Mingins <sh...@assureinternational.com> on 2003/05/30 00:27:53 UTC
Can I set the src of html:img from a bean?
Hi
I wish to set the src value for html:img from the form bean.
Can I do this? And if so how? I only seem to be able to "append a
parameter" ... not what I want to do.
Or probably better still would be to set the srcKey dynamically so that I
can maintain the URL values in the properties file and have my Action class
set the form bean value to the key I want.
Can I do this? And if so how?
What I am attempting to do is set an image dynamically and then retain the
value when the form is submitted and the ActionForm.validate method called.
One way that works is using:
<img src='<bean:write name="EditDistributionChannelBean"
property="mode"/>'>
<html:hidden property="mode"/>
But I thought if I could use html:img it would be tidier.
TIA
Shane
Shane Mingins
Analyst Programmer
Assure NZ Ltd
Ph 644 494 2522
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org