Occurs in Safari 3 and Firefox 2 on OS X 10.5. Haven't tried Windows.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
">
<html jwcid="@Shell" title="JumpStart" xmlns="http://www.w3.org/1999/xhtml
" xml:lang="en" lang="en"
stylesheet="ognl:stylesheet">
<body jwcid="@Body">
<form jwcid="@Form" clientValidationEnabled="true"
delegate="bean:validationDelegate" cancel="listener:doCancel">
Login Id:
<input jwcid="@TextField" value="ognl:user.loginId" size="15"
validators="validators:required, maxLength=15" displayName="Login Id"/>
<input type="submit" jwcid="@Submit" value="Save"
action="listener:doSave"/>
<input type="submit" jwcid="@Submit" value="Cancel"
submitType="cancel"/>
</form>
</body>
</html>
package jumpstart.web.pages.security;
import jumpstart.business.commons.exception.BusinessException;
import jumpstart.business.domain.security.User;
import
jumpstart.business.domain.security.iface.ISecurityManagerSvcLocal;
import jumpstart.web.pages.base.ProtectedBasePage;
import org.apache.tapestry.annotations.Persist;
public abstract class UserCreatePage extends ProtectedBasePage {
static public final String PAGE_NAME = "pages/security/UserCreatePage";
@Persist("client")
public abstract User getUser();
public abstract void setUser(User value);
public void activate() throws BusinessException {
User u = new User();
u.setActive(true);
setUser(u);
getRequestCycle().activate(this);
}
public void doSave() {
if (!hasErrors()) {
if (!hasErrors()) {
try {
ISecurityManagerSvcLocal manager =
getBusinessServicesLocator().getSecurityManagerSvcLocal();
// Create the User
User user = getUser();
manager.createUser(user, "password");
UserSearchPage nextPage = (UserSearchPage)
getRequestCycle().getPage(UserSearchPage.PAGE_NAME);
nextPage.activateAgain();
}
catch (Exception e) {
handleBusinessServicesExceptionForCreate(e);
}
}
}
}
public void doCancel() {
UserSearchPage nextPage = (UserSearchPage)
getRequestCycle().getPage(UserSearchPage.PAGE_NAME);
nextPage.activateAgain();
}
}
On cancel or save we return to a search screen containing:
public void activateAgain() {
if (getLastSearch() == null) {
// Don't call doResetSearch() because it would
// unnecessarily refresh the selection lists
setLastSearch(null);
setSearch(new UserSearchFields());
}
else {
UserSearchFields searchFields = getLastSearch();
doSearch(searchFields);
setSearch(searchFields);
setLastSearch(searchFields);
}
getRequestCycle().activate(this);
}
Cheers,
Geoff
On 10/03/2008, at 5:28 PM, Andreas Andreou wrote:
Is it an async form or not? How could i recreate this behavior?
browsers?
On Mon, Mar 10, 2008 at 5:54 AM, Heath Nielson <[EMAIL PROTECTED]
> wrote:
I'm behind in reading my email. I just updated from 4.1.3 to 4.1.5
and ran
into the same problem that you are describing. Are you still
having this
problem?
Heath
On Sat, Feb 23, 2008 at 08:52:03PM +1100, Geoff Callender wrote:
Surely someone else is experiencing this symptom in 4.1.5. No?
On 21/02/2008, at 8:24 AM, Geoff Callender wrote:
Is anyone else seeing this? In T4.1.5, I'm seeing all the client-
side validation errors momentarily displayed when I submit
cancel, eg.
<input type="submit" jwcid="@Submit" value="Cancel"
submitType="cancel"/>
I'm pretty sure this wasn't happening in 4.1.3.
Cheers,
Geoff
http://files.doublenegative.com.au/jumpstart
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]