We’re rewarding the question askers & reputations are being recalculated! Read more.
13

In my experience this usually means I've encountered an error and swallowed it. Do you have multiple required fields or validation rules that could error and stop the action method being invoked? The way I find out is to add an apex:pageMessages component to the page and rerender that as part of the actionfunction: <apex:actionFunction name="Update" ...


9

When you fire an action via a button or command link it submits the entire form, meaning all the required fields in the form are checked, so you're right in saying that targetted re-rendering would not solve your problem. The key is to split up your fields into logical groups, whereby when firing a specific action only the fields you want are included. You ...


6

You can use a simple javascript function to prevent a standard submitting the form with enter key and execute an apex:actionFunction instead: <apex:form id="orderSearchForm" onkeyup="submitListener(event)"> <apex:actionFunction name="onFormSubmit" action="{!checkSalesOrderAccount}" reRender="...


6

The main issue is that immediate=true flag. When that's set, the action method is fired before the getters and setters. This is useful for things like cancelling, when you don't actually need to process anything. However, it's preventing the controller from getting your values. As you mentioned, removing this causes validation failures else where. You'...


5

You are using an apex:actionRegion and the fields that have their data "lost" on the rerender are outside of the action region. The server will only process what is within the actionRegion when the onchange triggers an ajax request to the server. If you have fields on the page that the user can change in a section of the page that is rerendered as part of ...


5

Without seeing your whole VisualForce page its hard to know if this solution will work, but you can use the apex:actionRegion tag to determine which areas of the page are processed by the server when an action is fired. If you surround everything except the field that is giving you the validation error in apex:actionRegion tags you should be able to achieve ...


5

I want to avoid using ActionRegion because it forces the user to enter data in required fields in other parts of the page form. One of the main uses of the apex:actionRegion tag is to do the opposite of this, by sending only the elements that are children of the actionRegion with the request to the server. The visualforce parser will only enforce required ...


5

public class tempLookup { public Case caseMR { get; set; } public Contact con { get; set; } public tempLookup(ApexPages.StandardController std) { caseMR=new Case();//Create a new instance con=new Contact(); } public pagereference obtainAddress() { if(caseMR.ContactId != null) { con = [select MailingStreet from Contact where Id = :...


4

Yes. You have specified immediate="true". Doing that causes the setters to not be called, so the value is not set. You need to change it to immediate="false" or just remove it as false is the default. The <apex:actionSupport> documentation doesn't exactly specify that, so it isn't clear. Note that setting immediate="false" will cause validation to ...


4

Okay, after some guidance from eyescream, I came up with the following: Using a suggestion found on this developerforce article and some off the wall advice. I came up with a decent but hacky solution. Using the document.getElementById function, I was able to pass parameters like so: In VisualForce <apex:inputField value="{!Task[TaskField]}" required="...


4

If you need to use an ActionRegion, you need to restructure your page, using a pageBlockSectionItem You'll need something like this: <apex:pageBlockSection title="Data Section" collapsible="false"> <apex:pageBlockSectionItem> <apex:outputLabel value="{!$ObjectType.myobject__c.fields.Tester__c.label}" for="testerField"/> <...


4

The actionSupport tag is to enable AJAX support on the page and hence only works for AJAX requests. In order to get it working, all you need to do is put the "Selected:" portion in an outputPanel and add reRender to the actionSupport tag. See example code below that works: <apex:page controller="ActionSupportParamDemoController"> <apex:form > ...


4

These changes are needed: <apex:outputPanel id="script"> <script> google.load('visualization', '1', {packages:['orgchart']}); ... </script> </apex:outputPanel> <apex:actionSupport event="onchange" action="{!CreateChartData}" oncomplete="drawChart();" rerender="script" /> You need to re-render (get from the ...


4

actionRegion does not define the target components that gets rerendered. It defines the source components that needs to be processed at the server end when the request is sent. so in your case, if you just wrap the opportunity lookup inputField inside the actionRegion, it should work and skip the required field check <apex:pageBlock title="Page block" ...


4

It's because your reference twice hr.projectVal, that's why it's getting confused, one in your select and one in your param. Remove your param and it should fix your problem, it's useless. Update Project: <apex:selectList value="{!hr.projectVal}" size="1" multiselect="false"> <apex:actionSupport event="onchange" action="{!...


4

I got something similar to work in my org just by making the event name all lower-case: <apex:actionSupport event="onchange" reRender="taskOneCallOutcomeOPPanelId"/>


4

I guess you could add this to the part of your page where the method is called again: <apex:actionSupport event="onchange" action="{!UpdateWhatId}" reRender="inf_whatId,if_location"> <apex:param name="myFlag" value="true" assignTo="{!myBooleanValue}"/> </apex:actionSupport> Then in your class: public boolean myBooleanValue {get;set;} ...


4

You have to nest the <apex:actionSupport> tag within the tag whose action you are trying to support. You have it inverted. Correct <a ...> <apex:actionSupport ... /> </a> Incorrect <apex:actionSupport ...> <a ...> </a> </apex:actionSupport> However, it appears you may want to simply use the <...


3

The test environment really only handles Apex code. AFAIK the only value of Test.setCurrentPage is to fake the return value of ApexPages.currentPage() that an Apex controller might rely on. The Visualforce page is not executed to produce HTML and there is no emulation of a browser and its DOM events such as "onchange". So your Apex test code has to take the ...


3

Perhaps this is easiest done using Javascript (specifically using the jQuery library) instead of a Controller Action Method. To do this, let's first create a Javascript function called copyInput. This function takes in the HTML-element calling the method as its input (ex. copyInput(this);). Then it copies the input's value to the input of all inputs with ...


3

You need to use an <apex:pageBlockSectionItem> in order to preserve the formatting. Try this: <apex:pageBlockSection id="Info" title="Some Information" columns="2"> <apex:outputLabel for="taxType" value="Why does this disappear?" /> <apex:pageblocksectionitem> <apex:actionRegion > <apex:...


3

There was an <apex:inputFile>, which cannot be rerendered, in the same form. This caused the cryptic (and incorrect) insufficient privileges message.


3

Unless I'm missing the point of what you're trying to do, the currently selected value is accessible in the field that is bound to your inputField's value attribute. <apex:actionRegion> <apex:inputField value="{!thisContact.Degree_Level__c}" id="degreeLevel"> <apex:actionSupport event="onchange" action="{...


3

You can try to use your action method and reRender parameter directly from the actionSupport. And wrap your list with an actionRegion. You then don't need an extra javascript function and actionFunction. Something like this: <apex:actionRegion> <apex:selectList id="Type" value="{!selectedVal}" size="1" multiselect="false"> <apex:...


3

The problem is that "onChange" is to be specified as "onchange" as javascript is case-sensitive. Change your code as:- <apex:actionSupport event="onchange" reRender="taskOneCallOutcomeOPPanelId"/>


3

Sid, as you've asked 3 questions in the last 24 hours on this same code, I have a few suggestions for you. At present, you seem rather lost and are looking for others to debug your code for you. That's difficult for us to do when we're not familiar with your schema and you're not posting your updated code in the same thread where people can follow it. My ...


3

Few changes in your code <apex:inputField value="{!caseRec.AssetID}"> <apex:actionSupport event="onchange" action="{!determinePageBlock}" reRender="{!pageBlockList}" /> </apex:inputField> remove immediate="True" now if you select any assert record actionSupport call determinePageBlock method there check caseRec.assetID


3

There were two problems: You need to wrap rating in actionRegion since Account name is mandatory. Also you have placed ! at wrong place in redered condition. I have made corrections. Please check below code snippet. <apex:page standardController="Account"> <apex:form > <apex:pageBlock title="Account Edit" id="pb"> <apex:...


3

The problem in your code is that the outputPanel is never rendered by default. That is it ID is not accessible by the actionSupport. To solve this you will need a "wrapper" outputPanel and rerender it. <apex:outputPanel id="otherDRDeliveryFormatPanel" layout="none"> <apex:outputPanel rendered="{!sObjectRFC.Mailshot_delivery_format__c=='Other'}"&...


3

That component sets up the jQuery code using: j$(document).ready(function(){ j$('#{!searchBoxId}').typeahead({ minLength: {!minSearchLength}, hint: true, autoselect: true, highlight: true }, .... but that ready callback only happens on the initial page load and not when you re-...


Only top voted, non community-wiki answers of a minimum length are eligible