[SalesForce] Issue with command link on visual force pages

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>

Best Answer

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.

Related Topic