facebook

JSF validator gives warning on DataTable variable

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #259013 Reply

    vibul
    Member

    Hi,

    I’ve recently upgraded from V4 to V5.01GA

    I’m now getting a validator warning on my JSF pages that were not there in the previous version.

    
    <h:dataTable value="#{TradingPartyIdSearchBean.searchResults}" var="r"
                                    rendered="#{TradingPartyIdSearchBean.searchResultsRows > 0}" styleClass="StdResultsTable"
                                    headerClass="StdResultsHeader" rowClasses="StdResultsRow, StdResultsRowAlternate"
                                    columnClasses="StdResultsColumnCheck, StdResultsColumnLeft, StdResultsColumnLeft, StdResultsColumnLeft, StdResultsColumnLeft"
                                    cellpadding="0" cellspacing="0">
                                    <h:column>
                                        <f:facet name="header">
                                            <f:verbatim> </f:verbatim>
                                        </f:facet>
                                        <p:outputCheckbox id="tpiResultRecords" name="tpiResultRecords" value="#{r.primaryKey}" styleClass="StdCheckBox" />
                                    </h:column>
                                    <h:column>
                                        <f:facet name="header">
                                            <h:outputText value="#{msg.trading_party_id_value_label}" />
                                        </f:facet>
                                        <h:commandLink action="#{TradingPartyIdDetailsBean.view}" value="#{r.value}" styleClass="StdResultsLink">
                                            <f:param name="#{TradingPartyIdDetailsBean.tradingPartyIdPrimaryKeyHttpParameterName}" value="#{r.primaryKey}" />
                                        </h:commandLink>
                                    </h:column>
    

    The variable “r” in #{r.primaryKey} has a warning “r cannot be resolved”.

    Can you please help me have a look at this.

    Thanks
    Vibul.

    #259027 Reply

    Riyad Kalla
    Member

    Vibul,
    This is a known bug, the JSF validator doesn’t understand that the dataTable tag defines a local variable, so when it tries to resolve the “r” value, it is failing. We are working to fix this.

    #261056 Reply

    HeinzSueess
    Member

    Hi

    Is there a fix for the problem?

    #261066 Reply

    Riyad Kalla
    Member

    Not yet, we are prepping 5.0.3 right now and are completely heads down. The fix for this is too big to target for a bugfix release, we may look at addressing it for 5.1 though.

    #261106 Reply

    henk
    Member

    Riyad, I understand completely you didn’t include this in 5.03, but for 5.1 it would be extremely nice if you could offer us some kind of templating configuration file where we can define ourselves what tags introduce variables with which attributes.

    There will always be new tag libraries and custom tags you can’t cover with a closed DB.

    (thinking of of it, actually such kind of meta data should be more at home in the .tld file. It’s a shame the Java EE designers didn’t put this capability in)

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: JSF validator gives warning on DataTable variable

You must be logged in to post in the forum log in