RE: t5: adding http header
Wulf: Why (rather how) the @Override annotation ? I actually had to remove it for it work. Anyhooo...here is the complete working example (right or wrong, not sure)...comments welcome... Step 1. Created a class in your src/main/java -- SERVICES package - where you will find AppModule.java already installed by Tapestry. In my case, I created a class called RevalidateHTTPHeader package org.yourGroupId.yourArtifactId.services; import java.io.IOException; import org.apache.tapestry5.services.Request; import org.apache.tapestry5.services.RequestFilter; import org.apache.tapestry5.services.RequestHandler; import org.apache.tapestry5.services.Response; public class RevalidateHTTPHeader implements RequestFilter { private static final String CACHE_CTRL = Cache-Control; private static final String EXPIRE_DATE = Exprires; public boolean service(Request request, Response response, RequestHandler handler) throws IOException { response.setHeader(CACHE_CTRL, no-cache, no-store, must-revalidate); response.setHeader(EXPIRE_DATE, Sun, 07 Dec 1941 07:55:00 GMT); return handler.service(request, response); } } Step 2. Within AppModule.java, do two things - a. declare the following member variable RevalidateHTTPHeader nocache = new RevalidateHTTPHeader(); b. add the following within contributeRequestHandler method: public void contributeRequestHandler(OrderedConfigurationRequestFilter configuration, @Local RequestFilter filter) { // Each contribution to an ordered configuration has a name, When necessary, you may // set constraints to precisely control the invocation order of the contributed filter // within the pipeline. /// // ADD the custom nocache HTTP header(s) configuration.add(NoCache, nocache); // // configuration.add(Timing, filter); } Step 3: Run Jetty to verify/examine headers - I am using Google Chrome - which has a free HTTP Headers extension. http://localhost:8080/yourArtifactId/[yourPage] Name Extension Content-Encodinggzip Exprires Sun, 07 Dec 1941 07:55:00 GMT Transfer-Encoding chunked ServerJetty(6.1.26) Content-Type text/html; charset=utf-8 Cache-Control no-cache, no-store, must-revalidate -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-adding-http-header-tp3369097p5716459.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: t5: adding http header
Thanks!! Yep, even though java -version on command line shows 1.6, the Eclipse (right click) project -- properties -- java compiler shows using JDK 1.5 compliance. Changed that to 1.6 and sure enough no complaints on the @Override annotation anymore. And thanks for that typo catch ;-). In fact, off-topic, but in case anyone would like to use this code, the whole expires date can be made redundant by using max-age in the HTTP request header, per RFC 2616 14.21. response.setHeader(CACHE_CTRL, no-cache, no-store, max-age=0, must-revalidate); Also see: http://www.mnot.net/blog/2007/05/15/expires_max-age (this also has a link to an excellent tutorial on caches - must read - basic message being cache control is probably best handled by web server, if you can control it, rather than in your application) -- View this message in context: http://tapestry.1045711.n5.nabble.com/t5-adding-http-header-tp3369097p5716463.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: One Template to include another TML - JSP style
Thanks, Ivan, Thiago. Indeed, message being - this is possible - and desirable - at the component level. -- View this message in context: http://tapestry.1045711.n5.nabble.com/One-Template-to-include-another-TML-JSP-style-tp5716240p5716300.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
One Template to include another TML - JSP style
Basically, looking for jsp style include. However, in the user guide, under Layout Component I see Tapestry doesn't have a mechanism for such includes – nor does it need one. Hmmm... Well, here is the problem I have: 1. Create/Update Page featuring an input form, say, a Person with fields like name, address etc. 2. VIEW Person which is EXACTLY same update form - just no submit/cancel buttons. Not clear to me how doing nested layouts would be better than nested tmls. In fact, I found this so obtuse that I am maintaining two separate tmls (Sorry for the low IQ I bring to this ;-)) Any better ideas, examples? Should I just do JSP - and have it coexist with TML - is that the intended design of the framework? All that is needed is for that gigantic form to be maintained in one place - even if it has to included in various tmls - just so edits are centralized. Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/One-Template-to-include-another-TML-JSP-style-tp5716240.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: One Template to include another TML - JSP style
Thanks, Michael. Your suggestion makes sense - for most. Unfortunately, I have to using a fully customized form - not bean editor. In addition to TML, there is the property files that need to be not repeated - I know there is the app level properties for this - but still project demands this to avoid label clashes. I think there needs to be a way to contrive this include - simple on the outside - but the framework handles the complexity somehow in the back-end. -- View this message in context: http://tapestry.1045711.n5.nabble.com/One-Template-to-include-another-TML-JSP-style-tp5716240p5716242.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: One Template to include another TML - JSP style
Thanks, Robert. Excellent suggestion, especially the second one about editMode. Looking into this. Fighting my laziness of moving all the logic from page level to component level - classes, properties, templates - ugh - if I am understanding correctly. -- View this message in context: http://tapestry.1045711.n5.nabble.com/One-Template-to-include-another-TML-JSP-style-tp5716240p5716247.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: One Template to include another TML - JSP style
Sorry, Thiago, I do not see - why not? Basically, why cannot pages be allowed simply extend each other? -- View this message in context: http://tapestry.1045711.n5.nabble.com/One-Template-to-include-another-TML-JSP-style-tp5716240p5716249.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Missing 11 Build Path Entries
I am following the tutorial trying to get going on a new project with 5.3.4 using mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org but the following 11 build path entries are missing when loading project into eclipse even after mvn eclipse:clean mvn eclipse:eclipse -DdownloadSources=true 1. M2_REPO/com/google/code/maven-play-plugin/com/yahoo/platform/yui/yuicompressor/2.4.7/yuicompressor-2.4.7.jar 2. M2_REPO/org/apache/tapestry/plastic/5.3.4/plastic-5.3.4.jar 3. M2_REPO/org/apache/tapestry/tapestry-core/5.3.4/tapestry-core-5.3.4.jar 4. M2_REPO/org/apache/tapestry/tapestry-func/5.3.4/tapestry-func-5.3.4.jar 5. M2_REPO/org/apache/tapestry/tapestry-ioc/5.3.4/tapestry-ioc-5.3.4.jar 6. M2_REPO/org/apache/tapestry/tapestry-javadoc/5.3.4/tapestry-javadoc-5.3.4.jar 7. M2_REPO/org/apache/tapestry/tapestry-json/5.3.4/tapestry-json-5.3.4.jar 8. M2_REPO/org/apache/tapestry/tapestry-test/5.3.4/tapestry-test-5.3.4.jar 9. M2_REPO/org/apache/tapestry/tapestry-yuicompressor/5.3.4/tapestry-yuicompressor-5.3.4.jar 10. M2_REPO/org/apache/tapestry/tapestry5-annotations/5.3.4/tapestry5-annotations-5.3.4.jar 11. M2_REPO/org/testng/testng/5.14.10/testng-5.14.10.jar -- View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-11-Build-Path-Entries-tp5714760.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Missing 11 Build Path Entries
Problem/Question: Is there a quick fix to get these files? Or is it manually install each? Jetty will not launch without the plastic jar and I did not even find plastic 5.3.4, just 5.3.3. The maven dialogue allows only 5.3.4 -- View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-11-Build-Path-Entries-tp5714760p5714762.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Missing 11 Build Path Entries
Thanks!! Yes, creating a Maven project within eclipse seems to be the way to go. Although there was a minor hitch. Searching for tapestry5 did not bring up org.apache.tapestry. So, have to manually install (add) it. No, as mentioned, command line quick start is not pulling in all the required libraries. All steps are below: 1. In Eclipse, under Help, choose Install New Software 2. In worth with enter URL: http://download.eclipse.org/technology/m2e/releases 3. Follow dialogs to install m2ecplise. 4. File -- New -- Projects -- Maven 5. Add Archetype. GroupId: org,apache.tapestry ArtifactId: quickstart Archetype Version: 5.3.4 Repository URL: (Leave Blank) 6. Follow dialogs to create your project 7. Run as Jetty 8. test it at localhost:8080/yourContext -- View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-11-Build-Path-Entries-tp5714760p5714767.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
DAO Pattern
I have been reading some tapestry DAO resources: http://tapestry.apache.org/tapestry5.1/tapestry-hibernate/userguide.html http://tawus.wordpress.com/2011/05/28/tapestry-magic-13-generic-data-access-objects/ http://www.infoq.com/articles/tapestry5-intro/ Curious, if there is a standard, established, best-practice, data access object (DAO) pattern or convention? 1. Is there a specific DAO package (directory structure for resources)? Like there is for entities, pages, components, etc? Or is pretty much free-form? 2. I would like the DAOs to be RESTful API...any good examples? Or is it implicit through the page activation context as mentioned in the infoq blog? Thanks! -- View this message in context: http://tapestry.1045711.n5.nabble.com/DAO-Pattern-tp5714718.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DAO Pattern
Thanks.OK, I will put interfaces in services.dao and do implementations in services.dao.hibernateImpl. In the past (version 1) of the application, I put the transaction logic in the pages. But then I have multiple pages potentially using the same logic, hence the need to separate the core DAO from page, maintain in one place. I am also intrigued by the generic DAO concept in the tawus blog, but fail to see how to implement, so far.Would be great if this concept, if I am understanding correctly, could be standardized to pick up directly from the entities directory for basic CRUD. And similarly pick up from, say, the services.dao.* package, sub-directory for custom queries on the same entities. Then, Tapestry could offer a CRUD application out-of-the-box just by specifying the entities. May be the problem is, indeed, trying to shoehorn the DAO into Tapestry as a service. RESTful API can be (should be) application independent, loosely coupled with the application. Trade off being you lose the ability to inject, use activation context etc. -- View this message in context: http://tapestry.1045711.n5.nabble.com/DAO-Pattern-tp5714718p5714723.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DAO Pattern
Thanks, Kalle, all. Looking into Tynamo... -- View this message in context: http://tapestry.1045711.n5.nabble.com/DAO-Pattern-tp5714718p5714728.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Non-HTML Views
Is there a way now to render non-HTML views? Examples: 1. Have the grid component wrap Apache POI to dynamically generate spreadsheets? 2. Similar PDF engine to generate a pure PDF document (or convert the rendered HTML into PDF a la joomla, drupal CMS etc)? Much Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Non-HTML-Views-tp5714731.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Non-HTML Views
Thanks, Thiago, Richard. Looking into chaining streamed responses. Probably same approach will work to capture the HTML generated (as String) and feed into flying saucer http://www.avajava.com/tutorials/lessons/how-do-i-convert-a-web-page-to-a-string.html How do I convert a web page to a String? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Non-HTML-Views-tp5714731p5714743.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Should be easy enough to verify, Thiago ( BTW, total control edit is Jumpstart lingo). Case 1: Total control, create will fail. Case 2: BeanEditor, create will work. You are right, though, about person being null in both cases - verified. I was thinking just total control did that. Both do. However, total control seems to need the person=new Person in onPrepareForSubmit. Beaneditor seams to work with or without that null check. So, bottom line, there is a difference. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5695743.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Thanks for verifying. Which brings me back to...the basic misunderstanding I seem to have on using persistence What is the best practice to HANDLE a parameter (say person) between pages or even the page submitting to itself? That is, if not through some form form of session persistence? Is it through intricate knowledge of these event handlers like onPrepareXxxx...? Environment push/pop? Right now, if page1 submits person to page2. I am doing the following in Page1.class @Inject Page2 page2 onSuccess method 1. page2.setPerson(person) 2. return page2; Within Page2.class @Persist (PersistenceConstants.FLASH) private Person person; provide setter for person, needed in page1 It works, of course, but is there a better way? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5695818.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Got it. Thanks, Geoff. Sounds right, I was reaching the same conclusion. As for instantiating person, I guess it is the best practice - even though beaneditor covers the null case. Most likely the user will start with beaneditor in dev mode, transitioning to total control in production - which is when those two event handlers become necessary - so might as well provide from the get go. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5696047.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
I would think JIRA ... . Form event handling to be consistent with beaneditor: preferably upgrade form tag to have an objects property. All form objects should be null proof, by default, during render, submit. This will reduce code in page class...especially for the simple case of choosing between pageActivationContext(s) and empty object(s). -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5696218.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Or perhaps more elegant: have beaneditor recognize/allow plain HTML customization within its tags. Right now (I tested this) if you enclose a form with bean editor tags - it simply ignores its enclosed contents. Instead it should render only fields not customized within its open and close tags. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5696224.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Curious: IF no persistence, not even flash, is to be used for person, THEN , how would we handle the case of person being NULL during onPrepareForSubmit? Specifically, void onPrepareForSubmit() { if (this.person == null) { / // if not persisting person, will come here during Create person // What can be done here? Or, how to avoid coming here (w/o persistence)? // person does not have Id yet to find it by service // MUST handle this to avoid submit error - // logs indicate empty person in onPrepareForRender is already null by this stage // form data may still be in session(?), but no person object available to bind it } else { // // this is what happens normally in Update Person // Using persistence, even the minimal flash persist, // will allow coming here as well in Create Person // Either way nothing to be done here since person is already in session, // either thanks to @PageActivationContext (update) or // thanks to onPrepareForRender empty person (create) } } Conclusion (possibly wrong?): Some form of persistence is essential - to support create - when onPrepareForRender sets up empty person. Use flash persist annotation - @Persist (PersistenceConstants.FLASH) private Person person -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5692646.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
And, BTW, question above applies to total control form - i.e. not based on beaneditor. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5692665.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: CRUDS-QBE Create Read Update Delete CRUD plus Search and Query by Example
Updated this post to address comments received to date, best I can. Still using persistence, though, albeit of the (lower impact/transient) flash variety: 1. This allows the custom form to both create a new object as well as submit a partially defined entity for QBE . SUGGESTION: Bean editor to allow for total control form, or perhaps form tag should have the object attribute as in bean editor to take advantage of @PageActivationContext? 2. (SUGGESTION) Another way to tighten control on session storage would probably be something like directed persistence. This would combine the two step process of 1) setting a page class property 2) flash persisting the property into one. In other words, not just flash persistence, but specifically intended for pickup by next request by a specific page. Or is there something like already? -- View this message in context: http://tapestry.1045711.n5.nabble.com/CRUDS-QBE-Create-Read-Update-Delete-CRUD-plus-Search-and-Query-by-Example-tp5673726p5690115.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Best place to initialize form data
Yep, second Geoff. That is what I am doing - using onPrepareForRender(). Say specialized form is EditPerson.tml form t:type=Form t:id=person t:errors / [various form elements] /form /html In the corresponding EditPerson.java, this what I have: /** * Enables reuse of Edit as Create */ void onPrepareForRender() { if (this.person == null) { this.person = new Person(); // Person with defaults - populates the form } else { // nothing to do - form will pick up persisted person object } } I am posting because this probably most directly addresses your question - initialize with default values(?) Not sure if it is the most correct or elegant or what the side effects are - good or bad. One being that the person object needs to be persisted in the Session (for submit to work). Whereas using the beaneditor co, you just need to use activationContext and the person is initialized by just the Id. Thoughts? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Best-place-to-initialize-form-data-tp5685603p5688725.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: getting the object in a row from a grid component
Perhaps - persist the list (results) in your session? You could probably, then, use Id in the grid -- View this message in context: http://tapestry.1045711.n5.nabble.com/getting-the-object-in-a-row-from-a-grid-component-tp5687588p5688732.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: getting the object in a row from a grid component
This? http://tapestry.apache.org/using-select-with-a-list.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/getting-the-object-in-a-row-from-a-grid-component-tp5687588p5688802.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
Thanks, for chiming in, Howard. Somewhat gratified by your perspective as this being more like shades-of-grey rather than black-and-white. May be I should have asked differently...bit upset with the group, though, for asking me to post code and then essentially ignoring it, even maligning it as above, perhaps, not the Tapestry way. But of course it is not - LOL - it is my way. I want to improve it. Just FYI, I considered all comments except the ones that I could not get to work...(i.e. not ignoring anything...) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5684938.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
1. Removing @Persist breaks the input form - as designed - not using beaneditor, beaneditform. 2. Changing the person field breaks the grid - again, as designed - workaround being context=0. 3. I have removed the onActivate, OnPassivate - easy. As I see it the app is hanging together, no errors. Just not done the proper way. Could I trouble you with Step 23 of the blog? Download the source, make the changes, test and post back? May be the there should separate component, templates? I WILL post any code from you (Lance), Thiago et. al, that actually works...out of respect for the fact that you know Tapestry better. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5686974.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: CSS Driven Tabs
Thanks, Geoff. Love Jumpstart. Sticking with my counsel on this onejust doing a simple one-level menu, so pretty sure I nailed it, for now ;-) I selected the unravel CSS 2.0 tabs since it makes CSS do all the heavy-lifting. Always a better approach, if feasible. And the CSS itself is pure with no imagery etc. With tabX in the styles being replaced by componentResourcs.getPageName() as the alternate id mechanism in the unravel CSS 2.0 code, the polymorphism required in the component template falls into place. Now, all the components and page classes involved are completely free of any tabs related code, almost oblivious to the menu driving the application. Just importing the tabs.css into Layout.java in the usual manner. Nothing else there. No request parameters, Environment push-pop etc needed anymore. Basically, all the magic happens within Layout.tml which can (thankfully) pick up the pageName - and hence use it to conditionally style the page. Specifically, in the unravel CSS 2.0 code you would simply replace tabX with your page names. In the example below, Index replaces tab1, Products replaces tab2, Library replaces tab3 etc... body id=${prop:componentResources.pageName} html xmlns=http://www.w3.org/1999/xhtml; xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; xmlns:p=tapestry:parameter head meta http-equiv=content-type content=text/html; charset=utf-8/ titleWhatever/title /head body id=${prop:componentResources.pageName} ul id=tabnav li class=Indext:pagelink page=indexHome/t:pagelink/li li class=Productst:pagelink page=productsProducts/t:pagelink/li li class=Libraryt:pagelink page=libraryBibliography/t:pagelink/li [etc...] /ul t:body/ /body /html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5682662.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
Thiago, I perfectly understand where you are coming from. But it is hardly defensible. And, I suspect you know it. I have just proven to you polymorphic behavior of components using just pageName. Imagine what else can done, in menus alone, with more visibility - multi-level drill-downs etc. The possibilities are simply fantastic. If Tapestry, cannot (or will not) do it - there are other frameworks who will. Waving your resume, or credentials, is not going to help in the face of sheer power of logic, or the market. If you do not want to call it Polymorphism - fine - call it sometihng else. I was using that term loosely to convey some sense of different behavior based on what page the component is templating. The objective here is to enhace that behavior, not block the very consideration of it. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5683836.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
Good grief. O well, that is probably more oxygen for others. Thanks for you inputs nevertheless - the ones with substance, anyway. As for wink, wink, we are already doing magic - it borders on delusional - suggesting some sort of inside clique that is bullying everyone else - helping some and not others - you have perfect right to do that, but that there will more footsteps out the door than inpossibly mine too. Good bye. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5684049.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
All:Again, I appreciate the inputs, efforts and suggestions, even good advice. And, if someone does something differently, it is not hacky. The blog post, BTW, was for you specifically for your constructive comments. I was inspired to do that since we were just waving hands on this forum, going off in tangents. You now have something concrete. Lets improve it together. I have (and will ) incorporate many of those comments - just not all of them - unless I have code that actually works. Just declaring try this and that is not sufficient. Finally, as for time spent, we are all in the same canoe. This is the only way this tool gets sharpened. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5684235.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Can Component Template be Informed by Page Class
Would like put a property in the component that will be rendered only in the context of a page, picking up, say, a page property. To illustrate, lets say we want Layout.tml to have the following pseudo-html-element: htmlelement id=${pageProperty} / t:body / Layout.java is empty. Index.java: public class Index { @Property private String pageProperty= indexProperty; } Index.tml can be whatever, but would like to avoid putting html element in there to avoid repetition - the htmlelement could be very big - like a menu for the entire application, whereby the page property is used to customize the menu for the individual pages. Basically, is there is a way for a component to inherit properties of child component (page)? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
This may be a somewhat of a useful stand-in for the pageProperty... ${prop:componentResources.pageName} It gets you the page name...and can be put in the component. However, something like this would be useful ${prop:componentResources.pageName.pageProperty} What do you guys think - JIRA worthy??? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681430.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
OK...I think I got it...this works...swapping the property to the component instead and have it intercept the page request htmlelement id=${pageProperty} / t:body / Layout.java : public class Layout { @ActivationRequestParameter @Property private String pageProperty= default; } Index.java is now empty But Index page will have to be called by invoked index?pageProperty= -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681501.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
It violates the self-contained principle for components very badly. Sorry - Disagree. Components are NOT meant to be self-contained. They are supposed to govern sub-components. In fact, prop:componentResources.pageName is a step in the right direction. I am just asking to extend it further Question does not make sense... pages, like Index, are not inheriting layout etc, from component Layout? What am I missing? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681512.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
From: http://tapestry.apache.org/link-components-faq.html Every component has an extra property, componentResources, added to it it's the instance of ComponentResources that represents the link between your code and all of Tapestry's structure around your class. . As an added benefit,* if the page class is ever renamed or moved to a different package, the pageName property will automatically adjust to the new name*. ...This is what I am talking about. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681531.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
In other words, why is this bad? What specific dangers, problems do you see? I see only more convenience. If, by bad, you mean in poor taste - just don't use it. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681540.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
Right back at you guys on citations ;-). What principles is this breaking? BTW, I just posted a citation which describes the componentResources...which is already able to pull up the pageName...this is very useful in authoring solid code at the page level. Why would componentResources have the pagename attribute if the INTENT was otherwise (that is, as you are suggesting, the component to be oblivious to the page)? And if it does already have pageName, why not access to pageName.property? To me, it seems counter-intuitive to place a property of a page into a component and to then have it trickle back down to the page...when the component could simply access the property directly (just like it does the pageName). Also, I did review Lance's example...the images are not being pulled up, so it is a bit of a hard read. Also, it does not seem to be getting any parameters from a page. Unless... the message (best practice according to you guys) is to use the getters and setters of the component class from the page class...presumably with one of pre-rendering event handlers...which is essentially the same operation (for simple strings like ids) as request parameter...? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681722.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
For the component to pick up page property would make it Polymorphic. Components, for instance, can then just be a shape with an abstract draw() method. The page will tell it what the shape is and what exactly the draw method will do or for that matter what those parameters are - in case of a circle it would be a radius, for rectangle - two sides etc. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681782.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Can Component Template be Informed by Page Class
OK. Lets leave it at that, I guess. Agree to disagree ;-). 1. Polymorphism is not about implementation at all. It is about interfaces, which is what Components can aspire to be, sort of. In that case, components, do not get tied to page properties - they use only those available - and if not, they behave as if those properties do not exist. That is Polymorphism, for me. So a shape would draw only if there was concrete draw provided, other it would ignore the draw request. 2. This discussion is about expanding horizons of Tapestry...not saying this a Very Bad Thing etc or giving up because it is difficult. That is why we can have JIRA (let it be in Version 7). Or citing some principles that are yet to be articulated fully...for all I know, we are doing that now. Basically, it is about more magic, not less functionality. 3. I see pageName is just another page property...nothing more, nothing less (or should be, if not). Therefore, all other page properties should be visible as well. Of course, I have not looked at the code... That said, THANKS, I like the idea of ComponentResources.getPage()...*may* indeed be the answer I was look for...but I am already on a roll, so perhaps will look into later and report back -- View this message in context: http://tapestry.1045711.n5.nabble.com/Can-Component-Template-be-Informed-by-Page-Class-tp5681397p5681962.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
CRUDS-QBE Create Read Update Delete CRUD plus Search and Query by Example
Here we go guys (esp. Thiago, Lance...thanks for your thoughts), Have at it... the following blog builds on T5 quick start, tutorials, user guide etc, and gleanings from this message board to create a simple CRUDS-QBE re-usable form interface and listing page for an entity (Person). http://crudsqbe.wordpress.com/2012/04/29/tapestry/ Pretty sure I am doing some lame stuff, like unnecessary persisting, so constructive comments are welcome (here or on the blog itself). I hope to refine it to a point where it may be an useful tutorial for beginners. -- View this message in context: http://tapestry.1045711.n5.nabble.com/CRUDS-QBE-Create-Read-Update-Delete-CRUD-plus-Search-and-Query-by-Example-tp5673726p5673726.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Upgrading to Hibernate Core 4.1.1 Final
Issue: Current (5.3.2) versions of Tapestry-Hibernate seem to clash with latest 4.1.1 Final of Hibernate core. Specifically, import org.hibernate.Session can no longer be resolved after introducing the 4.1.1 Final dependency in pom. Anyone else experience this, have a convenient workaround? I would like to avoid messing around in framework code, if I can get away with it...;-)... My pom.xml (partial) dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version${tapestry-release-version}/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-search/artifactId version4.1.0.CR2/version /dependency dependency groupIdorg.hibernate/groupId artifactIdhibernate-core/artifactId version4.1.1.Final/version /dependency -- View this message in context: http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669640.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading to Hibernate Core 4.1.1 Final
Whacking tapestry-hibernate does not help either... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669693.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading to Hibernate Core 4.1.1 Final
Neither did this work... dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version${tapestry-release-version}/version exclusions exclusion groupIdorg.hibernate/groupId artifactIdhibernate-core/artifactId /exclusion exclusion groupIdorg.hibernate/groupId artifactIdhibernate-search/artifactId /exclusion /exclusions /dependency -- View this message in context: http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669713.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading to Hibernate Core 4.1.1 Final
Yes, basically the exception is a compile exception saying the following could not be resolved: import org.hibernate.Session; And, finally, I also tried this: dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate/artifactId version${tapestry-release-version}/version exclusions exclusion groupIdorg.apache.tapestry/groupId artifactIdtapestry-hibernate-core/artifactId /exclusion /exclusions /dependency -- View this message in context: http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669761.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading to Hibernate Core 4.1.1 Final
OK. Gave up on this, next version will probably include anyway. For now, looks like Tapestry 3.5.2 depends on Hibernate 3.6.0.Final. I downloaded that http://grepcode.com/snapshot/repo1.maven.org/maven2/org.hibernate/hibernate-core/3.6.0.Final and I am off doing useful work ;-). Thanks, folks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669793.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading to Hibernate Core 4.1.1 Final
Thanks, kristian. I tried that already (couple of times). Thanks, though. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5669799.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
grid dont link hibernate.classic.session?
Doing text search, using Hibernate cookbook recipe, using impl of org.hibernate.search.FullTextSession interface. When the list of entities is returned as return fullTextSession.createFullTextQuery(query, Person.class).list(); grid barfs the following: [ERROR] pages.Persons Render queue error in SetupRender[Persons:grid]: Failure reading parameter 'source' of component Persons:grid: $Session_b077f99da992 cannot be cast to org.hibernate.classic.Session org.apache.tapestry5.ioc.internal.util.TapestryException: Failure reading parameter 'source' of component Persons:grid: $Session_b077f99da992 cannot be cast to org.hibernate.classic.Session [...] Several questions: How else are we supposed to do Hibernate Search? Why is the grid worrying its poor brain on the Hibernate Session? It should be decoupled from it. Just be rendering the resultSet (List) instead. Any tips appreciated...Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/grid-dont-link-hibernate-classic-session-tp5669885p5669885.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: grid dont like hibernate.classic.session?
Source points to persons. This fires getPersons within Persons.Java. Which a list of type Person. Generated by the full text search API (which possibly encapsulates the classic session). .. all this is traced in logs... Why should it matter either way...I am declaring regular session BTW... Or does source pick up the entire. Persons class? Not just fire getPersons...even then...how does the session become relevent in this? Thanks... -- View this message in context: http://tapestry.1045711.n5.nabble.com/grid-dont-link-hibernate-classic-session-tp5669885p5669983.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: grid dont like hibernate.classic.session?
Unless runtime error in getEpersons due to limitation in tapestry hibernate session? tested fine on hibernate-coreI that's it -- View this message in context: http://tapestry.1045711.n5.nabble.com/grid-dont-link-hibernate-classic-session-tp5669885p5670015.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Upgrading to Hibernate Core 4.1.1 Final
Thanks! Believe this is planned for 5.4.x...so let it slide. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Upgrading-to-Hibernate-Core-4-1-1-Final-tp5669640p5670087.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Hibernate Search Fix
Yep. That was it...Tapestry Hibernate Session needs work to play nice within FullTextSession. Workaround is in thread below: http://tapestry.1045711.n5.nabble.com/Hibernate-Search-td4446040.html Also, JIRA already open... https://issues.apache.org/jira/browse/TAP5-1178 I would add 1. Hibernate-Lucene search is one of the hottest (or coolest!) thing out ... this would be a priority 2. (and/or) disambiguate session generated by services as a tapestry creation...to perhaps avoid the confusion. Basically, I did this... 1. First inject the HibernateSessionManager just like you would Session. import org.apache.tapestry5.hibernate.HibernateSessionManager; import org.hibernate.Session; @Inject private Session session; @Inject private HibernateSessionManager sessionManager; 2. Use it to get the session (and not wrap just the plain old session)...the session may be used elsewhere to do usual CRUD, not hibernate search FullTextSession fullTextSession = Search.getFullTextSession(sessionManager.getSession()); // instead of // FullTextSession fullTextSession = Search.getFullTextSession(session); -- View this message in context: http://tapestry.1045711.n5.nabble.com/grid-dont-link-hibernate-classic-session-tp5669885p5670148.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Hibernate Search Fix
Interesting...thanks, Lance. Probably improves performance in search results page loading. -- View this message in context: http://tapestry.1045711.n5.nabble.com/grid-dont-link-hibernate-classic-session-tp5669885p5671534.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pagelink above grid picks up context from last pagelink in grid
Thanks, again, Thiago, Lance. We will have to pick this up later...I will be happy to post a toy application that will illustrate this (rather minor) anamoly.Please note, I am not using beaneditor or its cousin the beaneditorform. Need project specific styling. In think therein lies the heart of the issue: to persist or not - both of which have their uses and unintended side-effects (that need to be managed). And I have found one way to manage it (context=0). Just wanted to post that, originally. The only wart I see is the logs error, which is ignored. Otherwise all else works fine, as intended (by design). Thanks for the suggestions, though. I will consider. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5668865.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long
Still no trace of this error and cannot seem to reproduce it. I am pretty sure this was caused by using jQuery though - before replacing the $ sign with the word jQuery. http://docs.jquery.com/Using_jQuery_with_Other_Libraries and, while I was messing around trying to fix the apparent yuicompressor issue (with rhino-bugfix etc): http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-td5658826.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/ioc-Registry-Exception-Failed-Coercion-of-css-to-Entity-Id-type-java-lang-Long-tp5661389p5668894.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: AssetsModule.ResourceMinimizer Exception yui compressor
Best I can tell, this issue melted away after I fixed my jQuery dependent scripts. Specifically to replace $ with jQuery as advised below: http://docs.jquery.com/Using_jQuery_with_Other_Libraries My application is no longer dependent on yuicompressor-rhino-bugfix. I also whacked the yuicompressor dependency from my pom, without suffering the index out of bounds problem. Now, I just use yui to compress my script by command line (instead of pom). That works fine whether I do it or not. Not sure if this will help anyone...but just a possibility...since yui seems to creating quite a bit of mischief. -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-tp5658826p5664180.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pagelink above grid picks up context from last pagelink in grid
I will try this to improve. But the bad design, as you put it (and I agree), is required by the grid ... t:grid source=persons row=person add=delete include=code,name,organization,contact reorder=code,name,organization,contact ... The row attribute complained that there is no person attribute of class Persons...hence the added person as property, which in turn leads to unintended consequences noted. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5664249.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pagelink above grid picks up context from last pagelink in grid
Thanks, all, for college of knowledge ;-). Much appreciated. 1. I am not beaneditorform (or beaneditor) in EditPerson.tml, therefore the @Persist annotation is needed in Person.java for the form to accept the submit. form t:type=quot;Formquot; t:id=quot;personquot; Why? Simply, need a much more professional looking, styled form than is supported by these two. 2. The @Persist for person in EditPerson does indeed seem to clash with the declaration in Persons page, but simply changing it that variable to, say, personRow in Persons does not work since the object person is stored in session state and even the though the link above the grid renders without the Id anymore, clicking edit will still pull up the last added/editted record since it is in the session. Ditto for returning Id, flash persistence etc. Basically, the session will either store person (thereby pulling the last record) or not (thereby breaking the input form). 3. I am using EditPerson from the User Guide http://tapestry.apache.org/hibernate-user-guide.html Just added onPrepareForRender to create a new Person when in Create mode. Bottom line, I really see no other workarounds to simply doing the following: lt;t:pagelink page=quot;person/editquot; context=quot;0quot;Create new/t:pagelink This create a error in logs, trying to pull up the record with zero id, but the application chugs along fine. Using null or $N0 for context breaks the list page. Only zero works. The application is working fine now...doing all the CRUD. I would like to extend it to CRUDS-QBE...search and QBE as well...that is what I am working on now. Will follow the suggestions here. Thanks, again. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p572.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pagelink above grid picks up context from last pagelink in grid
package org.pacificcis.piko.pages.person; import org.hibernate.Session; import org.pacificcis.piko.entities.Person; import org.pacificcis.piko.pages.Persons; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.PageActivationContext; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.hibernate.annotations.CommitAfter; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.log4j.Logger; public class EditPerson { private static Logger logger = Logger.getLogger(EditPerson.class); @Inject private Session session; @PageActivationContext @Property @Persist private Person person; @InjectPage private Persons persons; Object onSuccess() { saveOrUpdate(); return persons; } @CommitAfter private void saveOrUpdate() { session.saveOrUpdate(person); } void onActivate(Person person) { this.person = person; } Object onPassivate() { return person; } void onPrepareForRender() { if (this.person == null) this.person = new Person(); } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5661321.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pagelink above grid picks up context from last pagelink in grid
Commenting out onPassivate does not help. Thanks -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5661333.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pagelink above grid picks up context from last pagelink in grid
Neither does this work... Object onPassivate() { return new Person(); } Only context=0. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5661353.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long
For some reason, HTTP request to edit/create page of the entity results in attempted coercion of the word css into the Id parameter (type Long) of the entity -- application workflow seems normal though. Just plenty of vomit in jetty console log...shown below. S T A C K T R A C E 127.0.0.1 - - [24/Apr/2012:08:40:32 +] GET /piko/person/edit/6 HTTP/1 .1 200 4314 http://localhost:8080/piko/persons; Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) [ERROR] ioc.Registry Exception in method null, parameter #1: Exception converting 'css' to instance of java.lang.Long (id type for entity org.pacificcis.piko.entities.person): Coercion of css to type java.lang.Long (via String -- Long) failed: For input string: css [ERROR] ioc.Registry Operations trace: [ERROR] ioc.Registry [ 1] Triggering event 'activate' on person/Edit [ERROR] ioc.Registry [ 2] PageActivationContextWorker activate event handler [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Exception in method null, parameter #1: Exception converting 'css' to instance of java.lang.Long (id type for entity org.pacificcis.piko.entities.person): Coercion of css to type java.lang.Long (via String -- Long) failed: For input string: css org.apache.tapestry5.runtime.ComponentEventException: Exception in method null,parameter #1: Exception converting 'css' to instance of java.lang.Long (id type for entity org.pacificcis.piko.entities.person): Coercion of css to type java.lang.Long (via String -- Long) failed: For input string: css at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1130) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3200(ComponentPageElementImpl.java:61) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1051) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1048) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87) at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1121) at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1047) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:302) at org.apache.tapestry5.internal.services.PageActivatorImpl.activatePage(PageActivatorImpl.java:34) at $PageActivator_38a723db6011.activatePage(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:57) at org.apache.tapestry5.services.TapestryModule$37.handle(TapestryModule.java:2207) at $PageRenderRequestHandler_38a723db6012.handle(Unknown Source) at $PageRenderRequestHandler_38a723db600c.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48) at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47) at $ComponentRequestHandler_38a723db600d.handlePageRender(Unknown Source) at $ComponentRequestHandler_38a723db5fd2.handlePageRender(Unknown Source) at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45) at $Dispatcher_38a723db5fd5.dispatch(Unknown Source) at $Dispatcher_38a723db5fcf.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_38a723db5fd0.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_38a723db5fd0.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_38a723db5fd0.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) at $RequestHandler_38a723db5fd0.service(Unknown Source) at org.pacificcis.piko.services.AppModule$1.service(AppModule.java:98) at $RequestFilter_38a723db5fca.service(Unknown Source) at
Re: Pagelink above grid picks up context from last pagelink in grid
Thanks, guys. LANCE: @Persist(PersistenceConstants.FLASH) makes nullifies Person in Persons page (listing page), thereby breaking it... THIAGO: return person.getId() breaks the Edit Page completely with Render queue error in BeginRender... Here is probably the clincher that this is a bug or some type of unitended workflow problem Fully qualifying the Edit link, as below, works fine to get the Edit page to render as Create (edit/) ...without filling the last record as (edit/5) t:pagelink page=person/EditPersonCreate NEW Person/Advanced Search/t:pagelink BUT. then clicking the create/update button after coming into edit (in create mode) nullifies person and breaks the persons listing pagehope that makes sense. I am agreeing with trsvax at the moment... Page re-use seems fraught with session/objects management issues. I am trying to re-use not just Create/Update but also Query by Example (QBE). I have a button called Search and a method called onSelectedFromSearch in EditPerson.java That, too, seems to mess up the session as well, nullifying the person before it can be employed in QBE Search. In any case, this is all looking like Struts, only a bit backwards...Create, Edit and QBE pages are all identical except for the ACTION of the submit button. In Struts, you just send the action to a different METHOD in the same CRUD class - if it needs something in the Valuestack it will get it - otherwise it just proceed merrily along. But due to apparent ambiguity of activate/passivate in Create/Edit, seems like we are best off maintaining three separate sets of files - tml and java - one each for Create, Update and QBE. Otherwise each of these operations end up driving in each other's lanes. And, IF SO, this seems like a fundamental architectural weakness, not just a bug(?). Using a component (or jsp) to render most of the form will probably save tripling the pain...but that would defeat the purpose of form re-use. I would be happy to be proved wrong - if there is a working app out there which does all three Create/Update and QBE... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5663892.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: ioc.Registry Exception Failed Coercion of css to Entity Id type java.lang.Long
Aha. Thanks, Howard. Makes sense. That is probably what was going on. I am, however, using the context: in all my templates and corresponding java classes, as intended. And, for the life of me, I am unable to trap the issue any longer. The logs seem to be free of it last time I checked and, of course, it never seemed to interrupt the workflow. If I find it happens again, I will try to isolate it and post again. -- View this message in context: http://tapestry.1045711.n5.nabble.com/ioc-Registry-Exception-Failed-Coercion-of-css-to-Entity-Id-type-java-lang-Long-tp5661389p5663911.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Better Looking Input Form
Interesting. Inspiring. I am thinking along same lines. Perhaps... 1) Reflect the bean into some markup like XML. 2) Apply whatever-needed transformation (XSLT/CSS ?) to it. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Better-Looking-Input-Form-tp5656603p5658603.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
AssetsModule.ResourceMinimizer Exception yui compressor
With or without (by comment out in pom.xml) yui-compressor, getting the following minimizing exception. Application 'app' (version 1.0-SNAPSHOT) startup time: 274 ms to build IoC Regis try, 862 ms overall. __ __ /_ __/__ ___ ___ / /___ __ / __/ / / / _ `/ _ \/ -_|_-/ __/ __/ // / /__ \ /_/ \_,_/ .__/\__/___/\__/_/ \_, / // /_/ /___/ 5.3.2 [INFO] AppModule.TimingFilter Request time: 1352 ms [INFO] AppModule.TimingFilter Request time: 87 ms [ERROR] AssetsModule.ResourceMinimizer Exception minimizing context:js/addCheckBoxLabelToKeywords.js: String index out of range: 351 java.lang.StringIndexOutOfBoundsException: String index out of range: 351 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.lt;init(JavaScriptCompressor.java:533) at org.apache.tapestry5.internal.yuicompressor.JavaScriptResourceMinimizer.doMinimize(JavaScriptResourceMinimizer.java:98) at org.apache.tapestry5.internal.yuicompressor.AbstractMinimizer$1.perform(AbstractMinimizer.java:67) at org.apache.tapestry5.internal.TapestryInternalUtils$5.run(TapestryInternalUtils.java:582) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:51) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(OperationTrackerImpl.java:48) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationTrackerImpl.java:47) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerThreadOperationTracker.java:76) at org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java:1116) at org.apache.tapestry5.internal.TapestryInternalUtils.performIO(TapestryInternalUtils.java:576) at org.apache.tapestry5.internal.yuicompressor.AbstractMinimizer.minimize(AbstractMinimizer.java:61) at org.apache.tapestry5.internal.services.assets.MasterResourceMinimizer.minimize(MasterResourceMinimizer.java:44) at $ResourceMinimizer_1ac2e7b3.minimize(Unknown Source) at org.apache.tapestry5.internal.services.assets.SRSMinimizingInterceptor.getStreamableResource(SRSMinimizingInterceptor.java:44) at org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:56) at org.apache.tapestry5.internal.services.assets.SRSCompressingInterceptor.getStreamableResource(SRSCompressingInterceptor.java:40) at org.apache.tapestry5.internal.services.assets.SRSCachingInterceptor.getStreamableResource(SRSCachingInterceptor.java:56) at $StreamableResourceSource_1ac2e7b1.getStreamableResource(Unknown Source) at org.apache.tapestry5.internal.services.ResourceStreamerImpl$1.perform (ResourceStreamerImpl.java:93) at org.apache.tapestry5.internal.TapestryInternalUtils$5.run(TapestryInt ernalUtils.java:582) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(Opera tionTrackerImpl.java:51) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(Opera tionTrackerImpl.java:48) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(Operati onTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationT rackerImpl.java:47) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerTh readOperationTracker.java:76) at org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java: 1116) at org.apache.tapestry5.internal.TapestryInternalUtils.performIO(Tapestr yInternalUtils.java:576) at org.apache.tapestry5.internal.services.ResourceStreamerImpl.streamRes ource(ResourceStreamerImpl.java:86) at $ResourceStreamer_1ac2e7af.streamResource(Unknown Source) at org.apache.tapestry5.internal.services.assets.ContextAssetRequestHand ler.handleAssetRequest(ContextAssetRequestHandler.java:53) at org.apache.tapestry5.internal.services.AssetDispatcher.dispatch(Asset Dispatcher.java:114) at $Dispatcher_1ac2e7a8.dispatch(Unknown Source) at $Dispatcher_1ac2e7ac.dispatch(Unknown Source) at $Dispatcher_1ac2e7a6.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator .service(TapestryModule.java:302) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(Req uestErrorFilter.java:26) at $RequestHandler_1ac2e7a7.service(Unknown Source) at
Re: AssetsModule.ResourceMinimizer Exception yui compressor
Tried https://issues.apache.org/jira/browse/TAP5-1729 No success -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-tp5658826p5658828.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: AssetsModule.ResourceMinimizer Exception yui compressor
Tried compressing it... java -jar yuicompressor-2.4.7.jar addCheckBoxLabelToKeywords.js -o addCheckBoxLabelToKeywords-min.js Still same failure. Works in Jetty. Tomcat is failing on this... -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-tp5658826p5658831.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: AssetsModule.ResourceMinimizer Exception yui compressor
Thanks, Chris. Yes, I whacked yui from pom. Still same issue. I put the script into my tml. But it is failing on jquery-1.7.2.min.js as well. -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-tp5658826p5658865.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: AssetsModule.ResourceMinimizer Exception yui compressor
Indeed that fixed the issue. Much Thanks, Luke. This community is simply great! -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-tp5658826p5659834.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: AssetsModule.ResourceMinimizer Exception yui compressor
Specifically, install the jar into repository as follows: mvn install:install-file -Dfile=yuicompressor-rhino-bugfix-5.0.jar -DgroupId=yuicompressorbugfix -DartifactId=yuicompressor-rhino-bugfix -Dversion=5.0 -Dpackaging=jar Added/replaced the following in pom.xml dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-yuicompressor/artifactId version${tapestry-release-version}/version exclusions exclusion groupIdcom.yahoo.platform.yui/groupId artifactIdyuicompressor/artifactId /exclusion /exclusions /dependency dependency groupIdyuicompressorbugfix/groupId artifactIdyuicompressor-rhino-bugfix/artifactId version5.0/version /dependency -- View this message in context: http://tapestry.1045711.n5.nabble.com/AssetsModule-ResourceMinimizer-Exception-yui-compressor-tp5658826p5659846.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Pagelink above grid picks up context from last pagelink in grid
Here is a weird one. Probably a minor bug report, will open JIRA if anyone else can agree/reproduce. See the pagelink above grid in the code below? If there are three records, last id=3, it will render with the last pagelink (person/edit/3). This makes the Create new link pull up the third record for edit. Instead of rendering with empty person. I am reusing Edit page as create, obviously. html t:type=admin title=Persons xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; xmlns:p=tapestry:parameter body t:pagelink page=person/editCreate new/t:pagelink t:grid source=persons row=person add=delete include=code,name,organization,contact reorder=code,name,organization,contact p:deleteCell t:actionlink t:id=delete context=person.idDelete/t:actionlink /p:deleteCell p:nameCell t:pagelink page=person/edit context=person.id${person.name}/t:pagelink /p:nameCell p:empty pThere are no records; you can t:pagelink page=person/editadd some/t:pagelink./p /p:empty /t:grid /body /html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5660049.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Pagelink above grid picks up context from last pagelink in grid
This seems to fix it. t:pagelink page=person/edit context=0Create new/t:pagelink So, there is a workaroundfor now. As I said, minor bug. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Pagelink-above-grid-picks-up-context-from-last-pagelink-in-grid-tp5660049p5660054.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Better Looking Input Form
Somewhat outdated but helpful in this regard (Total Control form): http://jumpstart.doublenegative.com.au/jumpstart/examples/input/totalcontroledit1/1 But this is not for the faint of heart...for reasonably complex style-sheets. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Better-Looking-Input-Form-tp5656603p5657086.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Better Looking Input Form
This is somewhat less intrusive as well: t:beaneditor t:id=person/ Just happened on it at: http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Submit.html To separately style, used embedded attributes: t:beaneditor t:id=person/ div class=addresst:beaneditor t:id=person.address//div -- View this message in context: http://tapestry.1045711.n5.nabble.com/Better-Looking-Input-Form-tp5656603p5657113.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Reuse Edit/Create for Query by Example
Search is next step from the following thread whereby an UPDATE form may be REUSED to ADD a database record: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-td5643323.html The same form should do Query By Example (QBE) supported as by Hibernate: http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/ch17.html#querycriteria-examples So the same exact form is now used to ADD, UPDATE or QBE. For the sake of completeness, here is EditPerson from http://tapestry.apache.org/hibernate-user-guide.html modified for dual service as Edit/Create public class EditPerson { @Inject private Session session; @PageActivationContext @Property private Person person; @InjectPage private Persons persons; void onActivate(Person person) { this.person = person; } Object onPassivate() { return person; } @CommitAfter Object onSuccess() { session.saveOrUpdate(person); return persons; } } Persons.java is simply doing listing public class Persons { @Property private Person person; @Inject private Session session; public ListPerson getPersons() { return session.createCriteria(Person.class).list(); } } Corresponding tmls are: EditPerson: t:beaneditform object=person / Persons: t:grid source=persons / which are inserted between the usual html t:type=layout title=Persons xmlns:t=http://tapestry.apache.org/schema/tapestry_5_3.xsd; xmlns:p=tapestry:parameter /html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-for-Query-by-Example-tp5655916p5655916.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Reuse Edit/Create for Query by Example
To do QBE, I would simply modify the getPersons method in Persons.java public ListPerson getPersons() { return session.createCriteria(Person.class).add( Example.create(person) ).list(); } This would use the person property to list persons list. Of course, I would check for person=nulls etc to protect the above and list all if so...the above is just to simplify. However, the input form needs another button in addition to Create/Update. Lets say I even manually add it - and call it Search. How does the EditPerson NOT end up creating a new Person? In the Struts world this would simply be a search method within same PersonAction class. And the same Person object on the Valuestack would be used as an Hibernate Example to drive search instead of ending up as parameter of AddPerson and creating a new record. And so on..., generally, how does one single form submit be wired to support multiple actions? Or is this frowned upon as bad practice? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-for-Query-by-Example-tp5655916p5655931.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Reuse Edit/Create for Query by Example
Most likely, the solution is to simply segregate Search (QBE) from Create/Update using EventLink. That is, segregate the Search workflow instead of overloading Create/Update. This is to bypass the (default?) onSuccess and therefore prevent the EditPage from Adding a Person instead of doing QBE. # QBE Search To style this as a Search BUTTON instead of a link, use ChenilleKit as in: http://jumpstart.doublenegative.com.au/jumpstart/examples/styling/linksandsubmits1 -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-for-Query-by-Example-tp5655916p5656016.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Reuse Edit/Create for Query by Example
Instead of eventlinks and the ch kit wrapper for button...just use: t:submit t:id=search value=QBE Search / http://tapestry.apache.org/current/apidocs/index.html?org/apache/tapestry5/corelib/components/EventLink.html -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-for-Query-by-Example-tp5655916p5656051.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Better Looking Input Form
Problem: Default styles are too clunky. Need to bolt a better style wrapper. I would like to use better looking forms generated by, say, http://www.appnitro.com/ Is there some documentation, best practice or cookbook, somewhere, on MERGING styles with default Tapestry styles? The only way, right now, seems to be to reverse engineer every use-case (like form errors etc) and capture each CSS class to redefine it according to the new style. Even then, session management glue code like the hidden t:formdata can only be discovered by accident in view-source. With so much dependency on stuff showing up only after maven build in /assets/1.0-SNAPSHOT-DEV/tapestry/ ... there seems to be a lot going on to even bother creating your own look-and-feel (and also have tapestry form functionality). This would push back the project quite a bit...unless I am missing something? -- View this message in context: http://tapestry.1045711.n5.nabble.com/Better-Looking-Input-Form-tp5656603p5656603.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Better Looking Input Form
Bummer. Having both tapestry and non-tapestry styling is probably not a realistic option. From http://tapestry.apache.org/integration-with-existing-applications.html quote author=netdawg Tapestry's Form component does a lot of work while an HTML form is rendering to store all the information needed to handle the form submission in a later request; this is all very specific to Tapestry and the particular construction of your pages and forms; it can't be reproduced from a JSP. Well if it cannot be reproduced from JSP, plain HTML would be same thing. This is a serious problem. So either use your own form and roll your own validation etc - or use tapestry form with limited (default ) styles, or painful reconstruction in your styles to capture everything generated by tapestry (which itself can change). Am I understanding correctly? Ugh. This is why PHP ended up ruling the planet. I think what is probably needed is some sort of wizard to generate form a la appnitro.com or use some sort of decorator approach like Sitemesh does to augment plain HTML forms. Not sureany help/pointers would be appreciated. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Better-Looking-Input-Form-tp5656603p5656680.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Reuse Edit/Create
How to reuse the EditPerson from http://tapestry.apache.org/hibernate-user-guide.html as also create. public class EditPerson { @Persist(entity) @Property private Person person; @InjectPage private PersonIndex personIndex; void onActivate(Person person) { this.person = person; } Object onPassivate() { return person; } @CommitAfter Object onSuccess() { return personIndex; } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-tp5643323p5643323.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Reuse Edit/Create
Replacing @Persist(entity) with @PageActivationContext seems to do the trick. There was also talk of creatively coding the onActivate method starting with version 5.3. Of course, the onSuccess() is modified to @CommitAfter Object onSuccess() { session.saveOrUpdate(person); // rather than just persist return personIndex; } Just curious what the best (new) practice is for this common design pattern of Add/Update being driven by the same page/class etc. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-tp5643323p564.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Reuse Edit/Create
Thanks, Thiago. I am not sure I understand, though. Let me clarify. Here is a another thread that brought up this subject with a rather elaborate (unnecessary) workaround: http://tapestry.1045711.n5.nabble.com/Using-the-same-page-for-edit-new-Solution-td4876281.html Howard Lewis Ship wrote I recently changed Tapestry 5.3 so that the Hibernate ValueEncoder (used implicitly by @PageActivationContext) will encode a transient entity as null. This makes it possible to use the same page for add and edit, with *a bit of smart logic in your onActivate() event handler method/br. In the above EditPerson class from Tapesrty-Hibernate tutortial, I was able to replace @Persist(entity) with @PageActivationContext and get it to work, apparently. Still somewhat mystified, though, about the smart logic needed within onActivate()...what am I missing...?? In other words, if you could modify the EditPerson class to service a form input that is both Add and Update, what smart coding would you do in onActivate and why? And, for the benefit of the community, can we declare that as a standard/best practice for this common design pattern of Edit/Create form? If not, what would that practice be, if that can be articulated? Hope that is clear. Thanks, again, for your time. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-tp5643323p5645309.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Reuse Edit/Create
Thanks, Thiago. I think I understand the logic/strategy: If there's a context value passed, it is the id of an object to be edited. If not, we're going to create a new object. In the above code, just changing @Persist(entity) to @PageActivationContext seems to achieve that Is that all? I guess my question was WHAT ELSE needs to be done to get this production ready? Howard's quote seems to suggest something smart needed within the onActivate method. I suppose the only thing needed in onActivate is this.person = person; (???) void onActivate(Person person) { this.person = person; // is this the only smart thing needed in onActivate? } Is that all, or is there something else? By now, I am almost convinced the answer is: YES, that is all that is needed...(but just wanted to make absolutely sure about this, so I don't end up with something flaky just because I did not do the intended smart thing within onActivate()...;-) Thanks again...and, please bear with me as I learn to adjust to Code less, deliver more... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Reuse-Edit-Create-tp5643323p5645453.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
I posted in Tomcat forum and got this response - have not tested - posting here as-is, use at your own risk: If a file named index.jsp is declared as a welcome and it is not there in the system, tomcat does not allow failover to framework like Tapestry. It sounds like behaviour that can be controlled by resourceOnlyServlets option in Context, See http://tomcat.apache.org/tomcat-7.0-doc/config/context.html The current behaviour is caused by compatibility concerns with earlier versions of Tomcat. Read the doc for more details. However, if a file named Bienvenue.jsp is declared as welcome file, the failover is allowed. Unlikely. You have to provide specific example to confirm that. The above mentioned option could explain that as well. Howeverwelcome-file-list / is ignored and server picks up default values in ${Tomcat.home}/conf/web.xml conf/web.xml is not just default. It is merged with app's web.xml using the rules for merging web fragments, as specified in the Servlet 3.0 Rev.a specification. If current behaviour contradicts with specification, please cite what point in merging algorithm is not followed. Best regards, Konstantin Kolinko -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5641083.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
To Reproduce (using Tomcat 7.0.4 with jdk1.6.0_22 64-bit), follow Getting Started at http://tapestry.apache.org/getting-started.html Specifically, 1. mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org 2. Create newapp, change to newapp directory (verify works in jetty, stop it by CTRL+C) 3. mvn package 4. Startup tomcat, use manager to deploy the war file generated under newapp/target 5. No errors 6. Click on http://localhost:8080/newapp (ERROR, see below) Expecting to see something like: http://tapestry.apache.org/getting-started.data/getting-started.png BUT, Chrome Browser shows (View Source): htmlheadtitleApplication Exception/titlelink type=text/css rel=stylesheet href=/newapp/assets/1.0-SNAPSHOT/tapestry/default.css/meta content=Apache Tapestry Framework (version 5.3.2) name=generator//headbody An unexpected application exception has occurred. pComponent Index does not contain embedded component 'jsp'./p/body/html Tomcat Console stacktrace (after deployment) is: Application 'app' (version 1.0-SNAPSHOT) startup time: 208 ms to build IoC Regis try, 674 ms overall. __ __ /_ __/__ ___ ___ / /___ __ / __/ / / / _ `/ _ \/ -_|_-/ __/ __/ // / /__ \ /_/ \_,_/ .__/\__/___/\__/_/ \_, / // /_/ /___/ 5.3.2 [ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'. org.apache.tapestry5.ioc.util.UnknownValueException: Component Index does not contain embedded component 'jsp'. at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.getEmbeddedElement(ComponentPageElementImpl.java:860) at org.apache.tapestry5.internal.structure.PageImpl.getComponentElementByNestedId(PageImpl.java:116) at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:79) at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handleImmediateActionRenderResponseFilter.java:42) at $ComponentEventRequestHandler_1e7c9be9cf1f.handle(Unknown Source) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_1e7c9be9cf1f.handle(Unknown Source) at org.apache.tapestry5.services.TapestryModule$40.handle(TapestryModule.java:2456) at $ComponentEventRequestHandler_1e7c9be9cf1f.handle(Unknown Source) at $ComponentEventRequestHandler_1e7c9be9cf16.handle(Unknown Source) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39) at $ComponentRequestHandler_1e7c9be9cf18.handleComponentEvent(Unknown Source) at $ComponentRequestHandler_1e7c9be9cee5.handleComponentEvent(Unknown Source) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) at $Dispatcher_1e7c9be9cee8.dispatch(Unknown Source) at $Dispatcher_1e7c9be9cee1.dispatch(Unknown Source) at org.apache.tapestry5.services.TapestryMoule$RequestHandlerTerminator.service(TapestryModule.java:302) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_1e7c9be9cee2.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902) at $RequestHandler_1e7c9be9cee2.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892) at $RequestHandler_1e7c9be9cee2.service(Unknown Source) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90) at $RequestHandler_1e7c9be9cee2.service(Unknown Source) at org.ideademo.piko.services.AppModule$1.service(AppModule.java:89) at $RequestFilter_1e7c9be9cedd.service(Unknown Source) at $RequestHandler_1e7c9be9cee2.service(Unknown Source) at $RequestHandler_1e7c9be9ced6.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_1e7c9be9ced8.service(Unknown Source) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_1e7c9be9ced4.service(Unknown Source) at $HttpServletRequestHandler_1e7c9be9ced8.service(Unknown Source) at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852) at
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
Found this little nugget: http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html http://tapestryjava.blogspot.com/2007/02/fighting-with-tomcat.html Unfortunately, our production is tomcat. Have to comply. Jetty will not do. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637652.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
Thanks for suggestion. No luck, though. Same error in Tomcat 7 with exploded war approach BUT...war file works in Tomcat 5.5.31 ...JDK 1.6.0_03... Go figure... -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637743.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
The index page of the T5 tutorial. Not sure of component. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637774.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
YES, about link works, with errors in logs, both in Tomcat 7 and 5, (and the index page continues to barf in Tomcat 7). Here is the corresponding stacktrace: First [ERROR] is from About page (renders fine though). Second, now familiar, [ERROR] is generated by clicking on Index link from About page Application 'app' (version 1.0-SNAPSHOT) startup time: 234 ms to build IoC Regis try, 780 ms overall. __ __ /_ __/__ ___ ___ / /___ __ / __/ / / / _ `/ _ \/ -_|_-/ __/ __/ // / /__ \ /_/ \_,_/ .__/\__/___/\__/_/ \_, / // /_/ /___/ 5.3.2 Apr 12, 2012 11:39:37 PM org.apache.catalina.startup.HostConfig deployDirectory INFO: Deploying web application directory ROOT Apr 12, 2012 11:39:37 PM org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Apr 12, 2012 11:39:37 PM org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 Apr 12, 2012 11:39:37 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 1434 ms [INFO] AppModule.TimingFilter Request time: 1092 ms [INFO] AppModule.TimingFilter Request time: 46 ms [INFO] AppModule.TimingFilter Request time: 46 ms [INFO] AppModule.TimingFilter Request time: 46 ms [INFO] AppModule.TimingFilter Request time: 46 ms [ERROR] AssetsModule.ResourceMinimizer Exception minimizing 'core' JavaScript st ack, for locale en, resources=classpath:org/apache/tapestry5/underscore_1_1_7.js , classpath:org/apache/tapestry5/scriptaculous_1_9_0/prototype.js, classpath:org /apache/tapestry5/scriptaculous_1_9_0/scriptaculous.js, classpath:org/apache/tap estry5/scriptaculous_1_9_0/effects.js, classpath:org/apache/tapestry5/t5-core.js , classpath:org/apache/tapestry5/t5-spi.js, classpath:org/apache/tapestry5/t5-pr ototype.js, classpath:org/apache/tapestry5/t5-init.js, classpath:org/apache/tape stry5/t5-pubsub.js, classpath:org/apache/tapestry5/t5-events.js, classpath:org/a pache/tapestry5/t5-dom.js, classpath:org/apache/tapestry5/t5-console.js, classpa th:org/apache/tapestry5/t5-ajax.js, classpath:org/apache/tapestry5/t5-formfragme nt.js, classpath:org/apache/tapestry5/t5-alerts.js, classpath:org/apache/tapestr y5/tapestry.js, classpath:org/apache/tapestry5/tapestry-console.js, classpath:or g/apache/tapestry5/tree.js, classpath:org/apache/tapestry5/tapestry-messages.js: java.util.EmptyStackException java.util.EmptyStackException at java.util.Stack.peek(Stack.java:85) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.getCurrentScop e(JavaScriptCompressor.java:559) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.printSymbolTre e(JavaScriptCompressor.java:1105) at com.yahoo.platform.yui.compressor.JavaScriptCompressor.compress(JavaS criptCompressor.java:553) at org.apache.tapestry5.internal.yuicompressor.JavaScriptResourceMinimiz er.doMinimize(JavaScriptResourceMinimizer.java:99) at org.apache.tapestry5.internal.yuicompressor.AbstractMinimizer$1.perfo rm(AbstractMinimizer.java:67) at org.apache.tapestry5.internal.TapestryInternalUtils$5.run(TapestryInt ernalUtils.java:582) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(Opera tionTrackerImpl.java:51) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl$1.invoke(Opera tionTrackerImpl.java:48) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(Operati onTrackerImpl.java:74) at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.run(OperationT rackerImpl.java:47) at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.run(PerTh readOperationTracker.java:76) at org.apache.tapestry5.ioc.internal.RegistryImpl.run(RegistryImpl.java: 1116) at org.apache.tapestry5.internal.TapestryInternalUtils.performIO(Tapestr yInternalUtils.java:576) at org.apache.tapestry5.internal.yuicompressor.AbstractMinimizer.minimiz e(AbstractMinimizer.java:61) at org.apache.tapestry5.internal.services.assets.MasterResourceMinimizer .minimize(MasterResourceMinimizer.java:44) at $ResourceMinimizer_2584ccfdb20b.minimize(Unknown Source) at org.apache.tapestry5.internal.services.assets.StackAssetRequestHandle r.assembleStackContent(StackAssetRequestHandler.java:175) at org.apache.tapestry5.internal.services.assets.StackAssetRequestHandle r.assembleStackContent(StackAssetRequestHandler.java:163) at org.apache.tapestry5.internal.services.assets.StackAssetRequestHandle r.getUncompressedResource(StackAssetRequestHandler.java:146) at org.apache.tapestry5.internal.services.assets.StackAssetRequestHandle r.getCompressedResource(StackAssetRequestHandler.java:132) at org.apache.tapestry5.internal.services.assets.StackAssetRequestHandle r.getResource(StackAssetRequestHandler.java:123) at org.apache.tapestry5.internal.services.assets.StackAssetRequestHandle
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
Indeed. But it is the reference implementation of the servlet standard. In other words, the fault is not with Tomcat...even if it probably is. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637826.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
Thanks. YES, commenting out yui-compressor dependency in pom.xml eliminates the first error above. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637859.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
YES. That solves the problem indeed. BUT, no thanks ;-). This fix will almost certainly break many other applications on the production server and I am pretty sure the community shares my sentiment. Unfortunately, T5 will need to address this. JIRA created: https://issues.apache.org/jira/browse/TAP5-1904 -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637941.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
Yes, this may indeed be the temporary workaround. Since it is limited to the application, and not the entire server/container, this is the preferred fix. Much Thanks for fleshing this out. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5637951.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
YES, that worked. Sort of. Root URL is not found, but if pulled up as Index, no mo [ERROR]. Specifically, http://localhost:8080/newapp/ leads to HTTP 404 error - page not found However, http://localhost:8080/newapp/Index works (?!) Sorry to be pickyHere is the quote from http://tapestry.apache.org/configuration.html#Configuration-Changestoweb.xml http://tapestry.apache.org/configuration.html#Configuration-Changestoweb.xml User Guide wrote Tapestry Requests vs. Container Requests The Tapestry filter matches all the requests that apply to Tapestry, and passes the rest off to the servlet container. In situations where there would be a naming conflict, */actual files inside the web application take precedence over Tapestry pages./* (*) *Tapestry recognizes the root URL, where the servlet path is simply /, and renders the application page Index, if it exists.* (which is the case with newapp...it has an Index component, but that is NOT what T5 is doing) (**) (*)meaning an index.jsp inside web app would intercept the request meant for the Index component? Guess what, it does...! ) (**) This contradicts (*) - I think we just discovered that this may not be working as advertised in (and probably not just in) Tomcat 7...unless configured to ignore welcome file list as advised. Basically, the root URL is not pulling up Index (first/before other resources)...and Tapestry is AMBIGUOUS about the precedence - at least in the manual. One would think the simplest fix would be to put an index.jsp in the newapp folder with a jsp forward to Index, as follows: jsp:forward page=/Index / But, sure enough, that does NOT work...would be too easy ;-). Nevertheless, good work. This has been fun. Yes, the JIRA 1904 may be closed...with the proper explanation of the workaround (as you guys see fit). -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638049.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
Placing index.jsp with the following in it solves the problem: % response.sendRedirect(Index); % No need to jury rig the configuration. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638076.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
And now empty welcome file list in application does NOT work. Make sense, since the server will just default upward from application to container level default list. I win ;-) -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638095.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tomcat 7 deployment TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Component Index does not contain embedded component 'jsp'.
Nope forward does not work, tried that first (see previous post). -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tomcat-7-deployment-TapestryModule-RequestExceptionHandler-Processing-of-request-failed-with-uncaugh-tp5637647p5638114.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org