+ Start a Discussion
Uday KUday K 

Default Input fields in Pageblocktable

Hello Friends,
I am trying to develop a visualforce page in which I am having a page block table
<apex:pageBlockTable value="{!WorkAddList}" var="WrkForecast">
<apex:column headerValue="Date ">
<apex:inputField value="{!Wrkcastt.Date__c}"/>
</apex:column>
<apex:column headerValue="Quantity">
<apex:inputField value="{!Wrkcast.Quantity__c}"/>
</apex:column>
<apex:column headerValue="Revenue">
<apex:inputField value="{!Wrkcast.Revenue__c}"/>
</apex:column>
<apex:column headerValue="Comments">
<apex:inputField value="{!Wrkcast.Comments__c}"/>
</apex:column>
<apex:column headerValue="Product Name">
<apex:outputField value="{!Wrkcast.Product_Name__c}"/>
</apex:column>
</apex:pageBlockTable>
Here wrkcast is my custom object and quote is its parent.here i am having one button named new workschedule in related list of quote which is bringing me on my VF Page.so on click i am creating some rows for wrkcast object for insering the records in wrkcast object.On click on button i want product and revenue should bring the value from quoteline object .
How can I do this?
for(i=0;i<n;i++)
{
WorkcastAddList.add(new Work_Schedule__c());
}
}

raseshtcsraseshtcs
I think to pre populate the data from the lineitems you would need to set the values for the product and revenue in the list that you are using before displaying it on the page. I am getting confused with the variable names that you have used in the code :)