Sample Code:
<apex:page >
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >Name<apex:inputText /></apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >Age:
<apex:selectRadio >
<apex:selectOption itemLabel="Male" itemValue="m"/>
<apex:selectOption itemLabel="Female" itemValue="f"/>
</apex:selectRadio>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Store"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Output:
<apex:page >
<apex:form >
<apex:pageBlock >
<apex:pageBlockSection >
<apex:pageBlockSectionItem >Name<apex:inputText /></apex:pageBlockSectionItem>
<apex:pageBlockSectionItem >Age:
<apex:selectRadio >
<apex:selectOption itemLabel="Male" itemValue="m"/>
<apex:selectOption itemLabel="Female" itemValue="f"/>
</apex:selectRadio>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
<apex:pageBlockButtons >
<apex:commandButton value="Store"/>
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
Output:
good
ReplyDeleteGood example dear but i want to know how to create option button with the help of controller dynamically
ReplyDeleteif you have any idea please post this in your next article
thanks
This is really Very Helpful.
ReplyDelete