• stephan
  • SMARTIE
  • 640 Points
  • Member since 2009

  • Chatter
    Feed
  • 25
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 180
    Replies

We really like the built-in public/private tagging header -- but there's no Visualforce tag for it. The only way we can get the tagging header to appear on a Visualforce page is to move the <apex:detail /> tag outside of a form element; if the detail tag is inside a form element, then the tagging header disappears.

 

Now, with the release of Spring '11, we'd like to take advantage of inline editing for detail elements -- but that requires putting the detail element inside a form tag... so we lose the tagging header again...

 

Is there any way to get both the tagging header and inline editing support within a Visualforce page?

 

Thanks

Just trying out the new Spring 11 functionality, and had a question I am hoping someone might know..

 

I can get field sets to work as input or output fields.

 

I can get Inline editing to work as advertised.

 

But is it possible to output a set of fields from a field set and have those fields enabled to use inline editing? I have tried to combine the various examples but with no success - is it possible and if so, can someone give me an example?

 

For instance, it looks from the Spring Webinar that this should work if I pass in a Contact Id into the page...

 

 

<apex:page standardController="Contact" >
<apex:sectionHeader title="Inline for {!contact.Name}"/>
<apex:form>
 
<apex:pageMessages/>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="2">
<apex:repeat value="{!$ObjectType.Contact.FieldSets.TestFS1}" var="f">
<apex:outputField value="{!Contact[f]}">
<apex:inlineEditSupport event="ondblclick"/>
</apex:outputField> 
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

Many thanks

So I was told that Chatter does not work with Visual force I wanted to know if anyone had a work around for this or was able to get it to work any hints to point me in the right direction would be great?

 

 

Sincerely,

 

Whitney Bunker

 

Hi we have overridden the standard salesforce page layout with our custom VF page . The issue is that for ex in accounts / contacts page which  are custom VF page we are not getting the chatter bar  (hence not able to follow accounts etc ) is there a way this can be enabled 

  • June 23, 2010
  • Like
  • 0

So it took me less than 10 minutes to identify an issue with the new depending picklists in Visualforce. What if I want to make the child picklist required only if the picklist is active and has selectable options?

 

 

 

<apex:page standardController="Lead">
    <apex:form>
        <apex:inputField value="{!lead.EMEA_Country__c}"/>
        <apex:inputField value="{!lead.EMEA_Distributor__c}" required="true"/>
        <apex:commandButton value="save" action="save"/>
    </apex:form>
</apex:page>

 

 

 

Hmm. I feel like this shouldn't be required if the field is disabled.

 

Thoughts?

 

-Jason

 

 

 

Hi guys,

 

   do anyone knw any book name for "javascript usage in visualforce".?  Since i am working on Professional Edition, i need to use javascript for some functionalities. 

 

                                        Please suggest me.

 

 Tons of Thanks,

Krishna Nishanth T.

Hi,

This is a small VF bug I found when I was adding pageBlock section inside repeater control. I found that when I do so the maximize minimize functionality of page block section stops working.

 

Here is my code for the VF page

 

<apex:page standardController="ToDos__c" extensions="ToDosController">
	
	<apex:sectionHeader title="Weekly View" subtitle="{!ToDos__c.Name}"/>
	
	<apex:form > 
		<apex:pageBlock >
		


			<apex:repeat value="{!lstInner}" var="ToDoItem">
				<apex:pageBlockSection title="Week {!ToDoItem.weekNumber}" columns="1">
					<apex:pageBlockTable value="{!ToDoItem.lstDailyItems}" var="dailyItem">
						Some <apex:column> tags here
					</apex:pageBlockTable>
				</apex:pageBlockSection> 
			</apex:repeat>
		</apex:pageBlock> 
	</apex:form>
	
</apex:page>

When  this page gets rendered minimize maximize functionality for all pageBlockSection tags was not working but was going js error.

 

I just added one more hidden page block section before my repeater and all pageBlockSections started working properly.

 

<apex:page standardController="ToDos__c" extensions="ToDosController">

<apex:sectionHeader title="Weekly View" subtitle="{!ToDos__c.Name}"/>

<apex:form >
<apex:pageBlock >

<apex:pageBlockSection title="Week" columns="1" collapsible="true" rendered="false"/>

<apex:repeat value="{!lstInner}" var="ToDoItem">
<apex:pageBlockSection title="Week {!ToDoItem.weekNumber}" columns="1">
<apex:pageBlockTable value="{!ToDoItem.lstDailyItems}" var="dailyItem">
Some <apex:column> tags here
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:repeat>
</apex:pageBlock>
</apex:form>

</apex:page>

 This might not be a right way to overcome the bug, but it works.:manhappy:


Similar is applicable in many other cases.

 

For example if default calendar (datepicker) is not working for the Date type inputField inside pageblock table.(I have observed this for Task as a standardController). You add one Date type inputField as hide it. All datepickers on the page will start working properly.

 

Experts on VisualForce can give better solution than this.

 

 

 

 

Hi,

 

I have a SObject and one VF page.I added this page on the standard layout of Object.

But the problem is that i wanna add this VF page on the edit and new  layout of the SObject as well.

Can anyone help me ?

 

Thanks,

Hi Experts,

 

one day I was running my VF page i got the error "Maximum view state size limit (128K) exceeded. Actual viewstate size for this page was 130.047K"

 

 now i wont to know that what is my viwe state size when i m running the VF page coz i want to control the size b'coz we are creating & testing the VF page with small amount of data.we don't know how customer may use it so i want to know the view state size of the page so we can control it.

 

 if anybody have idea how to know the view state size please let me know

 

 

Hi,

 

I have a VF page that simply outputs some text:

 

<apex:page controller="myController" contentType="text/javascript" showHeader="false">
some garbage text
</apex:page>

 Then I have a JavaScript that uses XMLHttpRequest to make a request to the above VF page:

 

var url = "http://na4.salesforce.com/apex/myPage";
xmlhttp.open('GET', url, true);
xmlhttp.send(null);

 Before making the request I make sure that I'm logged in with my salesforce account (so that I don't need to pass user/pass thru the url). The problem is that, I never get anything back. xmlhttp.status is always 0 and xmlhttp.responseText is always blank. Firebug shows the status of the GET request as 200 OK.

 

Any ideas how I should make REST calls to a VF page and get the response back? Thanks!!

 

 

  • April 22, 2010
  • Like
  • 0

Hi-

 

I'm a beginner with visualforce, and I'm trying to implement a simple javascript image slideshow for a splash page. I implemented it successfully in standard html, but visualforce doesn't seem to like it.

 

The script to preload the images is in the head:

<script type="text/javascript">

<!--

var image1=new Image()

image1.src="{!$Resource.slide1}"

var image2=new Image()

image2.src="{!$Resource.slide2}"

var image3=new Image()

image3.src="{!$Resource.slide3}"

-->

</script>

 

Then the script for the slideshow is in the body:

 

<img src="{!$Resource.slide1}" name="slide" />

<script>

<!--

var step=1

function slideit(){

if (!document.images)

return

document.images.slide.src=eval("image"+step+".src")

if (step<3)

step++

else

step=1

setTimeout("slideit()",5000)

}

slideit()

//-->

</script>

 

Plz help, I'm totally noobing out on this one :(

 

-Karl

  • April 22, 2010
  • Like
  • 0

I am trying to setup radio buttons with descriptive text on mouseover, however the tooltip text is not appearing. The rendered HTML appears correct. I am wondering if there is some way to make this work, or if I will need to resort to using Javascript with standard HTML input fields. Here is the current code that is not displaying tooltips:

 

      <apex:selectRadio id="select_1a" value="{!Evaluation__c.CommunityNeed__c}">
          <apex:selectOption itemValue="1" itemLabel="Low" title="Little or no description of community need"/>
          <apex:selectOption itemValue="2" itemLabel="Medium" title="Describes community need in general terms and offers little or no verifiable supporting research or data"/>
          <apex:selectOption itemValue="3" itemLabel="High" title="Describes community need in specific terms and includes verifiable supporting research or data"/>
      </apex:selectRadio>

 

The following alternate code on the same page shows the tooltip but will require extra work to save selected values to the Evaluation object:

 

    <table>
    <tr><td>

    <input name="community_need_options" type="radio" value="1"><label for="community_need_options" title="Little or no description of community need">Low&nbsp;&nbsp;</label></input>
    </td><td>
    <input name="community_need_options" type="radio" value="2"><label for="community_need_options" title="Describes community need in general terms and offers little or no verifiable supporting research or data">Medium&nbsp;&nbsp;</label></input>
    </td><td>
    <input name="community_need_options" type="radio" value="3">
    <label for="community_need_options" title="Describes community need in specific terms and includes verifiable supporting research or data">High&nbsp;&nbsp;</label></input>
    </td></tr>
    </table>

 

Thanks.

Rich

  • April 21, 2010
  • Like
  • 0

Hi all,

 

I am facing problem having <apex:param assignTo...> working with <CommandButton>.  So started with this simple code to test. It is not working. Can somebody please let me know where I am going wrong? Appreciate Your help.

 

And the most important thing is : The Values are successfully printed on the page but unable to pass back to Controller !!!

 

Thanks!

 

VisualForce Code:

 

<apex:page controller="MyController" >
<apex:form >
    <apex:commandButton action="{!doLoginCommand}" value="Click" >
        <apex:param name="sessionId" assignTo="{!apiSessionId}" value="{!$Api.Session_ID}" />
        <apex:param name="serverURL" assignTo="{!apiServerURL}" value="{!$Api.Partner_Server_URL_140}" />
    </apex:commandButton>

    Session ID : {!$Api.Session_ID}<br/>
            URL: {!$Api.Partner_Server_URL_140}
</apex:form>
</apex:page>

 

 

Controller:

 

public class MyController {
     public String apiSessionId {get;set;}
     public String apiServerURL {get;set;}

 public pageReference doLoginCommand(){
        System.debug('Inside the Method ');
        System.debug('api SessionId: ' + apiSessionId);
        System.debug('api ServerURL: ' + apiServerURL);
    return null;
 }
}

 

 

Debug Log:

 

18.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;VALIDATION,INFO;WORKFLOW,INFO
11:15:25.586|EXECUTION_STARTED
11:15:25.587|CODE_UNIT_STARTED|[EXTERNAL]VF-Outer
11:15:25.590|CODE_UNIT_STARTED|[EXTERNAL]VForcePage
11:15:25.590|METHOD_ENTRY|[12,2]|System.debug(String)
11:15:25.590|USER_DEBUG|[12,2]|DEBUG|Inside the Method
11:15:25.590|METHOD_EXIT|[12,2]|debug(ANY)
11:15:25.590|METHOD_ENTRY|[13,2]|System.debug(String)
11:15:25.590|USER_DEBUG|[13,2]|DEBUG|api SessionId: null
11:15:25.590|METHOD_EXIT|[13,2]|debug(ANY)
11:15:25.590|METHOD_ENTRY|[14,3]|System.debug(String)
11:15:25.590|USER_DEBUG|[14,3]|DEBUG|api ServerURL: null
11:15:25.590|METHOD_EXIT|[14,3]|debug(ANY)
11:15:25.590|CODE_UNIT_FINISHED
11:15:25.591|VF_APEX_CALL|j_id2|{!doLoginCommand}|PageReference: none
11:15:25.633|CODE_UNIT_FINISHED
11:15:25.633|EXECUTION_FINISHED

 

 

 

 

 

 

 

 

 

 

  • April 20, 2010
  • Like
  • 0

Following the instructions on http://www.salesforce.com/us/developer/docs/pages/Content/pages_styling_custom.htm, I have created a style sheet file that contains the following

<style type="text/css">
    .required { font-weight: bold;}
</style>

I then uploaded it as a static resource called tntStyle.


Then in use, I have a visualforce page that includes the style sheet - thus

<apex:page showHeader="false" id="page" sidebar="false" standardController="Feedback__c" action="{!defaultValues}" extensions="FeedbackReturnPageExt" standardStylesheets="false">

<apex:stylesheet value="{!$Resource.tntStyle}"/>

<apex:pagemessages />
    <apex:form id="form">
        <apex:pageBlock mode="maindetail" >

            <apex:pageBlockButtons location="bottom">
                <apex:commandButton action="{!save}" value="Submit" />
               
            </apex:pageBlockButtons>

<apex:pageBlockSection columns="1">
                <apex:pageBlockSectionItem >
                    <apex:outputLabel for="title">title</apex:outputLabel>
                    <apex:inputText id="title" value="{!Feedback__c.Title__c}" />
                </apex:pageBlockSectionItem>
                <apex:inputField value="{!Feedback__c.First_Name__c}" />
                <apex:inputField value="{!Feedback__c.Last_Name__c}" />            
                <apex:pageBlockSectionItem >
                    <apex:outputLabel styleclass="required" for="cor">Country of Residence</apex:outputLabel>
                    <apex:inputText id="cor" required="true" value="{!Feedback__c.Country_of_Residence__c}" />
                </apex:pageBlockSectionItem>                    
                <apex:inputField value="{!Feedback__c.Email__c}" />
                <apex:pageBlockSectionItem >
                    <apex:outputLabel for="emailToCheck">Email verification</apex:outputLabel>
                    <apex:inputText id="emailToCheck" value="{!EmailToCheck}" />
                </apex:pageBlockSectionItem>
               
                <apex:inputField value="{!Feedback__c.Phone__c}" />
                <apex:inputField value="{!Feedback__c.Subject__c}" />
                <apex:pageBlockSectionItem >
                    <apex:outputLabel styleclass="required" for="CustomerComments">Comments</apex:outputLabel>
                    <apex:inputField id="CustomerComments" required="true" value="{!Feedback__c.Customer_Comments__c}" />
                </apex:pageBlockSectionItem>
                <apex:inputField value="{!Feedback__c.Customer_Entered_Account_Number__c}"/>
                <apex:inputField value="{!Feedback__c.Consignment_Number__c}" />
                                                 
        </apex:pageBlockSection>
        </apex:pageBlock>



    </apex:form>
</apex:page>

It does not however seem to change the font of the text to bold, whereas if I include the style "inline" within the page, it does.

Is there some stage I am missing to get this working with a CSS file. 

 

Many thanks

hi guys,

how do you customise the pop-up window made by commandLink target="_blank"? like resizing the window for example.

as now the popup window will appear in a new tab.

i know we can do it using window.open javascript, but can we do it without using javascript?

can anyone help me?

 

thanks.

I have a repeater within a javascript block, once a user clicks on a link that calls the javascript function of my actionFunction, the selected area refreshs. However, the javascript block is not executed again on the Ajax refresh.

 

 

<div id="msgdiv"></div> <apex:outputPanel id="refreshArea"> <script type="text/javascript"> function test() { var msg = ""; <apex:repeat value="{!Strings}" var="item"> msg += '{!item}-'; </apex:repeat> document.getElementById('msgdiv').innerHTML = msg; }

//works ok only on first page load

test(); </script>

Here is te actionFunction definition on the page:

 

<apex:actionFunction name="AddNewString" action="{!addString}" reRender="refreshArea" status="status"></apex:actionFunction> <a href="javascript:AddNewString()">test adding a string</a>

 In order to make the javascript call, I tried both actionStatus "onstop" event and actionFunction "oncomplete".

 

 Here  are the results:

 1) actionFucntion:

<apex:actionFunction name="AddNewString" action="{!addString}" reRender="refreshArea" oncomplete="test()"></apex:actionFunction>

 

 

 actionFunction oncomplete: won't call the javascript function!

 

 2) actionStatus:

  

<apex:actionStatus startText="working..." onstop="test()" id="status"></apex:actionStatus>

This one calls the javascript, in the HTML source code also I can see the javascript block is updated, however the previous text is shown. As if the actionStatus has called the javascript just before the DOM is updated by Ajax call.

 

This is very strange!
 
By the way, if I remove the javascript block and just flush out everything into the browser it works fine!

Anyone can help shed some light on this issue?


 

 

 

 

 

I'm using a reRender attribute on a commandLink to rerender an outputPanel. Inside the outputPanel is a pageBlock which contains pageBlockSections.

 

For some reason the pageBlockSection will not continue using the styling correctly and decides it want's to cover the entire pageBlock's width and use black text.

 

 

<apex:outputPanel layout="none" id="panelBlock"> <apex:pageBlock id="sectionInfo" title="Section" rendered="{!renderBoolean}"> <apex:pageBlockSection title="Section Information"> <apex:pageBlockSectionItem > <apex:outputLabel value="Test" for="test_value" /> <apex:outputText value="Test Value" id="test_value" /> </apex:pageBlockSectionItem> <apex:pageBlockSectionItem > <apex:outputLabel value="Test2" for="test2_value" /> <apex:outputText value="Test2 Value" id="test2_value" /> </apex:pageBlockSectionItem> </apex:PageBlockSection> </apex:pageBlock> </apex:outputPanel>

 

So panelBlock gets reRendered successfully. But the styling is lost within. It loses no styling if it's already displayed so I'm assuming it's because the area is set to rendered="false". If this is the case...

 

Is it a bug?

 

Hi...

 

I have a requirement to wrap a text inside a table cell...i have a panelgrid inside which im using repeat. inside repeat i have used a td tag where i am giving it a fixed width...but i am not able to wrap a text if it is too long..this affects the alignment in my table...can any one suggest a proper method to do it...

 

 

<apex:panelGrid >
<apex:repeat value="{!ProcessCellValuesWithoutName}" var="strCellValue">

<td width="200" align="center">

<apex:outputLabel rendered="{!(!strCellValue.renderLink)}">{!strCellValue.recValues}</apex:outputLabel>
<apex:outputLabel rendered="{!(!strCellValue.renderLink)}">&nbsp;&nbsp;&nbsp;</apex:outputLabel>

</td>

</apex:repeat>
</apex:panelGrid>

 

  • March 15, 2010
  • Like
  • 0

Hey guys,

 

I've created a Visualforce page for a number of users.

Some of my Org users use IE and some use Firefox.

 

For some reason, my Visualforce page is displayed differently in each web browser.

 

This is a sample of my Visualforce code:

<apex:pageBlock title="IMAC Detail" id="detailPageBlock"> <apex:panelGrid columns="4" rules="rows" styleClass="panelGridClass" title="IMAC detail" width="100%" columnClasses="panelGridLabel, panelGridValue"> <apex:outputText value="IMAC" /> <apex:panelGroup > <apex:outputField value="{!IMAC__c.Name}" rendered=" {!IMAC__c.ID != inlineEditId}"/> <apex:inputField value="{!IMAC__c.Name}" rendered=" {!IMAC__c.Id == inlineEditId}"/> </apex:panelGroup> <apex:outputText value="Owner" /> .... </apex:panelGrid> </apex:pageBlock>

 Also, the following figure highlights the differences between displayed pages in IE and in FireFox:

 IE vs. Firefox


Does anyone know what I need to do so my Visualforce page would render consistenlty accross these web browsers?

 

Thank you,

 

Behzad

 

  • March 10, 2010
  • Like
  • 0

How would I place my datatable tags outside the javascript tags and just have the outputtext value appear...???

 

<script type="text/javascript"> $(document).ready(function(){ j$("input#e").myfun({ source: ['<apex:dataTable value="{!Teach}" var="t"> <apex:outputText value="{!t.skc__Teacher__r.Name}"/></apex:dataTable>'] }); }); </script>

 

 

 

I am running into a very serious error with deploys, and before I log a case, was wondering if anyone else has seen this.

 

I have two sandboxes, A and B.  A is in Spring 11 and B is in Summer 11.

 

In my org, I have a VF Page and its controller which utilizes javascript remoting.  It works fine in both Sandbox A and B.

 

Now lets say I make a change to an sobject, such as adding a field that is not referenced anywhere, then deploy just this changed sobject to sandbox B.

 

After the deploy, the VF Page and its controller break in Sandbox B, but continue to work in Sandbox A.  The error given is a strange one:

 

Visualforce Remoting Exception: Cannot call test methods in non-test context

 

I am definitely not calling test methods from my remote apex.  If I drill into the error with Firebug, I can see it gets thrown in the following code (which is salesforces):

 

 

Visualforce.remoting.Util = {
log: function(msg, obj) {
if (typeof console === 'undefined' || !console.groupCollapsed || !console.log || !console.groupEnd) return;
if (typeof obj !== 'undefined' && obj !== null) {
try {
console.groupCollapsed(msg);
console.log(obj);
console.groupEnd();
} catch(e) {}
} else {
try { console.log(msg); } catch(e) {}
}
}, 

 

 

I can then add one dummy line (it literally does not matter what I add) of code to the problematic VF page and its controller, then I can redeploy the page and its controller, and things work again in Sandbox B.

 

This is quite strange, but I can consistently reproduce it with these steps.

 

Any ideas?

...besides the crude javascript methods posted in other threads? Thanks.

Hi

 

My visualforce page was working fine on IE8 with ajax being used. But on IE9 it gives an error

 

 

SCRIPT16386: No such interface supported
 
3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript, line 122 character 41

 

SCRIPT16386: No such interface supported 3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript, line 122 character 41

 

Any idea how it can be solved? 

  • March 21, 2011
  • Like
  • 0

Hi,

We need to be able to access the field names on a SalesForce page with javascript. For example when the user opens the Accounts page our javascript needs to be able to access the email field. When the user opens the Lead page our javascript needs to be able to access the email field on Leads.

 

Is there a way to detect what is the email's field id/name on Leads and Accounts and possibly the other SF pages.

 

Thanks,

Kzmp

  • March 16, 2011
  • Like
  • 0

Hi Everyone,

 

I can easily query and play around with results using Javascript remoting, but when trying to update the record using the remoting again. It seems its rolling back my changes without any errors.

 

Here is code snippet

 

Controller Class

 

 

public global with sharing class  testremotingcontroller {
    
     
    @RemoteAction
    global static Account[] searchAccounts(String accountName) {
        accountName = accountName.replaceAll('[*]', '%');
        return [select id, name, phone, type, numberofemployees from 
             Account where name like :accountName ];
        
    }   
    
    @RemoteAction
    global static boolean updateAccount(String accountId, String phoneNum) {
        Account a = [Select Phone from Account where Id = :accountId];
        a.Phone = phoneNum;
        update a;
        // querying again to see if its fixed.
        a = [Select Phone from Account where Id = :accountId];
        // This debug always prints the updated value
        system.debug('>>> accId'+ accountId + 
                    ' phone ' +  phoneNum +
                     ' ' +a );
        return true;
    }
}

 

 

Visualforce Page

 

<apex:page controller="testremotingcontroller">
<apex:includeScript value="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"/>
<apex:includeScript value="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"/>

<apex:sectionHeader title="Javascript Remoting & jQuery Templates !"/>

<apex:pageBlock title="Accounts">
    <apex:pageBlockSection title="Search Accounts" columns="2">
        <apex:pageBlockSectionItem >
            Account Name :
            <input type = "text" id = "accountNameToSearch" />
            <button onclick="searchAccounts()">Get Account</button>
        </apex:pageBlockSectionItem>        
    </apex:pageBlockSection>
    <apex:pageBlockSection title="Matching Accounts !" columns="1">
    <!-- 
	Created Empty table using the CSS styles of visualforce pageBlockTable 
	This gives same look and feel 
    -->
    <table cellspacing="0" cellpadding="0" border="0" id="searchResults" class="list ">
        <colgroup span="2"></colgroup>
        <thead class="rich-table-thead">
            <tr class="headerRow ">
                <th colspan="1" scope="col" class="headerRow">Id</th>
                <th colspan="1" scope="col" class="headerRow"> Name</th>
                <th colspan="1" scope="col" class="headerRow"> Phone</th>
                <th colspan="1" scope="col" class="headerRow">Type</th>
                <th colspan="1" scope="col" class="headerRow"> Number of Employees</th>                                 
            </tr>
        </thead>
	<!-- table body left empty for populating via row template using jquery -->
        <tbody />
    </table>
    </apex:pageBlockSection>
</apex:pageBlock>

<!-- Create a named jquery template -->
<script id="resultTableRowTemplate" type="text/x-jquery-tmpl">
<tr onfocus="if (window.hiOn){hiOn(this);}" onblur="if (window.hiOff){hiOff(this);}" onmouseout="if (window.hiOff){hiOff(this);} " onmouseover="if (window.hiOn){hiOn(this);} " class="dataRow even  first">
    <td class="dataCell">${Id}</td>
    <td class="dataCell">${Name}</td>
    <td class="dataCell"><input type="text" value="${Phone}" /></td>
    <td class="dataCell">${Type}</td>        
    <td class="dataCell">${NumberOfEmployees}</td>
</tr>           
</script>


<script type="text/javascript">
// if you are inside some component
// use jquery nonConflict
// var t$ = jQuery.noConflict();

function searchAccounts() {
    var accountName = $('#accountNameToSearch').val();
    // clear previous results, if any
    $("#searchResults tbody").html('');
    
    // The Spring-11 gift from force.com. Javascript remoting fires here
    // Please note "abhinav" if my org wide namespace prefix
    // testremotingcontroller is the Apex controller
    // searchAccounts is Apex Controller method demarcated with @RemoteAction annotation.
    abhinav.testremotingcontroller.searchAccounts( accountName, function(result, event){            
        if (event.status && event.result) {  
          $.each(event.result, function () {                
          // for each result, apply it to template and append generated markup to the results table body.
                  var row = $("#resultTableRowTemplate" ).tmpl(this);
		  // locate the Phone field and bind this account and blur handler to it
		  row.find('td input').data('account', this).blur(
			function () {
				var orginalAcc = $(this).data('account');
				if (orginalAcc.Phone != $(this).val()) 
					updateAccount(orginalAcc, $(this).val());
			}
		  );
		  row.appendTo( "#searchResults tbody" );
              }
          );            
        } else {
           alert(event.message);
        }
    }, {escape:true});
}

function updateAccount(acc, newPhoneVal) {
	abhinav.testremotingcontroller.updateAccount( acc.Id, newPhoneVal, function(result, event){            
        if (event.status && event.result) {  		
	   alert('Account - '  + acc.Name + ' updated  !');
        } else {
           alert(event.message);
        }
    }, {escape:true});
}
</script>

</apex:page>

 I am pasting the whole code as it is without any trimming. So that one can easily reproduce this by copy pasting it directly.

 

As many, I'm excited to deploy inline edits for Visualforce page, and while inline editing works, it's broken my google maps "related list".

This page was previously on api version 15.0. Prior to today, i've ran this form without <apex:form> tags. In enabling inline editing for VF, I've been forced to upgrade this page to API 21, and add <apex:form> tags as inline editing has to descend from this tag. Inline editing works! Google Maps breaks :(.

By viewing the errors in IE, i can break it down to this statement in the source:
<script  type="text/javascript">document.forms['echoScontrolForm_066700000004hqK'].submit()</script>

IE Mesage: 'document.forms.echoScontrolForm_066700000004hqK' is null or not an object

Please correct me if I'm wrong, but this seems to have broken because I have to explicitly define an <apex: form>! If i remove inline editing, and then subsequently the <apex:form> tags, it magically works again. Please see my very simple VF page below and let me know if I am doing something wrong, if there is an easier way to attain my goals, and how I can resolve this issue!

<apex:page standardController="Account" showHeader="true" title="Account: {!Account.Name}">
<apex:form id="theform">
        <apex:variable var="renderDistributor" value="{!if($User.ProfileId = '00e70000000viCR',false,true)}" />
        <apex:variable var="sentToInterface" value="{!if(Account.Sent_To_Interface__c = true,true,false)}" />
        <apex:variable var="sentToInterfaceTime" value="{!Account.Sent_To_Interface_Time__c}" />
    <apex:pageBlock rendered="{!AND(renderDistributor,sentToInterface)}" title="Information" >   
    
               <table border="0.5" width="100%">

                <tr>
                    <td bgcolor="pink">
                        <center>
                        <font color="red" face="arial">
                            <b>This customer was last queued for the interface on:&nbsp;<apex:outputfield value="{!Account.Sent_To_Interface_Time__c}"/></b>
                        </font>
                        </center>                
   <apex:detail relatedList="true" inlineEdit="true">
    </apex:detail>
    </apex:form>  
</apex:page>

 






 

We really like the built-in public/private tagging header -- but there's no Visualforce tag for it. The only way we can get the tagging header to appear on a Visualforce page is to move the <apex:detail /> tag outside of a form element; if the detail tag is inside a form element, then the tagging header disappears.

 

Now, with the release of Spring '11, we'd like to take advantage of inline editing for detail elements -- but that requires putting the detail element inside a form tag... so we lose the tagging header again...

 

Is there any way to get both the tagging header and inline editing support within a Visualforce page?

 

Thanks

Hi, I was wondering if you can create a pdf from a visual for page that will have the header on each page you print out.  So if I have a visualforce page, I want the header on the top of each page I print out. 

 

 

Thanks

When I use pageblocks and pageblocksections and outputfields, etc, I do not get the new Salesforce Look and Feel that I get when I view a standard SF page or when I use <apex:detail/>.

 

Why is that? Is there a way around that?

Just trying out the new Spring 11 functionality, and had a question I am hoping someone might know..

 

I can get field sets to work as input or output fields.

 

I can get Inline editing to work as advertised.

 

But is it possible to output a set of fields from a field set and have those fields enabled to use inline editing? I have tried to combine the various examples but with no success - is it possible and if so, can someone give me an example?

 

For instance, it looks from the Spring Webinar that this should work if I pass in a Contact Id into the page...

 

 

<apex:page standardController="Contact" >
<apex:sectionHeader title="Inline for {!contact.Name}"/>
<apex:form>
 
<apex:pageMessages/>
<apex:pageBlock>
<apex:pageBlockButtons>
<apex:commandButton action="{!save}" value="Save"/>
</apex:pageBlockButtons>
<apex:pageBlockSection columns="2">
<apex:repeat value="{!$ObjectType.Contact.FieldSets.TestFS1}" var="f">
<apex:outputField value="{!Contact[f]}">
<apex:inlineEditSupport event="ondblclick"/>
</apex:outputField> 
</apex:repeat>
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>

 

 

 

Many thanks

Hi,

 

I have got one requirement, In which I list down all  the fields of a particular object on the page and If user selects any field among the field names available in the list so he/she should be able to see the respective inputField (e.g is user selects the DOB from the list respective inputField of date time should be seen), accordingly for rest of the field types.

 

At the last I am going to store the value in a Key value pair as a record. However this dynamically rendering of inputFields are required for validation stuff at the client (on page) side.

 

Can you please help me to find how can we archive this ?

 

Thanks & Regards,

Anand Agrawal.

 

Hello Developers, how are you doing?

 

Well, again i'm here to do some questions,

 

Actually, i'm developing a table on avisualforce page, using Visualforce Tags.

 

I'm doing it using VF Tags, because i ll need to change the content type to generate a XLS file.

 

Reading about VF to XLS, i see this to solve my problems, well its work.

 

But now i need to iterate over an list, and generate a column for each value.

 

When i tried to use the following code:

 

 

<apex:pageBlock>
<apex:pageBlockTable value="{!valoresClienteMes}" var="omg" title="Teste">

    <apex:column id="teste1" width="100px" value="{!omg.nomeCliente}"/>
    
    <apex:repeat value="{!omg.valoresMeses}" var="valor">
        <apex:column id="teste2" width="100px" value="{!valor}"/>
    </apex:repeat>

</apex:pageBlockTable>
</apex:pageBlock>

 I got this message...

 

Error: &lt;apex:column&gt; may be child of &lt;apex:repeat&gt; only for the API version 20 or later

 

What can i do?

 

Tks for everything again =)