#{column} syntax -- where's the backing bean?

36 views Asked by At

I'm seeing syntax such as itemLabel="#{column}" and itemValue="#{column}" in one of my .xhtml (JSF/Primefaces) files (more complete code below), and I'm unsure as to what #{column} references.

I understand syntax like value="#{docSearchPersonalizationBean.sourceCount}", but is #{column} JSF EL? How can I tell which property/object is being referenced?

<p:pickList id="pickList1" 
            value="#{docSearchPersonalizationBean.columns}" 
            var="column" 
            showSourceFilter="true" 
            itemLabel="#{column}" 
            itemValue="#{column}" 
            itemDisabled="#{column eq 'Ref No'}"
            >

            <p:ajax event="transfer" listener="#{docSearchPersonalizationBean.onTransfer}" update="pickList1 availableCount1 selectedCount1 selectSortBy1" />
            <f:facet  name="sourceCaption">
                <h:outputText value="Available Columns ("/>
                <h:outputText id="availableCount1" value="#{docSearchPersonalizationBean.sourceCount}"/>
                <h:outputText value=")"/>
            </f:facet>
            <f:facet name="targetCaption">
                <h:outputText value="Selected Columns ("/>
                <h:outputText id="selectedCount1" value="#{docSearchPersonalizationBean.targetCount}"/>
                <h:outputText value=")"/>
            </f:facet>
 </p:pickList>
1

There are 1 answers

0
Jeff Levine On

Figured it out - figured I'd post if anyone has the same (basic) question.

var="column" inidicates that column is an iterator over value="#{docSearchPersonalizationBean.columns}". So, column is the current value of #{docSearchPersonalizationBean.columns} during the iteration.