p:ajax + h:selectOneMenu in seam

UI Components for JSF
Post Reply
dego
Posts: 3
Joined: 13 Jan 2011, 19:30

13 Jan 2011, 20:06

Hi,
First I would like to thank the PF team for the great job that has been done. While trying to replace some richfaces code with PF, I ran into the following issue. As I'm new to PF, I'm probably missing something obvious, so sorry in advance for that.
Basically, I want to ajax-update my model from a h:selectOneMenu change event which locates in a datatable colum.
Seam 2.2.0 GA
Primefaces 1.1

Code: Select all

<h:form prependId="false" id="participants">
    
(...)

    <p:dataTable var="_participant"
    		id="userList"
    		value="#{users.resultList}"
            rendered="#{not empty users.resultList}">

(...)

        <p:column>
            <f:facet name="header">
            	<h:outputText styleClass="columnHeader" value="#{messages['admin.rights']}"/>
            </f:facet>
			<h:selectOneMenu id="status"
					value="#{_participant.status}"
					disabled="#{_participant.status eq 'TEAM'}">
            	<s:selectItems var="_status"
                		value="#{admin.statuss}"
                    	label="#{_status}" /> 
                <s:convertEnum/>
                <p:ajax event="change"
                		process="@this"
                		update="@none"/>
			</h:selectOneMenu>
		</p:column>
	</p:dataTable>

(...)

    </h:form>

Code: Select all

@Name("users")
@Scope(ScopeType.CONVERSATION)
public class Users extends EntityQuery<Contributor>
{
(...)
}
When I change the value in the combo I get the following error in log

Code: Select all

18:27:06,164 WARN  [Component] Cannot create Seam component, scope is not active: users(CONVERSATION)
and the setter method isn't called...

Thanks for help !
Seam 2.2.0 GA
Primefaces 1.1
JSF 1.2
Jboss AS 5.0.1

dego
Posts: 3
Joined: 13 Jan 2011, 19:30

13 Jan 2011, 22:45

forgot to mention that my usecase :
  • doesn't occur in a long-running conversation, conversation is temporary.
  • worked fine with same code and richfaces tags with the same tag structure :

Code: Select all

<rich:dataTable id="userList" 
        var="_participant"
        value="#{users.resultList}" 
        rendered="#{not empty users.resultList}"
        rowKeyVar="_row">
(...)
    <h:column>
        <f:facet name="header">
            <h:outputText styleClass="columnHeader" value="#{messages['admin.rights']}"/>
        </f:facet>
        <h:selectOneMenu id="status"
                value="#{_participant.status}"
	        disabled="#{_participant.status eq 'TEAM'}">
            <s:selectItems var="_status"
                    value="#{admin.statuss}"
                    label="#{_status}" />
            <s:convertEnum/>
            <a4j:support event="onchange"
                    action="#{users.refresh()}"
                    ajaxSingle="true"
                    reRender="messages">
            </a4j:support>
        </h:selectOneMenu>
    </h:column>
</rich:dataTable>
Seam 2.2.0 GA
Primefaces 1.1
JSF 1.2
Jboss AS 5.0.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

14 Jan 2011, 11:59

Cant figure out what is wrong as it seems to be an issue with seam compatibility, problem is PrimeFaces 1.x development is no longer active, this issue should not happen with PrimeFaces 2 but seam does not support it officially.

See;

https://github.com/heyoulin/seam2jsf2

dego
Posts: 3
Joined: 13 Jan 2011, 19:30

14 Jan 2011, 14:39

Bad news for me then... Thank you for replying.
Seam 2.2.0 GA
Primefaces 1.1
JSF 1.2
Jboss AS 5.0.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 39 guests