Apache Tapestry Interview Questions and Answers
Question: How should do page navigation in apache tapestry?Answer:Usage page properties: Page1.page <page-specification class="Welcome.Action"> <property name="success" value="Home" /> <property name="error" value="Error" /> </page-specification> Page2.page <page-specification class="Welcome.Action"> <property name="success" value="Home2" /> <property name="error" value="Error2" /> </page-specification> Welcome.Action.java public void submitListener(IRequestCycle cycle) { if (success) cycle.activate(getSpecification().getProperty("success")); if (error) cycle.activate(getSpecification().getProperty("error")); } So on success, it will be redirected to Home2 and on error it will be redirected to Error2 page. |
Is it helpful?
Yes
No
Most helpful rated by users:
- What is Apache Tapestry?
- Does Tapestry use JSP Tag libraries?
- How do I make a link popup a new window?
- How should do page navigation in apache tapestry?
- How to get a file from client input to server end in apache tapestry?