You need to sign in to do that
Don't have an account?
how to change the font style of a string in controller(in message class)
hi
i have a controller like
public with sharing class assignment5
{
public string name{get;set;}
public assignment5(ApexPages.StandardSetController controller)
{
}
public void selected_name()
{
//name.fontstyle='bold';
ApexPages.Message myMsg = new ApexPages.Message(ApexPages.Severity.info, 'you selected '+name);
Apexpages.addMessage(mymsg);
}
}
page:-
<apex:page standardController="account" recordSetVar="acc" >
<apex:form id="f1">
<apex:sectionHeader title="Assighment 5"/>
<apex:pageBlock >
<apex:pageMessages ></apex:pageMessages>
<apex:pageBlockTable value="{!acc}" var="a" >
<apex:column headerValue="Name" id="col1">
<apex:commandLink action="{!selected_name}" reRender="f1" >
{!a.name}
<apex:param value="{!a.name}" name="n" assignTo="{!name}"/>
</apex:commandlink>
</apex:column>
<apex:column value="{!a.BillingState}" id="col2" />
<apex:column value="{!a.phone}" id="col3" />
<apex:column value="{!a.website}" id="col4"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>
in vf page the font style of "name" should be in bold.
ex: you selected xxxxx
Try to add in controller following:
On the page add: <apex:pageMessages escape="false" />
escape="false" - A Boolean value that specifies whether sensitive HTML and XML characters should be escaped in the HTML output generated by this component. If you do not specify escape="false", the character escape sequence displays as written.
All Answers
Try to add in controller following:
On the page add: <apex:pageMessages escape="false" />
escape="false" - A Boolean value that specifies whether sensitive HTML and XML characters should be escaped in the HTML output generated by this component. If you do not specify escape="false", the character escape sequence displays as written.
thank you, Its working
hi,
i want to change the background color of my row when i click the name how can we do this for the same code