You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Heath Nielson <he...@twix.dnsalias.net> on 2008/03/10 04:54:01 UTC

Re: T4 "cancel" momentarily shows val errrors

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4 "cancel" momentarily shows val errrors

Posted by Heath Nielson <he...@twix.dnsalias.net>.
Awesome job!!!  Works great!

Heath

On Tue, Mar 11, 2008 at 11:45:23AM +0200, Andreas Andreou wrote:
> fixed in https://issues.apache.org/jira/browse/TAPESTRY-2225
> and thx for pointing out - you can grab 4.1.6-SNAPSHOT to verify
> 
> On Tue, Mar 11, 2008 at 4:44 AM, Heath Nielson <he...@twix.dnsalias.net> wrote:
> > I create a simple page with a form i.e.:
> >
> >  TestPage.html:
> >
> >  <form jwcid="@Form" delegate="bean:validationDelegate"
> >     success="listener:save" cancel="listener:cancel">
> >
> >     Value:<input jwcid="@TextField" displayName="Value"
> >        validators="validators:required"  value="ognl:value" />
> >     <p><input type="submit" value="Save" />
> >       <input jwcid="@Submit" submitType="cancel" value="Cancel" /></p>
> >  </form>
> >
> >  TestPage.java:
> >
> >  public abstract class TestPage extends BasePage {
> >
> >    private static Log log = LogFactory.getLog(TestPage.class);
> >    @Bean(ValidationDelegate.class)
> >    public abstract IValidationDelegate getValidationDelegate();
> >    @InjectObject("engine-service:page")
> >    public abstract IEngineService getPageService();
> >    public abstract String getValue();
> >
> >    public ILink save() {
> >       log.debug("save val: " + getValue());
> >       return getPageService().getLink(false, "Home");
> >    }
> >
> >    public ILink cancel() {
> >       log.debug("cancel");
> >       return getPageService().getLink(false, "Home");
> >    }
> >  }
> >
> >  If I click "Cancel" I get a validation failure for the field and the cancel
> >  listener never gets called.  If I enter a value and click "Cancel", the save()
> >  listener is called.  The cancel() listener is still not called.
> >
> >  This occurs w/Jetty-6.1.7 and FF2 although I can't believe this particular
> >  problem is browser dependent (unless I'm really misunderstanding how this
> >  should work).
> >
> >  If you have any other questions, let me know.
> >
> >
> >  Thanks a lot,
> >  Heath
> >
> >
> >
> >
> >  On Mon, Mar 10, 2008 at 08:28:23AM +0200, 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 <he...@twix.dnsalias.net> 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: users-unsubscribe@tapestry.apache.org
> >  > >  For additional commands, e-mail: users-help@tapestry.apache.org
> >  > >
> >  > >
> >  >
> >  >
> >  >
> >  > --
> >  > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> >  > Tapestry / Tacos developer
> >  > Open Source / JEE Consulting
> >  >
> >  > ---------------------------------------------------------------------
> >  > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >  > For additional commands, e-mail: users-help@tapestry.apache.org
> >  >
> >
> >  ---------------------------------------------------------------------
> >  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >  For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> 
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4 "cancel" momentarily shows val errrors

Posted by Andreas Andreou <an...@gmail.com>.
fixed in https://issues.apache.org/jira/browse/TAPESTRY-2225
and thx for pointing out - you can grab 4.1.6-SNAPSHOT to verify

On Tue, Mar 11, 2008 at 4:44 AM, Heath Nielson <he...@twix.dnsalias.net> wrote:
> I create a simple page with a form i.e.:
>
>  TestPage.html:
>
>  <form jwcid="@Form" delegate="bean:validationDelegate"
>     success="listener:save" cancel="listener:cancel">
>
>     Value:<input jwcid="@TextField" displayName="Value"
>        validators="validators:required"  value="ognl:value" />
>     <p><input type="submit" value="Save" />
>       <input jwcid="@Submit" submitType="cancel" value="Cancel" /></p>
>  </form>
>
>  TestPage.java:
>
>  public abstract class TestPage extends BasePage {
>
>    private static Log log = LogFactory.getLog(TestPage.class);
>    @Bean(ValidationDelegate.class)
>    public abstract IValidationDelegate getValidationDelegate();
>    @InjectObject("engine-service:page")
>    public abstract IEngineService getPageService();
>    public abstract String getValue();
>
>    public ILink save() {
>       log.debug("save val: " + getValue());
>       return getPageService().getLink(false, "Home");
>    }
>
>    public ILink cancel() {
>       log.debug("cancel");
>       return getPageService().getLink(false, "Home");
>    }
>  }
>
>  If I click "Cancel" I get a validation failure for the field and the cancel
>  listener never gets called.  If I enter a value and click "Cancel", the save()
>  listener is called.  The cancel() listener is still not called.
>
>  This occurs w/Jetty-6.1.7 and FF2 although I can't believe this particular
>  problem is browser dependent (unless I'm really misunderstanding how this
>  should work).
>
>  If you have any other questions, let me know.
>
>
>  Thanks a lot,
>  Heath
>
>
>
>
>  On Mon, Mar 10, 2008 at 08:28:23AM +0200, 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 <he...@twix.dnsalias.net> 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: users-unsubscribe@tapestry.apache.org
>  > >  For additional commands, e-mail: users-help@tapestry.apache.org
>  > >
>  > >
>  >
>  >
>  >
>  > --
>  > Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
>  > Tapestry / Tacos developer
>  > Open Source / JEE Consulting
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  > For additional commands, e-mail: users-help@tapestry.apache.org
>  >
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4 "cancel" momentarily shows val errrors

Posted by Heath Nielson <he...@twix.dnsalias.net>.
I create a simple page with a form i.e.:

TestPage.html:

<form jwcid="@Form" delegate="bean:validationDelegate"
    success="listener:save" cancel="listener:cancel">
    
    Value:<input jwcid="@TextField" displayName="Value"
       validators="validators:required"  value="ognl:value" />
    <p><input type="submit" value="Save" />
      <input jwcid="@Submit" submitType="cancel" value="Cancel" /></p>
</form>

TestPage.java:

public abstract class TestPage extends BasePage {

   private static Log log = LogFactory.getLog(TestPage.class);
   @Bean(ValidationDelegate.class)
   public abstract IValidationDelegate getValidationDelegate();
   @InjectObject("engine-service:page")
   public abstract IEngineService getPageService();
   public abstract String getValue();
	
   public ILink save() {
      log.debug("save val: " + getValue());
      return getPageService().getLink(false, "Home");
   }
	
   public ILink cancel() {
      log.debug("cancel");
      return getPageService().getLink(false, "Home");
   }
}

If I click "Cancel" I get a validation failure for the field and the cancel
listener never gets called.  If I enter a value and click "Cancel", the save()
listener is called.  The cancel() listener is still not called.

This occurs w/Jetty-6.1.7 and FF2 although I can't believe this particular
problem is browser dependent (unless I'm really misunderstanding how this
should work).

If you have any other questions, let me know.


Thanks a lot,
Heath


On Mon, Mar 10, 2008 at 08:28:23AM +0200, 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 <he...@twix.dnsalias.net> 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: users-unsubscribe@tapestry.apache.org
> >  For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
> 
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T4 "cancel" momentarily shows val errrors

Posted by Geoff Callender <ge...@gmail.com>.
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 <heath@twix.dnsalias.net 
> > 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: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> -- 
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


Re: T4 "cancel" momentarily shows val errrors

Posted by Andreas Andreou <an...@gmail.com>.
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 <he...@twix.dnsalias.net> 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: users-unsubscribe@tapestry.apache.org
>  For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org