You need to sign in to do that
Don't have an account?
how to convert Column value in to link.
Hey Guys,
There are two requirement corresponding to this.
1> Lets Say there is a country column. displaying values from a custom object. now if the value is US.then in that case us should be a link but other value in that column should be output text .
here is my code snippet
<apex:column rendered="{!somecondition}" >
<apex:facet name="header"><apex:outputText style="font-weight:bold; font-weight:900; font-size:120%" value="Country"></apex:outputText></apex:facet>
<apex:outputLink style="color:blue;" >
{!FA.Country}
</apex:outputLink>
</apex:column>
in this case all the values become a command link , but i want it to be done only when country = US
2> Now another requirement is to open a overlay (Pop-up) on click of it without getting the page refresh. and pass the value of country name . in my case its US.
Regards,
You'd need to specify two versions of the column body and render the appropriate one depending on the value, something like:
To create a popup, you can simply give the link a target of _blank. Assuming the popup page is '/apex/Country', you'd do the following:
although the browser may choose to display this in a new tab rather than a popup.
All Answers
try this
<apex:column>
<apex:outputlink rendered="{!FA.Country=='US'}" value="{!string}"/>
<apex:outputfield rendered="NOT({!FA.Country=='US'})" value="{!FA.Country}"/>
</apex:column>
You'd need to specify two versions of the column body and render the appropriate one depending on the value, something like:
To create a popup, you can simply give the link a target of _blank. Assuming the popup page is '/apex/Country', you'd do the following:
although the browser may choose to display this in a new tab rather than a popup.
Thanks guys for your reply.
Actually i m using 'United states of america ' instead of US
The column becomes kind of Big.
how can i wrap text .
Regards,
use facet and put the value as United<br/>states<br/>of<br/>america
You can set the size of the column through inline styling. When the text would be too large, the browser will break on whitespace.
in this wht is  
Pls explain me how it works
Its a non-breaking space. It allows you to embed whitespace into a web page.
Thx Bob