You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by webtekie <we...@gmail.com> on 2005/04/14 15:47:21 UTC
question about Tapestry Bucket Brigade pattern
Sorry if these question is very simple, but I am new to whole Tapestry...
I asked about this before, but while implementing have some problems.
This is the method I have in my main class:
public void selectColor(IRequestCycle cycle){
String colors = getColorsList();
ColorsResult page = (ColorsResult)cycle.getPage("ColorsResult");
page.setColors(colors);
cycle.activate(page);
}
Then I describe ColorsResult:
package cc;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.event.PageRenderListener;
import org.apache.tapestry.html.BasePage;
public abstract class ColorsResult extends BasePage{
public abstract void setColors(String[] colors);
}
Now, I created ColorsResult.page:
<?xml version="1.0"?>
<!DOCTYPE page-specification PUBLIC
"-//Apache Software Foundation//Tapestry Specification 3.0//EN"
"http://jakatra.apache.org/tapestry/dtd/Tapestr_3_0.dtd">
<page-specification class="cc.ColorResult">
<property-specification name="colors" type="java.lang.String"/>
</page-specification>
But when I compile my main class with method selectColor(), I get error:
Color.java:36: error: Type `ColorsResult' not found in the declaration of
the local variable `page'.
ColorsResult page = (ColorsResult)cycle.getPage("ColorsResult");
What am I doing wrong?
thanks,
webtekie