...
Code Block | ||
---|---|---|
| ||
package orgcom.apache.tapestry5example.tutorial.pages.address; import orgcom.apacheexample.tapestry5tutorial.annotationsentities.InjectPageAddress; import orgcom.apacheexample.tapestry5tutorial.annotationspages.PropertyIndex; import org.apache.tapestry5.hibernate.annotations.CommitAfterInjectPage; import org.apache.tapestry5.ioc.annotations.InjectProperty; import org.apache.tapestry5.tutorialhibernate.entitiesannotations.AddressCommitAfter; import org.apache.tapestry5.tutorialioc.pagesannotations.IndexInject; import org.hibernate.Session; public class CreateAddress { @Property private Address address; @Inject private Session session; @InjectPage private Index index; @CommitAfter Object onSuccess() { session.persist(address); return index; } } |
...
Code Block | ||
---|---|---|
| ||
@Inject private Session session; public List<Address> getAddresses() { return session.createCriteria(Address.class).list(); } |
...
We have lots more to talk about: more components, more customizations, built-in Ajax support, more common design and implementation patterns, and even writing your own components (which is easy!).
More tutorials are planned, but for now check Check out the other many Tapestry resources available on the Tapestry 5 Documentation page page, including the Getting Started and FAQ pages and the Cookbook Recipies. Be sure to peruse the User Guide, which provides comprehensive details on nearly every Tapestry topic.
Wiki Markup |
---|
{scrollbar} |