[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1298) UIDecorate ignores programmatic faces messages
Christian Bauer (JIRA)
jira-events at lists.jboss.org
Tue May 8 02:39:52 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1298?page=comments#action_12361740 ]
Christian Bauer commented on JBSEAM-1298:
-----------------------------------------
The problem seems to be conditional rendering of <s:message/>:
<h:panelGroup rendered="#{invalid}">
<h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/attention.gif"
width="18" height="18"
styleClass="attentionImage"/>
<s:span styleClass="attentionMessage"> <s:message/></s:span>
</h:panelGroup>
Doesn't work, this works:
<h:panelGroup>
<h:graphicImage value="/themes/#{wikiPreferences.themeName}/img/attention.gif"
width="18" height="18"
styleClass="attentionImage"/>
<s:span styleClass="attentionMessage"> <s:message/></s:span>
</h:panelGroup>
> UIDecorate ignores programmatic faces messages
> ----------------------------------------------
>
> Key: JBSEAM-1298
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1298
> Project: JBoss Seam
> Issue Type: Bug
> Components: Core
> Reporter: Christian Bauer
> Assigned To: Gavin King
>
> <s:decorate id="usernameDecorate" template="includes/formFieldDecorate.xhtml">
> <ui:define name="label">Username</ui:define>
> <h:inputText tabindex="4" size="16" maxlength="16" required="true" id="username" value="#{userHome.instance.username}">
> <a:support event="onblur" action="#{userHome.validateUsername}" reRender="usernameDecorate"/>
> </h:inputText>
> </s:decorate>
> The userHome.validateUsername() method:
> User foundUser = userDAO.findUser(getInstance().getUsername(), false, false);
> if ( foundUser != null && foundUser != getInstance() ) {
> facesMessages.addToControlFromResourceBundleOrDefault(
> "username",
> FacesMessage.SEVERITY_ERROR,
> getMessageKeyPrefix() + "usernameExists",
> "A user with that name already exists."
> );
> return false;
> }
> return true;
> (This is actually wrapped again, the validateUsername() method returns void.)
> The decoration is not rendered as invalid. If I remove the identifier of the input field, a global message is correctly displayed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list