Как представить переменную итератора из составного компонента JSF в IDE на странице использования

Моя установка - Eclipse Oxygen, JSF 2.2, JBoss 7.0 (реализация Mojarra JSF) и Primefaces 6.0. Я обернул таблицу данных Primefaces в составной компонент JSF (my:dataTable):

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"
    xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" xmlns:composite="http://xmlns.jcp.org/jsf/composite"
    xmlns:c="http://java.sun.com/jsp/jstl/core">

<composite:interface>
    <composite:attribute name="value" required="true" type="java.lang.Object" /> 
    <composite:attribute name="var" required="true" type="java.lang.String" targets="dataTable"/>   
</composite:interface>

<composite:implementation>      
    <div class="ui-g">
        <div class="ui-g-12">
            <p:dataTable id="dataTable" value="#{cc.attrs.value}" sortMode="multiple"
                paginator="true" rows="10"                
                rowsPerPageTemplate="10, 20, 50, 100" currentPageReportTemplate="Ergebnisse {startRecord} - {endRecord} von {totalRecords}"
                paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
               <c:set target="#{component}" property="var" value="#{cc.attrs.var}"/>                    
               <composite:insertChildren/>                            
            </p:dataTable>  
        </div>
    </div>
</composite:implementation>

Столбец Primefaces реализован как пользовательский компонент (my:column):

<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://xmlns.jcp.org/jsf/core" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:p="http://primefaces.org/ui"
    xmlns:pt="http://xmlns.jcp.org/jsf/passthrough" >
        <p:column headerText="#{headerText}" sortable="#{sortable}">
            <ui:insert />
        </p:column>                   
</ui:composition>

И компонент вызывается на странице использования:

<my:dataTable id="datenTabelleID" value="#{showcaseDatenTabelleBean.quellWerteListe}" var="laufvar">
    <my:column headerText="ID">
        <h:outputText value="#{laufvar.id}" />
    </my:column>
    <my:column headerText="Name">
        <h:outputText value="#{laufvar.name}" />
    </my:column>
</my:dataTable>

Все работает, как и ожидалось, за исключением ассистента кода IDE (в моем случае Eclipse) для переменной итератора. У меня нет завершения кода для атрибута, объявленного как var (laufvar).

Заранее спасибо.

0 ответов

Другие вопросы по тегам