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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]