You need to sign in to do that
Don't have an account?
Ravindar Admin
Component code:
<apex:component >
<h1>Address</h1>
<p>First Name: {!$User.FirstName}</p>
<p>Last Name: {!$User.LastName}</p>
<p>Phone: {!$User.Phone}</p>
<p>Email: {!$User.Email}</p>
<p>Address:{!$User.Address}</p>
</apex:component>
Visualforce Page:
<apex:page standardController="sobject">
<center>
<c:componentname ></c:componentname>
</center>
</apex:page>
Getting null values for address filed in visualforce page using componet , Even I fill all address data. How to solve this?
Component code:
<apex:component >
<h1>Address</h1>
<p>First Name: {!$User.FirstName}</p>
<p>Last Name: {!$User.LastName}</p>
<p>Phone: {!$User.Phone}</p>
<p>Email: {!$User.Email}</p>
<p>Address:{!$User.Address}</p>
</apex:component>
Visualforce Page:
<apex:page standardController="sobject">
<center>
<c:componentname ></c:componentname>
</center>
</apex:page>
I suppose Latitude and Longitude are not present on User edit screen. So basically, the fields which are returned as null in your code are Latitude and Longitude.
If you access Address field directly. It is displaying all fields together including Latitude and Longitude. So for your case, you can display the address as per below String:
Address: {!$User.State},{!$User.City},{!$User.Country}...whatever values you want to add or remove.