What Am I Doing Wrong??

"Adam Greene" <[email protected]>
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <001101c29667$c06752f0$6b8fb3cf@adam>
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.
problem.zip (application/x-zip-compressed, 3.3 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.