pe:dynaFormControl with dynamically rendered inputs

Community Driven Extensions Project
Post Reply
brall77
Posts: 2
Joined: 24 Mar 2014, 18:41

22 Oct 2014, 22:38

Hello,

We are using primefaces-extensions-1.2.1, primefaces-4.0 on mojarra 2.1.21.

I am having an issue with dynamically rendered components in a dynaForm. It seams that if components inside of a pe:dynaFormControl have a rendered="#{XXX}" that is based on the form var, then input controls do not work correctly. The output rendering seems to work correctly, but when the form is submitted values are not bound correctly to the inputs (also no validation). If I remove the rendered attribute everything works correctly.

For example:

Code: Select all

        <pe:dynaForm id="form-data" value="#{formBuilderBacking.testModel.table}" var="cell">
            <pe:dynaFormControl type="control">
                <p:panel rendered="#{cell.active}">
		            <p:outputLabel value="#{cell.value.label}" />
		            <p:inputText id="txt" value="#{cell.value.value}" 
		                    required="#{cell.value.required}"
		                    requiredMessage="Required - #{cell.value.alert}" 
		                    validatorMessage="#{cell.value.alert}"
		                    validator="#{cell.validate}"
		             />
		             <p:message for="txt" />
                 </p:panel>
             </pe:dynaFormControl>
        </pe:dynaForm>
If I take out ' <p:panel rendered="#{cell.active}">' everything works fine but otherwise it's like the inputs is not recognized in the component tree.

Is this expected behavior? Is where a way around this issue?

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 10 guests