Hi,
I am new to Tapestry & have written a very simple application which takes input the first page & echoes it on the next page. I am attaching all the files for the application. I think that I am doing some basic thing wrong. Please help.
Thanks,
Aejaz
The error which I get in the Browser is,
Name: com.primix.tapestry.RequestCycleException
Message: Unable to resolve property Name of tutorial.formTest.Home@3bbafc[null].
component: tutorial.formTest.Home@3bbafc[null]
Name: com.primix.tapestry.BindingException
Message: Unable to resolve property Name of tutorial.formTest.Home@3bbafc[null].
binding: PropertyBinding[null Name]
Name: com.primix.tapestry.util.prop.MissingPropertyException
Message: Class tutorial.formTest.Home does not implement a Name property.
instance: tutorial.formTest.Home@3bbafc[null]
propertyName: Name
propertyPath: Name
rootObject: tutorial.formTest.Home@3bbafc[null]
Trace:
--------------formTest.application-----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Howard Ship//Tapestry Specification 1.1//EN"
"http://tapestry.sf.net/dtd/Tapestry_1_1.dtd">
<application name="FormTest" engine-class="com.primix.tapestry.engine.SimpleEngine">
<page name="Home" specification-path="/tutorial/formTest/Home.jwc"/>
<page name="Values" specification-path="/tutorial/formTest/Values.jwc"/>
</application>
-------------------formTestServlet.java-----------------------------
package tutorial.formTest;
import com.primix.tapestry.*;
public class formTestServlet extends ApplicationServlet
{
protected String getApplicationSpecificationPath()
{
return "/tutorial/formTest/formTest.application";
}
}
-----------------------------Home.html-----------------------
<html>
<head>
<title>FormTest</title>
</head>
<body>
<form jwcid="form">
<b>Name:</b>
<input jwcid="inputName" type="text" />
<br><br>
<input type="submit" value="Submit">
</form>
</body>
--------------------------------Home.java------------------------
package tutorial.formTest ;
import com.primix.tapestry.*;
public class Home extends BasePage {
private String Name ;
public String getName()
{
return Name;
}
public void setName(String value){
Name = value;
}
public void submit(IRequestCycle cycle){
cycle.setPage("Values");
}
public void detach()
{
Name = null;
super.detach();
}
}
---------------------Home.jwc---------------------
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: Home.jwc,v 1.5 2001/07/09 15:20:10 hship Exp $ -->
<!DOCTYPE specification PUBLIC "-//Howard Ship//Tapestry Specification 1.1//EN" "http://tapestry.sf.net/dtd/Tapestry_1_1.dtd">
<specification class="tutorial.formTest.Home">
<component id="form" type="Form">
<binding name="listener" property-path="listeners.submit"/>
</component>
<component id="inputName" type="TextField">
<binding name="value" property-path="Name"/>
</component>
</specification>
------------------------Values.html--------------------
<html>
<head>
<title>FormTest Output</title>
</head>
<body>
<b>Name:</b>
<b><span jwcid="insertName">TestName</span></b>
<br><br>
</body>
---------------Values.java------------------------
package tutorial.formTest;
import java.util.*;
import com.primix.tapestry.*;
public class Values extends BasePage
{
}
------------------------Values.jwc----------------
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: Home.jwc,v 1.4 2001/05/22 15:24:16 hship Exp $ -->
<!DOCTYPE specification PUBLIC "-//Howard Ship//Tapestry Specification 1.1//EN" "http://tapestry.sf.net/dtd/Tapestry_1_1.dtd">
<specification class="tutorial.formTest.Values">
<component id="insertName" type="Insert">
<binding name="value" property-path="Home.Name"/>
</component>
</specification>
I am little bit confused about 'name' property in the binding, what is it supposed to refer to ?
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
