Issues with p:command and custom converter

UI Components for JSF
Post Reply
Cowboy Coder
Posts: 4
Joined: 23 Nov 2010, 05:03

27 Nov 2010, 06:18

I have a custom converter for an object and when I add in the p:layout and p:layoutUnit objects to my code the p:commandButton on my page no longer calls the getasobject method for my custom converter. I can remove the p:layout and the p:layoutUnit objects and the converter is called just fine.

Am I missing something that needs to be in the update or process sections of the <p:commandButton> object ?

XHTML provided below.

Code: Select all

<h:form prependId="false" >
    <p:layout fullPage="true" >
        <p:layoutUnit position="center">
            <h:panelGrid id="grid" columns="2" >
                <h:messages/>
                <h:outputLabel value="Care Giver Groups" />
                <h:selectOneMenu id="selectCareGiverGroup" value="#{caregivergroupController.currentCaregivergroup}" >
                    <f:selectItems value="#{caregivergroupController.caregivergroupList}" var="caregivergroup" itemLabel="#{caregivergroup.name}" itemValue="#{caregivergroup}" />
                </h:selectOneMenu>
                <h:selectOneListbox size="5" id="selectCareGiver" value="#{caregiverController.selected}" >
                    <f:selectItems value="#{caregiverController.selectItems}" var="giver" itemLabel="#{giver.name}" itemValue="#{giver}"  />
                </h:selectOneListbox>
                <p:commandButton id="saveQuery" value="Save" action="#{handWashReportModel.report}" process="@form, @this, selectCareGiverGroup, selectCareGiver" />
            </h:panelGrid>
        </p:layoutUnit>
    </p:layout>
</h:form>
Thanks in advance for your assistance.

callahan
Posts: 768
Joined: 27 May 2010, 22:52

27 Nov 2010, 09:53

When fullPage is set to true on a p:layout, it's not possible to nest the p:layout within a h:form. h:forms must be nested within p:layoutUnits in such cases. See http://primefaces.prime.com.tr/forum/vi ... 478#p12478 for more info.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 48 guests