Javascript 有没有';如果primefaces组件';不支持什么?
我在Javascript 有没有';如果primefaces组件';不支持什么?,javascript,jsf,primefaces,Javascript,Jsf,Primefaces,我在primefaces中有下表: <h:form> <p:dataTable var="contentVos" value="#{serviceBean.clientsVo}" style="padding-top: 10vmin;margin: auto;max-width: 150vmin;text-align: center"
primefaces
中有下表:
<h:form>
<p:dataTable var="contentVos" value="#{serviceBean.clientsVo}" style="padding-top: 10vmin;margin: auto;max-width: 150vmin;text-align: center"
rows="3"
paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
currentPageReportTemplate="{startRecord}-{endRecord} of {totalRecords} records"
rowsPerPageTemplate="3,10,15"
widgetVar="clientTable"
reflow="true"
emptyMessage="No items found " filteredValue="#{serviceBean.filteredClientsVos}"
>
<f:facet name="header">
<p:outputPanel>
<h:outputText value="Search all fields : " />
<p:inputText id="globalFilter" onkeyup="PF('clientTable').filter()" style="width:150px;background-color: white;" placeholder="Search"/>
</p:outputPanel>
</f:facet>
<p:column headerText="client name" filterMatchMode="startsWith" filterBy="#{contentVos.name}">
<h:outputText value="#{contentVos.name}" />
</p:column>
<p:column headerText="client number" filterBy="#{contentVos.msisdn}" filterMatchMode="startsWith">
<h:outputText value="#{contentVos.msisdn}" />
</p:column>
<p:column headerText="client Image">
<p:graphicImage value="http://srv1.spectrum.com.jo:8084/SpectrumMusicPortal/resources/images/#{clientsVos.image}" title="Normandie" width="50%" alt="not avilable" />
</p:column>
<p:column headerText="client country">
<h:outputText value="#{contentVos.countryName}" />
</p:column>
<p:column headerText="added by" rendered="#{serviceBean.usersVo.id == 2}">
<h:outputText value="#{contentVos.userName}" />
</p:column>
</p:dataTable>
</h:form>
因为目标项filterBy
没有属性placeholder
有谁能建议我如何实现它吗?请参见,也请参见。f:passThroughAttribute
适用于大多数组件。
<script>
const placeholder =
document.getElementById('j_idt12:j_idt13:j_idt16:filter');
placeholder.setAttribute("placeholder","search");
</script>