You need to sign in to do that
Don't have an account?

An error occurred when processing your submitted information - Custom Controller
I have a page like this
<apex:page controller="My_Controller">
<apex:form >
<apex:inputField value="{!foo.bar__c }"/>
<apex:commandButton value="Search" action="{!search} />
</apex:form > </apex:page>
And my controller
public class My_Controller { public Foo__c foo {get; set;} public My_Controller() { foo = new foo__c(); }
public PageReference search()
{
return null;
}
}
I cannot seem to make a lookup field work on the page. THe page displays ok, the look up field works. But when I press the command button I get the error
An error occurred when processing your submitted information
Does it work if you remove the whitespace after bar__c:
All Answers
Does it work if you remove the whitespace after bar__c:
Unbelievable - yes it now works
1) I cannot believe I did not try this myself
2) I cannot believe visualforce doesn't trim the string automatically for me.
Unbelievable, I had same problem and wasted a few hours on it. Eventually found the answer here.
I too cannot understand why a trailing space at the end of the expression makes a difference. Why doesnt the compiler trim this?