DynaForm Problems

Community Driven Extensions Project
Post Reply
md97212
Posts: 5
Joined: 11 Mar 2010, 00:34

07 Mar 2017, 20:48

My DynaForm implementation is giving me all sorts of problems on primefaces 6. It seems like a very basic case that just isn't working


One is a stack overflow, the other is null data values in the controller after the form is submitted.

Code: Select all

	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
	at org.primefaces.extensions.component.base.AbstractDynamicData.getValue(AbstractDynamicData.java:109)
	at org.primefaces.extensions.component.dynaform.DynaForm.invokeOnChildren(DynaForm.java:251)
	at org.primefaces.extensions.component.base.AbstractDynamicData.invokeOnComponent(AbstractDynamicData.java:455)
Another is that I'm only getting null data values back into my controller after the form is submitted.

My code looks something like this:

Code: Select all

<h:head>
    <link type="text/css" rel="stylesheet" href="#{request.contextPath}/themes/bootstrap/skin.css"/>
</h:head>
<h:panelGrid columns="2" style="margin-top: 10px">
    <p:commandButton value="Add Member" icon="ui-icon-arrowthickstop-1-w" onclick="PF('dlgAdd').show();">
        <p:resetInput target="dlgAdd"/>
    </p:commandButton>
    <p:dialog header="Add Member" widgetVar="dlgAdd" resizable="false">
            <h:panelGroup id="dynaFormGroup">
                <p:messages id="messages" showSummary="true"/>
                <pe:dynaForm id="dynaForm" value="#{memberViewController.model}" var="data" columnClasses="label-container, field-container">
                    <pe:dynaFormControl type="input" for="txt">
                        <p:inputText id="txt" value="#{data.value}" required="#{data.required}"/>
                    </pe:dynaFormControl>
                </pe:dynaForm>
            </h:panelGroup>
    </p:dialog>
</h:panelGrid>
<h:form id="form">
    <pe:masterDetail
    .
    .
    .
    
and my controller looks something like this:

Code: Select all

	@PostConstruct
	public void init() {
		memberView = MemberView.builder().build();
	        model = new DynaFormModel();
        	DynaFormRow row = model.createRegularRow();
	        DynaFormLabel label11 = row.addLabel("Last");
        	DynaFormControl control12 = row.addControl(new FormProperty("Last", false), "input");
	        label11.setForControl(control12);
	}
my pom dependency is

Code: Select all

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        

User avatar
Melloware
Posts: 251
Joined: 22 Apr 2013, 15:48

07 Mar 2017, 22:49

@Rapster is the DynaForm expert on the PFE team. Hopefully he will chime in here and help you...
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces 6.1.X / PF Extensions 6.1.5

Babas007
Posts: 193
Joined: 24 May 2011, 09:42

12 Mar 2017, 19:24

How do you get a stack overflow error then if you're able to submit the form?

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest