Hello, we have a page who is doing a loop about parameter using a datatable and ui:repeat tag to generate dynamically a form.
It's running pretty good but not with the p:autocomplete tag.
The event is fired but no action reach to the server.
The snippet below shows how it is called
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<ui:composition xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets"
template="templates/template.xhtml">
<ui:define name="content-page-txt">
<h:form id="principal">
<p:panel id="formulaire">
<h:dataTable var="theme"
value="#{FormController.currentForm.allThemes}" style="width:100%;">
<h:column>
<p:panel id="theme#{theme.label}" style="width:100%;">
<h:dataTable var="row" value="#{theme.allRows}"
style="width:100%;">
<h:column>
<table width="100%">
<tr>
<ui:repeat var="item" value="#{row.allFields}">
<td style="">
<p:autoComplete name="#{item.name}"
value="#{item.value}"
rendered="#{item.type == 'TEXT_AUTO_COMPLETE'}"
completeMethod="#{item.completeHandler.complete}"/>
<h:selectOneMenu value="#{item.value}" rendered="#{item.type == 'MENU'}" >
<f:selectItems value="#{item.possibleValues}" var="c" itemLabel="#{c.label}" itemValue="#{c.value}" />
</h:selectOneMenu>
</td>
</ui:repeat>
</tr>
</table>
</h:column>
</h:dataTable>
</p:panel>
</h:column>
</h:dataTable>
</p:panel>
</h:form>
</ui:define>
</ui:composition>
Code: Select all
<td>
<span id="principal:j_idt21:1:j_idt24:1:j_idt29:0:j_idt36" class="ui-autocomplete">
<input id="principal:j_idt21:1:j_idt24:1:j_idt29:0:j_idt36_input" name="principal:j_idt21:1:j_idt24:1:j_idt29:0:j_idt36_input" type="text" class="ui-autocomplete-input ui-inputfield ui-widget ui-state-default ui-corner-all" autocomplete="off" value="" />
<div id="principal:j_idt21:1:j_idt24:1:j_idt29:0:j_idt36_panel" class="ui-autocomplete-panel ui-widget-content ui-corner-all ui-helper-hidden ui-shadow"></div>
</span>
<script id="principal:j_idt21:1:j_idt24:1:j_idt29:0:j_idt36_s" type="text/javascript"> $(function(){PrimeFaces.cw('AutoComplete','widget_principal_j_idt21_1_j_idt24_1_j_idt29_0_j_idt36',{id:'principal:j_idt21:1:j_idt24:1:j_idt29:0:j_idt36'});});
</script>
</td>
Does anyone have an idea ?