label="some label" ignored in DynaForm control

Community Driven Extensions Project
Post Reply
fatdevelops
Posts: 10
Joined: 04 Feb 2015, 18:03

22 Apr 2016, 16:42

Let's say I have the following xhtml code:

Code: Select all

                        <pe:dynaFormControl type="input"
                            for="formInputText">
                            <p:inputText id="formInputText" label="test label"/>
                        </pe:dynaFormControl>
The result is that the "label" attribute is ignored when the form is rendered.

Code: Select all

                        <pe:dynaFormControl type="input"
                            for="formInputText">
                            <p:inputText id="formInputText" label="test label">
                                <p:outputLabel value="test label"/>
                            </p:inputText>
                        </pe:dynaFormControl>
The result is that the label is rendered in this case but it looks as if it was glued to the control.

If you add the label programmatically, the rendered result looks quite neat.

I was wondering why it is not possible to add a label to a DynaForm control using the control's built-in "label" attribute and if this is the desired behaviour. Could anybody give me a hint why the rendered output is so different (either adding a label using "row.addLabel("test label")" semantics in the model or adding a child <p:outputLabel> to the <p:inputText> in the <p:dynaFormControl> tag)?
Wildfly 9.0.2, JSF 2.2 (Mojarra), PrimeFaces 5.3, PrimeFaces Extensions 4.0.0

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 4 guests