I am trying to create a SecurePage class that will protect parts of my site and in this class I have the following code to redirect to the Login page:
 

ILogInPage page = (ILogInPage) cycle.getPage(visit.getLogInPage());

page.setReturnURL(makeURL(request));

throw new PageRedirectException(page);

There is a function called makeURL that sets the full URL to return to (so that it gets all parameters).

Within the Login page I have the following:

public void setReturnURL(String URL) {

returnURL = URL;

if (!getRequestCycle().isRewinding()) {

fireObservedChange("returnURL", returnURL);

}

}

Now, the problem is that on the Login page is a form that takes the user name and password and if they enter the wrong password the first time, it simply redisplays the page, if they then try to re-enter the user name and password, and resubmit. I get this error:

Page recorder for page Login is locked after a commit(), but received a change to property returnURL of component Login.

Any ideas??  The source code is attached.

Attachment: problem.zip
Description: Zip compressed data

Reply via email to