DynaForm nested mode submit

Community Driven Extensions Project
Post Reply
Posts: 13
Joined: 20 Apr 2011, 10:10

21 Mar 2017, 21:02


I am trying to create a dynamic form with nested models in separate panels/tabs. When I am submitting the parent form the nested forms are not submitted.

Code: Select all

<pe:dynaForm id="dynaForm" value="#{dynaFormController.parentModel}"
	<pe:dynaFormControl type="nestedModel">
		<p:panel header="test" toggleable="true">
			<pe:dynaForm value="#{model}" var="data">

				<pe:dynaFormControl type="input" for="txt">
					<p:inputText value="#{data.value}" required="#{data.required}" />

				<pe:dynaFormControl type="select">
					<p:selectOneMenu value="#{data.value}">
						<f:selectItems value="#{data.values}" />

				<pe:dynaFormControl type="booleanchoice">
					<p:selectBooleanCheckbox value="#{data.value}" />

	<f:facet name="buttonBar">
		<p:commandButton process="dynaForm" value="Submit"
Here is the java code:

Code: Select all

parentModel = new DynaFormModel();

		DynaFormRow fprow = parentModel.createRegularRow();

		DynaFormModel nestedModel = new DynaFormModel();
		DynaFormRow nestedRow1 = nestedModel.createRegularRow();

//first is a testobject created earlier
		nestedRow1.addLabel("Name: ");
		nestedRow1.addControl(first.getName(), "input");
		nestedRow1.addLabel("Sirname: ");
		nestedRow1.addControl(first.getSirname(), "input");
		nestedRow1.addLabel("bool: ");
		nestedRow1.addControl(first.getBool(), "booleanchoice");

		fprow.addControl(nestedModel, "nestedModel");

Is it possible to accomplish this? Or how is it possible to include accordion/panel/tab in dynaform?

Thank you in advance


Code: Select all


Posts: 220
Joined: 24 May 2011, 09:42

22 Mar 2017, 00:22

1/ Where do you initialize your model?

2/ A lot of fixes have been provided since, try with the latest source please

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest