partialSubmit with graphicImage not working?
I have a simp开发者_StackOverflow中文版le page, implementing a password input field with strength analysis. I'm usign Ice-faces 1.8.2.
I set the partialSubmit property of password input field to display password strength:
<ice:inputSecret redisplay="true" partialSubmit="true"
id="password" value="#{beanreg.password}"/>
<ice:panelGroup>
<ice:graphicImage id="imgstrength" url="/images/#{beanreg.strengthImage}"/>
<ice:outputText id="pwdstrength"
value="#{beanreg.passwordStrength}"/>
</ice:panelGroup>
<ice:inputSecret partialSubmit="true"
id="password2" value="#{beanreg.password2}"/>
When I leave the password input field, the pwdstrength
component correctly update his value, but the imgstrength
field doesn't change the image. The image get changed only when subsequently I leave the field password2
or when I click anywhere in the form.
I tested the form both on Firefox3.6 and Chrome: same behaviour.
Any suggestion?
It's likely cached by the browser. Add a query string with a timestamp so that the browser is forced to request it fresh new from the server.
<ice:graphicImage id="imgstrength" url="/images/#{beanreg.strengthImage}?#{now.time}"/>
Where #{now}
is a request scoped managed bean of class java.util.Date
.
<managed-bean>
<managed-bean-name>now</managed-bean-name>
<managed-bean-class>java.util.Date</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
精彩评论