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

please write the controller for this code
<apex:page controller="selectobject" >
<apex:form >
<apex:pageBlock id="pb">
<apex:outputLabel ><b>Objects :</b></apex:outputLabel>
<apex:SelectList value="{!selectedObject}" size="1" >
<apex:SelectOptions value="{!objectsList}"/>
<apex:actionSupport event="onchange" rerender="pb"/>
</apex:SelectList>
<apex:commandButton value="Get Fields" action="{!showFields}" reRender="pb1" status="fetchStatus" />
<apex:actionStatus id="fetchStatus" >
<apex:facet name="start">
<img src="/img/loading.gif" class="waitingImage" title="Please Wait..."/>
</apex:facet>
</apex:actionStatus> <br/><br/>
</apex:pageBlock>
<apex:pageBlock id="pb1">
<apex:SelectList value="{!selectedField}" size="1">
<apex:SelectOptions value="{!items}"/>
</apex:SelectList>
</apex:pageBlock>
</apex:form>
</apex:page>
Here is the Controller Class
I think this Solves your Issue
APEX Controller:
VF Page: