tapestry

HibernateEntityValueEncoder NullPointerException

三世轮回 提交于 2020-01-06 12:45:49
问题 I'm using a CRUD framework called Tynamo, which in turn relies on Apache Tapestry and Hibernate. This all works fine, except for when I try to use it for CRUD on a table with a composite/compound primary key. I've decided not to go the @EmbeddedId route, since it seems to not work at all with the framework. That being said, I have been using the @IdClass method, which is mostly working; I think I'm a line or two of code away from success. The issue is that when it starts using reflection to

Accessing uploaded file in Apache Tapestry page

扶醉桌前 提交于 2020-01-05 03:06:07
问题 I'm using Apache Tapestry v5.3.7 and I already use the normal Tapestry upload component in a form. For a better user experience I try now to integrate Dropzone.js in a normal Tapestry page without any form. The JavaScript integration works fine. The uploaded file data are transferred to my server with a post request and I can access the request with all of its parameters. My question is now how can I access the binary data of the uploaded file (maybe as InputStream) to save them in my system?

Modifying FormInjector context information in Tapestry 5 dynamically

折月煮酒 提交于 2020-01-02 09:26:08
问题 My current problem regards updating context information dynamically in FormInjector , my previous question Updating a zone inside a form in Tapestry 5 probably contains useful background information. I added the following in my template. <div t:type="FormInjector" t:id="injector" t:context="item.id"/> And the following in my component class. @OnEvent(component = "injector") Block loadItemFields(String id) { item = itemRepository.find(id); return itemFieldsBlock; } Everything is working fine,

Video streaming to ipad does not work with Tapestry5

女生的网名这么多〃 提交于 2020-01-02 02:43:06
问题 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

how to create a composite primary key hibernate JPA?

不打扰是莪最后的温柔 提交于 2019-12-29 08:19:27
问题 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

error tapestry using data gridsource 2

萝らか妹 提交于 2019-12-25 18:24:53
问题 Continuing tutorial I have came across an error. previous problem seems to be fixed. tutorial says: To make use of the created CelebritySource, add the following method to the ShowAll page class: public GridDataSource getCelebritySource() { return new CelebritySource(dataSource); } Then change the source parameter of the Grid component in ShowAll.tml template: <t:grid t:source="celebritySource" rowsPerPage="5" row="celebrity" t:model="model"> Run the application. Log in to view the ShowAll

Tapestry IoC constructor and injection

会有一股神秘感。 提交于 2019-12-25 14:46:45
问题 I have the following class: public class MyClass { @Inject private MyAnotherClass myAnotherClass; public MyClass() { //Perform operations on myAnotherClass. } } I need to do some things in constructor which require an instance of myAnotherClass . Unfortunately myAnotherClass is injected after code in constructor is ran, which means I am performing operations on null ... I could of course instantiate it the classic way ( MyAnotherClass myAnotherClass = new MyAnotherClass() ) directly in

How to change domain for my assets in tapestry

给你一囗甜甜゛ 提交于 2019-12-24 21:18:02
问题 By default; the domain of all assets( js, css) is fixed which is the current domain. In order to improve the speed of website; we want to retrieve all assets using subdomain assets.example.com instead of example.com. I checked http://tapestry.apache.org/assets.html ; where for "New domains" it is specified as If you wish to create new domains for assets, for example to allow assets to be stored on the file system or in a database, you may define a new AssetFactory and contribute it to the

How to load files/properties from WEB-INF directory?

别等时光非礼了梦想. 提交于 2019-12-24 17:48:50
问题 It seems that in my Tapestry app, I can't load ini files nor properties file from WEB-INF directory or class path. I tried several different methods which should load my file but non of them worked. ex realm.setResourcePath("/WEB-INF/auth.properties"); ex realm.setResourcePath("classpath:wip/pages/auth.properties"); I need to load properties/ini file in order to use tapestry-security module which is based on Shiro. Thanks for help ! 回答1: The root of the classpath is the way to go. Put your

Tapestry 4: Asset Cache Control?

我的未来我决定 提交于 2019-12-23 17:43:23
问题 I use Tapestry 4, and whenever we push a release that changes any assets (image, style sheet, JS library), we get problems because users still have the old version of the asset in their browser cache. I'd like to set up some easy way to allow caching, but force a new asset download when we update the application. Simply disallowing caching entirely for assets is not an acceptable solution. I couldn't see any existing mechanism for doing this, but I was figuring that there might be some way to