1

We currently have a left nav bar on all our visual force pages. We are using a command link on the left nav bar which on clicking should render a visual force page. Initially the command link was not sending parameters and so i had to create a nested form and use the rerender attribute. This work to pass the parameters but now i am getting an error message which is below:

The page you submitted was invalid for your session. Please click Save again to confirm your change.

Could you please let us know what scenarios would this error message come? I am having a visual force component which has the below code snippet. The vf component gets a reference of the page controller as a parameter and on clicking the command link invokes a method on the page controller. I am getting the above error message. Any body has built left navbars with command links using visual force component ?

<apex:repeat value="{!listMenuItemData}" var="menu">

                    <apex:outputPanel layout="block" rendered="{!IF(menu.menuItemState=='C',true,false)}">
                        <li class="subNavSection completed">
                             <apex:form id="repeatFrm1" >
                                 <apex:commandLink action="{!executeButtonClick}" styleClass="button nextButton primary" reRender="repeatFrm1">
                                    <apex:param name="param1" assignTo="{!eventCode}" value="LeftNavClicked" />
                                    <apex:param name="param2" assignTo="{!leftNavPage}" value="{!menu.screen}" />
                                </apex:commandLink> 
                                <apex:outputText value="{!menu.menuItemDisplayText}" />
                            </apex:form>
                        </li>
                    </apex:outputPanel>
            </apex:repeat>
5
  • post the apex, and the link construct Commented May 1, 2013 at 16:48
  • I think this issue is coming because of using two forms.please provide VF page code to get better understanding of this issue .. Commented May 1, 2013 at 17:11
  • 3
    Two forms should work fine these days, I've only ever seen this message when trying to carry out an action on a page that's loaded in my browser but where my session has expired (overnight for example). Are you sure you didn't just log into another org on the same instance, and have this page open in another tab or something?
    – Matt Lacey
    Commented May 2, 2013 at 1:00
  • 1
    @LaceySnr The issue got resolved. I was missing the name attribute on the param tag and it was throwing me weird results. So bottom line is that i used one form and parameter name to resolve the issue. Commented May 2, 2013 at 19:56
  • Ah cool, add that as an answer, it could be of help to others!
    – Matt Lacey
    Commented May 3, 2013 at 0:10

1 Answer 1

1

Posted actual answer from comments :

I was missing the name attribute on the param tag and it was throwing me weird results. So bottom line is that i used one form and parameter name to resolve the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .