t:messages (the messages tomahawk component) has the functionality to render 
the summary with the label for description by replacing the component's id in 
the message summary with the label name. What I have noticed is that the 
validation interceptor tag doesn't add the component ID to the message. Since 
the component is not part of the validator properties, I can't add it to the 
message either using the bundle. 

So, if possible, can the functionality be added to the interceptor to add the 
component id to the valid message?

Example:

  | JSF:
  | <t:messages />
  | <t:outputLabel value="Testing" for="testInput" />
  | <t:intputText id="testInput" value="#{mybean.prop}" />
  | 
  | Java:
  | @Name("mybean")
  | public class MyBean
  | {
  | @Length(min=4,max=25)
  | public String getProp() {}
  | }
  | 

This results in "length must be between 4 and 25" in the t:messages. Normally, 
JSF would print something like "testInput: length must be between 4 and 25" and 
t:messages would print "Testing: length must be between 4 and 25". This way the 
user knows which component a message in the global messages is for. I could 
fake this by putting a custom message on every validated property that contains 
the property name, but then I can't change it in the XHTML. 

-Andrew


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

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


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to