You need to sign in to do that
Don't have an account?
NareshKrishna
Need help on getting values from the property file in apex
Hi All,
Please help me with the below:
In java, we can get the text values from the properties file.
In the same way, is there any way of getting values from the properties file and print those values
using <apex:outputLabel> instead of hardcoding the text in the apex page ?
Thanks.
you can use the same properties concept over here also but usage little bit different here
put a controller to the page i.e. apex class here and send the property value from the class
public class classname{
string strname = 'Header';
public string getstrname(){
return strname;
}
}
<apex:page controller="classname">
<apex:form>
<apex:outputlabel value="{!strname}" />
</apex:form>
</apex:page>
Thanks for your reply.
Related to my issue, found in discussion board that use custom labels as below:
http://boards.developerforce.com/t5/Visualforce-Development/using-static-resource-as-properties-file/m-p/210231#M29274
create custom labels through configuration - Setup -> App Setup -> Create -> Custom Labels.
Then we can access them in your visualforce code like so:
{!$Label.MyLabel}
But how can i use static resource as property file ?
Hi,
I am also looking for the same.
Can anyone please help me how to read values from a property file in an apex page.