You need to sign in to do that
Don't have an account?
pkirankumar 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
You can do this by using "reRender" in vf page.
Regards
Please provide sample code it helps lot to me.
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
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.