function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Francesco Carmagnola 10Francesco Carmagnola 10 

View state issues with wrapper: Bind in VF just a variable of the wrapper

Hi all,

I've got a problem. I've got this situation: a controller with a VF page and a wrapper class. Here a summary of the code:

WRAPPER:
public with sharing class DisplayOptionHelper {
    
    public Map<Integer, OptionsInLineaOrdineWrapper> mapDisplay {get; set;}
    public List<OptionsInLineaOrdineWrapper> listDisplay {get; set;}

    private Map<Integer, ProdottoListino__c>  mapAllOptions ;
    Map<Integer, OptionsInLineaOrdineWrapper> mapInsertOptions;

}
In the controller I put the declaration of the wrapper:
 
public DisplayOptionHelper displayOptions {get;set;}

Finally, in page I've got a Table like this:
 
<apex:pageBlockTable value="{!displayOption.listDisplay}" var="c" id="optionsPBSection" >


Now, I've got this problem: the variable mapAllOptions it is included in the view state, but I don't need it in page! How can bind just the wrapper variable "listOption"? transient on mapAllOptions doesn't work for me as I call the variable in many methods of the wrapper.

Thanks!