tapestry

第三十一讲:tapestry的javaScript混合(mixins)统计点击数

老子叫甜甜 提交于 2019-12-01 19:17:34
源码如下: CreatingMixins1.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.Property; import org.apache.tapestry5.annotations.SessionState; import com.tapestry.app.entities.MyOrder; public class CreatingMixins1 { @SessionState @Property private MyOrder myOrder; void setupRender() { myOrder.setApplesQuantity(0); myOrder.setOrangesQuantity(0); myOrder.setBananasQuantity(0); } Object onSuccessFromPlainForm() { orderOneApple(); return

第十一讲:tapestry session存储

点点圈 提交于 2019-12-01 19:17:22
tapestry session通常有两种方式:persist与sso,persist方法虽然简单,但是过多的使用会增加了服务器的负担,同时其URL也无法被做为书签保存。sso被保存在Session中,可以被同一用户的所有页面共享,但不会被其他用户共享,通过@SessionState标记,做用户登录使用。源码如下: MyPersist.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.Persist; import org.apache.tapestry5.annotations.Property; public class MyPersist { //直接把hello存储到session @Persist @Property private String hello; } MyPersist.tml <html t:type="layout" title="tapestryStart Index" t

Updating a zone inside a form in Tapestry 5

纵然是瞬间 提交于 2019-11-30 22:16:53
I've got a Zone inside a Form , the Zone is updated with a block containing input fields which I would like to bind to the parent Form . Unfortunately this doesn't seem to work quite as easily as I hoped as I am greeted with the following error message. The Description component must be enclosed by a Form component. [at classpath:...Page.tml, line 100] A simplified version of the source .tml is below. <t:form t:id="editForm" t:context="item.id"> <table> <tr> <th>Name</th> <td><t:textField value="item.name"/></td> </tr> <t:block t:id="block"> <tr class="person"> <th>Description</th> <td><t

how to create a composite primary key hibernate JPA?

旧时模样 提交于 2019-11-29 12:28:05
i try to create composite primary key in table from 2 foreign key using hibernate JPA,but gives me error.I find some solution on net but nothing The relations between tables looks like this: Table Client clientID(PK) FirstName LastName . Table CarService serviceID(PK) DescriptionOfFailure . . Table ServiceDepartment clientID(PK) serviceID(PK) price . implementation of my code looks like this: @Entity public class ServiceDepartmentBean implements ServiceDepartmentI { @EmbeddedId private ServiceDepartmentPK serviceDepartmentPK = new ServiceDepartmentPK(); @Column(name="clientID", nullable=false,

Yui compressor StringIndexOutOfBoundsException on jboss

我的未来我决定 提交于 2019-11-28 20:48:54
When minimising yui with 2.4.6, I get this problem: java.lang.StringIndexOutOfBoundsException: String index out of range: 232 at java.lang.String.substring(String.java:1934) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceString(JavaScriptCompressor.java:267) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:330) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533) It works when started through my IDE but when deployed to jboss it doesn't. This place: http://yuilibrary.com/forum/viewtopic

Installing maven on windows 7 64bit

白昼怎懂夜的黑 提交于 2019-11-27 14:22:51
I want to create a Tapestry Skeletion Project. I follow to these guide: http://maven.apache.org/download.html#Installation , http://juanjoefe.com/tutoriales/instalar-maven-en-windows-7/ and other guides on the internet. But, when I type "mvn --version" or "mvn -version", I always receive error " mvn is not recognized as an internal or external command, operable program or batch file. My friends use Windows 7 x86, and they had no problem. How can I install Maven 3.0.3 on Windows 7 x64? thejartender navigate in explorer to the Maven directory go to a dir IN the bin copy the address in the

Yui compressor StringIndexOutOfBoundsException on jboss

淺唱寂寞╮ 提交于 2019-11-27 13:11:44
问题 When minimising yui with 2.4.6, I get this problem: java.lang.StringIndexOutOfBoundsException: String index out of range: 232 at java.lang.String.substring(String.java:1934) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSourceString(JavaScriptCompressor.java:267) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:330) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:533) It works when started