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

return strings in array in a specifed format
Hi all,
Show it on VF page.
I am output result as [January,February,March]. but here i need output result on vf page as January > February>March. How to achive this.
Apex Code:
VF page:
how to acheive this ?
- Create a class
- Declare and populate array of string containing month names viz. January, February ….
- Create a method to return a string in below format :
Show it on VF page.
I am output result as [January,February,March]. but here i need output result on vf page as January > February>March. How to achive this.
Apex Code:
public class months{ String[] arrayItems; public PageReference myArrayItems() { arrayItems = new String[] {'January','February','March','April','May','June','July','August','September','November','December'}; return null; } public String[] getitems() { return arrayItems ; } }
VF page:
<apex:page showHeader="false" controller="months"> <apex:form > <apex:outputText value="{!items}" id="mn"/> <br/> <apex:commandButton value="Click" action="{!myArrayItems}" rerender="mn"/> </apex:form> </apex:page>
how to acheive this ?
All Answers
Do following changes in your vf page:
Try with this.