function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
mworld2mworld2 

Page fails to redirect on second request

I have an aggravating issue made all the more so because it's so simple:

 

I have built a page that makes a list of dates when it loads and loads the list into a Select List.  When the user selects a date from the list and clicks a button, the APEX code that executes redirects to the same page but this time with a query string parameter containing the date. When the page loads the second time it displays records for that date. Simple. And it works great. THE FIRST TIME. If I change the date using the SelectList and click the button again, there is some server action but the page does not change. What does change is that the back part of the URL (the part that used to contain my querystring parameter) now contains "core.apexpages.devmode.url=1". What the heck? I have tried all manner of ways to fix this and can't overcome it. I am not using any Javascript. This is purely VF and APEX. Nothing exotic. Same stuff I've done elsewhere. This is obviously not all the code butyou can see there is nothing exotic here. Any ideas?

 

 

    public pageReference retrieveTimeCard()
    {
        pageReference pr = new pageReference('/apex/Time_Card_Edit?startDate=' + StartDate);
        pr.setRedirect(true);
        return pr;
    }

<TABLE WIDTH="100%">
                    <TR>
                        <TD WIDTH="10%" ALIGN="right"><B>Week Start Date</B></TD>
                        <TD WIDTH="1%" ALIGN="right">&nbsp;</TD>
                        <TD WIDTH="19%" ALIGN="left">
                            <apex:selectList size="1" value="{!StartDate}">
                                <apex:selectOption itemValue="" itemLabel="--Select--"/>
                                <apex:selectOptions value="{!Sundays}"/>
                            </apex:selectList>
                        </TD>
                        <TD><apex:commandButton action="{!retrieveTimeCard}" value="Find Time-Card"/></TD>
                    </TR>
                </TABLE>

 

 

 

 

Pradeep_NavatarPradeep_Navatar

In my opinion you need to switch off the developer mode before testing the functionality. You can use "core.apexpages.devmode.url=1" to switch off the  developer mode .

 

Hope this helps.

mworld2mworld2

How do I turn off Developer mode? How do I use "core.apexpages.devmode.url=1" to do this? I checked my Personal settings and Devement Mode is not checked.

 

Mauricio