You need to sign in to do that
Don't have an account?

pageBlockTable and coloumn reprtion.
Hiiiiiiii
I have a pageBlockTable and a addRow function. Everything is working fine. But There is a lookup field in row. Once the field is filled up with data i have written a prog to get its other details and fill in other column of the table. Now if i create a row again, The lookup field is automatically filled which i donn't want to happen.
Can anyone suggest how to do that
Thanks in advance.
It sounds like you are cloning an earlier row if the lookup value is filled in. Is a bit tricky to say for sure without sight of the code.
I'm guessing the lookup is this piece:
The problem here is that the field isn't coming from the records you are iterating, but from another property called productss (that isn't in the code).
ya i know the prpoblem is that.. but i need to have that to execute my query. The look up need to fetch other data of the record in actionSupport.
i have put this code...
public SalesInvoice__c getproductss()
{
return prods;
}
As you effectively have a single field backing every instance of this column, the lookup will be the same across all of them. You'll need to change this so that the lookup comes from the instance of the list you are iterating. I reckon you want to use a wrapper class to encapsulate the record and its position in the list, then you can pass that back as an apex:param to the actionfunction.
thanks for the reply...
could you pls give me some hint on how to do as you suggested...
some lines of code would be very helpful...
Here goes:
The wrapper class would look something like:
The idx is simply a unique number. You'd then back the table with a list of these objects rather than the list of SalesInvoice__c. In your actionfunction you pass the idx back:
and in your controller method you'd iterate the list of wrapper classes, find the element where chosenIdx=wrapper.idx and retrieve the appropriate information.