2012-10-03 38 views
-2

我得到這個問題包含受保護的屬性一類的:「屬性南」 E不能被解析爲成員 「對象」

測試類:

abstract public class Test extends WithAttachment{ 
static ISQLTest pISQLTest = null; 

// Ajour une refence au campagne ??? pour resoudre le Warning 

/** 
* Date de creation du test 
*/ 
protected Date creationDate; 

/** 
* Nom complet du concepteur du test 
*/ 
protected String conceptorName; 

/** 
* Login du concepteur du test 
*/ 
protected String conceptorLogin; 
.....} 

管理的bean:

private Test selectedTest; // with getters and setters 

xhtml頁面:

<h:panelGrid columns="2" cellpadding="4" header="Test Details"> 

            <h:outputText value="Name of The Test :" /> 
            <h:outputText value="#{projectTestManagementMB.selectedTest.name}" /> 

            <h:outputText value="Creation Date :" /> 
            <h:outputText value="#{projectTestManagementMB.selectedTest.creationDate}" /> 

            <h:outputText value="Executed :" /> 
            <h:outputText value="#{projectTestManagementMB.testExecutedFlag}" /> 

            <h:outputText value="Owner :" /> 
            <h:outputText value="#{projectTestManagementMB.selectedTest.conceptorName} #{projectTestManagementMB.selectedTestconceptorLogin}" /> 


    </h:panelGrid> 

所以當我嘗試訪問它們在EL表達式中我的xhtml頁面時,我得到這個錯誤; t attribute name can no be resolved as member of selectedTest

因此,有沒有可能解決這個問題,而不改變類測試屬性的訪問類型(保護)。

任何幫助將不勝感激

+0

@AmitaGL。請在發佈前將您的意見和錯誤信息到'English'。我們不明白你所寫的內容有..雖然不需要爲了這個目的。但在WithAttachment –

回答

2

好,只是因爲它說 - 有沒有「名」在Test屬性,除非在WithAttachment是你還沒有告訴我們。

你有conceptorName,但不name。誠然,我不知道是否有受保護字段就可以了呢 - 我倒是希望一個私人領域和公共getName()財產。

0
#{projectTestManagementMB.selectedTest.name} 

你的屬性在哪裏name ??在Test類..

+0

。什麼?不明白? – AmiraGL

+0

@AmitaGL記住以供將來參考.. –

相關問題