Hi -

 

This may or may not help.  If you are sure that your servlet is deployed properly, you may want to display your page differently.  I sometimes have Tapestry mask errors when I go to a page using a Direct component.  I placed into my footer a Page component and link directly to the page.  This way, my internal errors are displayed.

 

Dorothy

 

-----Original Message-----
From: Aejaz Muslim [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 06, 2002 11:02 AM
To: [EMAIL PROTECTED]
Subject: Re: [Tapestry-developer] Newbie question : Property not found Exception

 

Hi Howard,

I changed the properties from "name" to "namex" in Home.java, Home.jwc & from "name" to "namep" in Values.java & Values.html in addition to changing get/set methods to reflect these properties. I am adding my test application to tutorial.war & use the same environment to run it as the tutorial but I still get,

HTTP ERROR: 503 Service Unavailable
java.lang.IllegalArgumentException: First element of keys may not be null.
RequestURI=/tutorial/formTest

There is no Tapestry trace as the browser shows text above only. Do you have some idea on what may be going on.

Thanks,

Aejaz

 

  Aejaz Muslim <[EMAIL PROTECTED]> wrote:

Hi Richard,

Thanks for your reply. I read Howard's article "How do pages comunicate ?" & have changed my application based on that. Changing "Name" to "name" had given me the following exception(in the browser),

HTTP ERROR: 503 Service Unavailable
java.lang.IllegalArgumentException: First element of keys may not be null.
RequestURI=/tutorial/formTest

I have no clue of what is wrong. I am attaching the updated files. Please help.

Thanks a lot,

Aejaz

-------------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>

-----------------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){ 
  //Get values page
  Values value = (Values) cycle.getPage("Values") ;
  //Set Name
  value.setName(Name) ;
  cycle.setPage("Values");
 }
 public void detach()
 {
  Name = null;
  super.detach();
 }

}

-----------------------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" >

  </form>
</body>

------------------------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="name"/>
  </component>
</specification>

-----------------------Values.java-----------------------

package tutorial.formTest;

import java.util.*;
import com.primix.tapestry.*;

/**
 *  @version $Id: Home.java,v 1.6 2001/11/10
21:58:37 hship Exp $
 *  @author Howard Ship
 *
 */

public class Values extends BasePage
{
 private String name ;

 public String getName() {
  return name ;
 }

 public void setName(String value) {
  name = value ;
 }
}

------------------------Values.html----------------

<html>
<head>
  <title>FormTest Output</title>
</head>
 
<body>
    <b>Name:</b>
    <b><span jwcid="insertName">TestName</span></b>
    <br><br>

</body>

---------------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>   

  Richard Lewis-Shell <[EMAIL PROTECTED]> wrote:

Hi,

 

Your inputName component in Home.jwc should use the property-path "name", not "Name". ie. it should be like this:

<component id="inputName" type="TextField">
  <binding name="value" property-path="name"/>
</component>

In general, a get/set method combo like getAbcDef/setAbcDef results in a property name of "abcDef".

But to get this all to work you will also have to pass the 'name' from the Home page to the Values page.  There are a number of ways to do this - see this list's archives for more info (in particular, look for "FAQ").  Your bindings used by your insertName component on the Values page will need to be changed accordingly...

Richard

 


Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

 


Do You Yahoo!?
Yahoo! Health - your guide to health and wellness

Reply via email to