[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1855) Provide a FacesMessages.instance().addToControlById() or equivalent

Stephen Friedrich (JIRA) jira-events at lists.jboss.org
Thu Jan 1 19:50:54 EST 2009


    [ https://jira.jboss.org/jira/browse/JBSEAM-1855?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12444363#action_12444363 ] 

Stephen Friedrich commented on JBSEAM-1855:
-------------------------------------------

Any news on this?
IMHO this is a bug, not a feature request:
You currently just cannot add a FacesMessage to a specific component and have it survive a redirect.
After the redirect it will be a global message instead.
(Because FacesMessages.getClientId(String) tries to walk the component tree to determine the client id for the component id, but that tree is still _empty_ so null is returned.)

We need the client id to correctly add the faces message when rendering the response, but I don't see how the client id can be computed from the component id when the tree does not yet exist.
So my conclusion would be that we really need a way to add a message for a _client_ id.


> Provide a FacesMessages.instance().addToControlById() or equivalent
> -------------------------------------------------------------------
>
>                 Key: JBSEAM-1855
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-1855
>             Project: Seam
>          Issue Type: Feature Request
>          Components: JSF Integration
>    Affects Versions: 1.2.0.GA
>            Reporter: Andy Bosch
>            Priority: Minor
>             Fix For: The future
>
>         Attachments: FacesMessages patch.txt
>
>
> It is possible do add FacesMessages via the Seam functionality with FacesMessages.instance().addToControl. In the parameters you have to pass the component id. In the plain JSF way, you can add FacesMessages via FacesContext ... addMessage. In the JSF-way you have to pass the client-id.
> With normal input components you can use both ways. But when you work with datatables, you MUST work with the client-id, the Seam-way with using only the component-id does NOT work.
> Explanation: When using a datatable-tag, you only have one component. The renderer generates the various rows. In the component-tree there is yet only one component! If you want to add a FacesMessage to one row, you can only work with client-ids (because you have to include the row-index). 
> My wish: Please change FacesMessages.instance().addToControl. for using with client-ids.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list