You need to sign in to do that
Don't have an account?
JeffTrier
Illegal view ID from String on actionSupport call
Hi guys and gals,
I am trying to wrap my head around actionSupport calls within VisualForce, and I keep getting this error:
java.lang.IllegalArgumentException: Illegal view ID
I scoured the web, various SFDC entries, and I still can't figure out why this error is happening. Any help would be greatly appreciated.
Thanks!
-Jeff
VisualForce Page:
<apex:page StandardController="Case" extensions="VistaCaseExtension"> <apex:form> <apex:outputPanel id="counter"> <apex:outputText value="Click Me!" /> <apex:actionSupport event="onclick" action="{!myTest}" rerender="counter2" status="refreshstatus" /> </apex:outputPanel> <apex:actionStatus id="refreshstatus" startstyle="color:green;" startText="Refreshing...."></apex:actionStatus> <apex:outputPanel id="counter2"> <p> <apex:outputText value="I want to change!" /> </p> </apex:outputPanel> </apex:form> </apex:page>
Apex Class
public class VistaCaseExtension { // Create extension hook private ApexPages.StandardController controller; String testRet = 'clicked... now what?'; // Constructor public VistaCaseExtension(ApexPages.StandardController std){ controller = std; } public void AccountPopulated() { Case cont=(Case) controller.getRecord(); cont.Account=[select AccountNumber, Site, ShippingStreet from Account where id=:cont.AccountId]; } public String myTest(){ return testRet; } }
Change you code as follows:
All Answers
Change your code to
Change you code as follows:
Nice! Thanks guys. :)
S91084, this did the trick!
I was wondering, what was happening for the error to occur?
Thanks again,
-Jeff
Hi,
For a action method the return type can be void or it can return a PageReference not other data types like String.
Thanks a lot! That helps me grasp this better. :)
-Jeff