0
我有一個VF頁面,其中有一個彈出窗口可以接受幾個字段。某些字段沒有從VF頁面中獲取
當我運行頁面並填寫字段時,我可以看到只有一些字段值被捕獲,其他字段正在返回爲空。我交叉檢查了字段名稱,它們是相同的。任何想法爲什麼會發生?
<apex:outputPanel id="tstpopup1">
<apex:outputPanel styleClass="popupBackground" layout="block" rendered="{!displayPopUp}"/>
<apex:outputPanel styleClass="custPopup" layout="block" rendered="{!displayPopUp}">
<apex:pageblock >
<apex:pageblocksection >
<apex:pageblocksectionitem >
<apex:outputlabel value="Project: " />
<apex:inputfield id="proj" value="{!AC.Project__c}" />
</apex:pageblocksectionitem><p/>
<apex:pageblocksectionitem >
<apex:outputlabel value="Start Date: " />
<apex:inputfield id="sd" value="{!AC.Start_Date__c}" />
</apex:pageblocksectionitem>
<apex:pageblocksectionitem >
<apex:outputlabel value="End Date: " />
<apex:inputfield id="ed" value="{!AC.End_Date__c}" />
</apex:pageblocksectionitem>
<apex:pageblocksectionitem >
<apex:outputlabel value="C85 Project Lead: " />
<apex:inputfield id="pl" value="{!AC.C85_Project_Lead__c}" />
</apex:pageblocksectionitem>
<apex:pageblocksectionitem >
<apex:outputlabel value="Daily Charge Rate of Consultant: " />
<apex:inputfield id="charge" value="{!AC.Daily_Charge_Rate_of_Consultant__c}" />
</apex:pageblocksectionitem>
<apex:pageblocksectionitem >
<apex:outputlabel value="Project Role Title: " />
<apex:inputfield id="role" value="{!AC.Project_Role_Title__c}" />
</apex:pageblocksectionitem>
<apex:pageblocksectionitem >
<apex:outputlabel value="Overtime Allowed: " />
<apex:inputfield id="overtime" value="{!AC.overtime_allowed__c}" />
</apex:pageblocksectionitem>
</apex:pageblocksection>
<apex:commandbutton value="Assign to a New Project" action="{!assign}" />
<apex:commandbutton value="Cancel" action="{!closePopup}" immediate="true" /><br/><br/><br/>
</apex:pageblock>
</apex:outputPanel>
類有這個
public Assigned_Consultant__c AC{
get{
if (AC == null) AC = new Assigned_Consultant__c();
return AC;
}
set;
}
public PageReference assign()
{
system.debug('Role title ...........................' + AC.Project_Role_Title__c); // this is returning null
system.debug('Day charge ...........................' + AC.Daily_Charge_Rate_of_Consultant__c); this has value filled
system.debug('overtime_allowed__c ...........................' + AC.overtime_allowed__c); // this is returning null
// Project_Role_Title__c
displayPopup = false;
system.debug('inside assign...........................3');
system.debug('AC.................' + AC);
}
我在猜測,但它可以在配置文件中的權限? –
也許某些輸入字段不對應於某種類型的對象字段?或者他們可能是隻讀的。 –