DynaForm - Wrong HTML encoding

Community Driven Extensions Project
Post Reply
Babas007
Posts: 251
Joined: 24 May 2011, 09:42

01 Jul 2016, 10:31

Probably related to this one: https://github.com/primefaces-extension ... issues/389

I have this:

Code: Select all

<pe:dynaFormControl type="DEP_ID" for="cp_dep">
                <sc:dynaChoosePopin id="cp_dep"
                                    bean="#{dyna}"
                                    completeMethod="#{cc.attrs.listProvider.getDepartmentIdsByCode}"
                                    formField="#{formField}"
                                    readonly="#{wrapper.readonly}"
                                    jsfDisplayFunction="#{jsfDepartment}"
                                    jsFunctionOnClick="showDepPopup"
                                    windowJsFunction="onDepartmentSelect"
                                    windowJsFunctionOnClear="onDepartmentClear"
                                    readableTextFieldDataValue="jsfDepartment"
                                    params="#{cc.attrs.controller.depSubmitPerimeter}"
                />
</pe:dynaFormControl>
And the html output is basically:

Code: Select all

<tr role="row">
    <td class="pe-dynaform-cell pe-dynaform-cell-first pe-dynaform-label field label-container" role="gridcell">
        <label for="record_form:record_display_form:j_idt563:0:j_idt564:j_idt565:cp_dep:modifiableTextField:acomplete_input">Entité</label>
    </td>
    <td class="pe-dynaform-cell pe-dynaform-cell-last field field-container" role="gridcell">

        <div class="ui-choose-popin">
            <input id="record_form:record_display_form:j_idt563:0:j_idt564:j_idt565:r1c2reg:cp_dep:modifiableTextField:acomplete_input">
        </div>
    </td>
</tr>
As the label is required, "for" is set to the label, although it does not target the right input, as a matter of fact, the targeted input indicated by "for" does not exist at all. See the difference:

Code: Select all

<label for="record_form:record_display_form:j_idt563:0:j_idt564:j_idt565:cp_dep:modifiableTextField:acomplete_input">Entité</label>
<input id="record_form:record_display_form:j_idt563:0:j_idt564:j_idt565:r1c2reg:cp_dep:modifiableTextField:acomplete_input">
The id in "for" does not contain "r1c2reg"!!! I'm not expecting you Oleg, to give me the solution but to help me where I should look at. I couldn't reproduce the problem on showcase.

This problem occurs only on the first input of the form.

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests