You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Shing Hing Man <ma...@yahoo.com> on 2007/02/08 16:33:52 UTC

Tapestry 4.1.2 Snapshot:Problem with async Form

I have a Form component with parameter async=true, and
a plain html
submit button to submit the form. 
The Form parameter updateComponents is set to the id
of a piece of html code
that display  a value entered in the form.
When I click the submit button, the form is submitted
asynchronously. 
But the piece of html specified in the updateComponent
is not updated.
A debug message says  
WARNING: 15:11:46: No ajax-response elements recieved.

But in FireBug, I get the expected response :


<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
[

<!ENTITY nbsp '&#160;'>

]>

<ajax-response><response id="output"
type="element"><div id="output">

	   <div>

                Your have entered : Holmer <br>

	   </div>	           

	</div></response></ajax-response>

===================
My Tapestry page is given below. Any help would be 
very much appreciated.

Shing 

==================
Java class : 

public abstract class TestAjaxForm extends BasePage{
    private static Logger log =
Logger.getLogger(TestAjaxForm.class);
	
	
    public  abstract String getFirstName();
	
	public abstract void setFirstName(String str);


	public void formSubmit(IRequestCycle cycle){
		log.info("formSubmit: " + getFirstName());
		
	}
}

===============
TestAjaxForm.page :

  

<?xml version="1.0"?>
<!DOCTYPE page-specification PUBLIC
  "-//Apache Software Foundation//Tapestry
Specification 4.0//EN" 
 
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">


<page-specification
class="man.pages.ajaxform.TestAjaxForm"> 
   
    <component id="form" type="Form" >
        <binding name="listener"
value="listener:formSubmit" />        
		<binding name="updateComponents"
value="ognl:{'output'}" />		
		<binding name="clientValidationEnabled"
value="ognl:true"/>
       <binding name="async" value="ognl:true"/>
    </component>
    
	<component id="firstNameLabel" type="FieldLabel">
		    <binding name="field"
value="component:firstNameTF"/> 
		   
	</component>
	
	<component id="firstNameTF" type="TextField">
		<binding name="displayName" value="literal:First
Name"/>
        <binding name="validators"
value="validators:required" />
		<binding name="value" value="ognl:firstName"/>
	</component>
	
  
</page-specification>

===============
TestAjaxForm.html :

<html>
<head jwcid="@Shell" 
	  title="TestAjaxForm" 
	  ajaxEnabled="true" 
	  browserLogLevel="DEBUG"
           debugEnabled="true"
           debugContainerId="literal:debugContainer" >
<title>TestAjaxForm</title>
 </head>
	
      
<body jwcid="@Body" >
	
	
	<form jwcid="form">
		
          <span jwcid="firstNameLabel">First
Name</span> 
          <INPUT jwcid="firstNameTF" type="text"
value=""/> <br>
         
		<INPUT   type="submit" value="Submit"/>
	</form>
	
    <div jwcid="@Any"  id="output">
	   <div jwcid="@If" condition="ognl:firstName !=
null" >
                Your have entered : <span
jwcid="@Insert" value="ognl:firstName"/> <br>
	   </div>	           
	</div>        
	<br/>
	 <a href="" jwcid="@PageLink"
page="literal:Home">Home</a>
</body>
      

Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html

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


Re: Tapestry 4.1.2 Snapshot:Problem with async Form

Posted by Andrea Chiumenti <ki...@gmail.com>.
:)

On 2/8/07, andyhot <an...@di.uoa.gr> wrote:
>
> it's the <br>
>
> try <br />
>
>
> Shing Hing Man wrote:
> > I have a Form component with parameter async=true, and
> > a plain html
> > submit button to submit the form.
> > The Form parameter updateComponents is set to the id
> > of a piece of html code
> > that display  a value entered in the form.
> > When I click the submit button, the form is submitted
> > asynchronously.
> > But the piece of html specified in the updateComponent
> > is not updated.
> > A debug message says
> > WARNING: 15:11:46: No ajax-response elements recieved.
> >
> > But in FireBug, I get the expected response :
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html
> > PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >
> >
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> > [
> >
> > <!ENTITY nbsp '&#160;'>
> >
> > ]>
> >
> > <ajax-response><response id="output"
> > type="element"><div id="output">
> >
> >          <div>
> >
> >                 Your have entered : Holmer <br>
> >
> >          </div>
> >
> >       </div></response></ajax-response>
> >
> > ===================
> > My Tapestry page is given below. Any help would be
> > very much appreciated.
> >
> > Shing
> >
> > ==================
> > Java class :
> >
> > public abstract class TestAjaxForm extends BasePage{
> >     private static Logger log =
> > Logger.getLogger(TestAjaxForm.class);
> >
> >
> >     public  abstract String getFirstName();
> >
> >       public abstract void setFirstName(String str);
> >
> >
> >       public void formSubmit(IRequestCycle cycle){
> >               log.info("formSubmit: " + getFirstName());
> >
> >       }
> > }
> >
> > ===============
> > TestAjaxForm.page :
> >
> >
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE page-specification PUBLIC
> >   "-//Apache Software Foundation//Tapestry
> > Specification 4.0//EN"
> >
> > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> >
> >
> > <page-specification
> > class="man.pages.ajaxform.TestAjaxForm">
> >
> >     <component id="form" type="Form" >
> >         <binding name="listener"
> > value="listener:formSubmit" />
> >               <binding name="updateComponents"
> > value="ognl:{'output'}" />
> >               <binding name="clientValidationEnabled"
> > value="ognl:true"/>
> >        <binding name="async" value="ognl:true"/>
> >     </component>
> >
> >       <component id="firstNameLabel" type="FieldLabel">
> >                   <binding name="field"
> > value="component:firstNameTF"/>
> >
> >       </component>
> >
> >       <component id="firstNameTF" type="TextField">
> >               <binding name="displayName" value="literal:First
> > Name"/>
> >         <binding name="validators"
> > value="validators:required" />
> >               <binding name="value" value="ognl:firstName"/>
> >       </component>
> >
> >
> > </page-specification>
> >
> > ===============
> > TestAjaxForm.html :
> >
> > <html>
> > <head jwcid="@Shell"
> >         title="TestAjaxForm"
> >         ajaxEnabled="true"
> >         browserLogLevel="DEBUG"
> >            debugEnabled="true"
> >            debugContainerId="literal:debugContainer" >
> > <title>TestAjaxForm</title>
> >  </head>
> >
> >
> > <body jwcid="@Body" >
> >
> >
> >       <form jwcid="form">
> >
> >           <span jwcid="firstNameLabel">First
> > Name</span>
> >           <INPUT jwcid="firstNameTF" type="text"
> > value=""/> <br>
> >
> >               <INPUT   type="submit" value="Submit"/>
> >       </form>
> >
> >     <div jwcid="@Any"  id="output">
> >          <div jwcid="@If" condition="ognl:firstName !=
> > null" >
> >                 Your have entered : <span
> > jwcid="@Insert" value="ognl:firstName"/> <br>
> >          </div>
> >       </div>
> >       <br/>
> >        <a href="" jwcid="@PageLink"
> > page="literal:Home">Home</a>
> > </body>
> >
> >
> > Home page :
> >   http://uk.geocities.com/matmsh/index.html
> >
> >
> >
> > ___________________________________________________________
> > Inbox full of unwanted email? Get leading protection and 1GB storage
> with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
> >
> > ---------------------------------------------------------------------
> > 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://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: Tapestry 4.1.2 Snapshot:Problem with async Form

Posted by Shing Hing Man <ma...@yahoo.com>.
It is the missing backslash ! 
Thanks!

Shing 


--- andyhot <an...@di.uoa.gr> wrote:

> it's the <br>
> 
> try <br />
> 
> 
> Shing Hing Man wrote:
> > I have a Form component with parameter async=true,
> and
> > a plain html
> > submit button to submit the form. 
> > The Form parameter updateComponents is set to the
> id
> > of a piece of html code
> > that display  a value entered in the form.
> > When I click the submit button, the form is
> submitted
> > asynchronously. 
> > But the piece of html specified in the
> updateComponent
> > is not updated.
> > A debug message says  
> > WARNING: 15:11:46: No ajax-response elements
> recieved.
> >
> > But in FireBug, I get the expected response :
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE
> html
> > PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >
> >
> >
>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> > [
> >
> > <!ENTITY nbsp ' '>
> >
> > ]>
> >
> > <ajax-response><response id="output"
> > type="element"><div id="output">
> >
> > 	   <div>
> >
> >                 Your have entered : Holmer <br>
> >
> > 	   </div>	           
> >
> > 	</div></response></ajax-response>
> >
> > ===================
> > My Tapestry page is given below. Any help would be
> 
> > very much appreciated.
> >
> > Shing 
> >
> > ==================
> > Java class : 
> >
> > public abstract class TestAjaxForm extends
> BasePage{
> >     private static Logger log =
> > Logger.getLogger(TestAjaxForm.class);
> > 	
> > 	
> >     public  abstract String getFirstName();
> > 	
> > 	public abstract void setFirstName(String str);
> >
> >
> > 	public void formSubmit(IRequestCycle cycle){
> > 		log.info("formSubmit: " + getFirstName());
> > 		
> > 	}
> > }
> >
> > ===============
> > TestAjaxForm.page :
> >
> >   
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE page-specification PUBLIC
> >   "-//Apache Software Foundation//Tapestry
> > Specification 4.0//EN" 
> >  
> >
>
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> >
> >
> > <page-specification
> > class="man.pages.ajaxform.TestAjaxForm"> 
> >    
> >     <component id="form" type="Form" >
> >         <binding name="listener"
> > value="listener:formSubmit" />        
> > 		<binding name="updateComponents"
> > value="ognl:{'output'}" />		
> > 		<binding name="clientValidationEnabled"
> > value="ognl:true"/>
> >        <binding name="async" value="ognl:true"/>
> >     </component>
> >     
> > 	<component id="firstNameLabel" type="FieldLabel">
> > 		    <binding name="field"
> > value="component:firstNameTF"/> 
> > 		   
> > 	</component>
> > 	
> > 	<component id="firstNameTF" type="TextField">
> > 		<binding name="displayName" value="literal:First
> > Name"/>
> >         <binding name="validators"
> > value="validators:required" />
> > 		<binding name="value" value="ognl:firstName"/>
> > 	</component>
> > 	
> >   
> > </page-specification>
> >
> > ===============
> > TestAjaxForm.html :
> >
> > <html>
> > <head jwcid="@Shell" 
> > 	  title="TestAjaxForm" 
> > 	  ajaxEnabled="true" 
> > 	  browserLogLevel="DEBUG"
> >            debugEnabled="true"
> >           
> debugContainerId="literal:debugContainer" >
> > <title>TestAjaxForm</title>
> >  </head>
> > 	
> >       
> > <body jwcid="@Body" >
> > 	
> > 	
> > 	<form jwcid="form">
> > 		
> >           <span jwcid="firstNameLabel">First
> > Name</span> 
> >           <INPUT jwcid="firstNameTF" type="text"
> > value=""/> <br>
> >          
> > 		<INPUT   type="submit" value="Submit"/>
> > 	</form>
> > 	
> >     <div jwcid="@Any"  id="output">
> > 	   <div jwcid="@If" condition="ognl:firstName !=
> > null" >
> >                 Your have entered : <span
> > jwcid="@Insert" value="ognl:firstName"/> <br>
> > 	   </div>	           
> > 	</div>        
> > 	<br/>
> > 	 <a href="" jwcid="@PageLink"
> > page="literal:Home">Home</a>
> > </body>
> >       
> >
> > Home page :
> >   http://uk.geocities.com/matmsh/index.html
> >
> >
> > 		
> >
>
___________________________________________________________
> 
> > Inbox full of unwanted email? Get leading
> protection and 1GB storage with All New Yahoo! Mail.
> http://uk.docs.yahoo.com/nowyoucan.html
> >
> >
>
---------------------------------------------------------------------
> > 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://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / J2EE Consulting 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail:
> users-help@tapestry.apache.org
> 
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
___________________________________________________________ 
Copy addresses and emails from any email account to Yahoo! Mail - quick, easy and free. http://uk.docs.yahoo.com/trueswitch2.html

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


Re: Tapestry 4.1.2 Snapshot:Problem with async Form

Posted by andyhot <an...@di.uoa.gr>.
it's the <br>

try <br />


Shing Hing Man wrote:
> I have a Form component with parameter async=true, and
> a plain html
> submit button to submit the form. 
> The Form parameter updateComponents is set to the id
> of a piece of html code
> that display  a value entered in the form.
> When I click the submit button, the form is submitted
> asynchronously. 
> But the piece of html specified in the updateComponent
> is not updated.
> A debug message says  
> WARNING: 15:11:46: No ajax-response elements recieved.
>
> But in FireBug, I get the expected response :
>
>
> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>
>
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> [
>
> <!ENTITY nbsp '&#160;'>
>
> ]>
>
> <ajax-response><response id="output"
> type="element"><div id="output">
>
> 	   <div>
>
>                 Your have entered : Holmer <br>
>
> 	   </div>	           
>
> 	</div></response></ajax-response>
>
> ===================
> My Tapestry page is given below. Any help would be 
> very much appreciated.
>
> Shing 
>
> ==================
> Java class : 
>
> public abstract class TestAjaxForm extends BasePage{
>     private static Logger log =
> Logger.getLogger(TestAjaxForm.class);
> 	
> 	
>     public  abstract String getFirstName();
> 	
> 	public abstract void setFirstName(String str);
>
>
> 	public void formSubmit(IRequestCycle cycle){
> 		log.info("formSubmit: " + getFirstName());
> 		
> 	}
> }
>
> ===============
> TestAjaxForm.page :
>
>   
>
> <?xml version="1.0"?>
> <!DOCTYPE page-specification PUBLIC
>   "-//Apache Software Foundation//Tapestry
> Specification 4.0//EN" 
>  
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
>
>
> <page-specification
> class="man.pages.ajaxform.TestAjaxForm"> 
>    
>     <component id="form" type="Form" >
>         <binding name="listener"
> value="listener:formSubmit" />        
> 		<binding name="updateComponents"
> value="ognl:{'output'}" />		
> 		<binding name="clientValidationEnabled"
> value="ognl:true"/>
>        <binding name="async" value="ognl:true"/>
>     </component>
>     
> 	<component id="firstNameLabel" type="FieldLabel">
> 		    <binding name="field"
> value="component:firstNameTF"/> 
> 		   
> 	</component>
> 	
> 	<component id="firstNameTF" type="TextField">
> 		<binding name="displayName" value="literal:First
> Name"/>
>         <binding name="validators"
> value="validators:required" />
> 		<binding name="value" value="ognl:firstName"/>
> 	</component>
> 	
>   
> </page-specification>
>
> ===============
> TestAjaxForm.html :
>
> <html>
> <head jwcid="@Shell" 
> 	  title="TestAjaxForm" 
> 	  ajaxEnabled="true" 
> 	  browserLogLevel="DEBUG"
>            debugEnabled="true"
>            debugContainerId="literal:debugContainer" >
> <title>TestAjaxForm</title>
>  </head>
> 	
>       
> <body jwcid="@Body" >
> 	
> 	
> 	<form jwcid="form">
> 		
>           <span jwcid="firstNameLabel">First
> Name</span> 
>           <INPUT jwcid="firstNameTF" type="text"
> value=""/> <br>
>          
> 		<INPUT   type="submit" value="Submit"/>
> 	</form>
> 	
>     <div jwcid="@Any"  id="output">
> 	   <div jwcid="@If" condition="ognl:firstName !=
> null" >
>                 Your have entered : <span
> jwcid="@Insert" value="ognl:firstName"/> <br>
> 	   </div>	           
> 	</div>        
> 	<br/>
> 	 <a href="" jwcid="@PageLink"
> page="literal:Home">Home</a>
> </body>
>       
>
> Home page :
>   http://uk.geocities.com/matmsh/index.html
>
>
> 		
> ___________________________________________________________ 
> Inbox full of unwanted email? Get leading protection and 1GB storage with All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
>
> ---------------------------------------------------------------------
> 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://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


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


Re: Tapestry 4.1.2 Snapshot:Problem with async Form

Posted by Shing Hing Man <ma...@yahoo.com>.
Thanks for the suggestion!
But @Submit (or  @Submit with async="ognl:true)
does not solve the problem.

Shing 



--- Andrea Chiumenti <ki...@gmail.com> wrote:

> hi,
> try replacing
> <INPUT   type="submit" value="Submit"/>
> with
> <input jwcid="@Submit"  type="submit"
> value="Submit"/>
> 
> ciao,
> kiuma
> 
> On 2/8/07, Shing Hing Man <ma...@yahoo.com> wrote:
> >
> > I have a Form component with parameter async=true,
> and
> > a plain html
> > submit button to submit the form.
> > The Form parameter updateComponents is set to the
> id
> > of a piece of html code
> > that display  a value entered in the form.
> > When I click the submit button, the form is
> submitted
> > asynchronously.
> > But the piece of html specified in the
> updateComponent
> > is not updated.
> > A debug message says
> > WARNING: 15:11:46: No ajax-response elements
> recieved.
> >
> > But in FireBug, I get the expected response :
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE
> html
> > PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >
> >
> >
>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> > [
> >
> > <!ENTITY nbsp ''>
> >
> > ]>
> >
> > <ajax-response><response id="output"
> > type="element"><div id="output">
> >
> >            <div>
> >
> >                 Your have entered : Holmer <br>
> >
> >            </div>
> >
> >         </div></response></ajax-response>
> >
> > ===================
> > My Tapestry page is given below. Any help would be
> > very much appreciated.
> >
> > Shing
> >
> > ==================
> > Java class :
> >
> > public abstract class TestAjaxForm extends
> BasePage{
> >     private static Logger log =
> > Logger.getLogger(TestAjaxForm.class);
> >
> >
> >     public  abstract String getFirstName();
> >
> >         public abstract void setFirstName(String
> str);
> >
> >
> >         public void formSubmit(IRequestCycle
> cycle){
> >                 log.info("formSubmit: " +
> getFirstName());
> >
> >         }
> > }
> >
> > ===============
> > TestAjaxForm.page :
> >
> >
> >
> > <?xml version="1.0"?>
> > <!DOCTYPE page-specification PUBLIC
> >   "-//Apache Software Foundation//Tapestry
> > Specification 4.0//EN"
> >
> >
>
"http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
> >
> >
> > <page-specification
> > class="man.pages.ajaxform.TestAjaxForm">
> >
> >     <component id="form" type="Form" >
> >         <binding name="listener"
> > value="listener:formSubmit" />
> >                 <binding name="updateComponents"
> > value="ognl:{'output'}" />
> >                 <binding
> name="clientValidationEnabled"
> > value="ognl:true"/>
> >        <binding name="async" value="ognl:true"/>
> >     </component>
> >
> >         <component id="firstNameLabel"
> type="FieldLabel">
> >                     <binding name="field"
> > value="component:firstNameTF"/>
> >
> >         </component>
> >
> >         <component id="firstNameTF"
> type="TextField">
> >                 <binding name="displayName"
> value="literal:First
> > Name"/>
> >         <binding name="validators"
> > value="validators:required" />
> >                 <binding name="value"
> value="ognl:firstName"/>
> >         </component>
> >
> >
> > </page-specification>
> >
> > ===============
> > TestAjaxForm.html :
> >
> > <html>
> > <head jwcid="@Shell"
> >           title="TestAjaxForm"
> >           ajaxEnabled="true"
> >           browserLogLevel="DEBUG"
> >            debugEnabled="true"
> >           
> debugContainerId="literal:debugContainer" >
> > <title>TestAjaxForm</title>
> > </head>
> >
> >
> > <body jwcid="@Body" >
> >
> >
> >         <form jwcid="form">
> >
> >           <span jwcid="firstNameLabel">First
> > Name</span>
> >           <INPUT jwcid="firstNameTF" type="text"
> > value=""/> <br>
> >
> >                 <INPUT   type="submit"
> value="Submit"/>
> >         </form>
> >
> >     <div jwcid="@Any"  id="output">
> >            <div jwcid="@If"
> condition="ognl:firstName !=
> > null" >
> >                 Your have entered : <span
> > jwcid="@Insert" value="ognl:firstName"/> <br>
> >            </div>
> >         </div>
> >         <br/>
> >          <a href="" jwcid="@PageLink"
> > page="literal:Home">Home</a>
> > </body>
> >
> >
> > Home page :
> >   http://uk.geocities.com/matmsh/index.html
> >
> >
> >
> >
>
___________________________________________________________
> > Inbox full of unwanted email? Get leading
> protection and 1GB storage with
> > All New Yahoo! Mail.
> http://uk.docs.yahoo.com/nowyoucan.html
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail:
> users-help@tapestry.apache.org
> >
> >
> 


Home page :
  http://uk.geocities.com/matmsh/index.html


		
____________________________________________________ 
 
Yahoo! Photos is now offering a quality print service from just 7p a photo. http://uk.photos.yahoo.com

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


Re: Tapestry 4.1.2 Snapshot:Problem with async Form

Posted by Andrea Chiumenti <ki...@gmail.com>.
hi,
try replacing
<INPUT   type="submit" value="Submit"/>
with
<input jwcid="@Submit"  type="submit" value="Submit"/>

ciao,
kiuma

On 2/8/07, Shing Hing Man <ma...@yahoo.com> wrote:
>
> I have a Form component with parameter async=true, and
> a plain html
> submit button to submit the form.
> The Form parameter updateComponents is set to the id
> of a piece of html code
> that display  a value entered in the form.
> When I click the submit button, the form is submitted
> asynchronously.
> But the piece of html specified in the updateComponent
> is not updated.
> A debug message says
> WARNING: 15:11:46: No ajax-response elements recieved.
>
> But in FireBug, I get the expected response :
>
>
> <?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>
>
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> [
>
> <!ENTITY nbsp ''>
>
> ]>
>
> <ajax-response><response id="output"
> type="element"><div id="output">
>
>            <div>
>
>                 Your have entered : Holmer <br>
>
>            </div>
>
>         </div></response></ajax-response>
>
> ===================
> My Tapestry page is given below. Any help would be
> very much appreciated.
>
> Shing
>
> ==================
> Java class :
>
> public abstract class TestAjaxForm extends BasePage{
>     private static Logger log =
> Logger.getLogger(TestAjaxForm.class);
>
>
>     public  abstract String getFirstName();
>
>         public abstract void setFirstName(String str);
>
>
>         public void formSubmit(IRequestCycle cycle){
>                 log.info("formSubmit: " + getFirstName());
>
>         }
> }
>
> ===============
> TestAjaxForm.page :
>
>
>
> <?xml version="1.0"?>
> <!DOCTYPE page-specification PUBLIC
>   "-//Apache Software Foundation//Tapestry
> Specification 4.0//EN"
>
> "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
>
>
> <page-specification
> class="man.pages.ajaxform.TestAjaxForm">
>
>     <component id="form" type="Form" >
>         <binding name="listener"
> value="listener:formSubmit" />
>                 <binding name="updateComponents"
> value="ognl:{'output'}" />
>                 <binding name="clientValidationEnabled"
> value="ognl:true"/>
>        <binding name="async" value="ognl:true"/>
>     </component>
>
>         <component id="firstNameLabel" type="FieldLabel">
>                     <binding name="field"
> value="component:firstNameTF"/>
>
>         </component>
>
>         <component id="firstNameTF" type="TextField">
>                 <binding name="displayName" value="literal:First
> Name"/>
>         <binding name="validators"
> value="validators:required" />
>                 <binding name="value" value="ognl:firstName"/>
>         </component>
>
>
> </page-specification>
>
> ===============
> TestAjaxForm.html :
>
> <html>
> <head jwcid="@Shell"
>           title="TestAjaxForm"
>           ajaxEnabled="true"
>           browserLogLevel="DEBUG"
>            debugEnabled="true"
>            debugContainerId="literal:debugContainer" >
> <title>TestAjaxForm</title>
> </head>
>
>
> <body jwcid="@Body" >
>
>
>         <form jwcid="form">
>
>           <span jwcid="firstNameLabel">First
> Name</span>
>           <INPUT jwcid="firstNameTF" type="text"
> value=""/> <br>
>
>                 <INPUT   type="submit" value="Submit"/>
>         </form>
>
>     <div jwcid="@Any"  id="output">
>            <div jwcid="@If" condition="ognl:firstName !=
> null" >
>                 Your have entered : <span
> jwcid="@Insert" value="ognl:firstName"/> <br>
>            </div>
>         </div>
>         <br/>
>          <a href="" jwcid="@PageLink"
> page="literal:Home">Home</a>
> </body>
>
>
> Home page :
>   http://uk.geocities.com/matmsh/index.html
>
>
>
> ___________________________________________________________
> Inbox full of unwanted email? Get leading protection and 1GB storage with
> All New Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>