I got a problem with primefaces 5.1.
I want to check a field variable for maximum length. This code snipped is working:
<p:outputPanel id="insertField" columns="3" style="display: none;">
<ui:param name="insertTable" value="#{tabDefineRelationTable.insertValues}" />
<p:dataTable value="#{insertTable.values}" var="insertValue" editable="true" id="insertTableDynamic">
<p:columns value="#{insertTable.headlines}" var="insHead">
<f:facet name="header">
#{insHead.headline.a_name}
</f:facet>
<ui:param name="insAttribute" value="#{insertValue.getAttribute(insHead.headline.a_name)}"></ui:param>
<p:inputText value="#{insAttribute.valueAsString}">
<f:validateLength maximum="4" />
<f:validateRegex pattern=".*"/>
</p:inputText>
</p:columns>
</p:dataTable>
<p:commandButton value="Insert" action="#{tabDefineRelationTable.insert}" id="btnInsert" update=":tabView:relationTableForm:valueTable :tabView:relationTableForm:insertField"/>
<p:commandButton value="Cancel" type="button" onclick="$(document.getElementById('tabView:relationTableForm:insertField')).hide()"/>
</p:outputPanel>
but if I want to test this value for a variable length, like:
<f:validateLength maximum="#{insAttribute.objectSpecification.attributeType.dlength}" />
it's not working fine. I think that the variable is not exhausted and so the value was null or something else. Got anyone at this point a good solution for that?
I don't want to use Omnifaces, because it's not accepted by my customer.
Best regrads Björn