Tapestry + ETag headers

2024-10-04 Thread Christopher Dodunski (Tapestry)
Hello all, I’m exploring the possibility of adding ETag headers to images my Tapestry application is serving, to help improve performance on slower networks. It seems that Apache Server automatically adds ETag headers to images sourced from static files (Tapestry @Asset), but not when Tapest

Re: RequireJS timeout error

2024-09-17 Thread Christopher Dodunski (Tapestry)
Conclusion: The callback mechanism for modifying RequireJS's configuration on the go seems to have done the trick. I was able to disable RequireJS's default 7 second timeout. Not being entirely sure of when in the page's lifecycle the JS gets sent and the timeout clock starts ticking, I mad

Re: RequireJS timeout error

2024-09-17 Thread Christopher Dodunski (Tapestry)
Hi Ben, Thank you for those suggestions. In my case, RequireJS is pulling a remote JavaScript library as per the @Import annotation (below) on the pages’s class, so not a local jQuery module. The issue seems to arise when a user expands/refreshes a particular zone containing a large number o

RequireJS timeout error

2024-09-16 Thread Christopher Dodunski (Tapestry)
Hi team, Starting with version 5.4, Tapestry uses RequireJS modules internally, and provides support for using RequireJS modules in our own Tapestry applications. I'm wondering whether there is a mechanism in place for configuring RequireJS from my AppModule? On networks with slow internet

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-13 Thread Christopher Dodunski (Tapestry)
Hi Ben, Your "educated guess" proved to be entirely correct! I added the below method to my RegistryProxy class, and calling it from the @OnMessage annotated method of the WebSocket server endpoint ensures Hibernate sessions get closed on completion and associated DB connections are released

Re: Tapestry-hibernate module seemingly leaking connections

2024-06-11 Thread Christopher Dodunski (Tapestry)
Hi Ben, Thank you for those helpful suggestions! You're right... debugging is tricky given the large number of moving parts. 😊 I've made some progress since last writing. By activating "hibernate.c3p0.debugUnreturnedConnectionStackTraces" within my Hibernate configuration I've been able to

Tapestry-hibernate module seemingly leaking connections

2024-06-04 Thread Christopher Dodunski (Tapestry)
Hi, My application's DAO class is employing an injected Hibernate Session for accessing a MySQL DB. Connection pooling is provided by C3PO. My understanding is that the Tapestry Hibernate IoC (per thread) service takes care of closing DB connections under the hood, releasing them back to th

Re: Illegal char <<> at index 18: StreamableResource

2024-05-20 Thread Christopher Dodunski (Tapestry)
Thank you Ben, also for detailing a workaround. Glad to hear you are on the matter. The web application I upgraded isn't particularly busy and I've opted to disable minification, as below, until a permanent fix is in place, possibly version 5.8.7. configuration.override(SymbolConstants.M

Illegal char <<> at index 18: StreamableResource

2024-05-20 Thread Christopher Dodunski (Tapestry)
Hi all, Today I encountered the below exception after upgrading from Tapestry 5.8.2 to 5.8.6, and am wondering what changed between these versions that might have led to this. A dependency incompatibility perhaps? Evidently not liking the angle bracket immediately following "StreamableResou

Re: Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-10 Thread Christopher Dodunski (Tapestry)
Hi Ben, Thank you for your investigative efforts, even though you weren't yet able to pinpoint the exact cause. And thank you, you and Vangel, for sharing that workaround. Occasionally, this HibernateCrudServiceDAO method works as expected. Most times not. This seeming randomness fits wit

Problem running Tapestry 5.8.2 with Hibernate 5.4.32.Final

2023-06-09 Thread Christopher Dodunski (Tapestry)
Hello, I've encountered an issue after upgrading from Tapestry 5.6.4 to 5.7.3. This included moving from Hibernate 5.1.0.Final to 5.4.32.Final (as per the guidelines). The HibernateCrudServiceDAO method below is now failing to fetch named queries via the injected org.hibernate.Session, resu

Tapestry 5.7.0 migration tool

2023-06-06 Thread Christopher Dodunski (Tapestry)
Hello, Today, with the help of the handy migration tool, I upgraded from Tapestry 5.6.4 to 5.7.3. Below are some packages which it missed. Just letting you know in case you might like to add these to the tool's properties file for future users. org.apache.tapestry5.beaneditor.BeanModel

Re: Tapestry Grid encoder

2022-05-19 Thread Christopher Dodunski
Thanks for those links, Geoff. Actually, I'm more interested in your Grid example where you provide this component with an encoder. http://jumpstart.doublenegative.com.au/jumpstart/examples/tables/gridwithdeletecolumn1 When I try to do likewise, my IDE complains: "Attribute t:encoder is

Re: Tapestry Grid encoder

2022-05-19 Thread Christopher Dodunski
Thanks for those links, Geoff. Actually, I'm more interested in your "jumpstart/examples/tables/gridwithdeletecolumn1" Grid example where you provide this component with an encoder. When I try to do likewise, my IDE complains: "Attribute t:encoder is not allowed here". Not sure whether this

Re: Tapestry Grid encoder

2022-05-19 Thread Christopher Dodunski
Hi all, I've identified the source of the problem. It was a small omission in the HQL which resulted in an Object[] of fields rather than an entire entity being handed onto the Grid component, hence "[Ljava.lang.Object;" in the exception message below. "Could not find a coercion from ty

Re: Tapestry Grid encoder

2022-05-13 Thread Christopher Dodunski (Tapestry)
Thank you for those suggestions, Volker. The common theme seems to be that I should allow Tapestry to create a default BeanModel rather than create a new instance of one in my Java class, correct? Your second suggestion is nearest to what I've done, except that I return a new BeanModel. Jus

Tapestry Grid encoder

2022-05-13 Thread Christopher Dodunski (Tapestry)
Hi all, I'm trying out the Tapestry Grid component for the first time in one of my projects. During rendering I'm presented with the below exception. "Render queue error in BeginRender[vessel/Read:grid.rows]: Failure writing parameter 'row' of component vessel/Read:grid.rows: Failure wr

Re: Navigation to section of a page

2022-03-24 Thread Christopher Dodunski (Tapestry)
Hi Ben and Thiago, Thank you for your well considered suggestions on accommodating anchor points in returned pages. I've stored them away for possible future use. I wound up solving the original problem in a rather different way, using a RequireJS module. Background: My web application has

Navigation to section of a page

2022-03-20 Thread Christopher Dodunski (Tapestry)
Hi, Quick question: Tapestry is flexible when it comes to return types for page navigation. "When a string is returned, it is expected to be the logical name of a page." Although I've not tried it, presumably this means the likes of "Index#footer" isn't possible for navigating to a particul

Re: File downloading in Tapestry

2021-11-16 Thread Christopher Dodunski (Tapestry)
Thank you, Charles and Ben, for the helpful pointers and code snippets! You've both implemented StreamResponse in a nice and versatile way, and I will now tailor something similar for my needs. Thanks & regards, Chris - To u

File downloading in Tapestry

2021-11-15 Thread Christopher Dodunski (Tapestry)
Hi all, Inserting a simple type link in a Tapestry template so visitors can download a PDF is straightforward enough. I'd like to shift this to inside the controller, however, so that some code for analytical purposes can be added. A quick Google search revealed the code example below, fr

Browser automatically scrolls to contact form in footer (undesirable)

2021-10-27 Thread Christopher Dodunski (Tapestry)
Hi all, I've built a new home page for an existing site, and this includes a simple contact form in the footer. When the page loads the browser automatically scrolls down to this form, with cursor in the first field. This obviously isn't desirable. Plain HTML forms don't normally invoke th

Re: Upgrading to Tapestry 5.6.4

2021-05-07 Thread Christopher Dodunski (Tapestry)
Hi Ben, You were 100% correct! Adding the below dependencies to my POM fixed the issue. I really appreciate the quick response you gave. Perhaps Thiago or Bob might like to make mention of this on the Tapestry Upgrade page? com.sun.xml.bind

Upgrading to Tapestry 5.6.4

2021-05-06 Thread Christopher Dodunski (Tapestry)
Hi team, I have moved to upgrade a Tapestry webapp from version 5.4.3 to version 5.6.4, after first checking the page below for known compatibility issues. https://cwiki.apache.org/confluence/display/TAPESTRY/Supported+Environments+and+Versions Reportedly, Tapestry 5.6.4 is compatible with..

Re: Tapestry services lifecycle

2020-09-22 Thread Christopher Dodunski (Tapestry)
Thanks, Thiago, for confirming that. And I'm glad to hear news of Tapestry 5.6.1 release. Good work! Regards, Chris. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@

Tapestry services lifecycle

2020-09-15 Thread Christopher Dodunski (Tapestry)
Hi all, just a quick question... Once a Tapestry service implementation gets instantiated, and that service's status moves to "realised", at what point does that implementation get destroyed? Tapestry instantiates a service implementation the first time a service method gets called, and I'm

Re: Making certain BeanEditForm fields 'read only'

2020-08-27 Thread Christopher Dodunski (Tapestry)
Hi Thiago, A couple of years' ago I extended Tapestry's AbstractField to create a DateTimeField, as DateField's standard JavaScript calendar looks a little dated (pardon the pun). DateTimeField leverages the HTML5 datetime-local input type, and one of its parameters is 'boolean readOnly'. I

Re: Making certain BeanEditForm fields 'read only'

2020-08-26 Thread Christopher Dodunski (Tapestry)
Thanks Thiago. I guess it's something worth considering in the future - updating BeanEditor and related components to better leverage HTML5 features. A workaround in my case was to have SelectModelFactory reduce the number of selectable elements down to one, making selecting something differe

Making certain BeanEditForm fields 'read only'

2020-08-18 Thread Christopher Dodunski (Tapestry)
Hi all, I'm just wondering whether there is a simple and elegant way of making certain BeanEditForm fields 'read only' within the controller class, rather than in the view template? In certain circumstances I wish to dynamically prevent users from modifying certain fields (a pretty common sc

Re: Tapestry 5.5 progress

2020-01-10 Thread Christopher Dodunski (Tapestry)
I'm much looking forward to Tapestry 5.5's pending release. Regarding glyphicons, I recall not being able to get these displaying even with a Tapestry app built extending the quickstart project (bootstrap 3). So the date pickers are iconless, palette arrows absent, etcetera (I need to revisit

Re: Progressive Web App

2019-05-10 Thread Christopher Dodunski
Hi Geoff, I'm in the final stages of developing a webapp which uses the WebSocket API for asynchronous, two-way communication. Not sure if WebSocket is the way you want to go? Message packets are objects encoded into JSON format using Jason. The server endpoint is a Tapestry service (singleton)

Re: Injecting one service into another 'ignored path' service

2019-04-28 Thread Christopher Dodunski
Hi Thiago, Indeed, if I want to provide endpoints as a Tapestry-IoC service, singleton may be the only option. Running as a 'per thread' service, connections are successfully established, but subsequent method calls on the connection by Tomcat - like to @OnError and/or @OnClose - results in the r

Re: Injecting one service into another 'ignored path' service

2019-04-24 Thread Christopher Dodunski
Update: it seems that option #1 is off the table. >From the Java WebSockets specification: 4.1 @ServerEndpoint "This class level annotation signifies that the Java class it decorates must be deployed by the implementation as a websocket server endpoint and made available in the URI-space of the w

Re: Injecting one service into another 'ignored path' service

2019-04-19 Thread Christopher Dodunski
If option #1 works, it could be the ideal solution. I've only ever seen WebSocket annotations on a POJO, never an interface. Not to say it can't be done. I was about to attempt an 'option #3': do away with the custom Configurator (allowing Tomcat to instantiate endpoints), with endpoints getting

Re: Injecting one service into another 'ignored path' service

2019-04-19 Thread Christopher Dodunski
Hi Thiago, >> Why is it even referencing HarbourServerEndpointImpl? This, the service >> implementation class, should only be referenced in AppModule (or other >> Tapestry-IoC module) when declaring the service and maybe also when making >> unit tests. Everything else should use HarbourServerEndpo

Re: Injecting one service into another 'ignored path' service

2019-04-15 Thread Christopher Dodunski
By the way, the @ServerEndpoint and @OnOpen and other WebSocket annotations are on the implementation class, not the interface. Perhaps this is not right when providing endpoints as a Tapestry-IoC service? - To unsubscribe, e-ma

Re: Injecting one service into another 'ignored path' service

2019-04-15 Thread Christopher Dodunski
By creating a ServletContextListener that sets a static ServletContext variable in a RegistryProxy class I created, I now have access to the Tapestry-IoC registry from anywhere in the application. So the internal wiring ought to be in place now. However, when I use my custom endpoint Configurator

Re: Injecting one service into another 'ignored path' service

2019-04-11 Thread Christopher Dodunski
Hi Thiago, No, not solved yet. Was still exploring options, for instance overriding TapestryFilter.init(Registry). Sorry if I wasn't clear. I'm about to create a ServletContextListener in my app, so I can get access to the ServletContext, and consequently the Registry, on app initialisation. T

Re: Injecting one service into another 'ignored path' service

2019-04-11 Thread Christopher Dodunski
Hi Thiago, I discovered a mailing-list post, from around 9 years ago, where you advised someone to override the TapestryFilter.init(Registry registry) method to save the registry to a static field. Ideally, I'd like to invoke the static method of a standalone class to access the registry and its

Re: Injecting one service into another 'ignored path' service

2019-04-09 Thread Christopher Dodunski
Thank you very much for responding Thiago. You write: "I'm afraid you're wrong about why the problem is happening. Tapestry-IoC is the one actually taking care of services and it knows nothing about ignored paths, which are a Tapestry(-core, the webapp) thing. The problem is that your endpoint doe

Re: Injecting one service into another 'ignored path' service

2019-04-08 Thread Christopher Dodunski
And here, another version of custom configurator, where Jersey is the CDI implementation. public class CdiAwareConfigurator extends ServerEndpointConfig.Configurator { public T getEndpointInstance(Class endpointClass) throws InstantiationException { return CDI.current().select(endpo

Re: Injecting one service into another 'ignored path' service

2019-04-08 Thread Christopher Dodunski
I found a thread where someone else was grappling with this same issue, but in his case the IoC framework was Google Guice. http://tomcat.10.x6.nabble.com/ServerEndpoint-Guice-td5007388.html Summarising his solution: Create a custom WebSocket endpoint configurator class... public class Ws

Injecting one service into another 'ignored path' service

2019-04-07 Thread Christopher Dodunski
Hi team, I've implemented a WebSocket server endpoint inside a Tapestry application by placing its class inside the 'services' folder, and adding its path to 'contributeIgnoredPathsFilter()' as below. public static void contributeIgnoredPathsFilter(Configuration configuration) { confi

Re: ServerSocket from within Tapestry

2019-04-06 Thread Christopher Dodunski
Thanks Lance, those two libraries look very interesting! For now I've successfully implemented Tyrus 'stand-alone' (Grizzly) on my desktop clent application, and this connects to my Tapestry app via Tomcat. However, in the future I would also like to PUSH server-side state changes out to a dashbo

Re: ServerSocket from within Tapestry

2019-03-20 Thread Christopher Dodunski
A simple solution in the end, a retweaking of the 'IgnoredPathsFilter'... public static void contributeIgnoredPathsFilter(Configuration configuration) { configuration.add("/websocket/.*"); } - To unsubscribe, e-m

Re: ServerSocket from within Tapestry

2019-03-14 Thread Christopher Dodunski
Hi team, Just wondering whether anyone has successfully implemented a serverside WebSocket endpoint as a Tapestry service? The beauty of implementing it as a Tapestry service is that I could then easily PUSH messages out from other parts of the program, via the injected service. The client is no

Re: [ANNOUNCEMENT] Tapestry 5.4.4

2018-12-19 Thread Christopher Dodunski
Hi all, "A designer knows he has achieved perfection not when there is nothing left to add, but when there is nothing left to take away." - Antoine de Saint-Exupéry. Winsome words from a once French aviator. Perfecting Tapestry is unlikely to be a simple matter of just culling code. Still, it s

Re: [ANNOUNCEMENT] Tapestry 5.4.4

2018-12-19 Thread Christopher Dodunski
Good team effort! It's encouraging to see Tapestry progressing in step with associated technologies: Java 12 is due out in March, and Hibernate currently at version 5.3.3. Tapestry 5 was a leap forward from 4. Where does the community see Tapestry 6 at on the Java web landscape? A free and fran

Re: Event to trigger zone refresh

2018-12-15 Thread Christopher Dodunski
Hi all, Thanks for the pointers. In the end I switched to AjaxResponseRenderer rather than returning the zone's body, and all seems to work well. I'm not sure why I didn't do it this way to begin with. You can see the old line of code now commented out. public void onFilter(){ expa

Re: DateField behaviour when within a zone

2018-12-13 Thread Christopher Dodunski
Hi Thiago, Yes, I'll certainly use your Html5DateField wherever I can, in preference to the WebFX based DateField component, whenever just a date is required. Good effort! Indeed, datetime-local is not yet widely implemented in desktop browsers (seems to work fine in Chrome and Edge, but not IE

Event to trigger zone refresh

2018-12-13 Thread Christopher Dodunski
Hi all, I had mistakenly thought that any event handler method could render a response through return type, whereas seemingly this is unique to events triggered by Tapestry's actionlink, eventlink and form components. I developed a filter pane component for limiting the number and (date) range of

Re: DateField behaviour when within a zone

2018-12-11 Thread Christopher Dodunski
Hi Thiago, Great, I'll take a look. Meanwhile, because of working to a deadline, last weekend I developed my own, and was just about to offer it to the Tapestry community. But maybe there's no need now? I based it on HTML 5 datetime-local. The various browser implementations of this element ar

Re: DateField behaviour when within a zone

2018-12-06 Thread Christopher Dodunski
On second thoughts, producing a new DateTimeField component is probably wiser. I'm impressed by the HTML5 "datetime-local" input type. Browsers that don't support it should gracefully degrade to plain textfield. A DateTimeField component based on this HTML5 element would be lighter weight than t

Re: DateField behaviour when within a zone

2018-12-06 Thread Christopher Dodunski
Thanks Chris. What puzzled me about the absent closing tag is that it appears in the first example above, but not the second. Yet this markup is generated by the same DateField component (line 276 to be precise: "writer.end()"). I searched the web for alternative 'date pickers'. Bootstrap prov

Re: DateField behaviour when within a zone

2018-12-05 Thread Christopher Dodunski
Just a few short questions to help progress with problem solving. 1) Is there any known reason why DateField's WebFX DatePicker wouldn't work within an embedded Tapestry component? I've had no problem with it working directly in a Tapestry page. Don't want to be flogging a dead horse here. :-)

Re: DateField behaviour when within a zone

2018-12-02 Thread Christopher Dodunski
Making some headway... The base page is "Dashboard", which contains 10 panel components (each having its own zone). Three of these panels require a "FilterPane" for limiting the number of records displayed (again, this filter pane has its own zone). This pane contains a form, and this form conta

Re: DateField behaviour when within a zone

2018-12-02 Thread Christopher Dodunski
>> I imagine others are using the existing DateField with success, whether >> inside or outside of zones. Assuming the DatePicker javascript is using >> AJAX to invoke a zone refresh, is there perhaps a way of disabling this >> without meddling with the code? I had thought that without "async=tru

Re: DateField behaviour when within a zone

2018-11-29 Thread Christopher Dodunski
That sounds promising Thiago. Does your component support time also, or just date (you mentioned -mm-dd is hardcoded)? I imagine others are using the existing DateField with success, whether inside or outside of zones. Assuming the DatePicker javascript is using AJAX to invoke a zone refresh

DateField behaviour when within a zone

2018-11-28 Thread Christopher Dodunski
Hi all, I've successfully been using the datefield component within a number of tapestry pages. But now that I've embedded a datefield within a custom component that is nested within a zone, the datepicker isn't working as it should. When the datepicker is used to select a certain date, the zone

Re: QuickStart

2018-11-26 Thread Christopher Dodunski
Hi all, I only started with Tapestry, seriously, around 18 months ago. Tapestry may not be the latest fashion, but I love its convention over configuration approach, use of POJOs, and the myriad other elegant features that keep web application development fun and rewarding. I guess technical ele

Palette and DateField Icons Not Displaying

2018-10-14 Thread Christopher Dodunski
Hi Tapestry Team, I have a small problem with Tapestry's palette and datefield components. I downloaded Tapestry some months ago, using Maven. The QuickStart hotel demo release, as I recall. Anyway, the application I've gone on to develop since then makes frequent use of both the datefield and

Re: JavaScript not invoked on zone refresh

2018-10-01 Thread Christopher Dodunski
Thanks Chris & JumpStart, with your help I was able to get this CSS animation working, using JavaScriptSupport in combination with RequireJS. Below is the code, for anyone else wishing to do the same. **The CSS** .open-section{ transition:0s; transform: rotate(90deg); } .close-section{

Re: JavaScript not invoked on zone refresh

2018-09-25 Thread Christopher Dodunski
After exploring a little further, I discovered the below thread on invoking javascript from within Tapestry. https://stackoverflow.com/questions/27988473/pass-parameter-from-java-to-js-in-tapestry Joost writes: You will need to use the JavaScriptSupport service. Your java file: @Import(library

Re: JavaScript not invoked on zone refresh

2018-09-25 Thread Christopher Dodunski
Thanks Chung and Chris. I doubt using .click() will work, as the button being clicked on is immediately replaced, and it is this new button that must rotate. The buttons are for expanding and collpasing sections of a webpage. Once a user clicks on an expand button, it is immediately replaced wit

JavaScript not invoked on zone refresh

2018-09-24 Thread Christopher Dodunski
Hi all, I suspect there's a simple solution to this small, but annoying problem. My Tapestry page uses a simple javascript to rotate an image 90 degrees the moment the image is rendered on screen. It does this by adding a CSS class to the button element that contains the image. **The JavaScrip

Re: ServerSocket from within Tapestry

2018-06-13 Thread Christopher Dodunski
Hi Eugen, Thank you for explaining so well. I had been considering running a standalone WebSocket server to avoid being tied to Tomcat in particular, but, after further thought, think I'll take your advice and keep it simple. :-) Here is a recording of the client app running in demo mode: www.h

Re: ServerSocket from within Tapestry

2018-06-11 Thread Christopher Dodunski
I like the look of the WebSocket library below: https://github.com/TooTallNate/Java-WebSocket It is 100% Java, and includes example code for both server and client. Also, it supports multi-threading 'out of the box'. If I were to use this library's server code, placed in the Tapestry 'services'

Re: ServerSocket from within Tapestry

2018-06-08 Thread Christopher Dodunski
Hi Carlos, Thanks for detailing how you implemented a WebSocket using an external HttpServlet. I'm sure it works well for you. However, since it seems possible to implement a WebSocket right inside a Tapestry app, I will attempt to do it this way first. It keeps everything self-contained and ti

Re: ServerSocket from within Tapestry

2018-06-07 Thread Christopher Dodunski
Hi Eugen, I like the look of the WebSocket library you shared: https://github.com/TooTallNate/Java-WebSocket. It is 100% Java, and includes example code for both server and client. Also it supports multi-threading 'out of the box'. So, if inside my Tapestry project's 'services' directory I crea

Re: ServerSocket from within Tapestry

2018-06-06 Thread Christopher Dodunski
Thanks Eugen, and where did you place the server-side class decorated with @ServerEndpoint("/ws")? Perhaps it doesn't matter whether it is placed in 'pages' or 'services', as Tomcat finds it regardless. Is it necessary to invoke new threads (multi-threading) within each of the methods decorated w

ServerSocket from within Tapestry

2018-06-06 Thread Christopher Dodunski
Hi team, I'm in the final stages of developing a Tapestry webapp for a multi-contractor worksite. Most user interactions will be via webpage forms, with state displayed on a dashboard page, involving mostly text (though done attractively). To support this application I've also developed a small

Tapestry SelectModel

2018-01-23 Thread Christopher Dodunski
Hi team, Just a quick question: When using Tapestry's SelectModel to create a drop down list of String options, is it possible to enforce this at the 'model' tier through the use of an annotation? With Java enumerations this is possible: @Enumerated(EnumType.STRING) private String countr

Re: BeanEditForm onValidate()

2018-01-18 Thread Christopher Dodunski
Mystery solved! My original suspicion was correct in that somewhere the app was attemting to update the database before or while onValidate() was doing it's thing. It wasn't BeanEditForm however, it was Hibernate jumping in the way. Part of the stack trace: org.hibernate.event.internal.DefaultA

Re: BeanEditForm onValidate()

2018-01-17 Thread Christopher Dodunski
And when using the literal "Abel", as below... User userVerif = crudServiceDAO.findUniqueWithNamedQuery(User.BY_USERNAME, QueryParameters.with("userName", "Abel").parameters()); LOG.debug("Verify user: [" + userVerif.getUserName() + "|" + userVerif.getFirstName() + "|" + userVerif.

Re: BeanEditForm onValidate()

2018-01-17 Thread Christopher Dodunski
Hi Geoff, I'm not sure whether this is what you meant, but I added the below code to my onActivate() method: User userVerif = crudServiceDAO.findUniqueWithNamedQuery(User.BY_USERNAME, QueryParameters.with("userName", user.getUserName()).parameters()); LOG.debug("Verify user: [" +

Re: BeanEditForm onValidate()

2018-01-16 Thread Christopher Dodunski
Hi Geoff, Sorry, I'll try that when back at my PC tomorrow. I could be mistaken, but does the 'column' annotation below not set the USER_NAME column in the database as unique? I assumed this is the reason for the ConstraintViolationException, i.e. the unique field. Irrespective, I'll do as you

Re: BeanEditForm onValidate()

2018-01-15 Thread Christopher Dodunski
To summarise... the exceptions: org.hibernate.exception.ConstraintViolationException could not execute statement SQL n/a SQLState 23000 errorCode 1062 and: java.sql.SQLIntegrityConstraintViolationException Duplicate entry 'Abel' for key 'UK

Re: BeanEditForm onValidate()

2018-01-13 Thread Christopher Dodunski
Below is a snippet of my User entity class, where the NamedQueries are also located. Based on your responses, it seems that I'm correct that UpdateUser.java oughtn't be persisting anything for NamedQuery to discover until the line "crudServiceDAO.update(user)" is reached in onSuccessFromUpdateForm

Re: BeanEditForm onValidate()

2018-01-13 Thread Christopher Dodunski
directly compare the user name strings instead > of comparing the User objects? > > > On Jan 13, 2018 4:01 AM, "Christopher Dodunski" < > chrisfromtapes...@christopher.net.nz> wrote: > > The database contains these two users: > > User name: Abel > First name

Re: BeanEditForm onValidate()

2018-01-13 Thread Christopher Dodunski
The database contains these two users: User name: Abel First name: Abel Last name: Tasman etc. User name: James First name: James Last name: Cook etc. As a test I load user 'James' into the BeanEditForm of UpdateUser.java, and attempt to change his user name to 'Abel' (an illegal change). This

Re: [ANN] JumpStart 7 Released!

2018-01-12 Thread Christopher Dodunski
Thank you Geoff for your continuing commitment to the Tapestry framework! - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org

BeanEditForm onValidate()

2018-01-12 Thread Christopher Dodunski
Hi there, Below is my onValidate() method of a BeanEditForm for updating a user's profile, where I simply check that a user isn't changing his username to an already taken username. The error output (below it) suggests that BeanEditForm is committing the change to the database even before onValid

Re: How to use CSS buttons outside of forms

2017-12-26 Thread Christopher Dodunski
Hi Chris & Bob, Thanks, yes, it's all part of the learning process. :-) Now that I know that Tapestry ActionLink and EventLink only emit tags, I'll in future style all my buttons as a.xxx rather than input.xxx (style.css). I had wrongly assumed that Tapestry left the HTML markup as is, parsing

Re: How to use CSS buttons outside of forms

2017-12-26 Thread Christopher Dodunski
ot; components so it > could be plausible, but I do not have the sources handy on this machine to > check). > > I guess you could make a plain HTML button that delegates its clicks to a > hidden link using Javascript, if you cannot fix your CSS, but it feels > like > a hack c

Re: How to use CSS buttons outside of forms

2017-12-24 Thread Christopher Dodunski
This problem has proved trickier to solve than expected. The below tag produces a displayed button, but obviously without any functionality, as the tag contains no Tapestry-specific elements. The problem comes on adding Tapestry markup, with the intention of invoking a deleteUser() method in th

Re: How to use CSS buttons outside of forms

2017-12-23 Thread Christopher Dodunski
Thanks Geoff. Are you in Aus? Greetings from NZ. Your tag... ...looks like it should do the trick. I assume that the t:context parameter is optional, in this case just for passing onNextPage() a literal string as argument? Also, to keep the website designers happy, it might be preferable to

Re: How to use CSS buttons outside of forms

2017-12-23 Thread Christopher Dodunski
Concerning use of the button HTML tag, I read the following... "Definition and Usage The tag defines a clickable button. Inside a element you can put content, like text or images. This is the difference between this element and buttons created with the element. Tip: Always specify the type a

Re: How to use CSS buttons outside of forms

2017-12-23 Thread Christopher Dodunski
Oh, I thought I had tried that but the button didn't render. Hence my post. Nevermind, I'll try it again in case the problem was elsewhere. If ActionLink and Eventlink indeed accept 'class' parameter, it should go easily. Thanks, Chris. ---

How to use CSS buttons outside of forms

2017-12-22 Thread Christopher Dodunski
Hi all, The Tapestry 'submit' component allows use of buttons defined in CSS by way of the 'class' parameter. This is perfect for form buttons. But now I want to use these same CSS buttons outside of forms. The natural choice is Tapestry's ActionLink or EventLink component. But these component

Re: Override BeanEditForm Submit Button

2017-12-20 Thread Christopher Dodunski
ttps://github.com/apache/tapestry-5/blob/master/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/BeanEditForm.tml > > Kalle > > On Fri, Dec 15, 2017 at 3:31 PM, Christopher Dodunski < > chrisfromtapes...@christopher.net.nz> wrote: > >> Hi, &

Override BeanEditForm Submit Button

2017-12-15 Thread Christopher Dodunski
Hi, I would simply like to override Tapestry's BeanEditForm default submit button. I've searched the internet but not found example code to achieve this. Below is my template code, which is for a BeanEditForm component with two added fields. The submit tag is not having the desired effect. Of

"Detached entity passed to persist"

2017-11-28 Thread Christopher Dodunski
Hi team, I suspect you'll be able to answer this right off the top of your head, as this error occurs in response to what I imagine is a very routine code assignment: set a newly created user's company to be the same company as that of the user doing the creating. Code snippet from 'pages/user/C

Re: Authorisation in Tapestry Applications

2017-11-28 Thread Christopher Dodunski
Hi Kalle, Thank you for explaining what Tynamo Model has to offer. It certainly looks interesting, and promises to save much time in creating CRUD heavy apps in Tapestry. I'll give it a go on my next webapp. For now, I think I'll simply inspect the user's permissions in the onActivate() method

Re: Authorisation in Tapestry Applications

2017-11-26 Thread Christopher Dodunski
create company button } Regards, Chris. > http://www.tynamo.org/tapestry-security+guide/ > > https://tapestry.apache.org/security.html > > Le 26/11/2017 à 05:16, Christopher Dodunski a écrit : >> Hi All, >> >> The Tapestry Hotel demo app has proven a good less

Authorisation in Tapestry Applications

2017-11-25 Thread Christopher Dodunski
Hi All, The Tapestry Hotel demo app has proven a good lesson in implementing AUTHENTICATION. Having developed a multi-user Tapestry app, I now need to implement AUTHORISATION, but the Hotel demo app is aimed at just one user type: visitors. I created a role table in my Tapestry application (scre

Re: How to display a Blob (byte[]) from database in a Tapestry template

2017-11-02 Thread Christopher Dodunski
Thank you for your help. I corrected those two oversights, and got the class working successfully by changing the onActivate() parameter from byte[] to 'User' (code below). The image now displays, but I wonder if when passing a 'User' object Tapestry passes just the id as reference (using Tapestr

How to display a Blob (byte[]) from database in a Tapestry template

2017-11-02 Thread Christopher Dodunski
Hi all, I am having a little difficulty with what I imagine is a very common use case: displaying a user's profile image alongside their personal details following successful login. Displaying the JavaBean strings served up by Hibernate is easy. Just displaying the database Blob (stored as a byt

Re: Tapestry QuickStart Project (build unsuccessful)

2017-08-24 Thread Christopher Dodunski
Thanks Svein. I noticed you are using IntelliJ, like me. Can I ask how you configured IntelliJ to use the 2.4 plugin instead either of the two it comes bundled with? I like to do everything from the IDE rather than 'mvn' from the command line. Thanks! > Hi all, > > I am a first time user of T

Tapestry QuickStart Project (build unsuccessful)

2017-08-19 Thread Christopher Dodunski
Hi all, I am a first time user of Tapestry, and am attempting to build the Tapestry QuickStart project. My IDE comes bundled with two versions of Maven, but both fail to build the project (see below for the output of both). I read on the Tapestry website the recommendation to use Maven 2.4, whic

Re: 10 Minute Web Application Demo

2011-02-18 Thread Christopher Dodunski
"It would be much longer though, so I wasn't sure if people would actually watch it." I would!! I'm currently learning Tapestry, and it wouldn't bother me in the least if your tutorial took thirty minutes to play. Provided it covered important key concepts (e.g. Tapestry form -> Hibernate -> r

  1   2   >