You need to sign in to do that
Don't have an account?
suresh sanneboina
Fixed header and footer in vf page
Hi,
I have a table in the vf page. the header and the last row(Footer) should not be scrolled.
Regards
Suresh S
I have a table in the vf page. the header and the last row(Footer) should not be scrolled.
Regards
Suresh S
All Answers
http://fixedheadertable.com/
and
http://mkoryak.github.io/floatThead/
successfully in the past.
Thanks for replying
How can the footer(last row) be fixed.
Suresh S
Please find the below link
http://sfdcintegration.blogspot.in/2014/03/fixed-headertable-in-visualforce-page.html
Error: Compile Error: expecting a left angle bracket, found 'records' at line 7 column 16
What can I do to rectify this error?
Thank you so much for your help.
records is used to get the data existing in the custom object to display in the vf page table.
I have added field sets and a custom object with a child to Account. I am not sure if you wanted the actually custom object to be called records or just any custom object thats a child to accounts. Regardless this is my code:
I am getting this error: Error: Compile Error: expecting a left angle bracket, found '(' at line 19 column 26
public class CustomClass {
//Account
public Account account {get; set;}
//List to hold Custom Object records
public List<Service__c> records {get; set;}
//List to hold fields
public List<AllServiceFields> fields{get; set;}
public List<DestinyServicesFieldSet> vfFields {get; set;}
//Standard Controller
public CustomClass (ApexPages.StandardController controller) {
//Get record
account = (Account)controller.getRecord();
//Memory allocation
records = new List();
//Method calling
funds();
}
//This method is to get related fund data for Account record.
public void funds() {
String fieldvalue='';
String namespaceval = '';
Integer namespaceLength = 0;
LIST namespaceprefix=[SELECT NamespacePrefix FROM ApexClass WHERE Name = 'Service__c'];
if(namespaceprefix.size()>0)
{
namespaceval = namespaceprefix[0].NamespacePrefix + '__';
namespaceLength = namespaceval.length();
}
//populate the list with the fields
fields = Schema.SObjectType.CustomObject__c.fieldSets.FieldSetName.getFields();
// In visualforcepages the alias should not be more than 25 characters, So do concatenate .
for(Schema.FieldSetMember f:fields){
fieldvalue +=f.getFieldPath().subString(namespaceLength) + ',';
/*
if(f.getType() != Schema.DisplayType.String){
System.debug(f.getFieldPath());
fieldvalue +=f.getFieldPath().subString(0,f.getFieldPath().length()-3)+',';
}else{
fieldvalue +=f.getFieldPath()+',';
}*/
//System.debug(vfFields);
}
fieldvalue = fieldvalue.removeEnd(',');
vfFields=fieldvalue.split(',');
records = getResultById(account.Id , fields);
}
public List getResultById(Id entityId , List fields) {
//String to hold soql string
System.debug(entityId );
String query = 'SELECT ';
String querywhere = ' ';
String namespaceval = ' ';
Integer namespaceLength = 0;
LIST namespaceprefix=[SELECT NamespacePrefix FROM ApexClass WHERE Name = 'Service__c'];
if(namespaceprefix.size()>0)
{
namespaceval = namespaceprefix[0].NamespacePrefix + '__';
namespaceLength = namespaceval.length();
}
//loop through fields
for(Schema.FieldSetMember f : fields) {
if(f.getType() != Schema.DisplayType.String)
{
query += 'sum('+ f.getFieldPath() + ') ' + f.getFieldPath().subString(namespaceLength) + ', ';
querywhere += 'or (' + f.getFieldPath() + ' != null) ';
}
else
{
query += f.getFieldPath() + ' ' + f.getFieldPath().subString(namespaceLength) + ', ';
}
}
query = query.removeEnd(', ');
query += ' FROM '+ namespaceval + 'Service__c WHERE Account(Master-Detail Field) =: entityId';
querywhere = querywhere.replaceFirst('or', 'and (');
query += querywhere + ')';
query += ' group by rollup ('+ namespaceval + 'Service__c)';
list lstfundSummary = Database.query(query);
System.debug('\n lstfundSummary'+lstfundSummary);
return lstfundSummary;
}
}
Thank you for uyour help
<html>
<head>
<style type="text/css">
body {
background-color: #CCC;
margin:48px 0px 0px 64px;
}
div#topdiv {
position:fixed;
top:0px;
left:0px;
width:100%;
color:#CCC;
background:#333;
padding:8px;
}
div#bottomdiv {
position:fixed;
bottom:0px;
left:0px;
width:100%;
color:#CCC;
background:#333;
padding:8px;
}
</style>
</head>
<body>
<div id="topdiv">HeaderRagava</div>
<h1>Page Heading</h1>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<p>Content placeholder ...</p>
<div id="bottomdiv">FooterRagava</div>
</body>
</html>
</apex:page>
Thanks
This one is help full for u .