Hello, im new to Tapestry but have used Cocoon and Struts previously, for the last 2
moths i have been trying to find the time to
read some o Tapestry to understant the framework.
I made a small app to test page link based on the page on PageLink in the reference
doc, i get one error when trying the
binding (Using Tapestry 2.4-A-3):
<binding name="source" expression="[EMAIL PROTECTED]"/>
<!--
<binding name="source" expression="mail.MailEngine.NAVIGATION_PAGES"/>
<field-binding name="source" field-name="mail.MailEngine.NAVIGATION_PAGES"/>
<binding name="source" expression='engine.NAVIGATION_PAGES'/>
-->
And noe of the the obter comment binding�s work�s.
Where is the code.
Start
MailEngine.application----------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application
PUBLIC "-//Howard Lewis Ship//Tapestry Specification 1.3//EN"
"http://tapestry.sf.net/dtd/Tapestry_1_3.dtd">
<!-- generated by Spindle, http://spindle.sourceforge.net -->
<application name="MailEngine" engine-class="net.sf.tapestry.engine.SimpleEngine" >
<page name="Compose" specification-path="/mail/pages/Compose.page"/>
<page name="Contacts" specification-path="/mail/pages/Contacts.page"/>
<page name="Help" specification-path="/mail/pages/Help.page"/>
<page name="Home" specification-path="/mail/pages/Home.page"/>
<page name="Inbox" specification-path="/mail/pages/Inbox.page"/>
<page name="Logout" specification-path="/mail/pages/Logout.page"/>
<page name="Options" specification-path="/mail/pages/Options.page"/>
<page name="Sent" specification-path="/mail/pages/Sent.page"/>
</application>
--------------------------------------------------------------------------------------------------------End
MailEngine.application
Ok i was sleepy when i tried this yesterday i seen now that i the engine-class attr it
should be mail.MailEngine
Start
MailEngine.java----------------------------------------------------------------------------------------------------------
package mail;
import java.io.Serializable;
import net.sf.tapestry.ApplicationServlet;
public class MailEngine extends ApplicationServlet implements Serializable {
public static final String[] NAVIGATION_PAGES =
{"Home","Inbox","Sent","Compose","Contacts","Options","Help","Logout" };
protected String getApplicationSpecificationPath() {
return "/mail/MailEngine.application";
}
}
--------------------------------------------------------------------------------------------------------End
MailEngine.java
Start
Home.page----------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE page-specification
PUBLIC "-//Howard Lewis Ship//Tapestry Specification 1.3//EN"
"http://tapestry.sf.net/dtd/Tapestry_1_3.dtd">
<!-- generated by Spindle, http://spindle.sourceforge.net -->
<page-specification class="mail.pages.Home">
<component id="foreachNavigationPage" type="Foreach">
<binding name="source" expression="[EMAIL PROTECTED]"/>
<!--
<binding name="source" expression="mail.MailEngine.NAVIGATION_PAGES"/>
<field-binding name="source" field-name="mail.MailEngine.NAVIGATION_PAGES"/>
<binding name="source" expression='engine.NAVIGATION_PAGES'/>
-->
<binding name="value" expression='navigationPage'/>
</component>
<component id="navigationPageLink" type="PageLink">
<binding name="disabled" expression='! visit.authenticated'/>
<binding name="page" expression='navigationPage'/>
</component>
</page-specification>
--------------------------------------------------------------------------------------------------------End
Home.page
Start
Home.java----------------------------------------------------------------------------------------------------------
package mail.pages;
import mail.*;
/**
* @author oscar
*
*/
public class Home extends MailPage {
}
--------------------------------------------------------------------------------------------------------End
Home.java
Start MailPage
.java----------------------------------------------------------------------------------------------------------
package mail;
import net.sf.tapestry.html.BasePage;
public class MailPage extends BasePage {
private String navigationPage;
public String getNavigationPage() {
return navigationPage;
}
public void setNavigationPage(String value) {
navigationPage = value;
}
public void detach() {
navigationPage = null;
super.detach();
}
}
--------------------------------------------------------------------------------------------------------End
MailPage .java
Maybe i should change i the Home.page the attr class to mail.MailPage
I�m very excited about Tapestry because it realy was a compoment model arquitecture
and the other framework�s i have
tryied don�t have this. I would like to work with a framework were i can create
compoments and from project to project reuse tham
and improvo tham, im a continous line the better time to mark. And Tapestry seems to
have this
King regards, Oscar
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Tapestry-developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/tapestry-developer