RE: T5 ajax zones example

2008-06-10 Thread Blower, Andy
Yeah, this is all fixed now in 5.0.13. Plus the AjaxFormLoop and issue I was 
having with the select box doing a resort and updating a zone!

I'm pretty happy, except I'm stuck in meetings in the US all week and not doing 
Tapestry dev... ho hum.

Good work Howard.

Andy

 -Original Message-
 From: Filip S. Adamsen [mailto:[EMAIL PROTECTED]
 Sent: 06 June 2008 14:08
 To: Tapestry users
 Subject: Re: T5 ajax zones example

 Howard is on it. See https://issues.apache.org/jira/browse/TAPESTRY-
 2341.

 -Filip

 On 2008-06-06 16:07, james cai wrote:
  I have the same problem using T5.0.12.Who can fix this?
 
  thanks.
 
 
 
  Sabine K. wrote:
  Hi,
 
  this works perfect with the Firefox. With the Internet Explorer it
 gives
  by triggering the submit button, the link works:
 
  org.apache.tapestry.runtime.ComponentEventException
  A component event handler method returned the value
  [EMAIL PROTECTED] Return
 type
  org.apache.tapestry.internal.structure.BlockImpl can not be handled.
  Configured return types are java.lang.Class, java.lang.String,
  java.net.URL, org.apache.tapestry.Link,
  org.apache.tapestry.StreamResponse,
 org.apache.tapestry.runtime.Component.
 
  Any idea?
 
 
 
  Ted Steen wrote:
  This is a simple example showing ajax with and without forms.
  Hope it helps!
 
  --Test.tml--
  html
 xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  headtitleAjax test/title/head
  body
  t:block t:id=someBlock
  Boring block
  /t:block
 
  t:block t:id=dynamicBlock
  fun dynamic block!
  br /
  date on server ${date}
  br /
  message: ${message}
  /t:block
 
  t:actionlink t:id=theLink t:zone=zoneToUpdateclick
  me!/t:actionlink
 
  t:form t:id=theForm t:zone=zoneToUpdate
  t:textfield t:value=message /
  br /
  t:submit /
  /t:form
 
  hr/
 
  t:zone t:id=zoneToUpdate
  Content before update
  /t:zone
 
  /body
  /html
 
  --Test.java--
  public class Test
  {
  @Inject
  private Block someBlock;
  @Inject
  private Block dynamicBlock;
 
  @Property
  private String message;
 
  public String getDate()
  {
  return new Date().toString();
  }
 
  @OnEvent(component=theLink, value=action)
  private Block actionFromTheLink()
  {
  return someBlock;
  }
 
  @OnEvent(component=theForm, value=success)
  private Block successFromTheForm()
  {
  return dynamicBlock;
  }
  }
 
 
  2008/3/11, Janko Muzykant [EMAIL PROTECTED]:
 
  Tapestry's page mentions about zones and update-divs but i'm not
 able to
  find
  even one example how to use them. is there anyone who successfully
 tried
  to
  use these features?
 
  cheers,
  m.
 
 
  --
  View this message in context:
  http://www.nabble.com/T5-ajax-zones-example-
 tp15991696p15991696.html
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  --
 ---
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  --
  /ted
 
 
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ajax zones example

2008-06-06 Thread james cai

I have the same problem using T5.0.12.Who can fix this?

thanks.



Sabine K. wrote:
 
 Hi, 
 
 this works perfect with the Firefox. With the Internet Explorer it gives
 by triggering the submit button, the link works:
 
 org.apache.tapestry.runtime.ComponentEventException
 A component event handler method returned the value
 [EMAIL PROTECTED] Return type
 org.apache.tapestry.internal.structure.BlockImpl can not be handled.
 Configured return types are java.lang.Class, java.lang.String,
 java.net.URL, org.apache.tapestry.Link,
 org.apache.tapestry.StreamResponse, org.apache.tapestry.runtime.Component.
 
 Any idea?
 
 
 
 Ted Steen wrote:
 
 This is a simple example showing ajax with and without forms.
 Hope it helps!
 
 --Test.tml--
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 headtitleAjax test/title/head
 body
 t:block t:id=someBlock
 Boring block
 /t:block
 
 t:block t:id=dynamicBlock
 fun dynamic block!
 br /
 date on server ${date}
 br /
 message: ${message}
 /t:block
 
 t:actionlink t:id=theLink t:zone=zoneToUpdateclick
 me!/t:actionlink
 
 t:form t:id=theForm t:zone=zoneToUpdate
 t:textfield t:value=message /
 br /
 t:submit /
 /t:form
 
 hr/
 
 t:zone t:id=zoneToUpdate
 Content before update
 /t:zone
 
 /body
 /html
 
 --Test.java--
 public class Test
 {
 @Inject
 private Block someBlock;
 @Inject
 private Block dynamicBlock;
 
 @Property
 private String message;
 
 public String getDate()
 {
 return new Date().toString();
 }
 
 @OnEvent(component=theLink, value=action)
 private Block actionFromTheLink()
 {
 return someBlock;
 }
 
 @OnEvent(component=theForm, value=success)
 private Block successFromTheForm()
 {
 return dynamicBlock;
 }
 }
 
 
 2008/3/11, Janko Muzykant [EMAIL PROTECTED]:


 Tapestry's page mentions about zones and update-divs but i'm not able to
 find
 even one example how to use them. is there anyone who successfully tried
 to
 use these features?

 cheers,
 m.


 --
 View this message in context:
 http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -- 
 /ted
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/T5-ajax-zones-example-tp15991696p17693047.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ajax zones example

2008-03-12 Thread Sabine K.

Hi, 

this works perfect with the Firefox. With the Internet Explorer it gives by
triggering the submit button, the link works:

org.apache.tapestry.runtime.ComponentEventException
A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
org.apache.tapestry.runtime.Component.

Any idea?



Ted Steen wrote:
 
 This is a simple example showing ajax with and without forms.
 Hope it helps!
 
 --Test.tml--
 html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
 headtitleAjax test/title/head
 body
 t:block t:id=someBlock
 Boring block
 /t:block
 
 t:block t:id=dynamicBlock
 fun dynamic block!
 br /
 date on server ${date}
 br /
 message: ${message}
 /t:block
 
 t:actionlink t:id=theLink t:zone=zoneToUpdateclick
 me!/t:actionlink
 
 t:form t:id=theForm t:zone=zoneToUpdate
 t:textfield t:value=message /
 br /
 t:submit /
 /t:form
 
 hr/
 
 t:zone t:id=zoneToUpdate
 Content before update
 /t:zone
 
 /body
 /html
 
 --Test.java--
 public class Test
 {
 @Inject
 private Block someBlock;
 @Inject
 private Block dynamicBlock;
 
 @Property
 private String message;
 
 public String getDate()
 {
 return new Date().toString();
 }
 
 @OnEvent(component=theLink, value=action)
 private Block actionFromTheLink()
 {
 return someBlock;
 }
 
 @OnEvent(component=theForm, value=success)
 private Block successFromTheForm()
 {
 return dynamicBlock;
 }
 }
 
 
 2008/3/11, Janko Muzykant [EMAIL PROTECTED]:


 Tapestry's page mentions about zones and update-divs but i'm not able to
 find
 even one example how to use them. is there anyone who successfully tried
 to
 use these features?

 cheers,
 m.


 --
 View this message in context:
 http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -- 
 /ted
 
 

-- 
View this message in context: 
http://www.nabble.com/T5-ajax-zones-example-tp15991696p16000137.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ajax zones example

2008-03-12 Thread Ted Steen
This example only works with 5.0.11.
I tried it with Internet Explorer just now and I see that the ajax form is
submitted and the form is updated (correct), but the click event appears to
go all the way to IE and the form is also submitted by IE. This is wrong,
and it is the cause for the ComponentEventException you get.
This is a bug.
So ajax with forms ( =my example) only works with gecko-based browser at the
moment.

2008/3/12, Sabine K. [EMAIL PROTECTED]:


 Hi,

 this works perfect with the Firefox. With the Internet Explorer it gives
 by
 triggering the submit button, the link works:


 org.apache.tapestry.runtime.ComponentEventException
 A component event handler method returned the value
 [EMAIL PROTECTED] Return type
 org.apache.tapestry.internal.structure.BlockImpl can not be handled.
 Configured return types are java.lang.Class, java.lang.String,
 java.net.URL,
 org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
 org.apache.tapestry.runtime.Component.

 Any idea?



 Ted Steen wrote:
 
  This is a simple example showing ajax with and without forms.
  Hope it helps!
 
  --Test.tml--
  html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
  headtitleAjax test/title/head
  body
  t:block t:id=someBlock
  Boring block
  /t:block
 
  t:block t:id=dynamicBlock
  fun dynamic block!
  br /
  date on server ${date}
  br /
  message: ${message}
  /t:block
 
  t:actionlink t:id=theLink t:zone=zoneToUpdateclick
  me!/t:actionlink
 
  t:form t:id=theForm t:zone=zoneToUpdate
  t:textfield t:value=message /
  br /
  t:submit /
  /t:form
 
  hr/
 
  t:zone t:id=zoneToUpdate
  Content before update
  /t:zone
 
  /body
  /html
 
  --Test.java--
  public class Test
  {
  @Inject
  private Block someBlock;
  @Inject
  private Block dynamicBlock;
 
  @Property
  private String message;
 
  public String getDate()
  {
  return new Date().toString();
  }
 
  @OnEvent(component=theLink, value=action)
  private Block actionFromTheLink()
  {
  return someBlock;
  }
 
  @OnEvent(component=theForm, value=success)
  private Block successFromTheForm()
  {
  return dynamicBlock;
  }
  }
 
 
  2008/3/11, Janko Muzykant [EMAIL PROTECTED]:
 
 
  Tapestry's page mentions about zones and update-divs but i'm not able
 to
  find
  even one example how to use them. is there anyone who successfully
 tried
  to
  use these features?
 
  cheers,
  m.
 
 
  --
  View this message in context:
  http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.html
  Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  /ted
 
 

 --
 View this message in context:
 http://www.nabble.com/T5-ajax-zones-example-tp15991696p16000137.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
/ted


Re: T5 ajax zones example

2008-03-12 Thread Stephane Decleire
I've got the same error in Firefox (v2.0.0.12) when triggering the 
button ... :-(


Stephane

Sabine K. a écrit :
Hi, 


this works perfect with the Firefox. With the Internet Explorer it gives by
triggering the submit button, the link works:

org.apache.tapestry.runtime.ComponentEventException
A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String, java.net.URL,
org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
org.apache.tapestry.runtime.Component.

Any idea?



Ted Steen wrote:
  

This is a simple example showing ajax with and without forms.
Hope it helps!

--Test.tml--
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
headtitleAjax test/title/head
body
t:block t:id=someBlock
Boring block
/t:block

t:block t:id=dynamicBlock
fun dynamic block!
br /
date on server ${date}
br /
message: ${message}
/t:block

t:actionlink t:id=theLink t:zone=zoneToUpdateclick
me!/t:actionlink

t:form t:id=theForm t:zone=zoneToUpdate
t:textfield t:value=message /
br /
t:submit /
/t:form

hr/

t:zone t:id=zoneToUpdate
Content before update
/t:zone

/body
/html

--Test.java--
public class Test
{
@Inject
private Block someBlock;
@Inject
private Block dynamicBlock;

@Property
private String message;

public String getDate()
{
return new Date().toString();
}

@OnEvent(component=theLink, value=action)
private Block actionFromTheLink()
{
return someBlock;
}

@OnEvent(component=theForm, value=success)
private Block successFromTheForm()
{
return dynamicBlock;
}
}


2008/3/11, Janko Muzykant [EMAIL PROTECTED]:


Tapestry's page mentions about zones and update-divs but i'm not able to
find
even one example how to use them. is there anyone who successfully tried
to
use these features?

cheers,
m.


--
View this message in context:
http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

--
/ted





  


Re: T5 ajax zones example

2008-03-12 Thread Stephane Decleire

It doesn't work on Firefox for me ...
And i don't think the error returned deals with the client.

Ted Steen a écrit :

This example only works with 5.0.11.
I tried it with Internet Explorer just now and I see that the ajax form is
submitted and the form is updated (correct), but the click event appears to
go all the way to IE and the form is also submitted by IE. This is wrong,
and it is the cause for the ComponentEventException you get.
This is a bug.
So ajax with forms ( =my example) only works with gecko-based browser at the
moment.

2008/3/12, Sabine K. [EMAIL PROTECTED]:
  

Hi,

this works perfect with the Firefox. With the Internet Explorer it gives
by
triggering the submit button, the link works:


org.apache.tapestry.runtime.ComponentEventException
A component event handler method returned the value
[EMAIL PROTECTED] Return type
org.apache.tapestry.internal.structure.BlockImpl can not be handled.
Configured return types are java.lang.Class, java.lang.String,
java.net.URL,
org.apache.tapestry.Link, org.apache.tapestry.StreamResponse,
org.apache.tapestry.runtime.Component.

Any idea?



Ted Steen wrote:


This is a simple example showing ajax with and without forms.
Hope it helps!

--Test.tml--
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
headtitleAjax test/title/head
body
t:block t:id=someBlock
Boring block
/t:block

t:block t:id=dynamicBlock
fun dynamic block!
br /
date on server ${date}
br /
message: ${message}
/t:block

t:actionlink t:id=theLink t:zone=zoneToUpdateclick
me!/t:actionlink

t:form t:id=theForm t:zone=zoneToUpdate
t:textfield t:value=message /
br /
t:submit /
/t:form

hr/

t:zone t:id=zoneToUpdate
Content before update
/t:zone

/body
/html

--Test.java--
public class Test
{
@Inject
private Block someBlock;
@Inject
private Block dynamicBlock;

@Property
private String message;

public String getDate()
{
return new Date().toString();
}

@OnEvent(component=theLink, value=action)
private Block actionFromTheLink()
{
return someBlock;
}

@OnEvent(component=theForm, value=success)
private Block successFromTheForm()
{
return dynamicBlock;
}
}


2008/3/11, Janko Muzykant [EMAIL PROTECTED]:
  

Tapestry's page mentions about zones and update-divs but i'm not able


to


find
even one example how to use them. is there anyone who successfully


tried


to
use these features?

cheers,
m.


--
View this message in context:
http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
/ted


  

--
View this message in context:
http://www.nabble.com/T5-ajax-zones-example-tp15991696p16000137.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


T5 ajax zones example

2008-03-11 Thread Janko Muzykant

Tapestry's page mentions about zones and update-divs but i'm not able to find
even one example how to use them. is there anyone who successfully tried to
use these features?

cheers,
m.

-- 
View this message in context: 
http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ajax zones example

2008-03-11 Thread Ted Steen
This is a simple example showing ajax with and without forms.
Hope it helps!

--Test.tml--
html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd;
headtitleAjax test/title/head
body
t:block t:id=someBlock
Boring block
/t:block

t:block t:id=dynamicBlock
fun dynamic block!
br /
date on server ${date}
br /
message: ${message}
/t:block

t:actionlink t:id=theLink t:zone=zoneToUpdateclick
me!/t:actionlink

t:form t:id=theForm t:zone=zoneToUpdate
t:textfield t:value=message /
br /
t:submit /
/t:form

hr/

t:zone t:id=zoneToUpdate
Content before update
/t:zone

/body
/html

--Test.java--
public class Test
{
@Inject
private Block someBlock;
@Inject
private Block dynamicBlock;

@Property
private String message;

public String getDate()
{
return new Date().toString();
}

@OnEvent(component=theLink, value=action)
private Block actionFromTheLink()
{
return someBlock;
}

@OnEvent(component=theForm, value=success)
private Block successFromTheForm()
{
return dynamicBlock;
}
}


2008/3/11, Janko Muzykant [EMAIL PROTECTED]:


 Tapestry's page mentions about zones and update-divs but i'm not able to
 find
 even one example how to use them. is there anyone who successfully tried
 to
 use these features?

 cheers,
 m.


 --
 View this message in context:
 http://www.nabble.com/T5-ajax-zones-example-tp15991696p15991696.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
/ted


Re: T5 ajax zones example

2008-03-11 Thread Janko Muzykant

thanks Ted!
that helped me a lot. one additional question. is it possible to mark as
'zone-to-update' something different than a form element? a simple div for
example?



Ted Steen wrote:
 
 This is a simple example showing ajax with and without forms.
 Hope it helps!
 
 cut
 -- 
 /ted
 
 

-- 
View this message in context: 
http://www.nabble.com/T5-ajax-zones-example-tp15991696p15993669.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: T5 ajax zones example

2008-03-11 Thread Ted Steen
I'm not sure that I understand what you mean?
The zone is replaced by a div (I think) and then the content of that div is
updated with the return values from the event handlers.


2008/3/11, Janko Muzykant [EMAIL PROTECTED]:


 thanks Ted!
 that helped me a lot. one additional question. is it possible to mark as
 'zone-to-update' something different than a form element? a simple div for
 example?




 Ted Steen wrote:
 
  This is a simple example showing ajax with and without forms.
  Hope it helps!
 

  cut
  --
  /ted
 
 


 --
 View this message in context:
 http://www.nabble.com/T5-ajax-zones-example-tp15991696p15993669.html

 Sent from the Tapestry - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
/ted


Re: T5 ajax zones example

2008-03-11 Thread Mark W. Shead

On Mar 11, 2008, at 8:00 PM, Weisu wrote:

Hi Ted, I had tried your example, but I can not make the form part  
to work,

it only displays Content before update. I am using T5.0.10.


I am using 5.0.11, but I had to change:

   @OnEvent(component=theForm, value=success)

to

   @OnEvent(component=theForm, value=action)

The link worked before the change.  It was just the form that said  
undefined.


Mark

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]