tapestry

Tapestry + REST

半城伤御伤魂 提交于 2019-12-05 01:41:33
I want to add REST to my tapestry project, and so need to know how to implement it. What is the better way ? thx. [Edit, copied from answer:] I have to add GET, PUT, POST and DELETE services to my tapestry application. I see that Tapestry has RESTful url but what about JAX-RS and annotations? Henning You could use the Restlet API or any other JAX-RS implementation that can run as a servlet. To have the web service co-exist nicely with Tapestry, there is one thing you have to configure in your Tapestry application module : /** * Keep Tapestry from processing requests to the web service path. *

Mixins in Tapestry5

一个人想着一个人 提交于 2019-12-04 20:47:08
I'm new to Tapestry5, but because of an internship I need to work with it. Currently I am trying to build a mixin to integrate a CSRF token ( explanation here ) to any form. Is it even possible to achieve this in a mixin? If yes, could I access functions that the mixin offers from the page? I am really not sure about how mixins really work and I'm having big difficulties on finding information about how to create one. Can somebody explain how to create a mixin and if what I'm trying to do is even possible? Thanks a lot! You might find that the HMAC message authentication introduced in tapestry

Tapestry 5 - Dynamically generate URL of file in web app context folder in Java code

依然范特西╮ 提交于 2019-12-04 14:20:31
I am displaying a static image asset inside a component, and I don't know until runtime what that image should be, so I need to dynamically generate the URL. These images all live in webapp/images/ The documentation I found is not very clear on how to handle this usecase, but after playing around I figured out I can construct the URL dynamically in the component template like so: <img src="${context:img/score/overall}/${imageFilename}" /> Then put the logic for which image to display in the component class file: public String getImageFilename() { // decide which image to display and return the

Java Server Faces 2.0 or Tapestry 5.2? [closed]

回眸只為那壹抹淺笑 提交于 2019-12-04 12:00:24
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Are there any up to date articles comparing JSF 2 and Tap 5? Everything I seem to find is comparing JSF 1.2 and Tap4. Does anyone have

Should I choose Apache Click or Tapestry 5?

半城伤御伤魂 提交于 2019-12-04 10:15:32
I am to decide whether to use Apache Click or Apache Tapestry 5 framework. Which one I should choose? I'm looking for a framwork that I could use for building Java EE web applications for the next few years. The next few days I'll be testing them both running sample and custom projects, but I'd like to know in advance if one of them is not stable or big enough for large scale enterprise applications. I need it to work without any difficulties with Maven, various AJAX and Eclipse. Thank you in advance, StackOverflow comunity :) Well, thanks Dragan. I think the essential question is are you

Tapestry 5.3.8 中文乱码解决办法

最后都变了- 提交于 2019-12-04 08:50:21
1、 遇到的 Bug :字节的 UTF-8 序列的字节 3 无效 Bug 描述:在 tml 文件中出现汉字时,有时奇数会报错,有时偶数会报错。我用的版本是 Tapestry 5.3.8 。 Bug 信息如图所示: 出现原因:查资料可能是 Tapestry 版本问题, 5.3 以上的版本可能出现这个问题。 解决办法:手动修改源码内容,步骤如下所示 1 ):下载源码 Tapestry 5.3.8 (下载路径: http://tapestry.apache.org/download.html ),找到包“ apache-tapestry-5.3.8-sources\tapestry-core\src\main\java\org\apache\tapestry5\internal\services ”下的“ XMLTokenStream.java ”文件 2 ):用这行代码替换 348 行 InputStreamReader rawReader = new InputStreamReader(rawStream, "UTF-8"); 3 ):用这行代码替换 532 行 PrintWriter writer = new PrintWriter(new OutputStreamWriter(bos, "UTF-8")); 4 ):在项目 src 包下创建包“ org.apache

第二十四讲:tapestry的grid组件

荒凉一梦 提交于 2019-12-04 06:29:50
tapestry的grid组件,具体实现方法看源码吧,之前的教程也有讲到,这次配合数据库操作使用,实体Person.java在第二十三讲中已经贴出来了,这里就不贴了,其他源码如下: PersonCreate.java /** * 项目名称:TapestryStart * 开发模式:Maven+Tapestry5.x+Tapestry-hibernate+Mysql * 网址: http://www.flywind.org * 版本:1.0 * 编写:飞风 * 时间:2012-02-29 */ package com.tapestry.app.pages.crud; import java.util.Date; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.ioc.annotations.Inject; import com.tapestry.app.entities.Person; import com.tapestry.app.services.StartDAO; public class PersonCreate { @Property private Person person; //导入服务接口 @Inject private StartDAO dao; /

第二十讲:tapestry多表单(forms)

不想你离开。 提交于 2019-12-04 06:28:58
源码如下: MultipleForms1.java /** * 项目名称:TapestryStart * 开发模式:Maven+Tapestry5.x+Tapestry-hibernate+Mysql * 网址: http://www.flywind.org * 版本:1.0 * 编写:飞风 * 时间:2012-02-29 */ package com.tapestry.app.pages; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.Property; import com.tapestry.app.pages.MultipleForms2.SearchType; public class MultipleForms1 { @Property private String customerName; @Property private String supplierName; @InjectPage private MultipleForms2 page2; void onPrepareFromSearchCustomers() { //可初始化Customers表单元素 } void onPrepareFromSearchSuppliers

第三十三讲:tapestry Ajax eventlink无刷新页面

女生的网名这么多〃 提交于 2019-12-04 06:27:58
tapestry的Ajax使用非常简单,Ajax的页面无刷新,刚好解决了eventlink、actionlink等组件无刷新,这点在js应用中非常的强大。下面就于eventlink组件为例。源码如下: AJAXEventLink.java /** * 项目名称:TapestryStart * 开发模式:Maven+Tapestry5.x+Tapestry-hibernate+Mysql * 网址: http://www.flywind.org * 版本:1.0 * 编写:飞风 * 时间:2012-02-29 */ package com.tapestry.app.pages; import java.util.Date; import org.apache.tapestry5.annotations.InjectComponent; import org.apache.tapestry5.corelib.components.Zone; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.services.Request; public class AJAXEventLink { @Inject private Request request;

Tapestry 教程(四)探索项目结构

孤人 提交于 2019-12-04 06:26:59
项目的格局遵循的是 Maven 倡导的一个很合适的标准: l Java 源代码文件放在 src/main/java 下面 l Web 应用程序文件放在 src/main/webapp (包括 src/main/webapp/WEB-INF ) l Java 测试资源放在 src/test/java 下面 l 非代码资源(包括 Tapestry 页面和组件模板)放在 src/main/resources 和 src/test/resources 下面 让我们来看看 Maven 根据原型创建了写什么,先从 web.xml 配置文件开始: src/main/webapp/WEB-INF/web.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <display-name>tutorial1 Tapestry 5 Application</display-name> <context-param> <!-- The only significant configuration for