[jboss-user] [JBoss Seam] - Messages with "for" attribute to assoicate with related form

xshuang do-not-reply at jboss.com
Wed Nov 28 09:24:55 EST 2007


Good morning all,

The JSF h:messages tag doesn't include information to link message for form controls (not global messages) with related form controls. The Seam s:message does so but it is not suitable for my use.

My goal is to display a list of error messages on the top of the form, which are linked to the form control where the error occured.

I checked Seam source code and found that the Seam FacesMessages class maintains an internal Map to map form controls to messages. However, Seam does not provide a tag like s:messages to serve this purpose.

And for whatever reason, clientIds stored in JSF FacesContextImpl (can be retrieved using getClientIdsWithMessages()) are not the same as what are on form display. It seems JSF creates two components for each form control, one can be retrieved using getClientIdsWithMessages() and the other is on form display. That might explain why sometimes we got "duplicate ID for a component" error.

Is there a work-around or a solution? Thank you very much for your help.

Best regards,
Sheng

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

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



More information about the jboss-user mailing list