I have a table that shows the QuoteLineItem's information and I have the UnitPrice in a textfield so it can be changed, using an action support and param to call an apex code method that updates it. Only problem is it doesn't work at all.
<apex:column title="Unit Price">
<apex:inputField value="{!item.UnitPrice}" label="UnitPriceID={!item.id}" >
<apex:actionsupport event="onchange" rerender="qlitems" status="status" >
<apex:param name="qliID" assignTo="{!qliID}" value="{!item.id}" />
<apex:param name="qliUnitPrice" assignTo="{!qliUnitPrice}" value="UnitPriceID{!item.Id}" />
</apex:actionsupport>
</apex:inputField>
</apex:column>
Here is the apex code for it as well:
public pageReference udpateQuoteLineItems(){
//Update QuoteLineItem as needed
list<QuoteLineItem> myQliList = new list<QuoteLineItem>();
myQliList = [Select id, UnitPrice, Quantity, TotalPrice from QuoteLineItem where id=:qliID];
if(myQliList.isEmpty() == false){
Decimal qUP = Decimal.valueof(qliUnitPrice);
Integer qQty = Integer.valueof(qliQuantity);
myQliList[0].Quantity = qQty;
myQliList[0].UnitPrice = qUP;
System.assertEquals(myQliList[0].TotalPrice, (myQliList[0].Quantity * myQliList[0].UnitPrice));
update myQliList[0];
}
return null;
}