tapestry

GET submits instead of POST ones. Tapestry

痴心易碎 提交于 2019-12-05 20:48:59
I've encountered this problem in tapestry 5.2 application: Forms require that the request method be POST and that the t:formdata query parameter have values. In access log, i found that sometimes there are form submits with GET method from different users. Though, according to docs, Tapestry 5 use post-redirect-get scheme. This page doesn't allow anonymous access, so it can't be robots. So i,m frustrated what can be the cause of such issue. Suggestions please. There is couple of selects, refreshed by Ajax, on the form. Edit 2. Such GET request came from users not bots, because there was

Tapestry 5.3.8 + Spring 4.0.5 小例子(一)

ε祈祈猫儿з 提交于 2019-12-05 08:39:37
1、创建一个Web项目(Crud),引入Tapestry 5.3.8 和 Spring 4.0.5 的jar文件。 2、WEB-INF下,创建Spring的配置文件“spring-service.xml”,数据库连接配置,JdbcTemplate的注入配置,以及项目中的使用的接口配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www

Which java web framework to use for google app engine development in 2012? [closed]

左心房为你撑大大i 提交于 2019-12-05 07:15:58
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . I am looking at developing simple java web-app to be deployed on GAE and learn about Java web development in the process. I am not inclined to use RIA component-based frameworks like Wicket and Vaadin. I have looked at Play 2.0, Tapestry 5 and Click, out of which Play 2.0

Video streaming to ipad does not work with Tapestry5

柔情痞子 提交于 2019-12-05 07:05:27
I want to stream a video to my IPad via the HTML5 video tag with tapestry5 (5.3.5) on the backend. Usually the serverside framework shouldn't even play a role in this but somehow it does. Anyway, hopefully someone here can help me out. Please keep in mind that my project is very much a prototype and that what I describe is simplified / reduced to the relevant parts. I would very much appreciate it if people didn't respond with the obligatory "you want to do the wrong thing" or security/performance nitpicks that aren't relevant to the problem. So here it goes: Setup I have a video taken from

第二十五讲:tapestry的loop组件

馋奶兔 提交于 2019-12-05 06:33:57
tapestry的loop组件,官方没有出分页组件,这里使用了PagedLoop分页组件,这个组件是chenillekit组件里的一个小组件,因不需要其它组件,这里就把PagedLoop组件单独提出来使用。实现从数据库中抓取每页所需的记录,而不是所有记录。下面先看下PagedLoop源码: PagedLoop.java /** * 项目名称:TapestryStart * 开发模式:Maven+Tapestry5.x+Tapestry-hibernate+Mysql * 网址: http://www.flywind.org * 版本:1.0 * 编写:飞风 * 时间:2012-02-29 */ package com.tapestry.app.components.pagedLoop; import org.apache.tapestry5.Block; import org.apache.tapestry5.ClientElement; import org.apache.tapestry5.ComponentResources; import org.apache.tapestry5.ValueEncoder; import org.apache.tapestry5.annotations.BeginRender; import org.apache.tapestry5

第二十一讲:tapestry的LinkSubmit等同于submit来使用

不问归期 提交于 2019-12-05 06:33:14
tapestry的LinkSubmit其实就等同于一个submit按钮,它的存在可使前端开发很容易的修改<a>样式,非常容易做出好的按钮样式。源码如下: LinkSubmits1.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.Component; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.corelib.components.Form; import org.apache.tapestry5.corelib.components.TextField; public class LinkSubmits1 { @Persist @Property private String firstName;

第十二讲:tapestry actionlink与eventlink组件

自古美人都是妖i 提交于 2019-12-05 06:31:28
actionlink与eventlink组件非常相似,都是执行一个事件,在代码编写上有一点点差异。源代码如下: MyEvent.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.PageActivationContext; import org.apache.tapestry5.annotations.Property; public class MyEvent { @Property @PageActivationContext private int count; //执行eventlink递增加+1,newCount就是默认值1 void onAdd(int newCount){ count += newCount; } //执行actionlink递增加+2,meCount就是默认值2 void onActionFromAddTwo(int meCount){ count += meCount;

tapestry using ajax

邮差的信 提交于 2019-12-05 06:31:15
请参看tapestry的官方文档,这里只是总结性的备忘录。 http://tapestry.apache.org/ajax-and-zones.html http://www.w3cschool.cc/jquery/jquery-dom-set.html 相关内容: t:zone组件: 决定ajax请求完成后,更新的区域。 触发ajax请求的方式: 1) 通过组件的的事件函数,返回局部更新的内容。 定义t:zone组件,组件参数 id 和 t:id 在下面的4个组件的事件处理方法中,返回更新的内容。component中添加zone属性,指向定义的t:zone组件。 EventLink ActionLink Select Form page.tml //------------------------ <t:actionlink t:id="someLink" zone="myzone">update</t:actionlink> <t:zone t:id="myZone" id="myzone"> The current time is ${currentTime} </t:zone> page.java //------------------------ Object onActionFromSomeLink() { return request.isXHR() ?

Tapestry 教程(三)创建应用程序的骨架

心不动则不痛 提交于 2019-12-05 06:30:58
首先创建一个空的应用程序。 Tapestry 提供了一个 Maven 原型( archetype ,一种项目模板)来简化操作。 针对本教程,我们使用了一个干净的 Eclipse 版本安装,还有一个位于 /users/joeuser/workspace 的工作空间( workspace )。对于其它的操作系统或者本地路径,你可以需要调整一些东西。 使用 Quichstart 原型 在 Eclipse 中,我们会使用一个 Maven 原型来创建 Tapestry 项目的骨架。 如果有防火墙或者代理,在执行 Maven 的下载之前,你可能需要在 Maven 的 settings.xml 文件(一般位于主目录的 .m2 子文件夹中, ~/m2 或者 C:\users\joeuser\.m2 )中配置一下你的代理设置。下面是一个示例: Settings.xml <settings> <proxies> <proxy> <active>true</active> <protocol>http</protocol> <host>myProxyServer.com</host> <port>8080</port> <username>joeuser</username> <password>myPassword</password> <nonProxyHosts></nonProxyHosts>

Tapestry loop through hashmap

大憨熊 提交于 2019-12-05 02:44:28
I'm trying to loop through a hashmap and display a number checkboxes with id the key of the hashmap and label the value of the hashmap. Anyone knows how the tapestry syntax for that is? Cheers Dimitris You should be able to loop through the key set like this: <form t:type="Form"> <t:Loop t:source="myMap.keySet()" t:value="currentKey"> <input type="Checkbox" t:type="Checkbox" t:id="checkbox" t:value="currentValue"/> <label t:type="Label" for="checkbox">${mapValue}</label> </t:Loop> </form> Class file: @Property private Object currentKey; @Persist private Set<String> selection = new HashSet