[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-858) Add a explicit section to the conversation section of the documentation about the components bindings in conversation scoped components

Mike Quilleash (JIRA) jira-events at lists.jboss.org
Fri Feb 16 07:55:35 EST 2007


Add a explicit section to the conversation section of the documentation about the components bindings in conversation scoped components
---------------------------------------------------------------------------------------------------------------------------------------

                 Key: JBSEAM-858
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-858
             Project: JBoss Seam
          Issue Type: Feature Request
          Components: Documentation
    Affects Versions: 1.1.6.GA
         Environment: Any
            Reporter: Mike Quilleash


Binding UIComponents into the conversation scoped component does not work because the bindings are executed during the restore view phase which is before the conversation context is available.

A small section to the documentation with a (recommended?) workaround would be useful.

The workaround suggested on the Seam forums has been to use an event scoped component to hold the bindings and then inject into the conversation component.  Note that bindings that cross event boundaries have other issues as described in the facelets FAQ (briefly) here.

http://wiki.java.net/bin/view/Projects/FaceletsFAQ#I_m_getting_Duplicate_ID_Errors


Some blurb....


Conversational scope and UIComponent bindings

Conversational components have one minor limitation which is they cannot be used to hold bindings to JSF UIComponents.  On a postback request the bindings are updated during the Restore View phase which is before the conversation context is available.

To work around this use an event scoped component to store the component bindings and inject it into conversation components that require it

Example

@Name( "componentBindings" )
@Scope( ScopeType.EVENT )
public class ComponentBindings
{
    private HtmlPanelGrid htmlPanelGrid;

    // getters and setters
}


And inject into the conversation component using

@In( required = false )
private ComponentBindings componentBindings;

Generally required should be false as on a non-postback request the component may be invoked before the bindings are available (e.g. page actions).


-- 
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