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
pkirankumar reddypkirankumar reddy 

i have one pick list field calles statues which contain a values calles draft,pre-publish, published and canceled if status is changed to pre publish the value draft should be disabled how can i achieve this in vf page

 I have one pick list field called status which contain a values called draft,pre-publish, published and canceled if status is changed to pre publish the value draft should be disabled how can i achieve this in vf page
Rowallim TechnologyRowallim Technology
Hi pkirankumar reddy
You can do this by using "reRender" in vf page.
Regards
pkirankumar reddypkirankumar reddy
Hi Rowallim Technology 

Please provide sample code it helps lot  to me.
Rowallim TechnologyRowallim Technology
Hi
Use actionSupport on your picklist to rerender the container of your field.  Something like this:

apex:outputPanel id="thePanel"> <apex:inputField value="{!myObject__c.status__c}"> <apex:actionSupport event="onchange" action="{!doDisable}" rerender="thePanel"/> </apex:inputField> <apex:inputField value="{!myObject__c.field__c}" rendered="{!shouldRender}"/> </apex:outputPanel> public void doDisable() { if (myObject__c.status__c== 'pre-publish') { shouldRender = false; } else { shouldRender = true; } }

Hope this will help you.
If it helps markit as best answer.
Thanks
pkirankumar reddypkirankumar reddy
Rowalliam Technology

Hi I understand yor code. But here while rendering another field value should be dispaly .but i want render pick list field  status with out draft value in list of values contain only ,Pre published,published and cancled but i dont want draft value in status pick list field.if status is in prebulished or published.