RE: Question of form zone

2008-05-16 Thread Partogi, Joshua
Hi Josh,

How do we enable it to be XHR?

Best regards,

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Josh Canfield
Sent: Thursday, May 15, 2008 12:40 AM
To: Tapestry users
Subject: Re: Question of form zone


I would guess that you are not getting the AJAX handler invoked and it's
rendering the whole page, in which case returning the block would be
innapprpriate. What browser are you using?

Try injecting the Request object and testing isXHR().

Josh

IMPORTANT NOTICE: 
The information in this email (and any attachments) is confidential. If you are 
not the intended recipient, you must not use or disseminate the information. If 
you have received this email in error, please immediately notify me by "Reply" 
command and permanently delete the original and any copies or printouts 
thereof.  Although this email and any attachments are believed to be free of 
any virus or other defect that might affect any computer system into which it 
is received and opened, it is the responsibility of the recipient to ensure 
that it is virus free and no responsibility is accepted by American 
International Group, Inc. or its subsidiaries or affiliates either jointly or 
severally, for any loss or damage arising in any way from its use.

Re: Question of form zone

2008-05-14 Thread amebaliu

Hi, Josh,

Thanks for your help, the browser I am using is ff3. I will try the way you
suggested. thanks a lot.


joshcanfield wrote:
> 
> I would guess that you are not getting the AJAX handler invoked and it's
> rendering the whole page, in which case returning the block would be
> innapprpriate. What browser are you using?
> 
> Try injecting the Request object and testing isXHR().
> 
> Josh
> 
> On Wed, May 14, 2008 at 3:50 AM, amebaliu <[EMAIL PROTECTED]> wrote:
> 
>>
>> Hi, I think I really confused this time. I searched some post about the
>> form
>> zone and just try to test it.
>>
>> My tml code is below:
>> 
>>  Content before update
>>  
>>
>> 
>> today's task ${task}
>> 
>>
>> 
>>   
>> > class="enter-todo">Enter a to-do item
>>   
>> > class="task-textarea enter-todo">> t:value="task"  />
>>   
>> > class="enter-todo">Who's responsible?
>>   
>> > class="enter-todo">
>>
>>
>>
>>User 1
>>
>>User 2
>>
>>
>>
>>  
>>
>>  
>> 
>>
>> and in page class
>>
>>@Inject
>>private Block dynamicBlock;
>>
>>Block onSuccessFromAddTasksForm()
>>{
>>return dynamicBlock;
>>}
>>
>>
>>
>> after i click the submit button, I got the exception:
>> 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.
>>
>> I've test the zone with ActionLink, and it's working fine.. anything
>> wrong
>> for my codes caused the error , or is the form onSuccess Handler can not
>> return block object??
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Question-of-form-zone-tp17228290p17228290.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]
>>
>>
> 
> 
> -- 
> --
> TheDailyTube.com. Sign up and get the best new videos on the internet
> delivered fresh to your inbox.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-of-form-zone-tp17228290p17241715.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: Question of form zone

2008-05-14 Thread Josh Canfield
I would guess that you are not getting the AJAX handler invoked and it's
rendering the whole page, in which case returning the block would be
innapprpriate. What browser are you using?

Try injecting the Request object and testing isXHR().

Josh

On Wed, May 14, 2008 at 3:50 AM, amebaliu <[EMAIL PROTECTED]> wrote:

>
> Hi, I think I really confused this time. I searched some post about the
> form
> zone and just try to test it.
>
> My tml code is below:
> 
>  Content before update
>  
>
> 
> today's task ${task}
> 
>
> 
> class="enter-todo">Enter a to-do item
> class="task-textarea enter-todo"> t:value="task"  />
> class="enter-todo">Who's responsible?
> class="enter-todo">
>
>
>
>User 1
>
>User 2
>
>
>
>  
>
>  
> 
>
> and in page class
>
>@Inject
>private Block dynamicBlock;
>
>Block onSuccessFromAddTasksForm()
>{
>return dynamicBlock;
>}
>
>
>
> after i click the submit button, I got the exception:
> 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.
>
> I've test the zone with ActionLink, and it's working fine.. anything wrong
> for my codes caused the error , or is the form onSuccess Handler can not
> return block object??
>
> --
> View this message in context:
> http://www.nabble.com/Question-of-form-zone-tp17228290p17228290.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]
>
>


-- 
--
TheDailyTube.com. Sign up and get the best new videos on the internet
delivered fresh to your inbox.