[jboss-user] [JBoss Seam] - Re: Mathematical captcha & Email obfuscator

Homer J. do-not-reply at jboss.com
Wed May 2 11:34:45 EDT 2007


Thanks for your response!

I added attributes & getters / setters to the UI* classes.

Regarding h:outputLink as parent for s:email I agree with you that it would be conceptually correct / better, but I don't like it because the user would be forced to write more. Further the text (not only the value) get´s obfuscated because, normally, one not only uses a mailto link but also shows the email address in the body of the  tag. Therefore further distinction would be required to distinguish normal text and - e.g. - a picture. Last but not least the email tag relies on some stuff in the obfuscator tag to keep the code dry.

However: I stumbled upon a pretty strange behavior when using value binding and ui:repeat - e.g:
<ui:repeat value="#{newMembers}" var="newMember">
  | 	<s:obfuscator value="#{newMember.memberName}" /><br />
  | </ui:repeat>
results in:
Mona<br />
  | obfuscationOf(Mona)<br />
  | obfuscationOf(obfuscationOf(Mona))<br />
  | ...
This happens because the value is not renewed for 2nd+ iterations which seems to happen because the name of the value binding is the same. I worked around that by manually setting value=null in encodeEnd but this seems to be quite an ugly hack. Further it works fine for h:outputText.

Is this a bug in JSF or am I missing the obvious? How is this normally solved?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042482#4042482

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4042482




More information about the jboss-user mailing list