Hi,
Thanks for the code. I noticed that most of your component classes extend ERXStatelessComponent
Another stab in the dark, but try temporarily changing those to ERXComponent, and see if it helps.
By the way, if you do use stateless components, you should implement the reset() method, that sets all your variables back to null, so the next guy that uses that component has a clean slate.
Let me know if that works.
Thanks,
Mark
On 11 Aug 2009, at 18:44, Francesco Romano wrote: To test I commented out the redirect binding, so that is not a problem.
Just a summery: If I do the login without having a session, and then I add some products, everything works. (no more sessions are created). If I add some product (so create a session without a user) and then I try the login there is the problem.
About the ajax container.. the first session (add a product ) is created in this way:
ShowProduct page: addToCart link: addToCart: WOHyperlink { string = "Aggiungi al carrello"; actionClass = "DirectAction"; directActionName = "addToCart"; ?product = product.prodID; }
public WOActionResults addToCartAction() { //return boolean.. if false.. what to do?? if (((Session)session()).addProductToCart((String) request().formValueForKey("product"))) return pageWithName(ShowCart.class); else return null; }
So.. there is no Ajax container here... but.. the ShowCart page has some ajax container..
I attach the entire project.. so you can have all the java.. (...something is in italian, something in english..) (I can't attach.. I put a link to it) On 11/ago/09, at 16:11, Mark Gowdy wrote: This is unlikely, but... Is there any chance that the session is being generated during an Ajax call? And that it is updating a container within the page, while the login stuff might not be in that container?
Mark
On 11 Aug 2009, at 11:47, Francesco Romano wrote: On 11/ago/09, at 11:55, Mark Gowdy wrote:You didn't provide me with all of (2)
I need: The URL that generated the login page. (I want to see if it contains session information) Rendered HTML source from the browser (all of it - if possible)
Also what happens if you remove the '?redirect = redirectTo' bindings?
I would expect the link to the doLogin to be something like: Mark On 10 Aug 2009, at 19:03, Mark Gowdy wrote: 2) And can you show us the rendered html source from the browser and the URL that got you to that login page.
Yeah... this is because I didn't understand what I should provide you...The login page can be called from different pages (that because of that redirectTo binding), but I'll show you the URL generated by the ShowAccount link put in the PageWrapper component.
This is the URL if I don't have any session: And this is the one if I have the session, but no user is associated with it:
Aug 11 12:42:24 PNStore[5100] INFO er.extensions.appserver.ERXApplication - false <- hasSession() Aug 11 12:42:24 PNStore[5100] INFO er.extensions.appserver.ERXApplication - Created Session pdMZptwvvSouWp644CBBYM Aug 11 12:42:24 PNStore[5100] INFO er.extensions.appserver.ERXApplication - true <- hasSession()
This is the HTML generated for the loginPage:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<!-- <script type="text/_javascript_" src=""></script>
<script type="text/_javascript_" src=""></script> -->
<title>PortoNapoleone Store - Login</title>
<link rel="stylesheet" type="text/css" href=""></link>
</head>
<body>
<div id="header">
<div id="logo">
<img alt="Logo" src="" width="226" height="99" />
</div>
<div class="separationbar"></div>
<div id="navigation">
<ul>
<li><a href="">Store Home</a></li>
<li> | </li>
<li><a href=""http://www.portonapoleone.com">http://www.portonapoleone.com">Site Home</a></li>
<li> | </li>
<li><a href="">Account</a></li>
<li> | </li>
<li><a href="">Il carrello</a></li>
</ul>
</div>
<div id = "ajaxCartConteiner" style = "display:none;">
</div>
<div class="separationbar"></div>
</div>
<div>
<div>
</div>
<div>
<h4>login</h4>
<form name="loginForm" method="post" action="">
<table>
<tr><td>Username:</td><td><input type="text" name="username" /></td></tr>
<tr><td>Password:</td><td><input type="password" name="password" /></td></tr>
<tr><td></td><td><input type="submit" value="Submit" name="Login/doLogin" /><input type="hidden" name="WOSubmitAction" value="Login/doLogin" /></td></tr>
</table>
</form>
</div>
<div>
<h4><a href="">registrati</a></h4>
</div>
</div>
<div id="footer">
<p id="left">P.IVA 00127230993</p>
<p>PortoNapoleone · Santa Margherita Ligure</p>
</div>
</body>
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|