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
pintoo rajputpintoo rajput 

How to retain a picklist field value by re rendring a section of page??

Vidhyasagaran MuralidharanVidhyasagaran Muralidharan
what is the exact requirement??
Like you want add something to picklist or
if you select a option  in picklist even re render is used it should be selected.???
Ramu_SFDCRamu_SFDC
Put the picklist field out of the action region. Something as explained in the below article

http://www.oyecode.com/2013/04/how-to-re-render-part-of-visualforce.html
pintoo rajputpintoo rajput
Yes Dear ,
if i select a option in picklist even re render is used it should be selected.
for ex- i have two text field and two picklist field and filled all the values after if i click a button ADD MORE button it re rendring a same form with 4 blank fields prob is that after rerendring my old form text is same but picklist is deselected I want picklist also selected in my above form

Vidhyasagaran MuralidharanVidhyasagaran Muralidharan
Try togive  the addmore button rerender attribute  with the id of page block and dont add the picklist with in the page block and if you click add more it wont refresh the picklist.
pintoo rajputpintoo rajput
how is it possible ??? i want picklist also with text field in page block     if i thrown out picklist from page section then how can i display whole form after click ADD MORE button plz give  me a example..
Vidhyasagaran MuralidharanVidhyasagaran Muralidharan
<apex:pageBlockSectionItem  id="text">
textfield
 </apex:pageBlockSectionItem>
<apex:pageBlockSectionItem  id="picklist">
picklist
</apex:pageBlockSectionItem>
<apex:commandbutton value="addmore" rerender="text">
picklist section wont be refreshed