Is breadcrumbs component hard in Tapestry?
Hello all. I tried to develop my breadcrumbs component, but it seems that it is a bit harder than expected to do it in component framework. Anyway, has anyone developed the same and is willing to share? IMPORTANT NOTE: this breadcrumb component should be dynamic in nature, not using only PageLinks to render links, but also DirectLinks (or whatever) to be able to pass some additional argument required for displaying some breadcrumb page. Typical case is when some breadcrumb link is leading to some EntityHome page of some db entity that requires entity ID to be displayed. Regards, Vjeran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: java.io.NotSerializableException - tapestry property
Hi Jesse, Yes, the problem is that it's being serialized. If I properly implement java.io.Serializable on the object, then the error goes away. I'm just thinking for some reason though that I vaguely remember the Tapestry documentation mentioning this and providing 3 different solutions to remedy the problem though I can't find the link...I've googled, searched my history etc...(very frustrating) Thanks, Josh Jesse Kuhnert wrote: Is it a parameter that is being serialized? You haven't provided the full stack trace so it's impossible to say why...(Other than the obvious that some user defined object you are using isn't java.io.Serializable ;) ) On 9/21/06, Peter Dawn [EMAIL PROTECTED] wrote: i think your output file is missing. the fill you are trying to write to does not exist. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
EventListener can update a For component ?
Hi everybody, I'm an starter in Tapestry 4.1, using tomcat 5.5 and jdk 1.5 I want to have a link (a plus image :P) that adds a new element to the for loop. I tried this: @EventListener(elements=addLink, events=onclick, submitForm=userForm, async=true) public void addNewRequester(IRequestCycle cycle){ this.getLoanAdvice().getRequesters().add(new PersonEconomicEvaluation()); cycle.getResponseBuilder().updateComponent(requestersLoop); } The html is this: span jwcid=requestersLoop fieldset div a jwcid=[EMAIL PROTECTED]img src=images/images-new/delsigner_01.jpg /a /div /fieldset Obviously, requesterLoop is a loop over the getLoanAdvice().getRequesters() ... the method 'addNewRequester' is supose to add a new item in the for loop. The serverside is called, but the client side doens't update correctly, eventhough I call the ' cycle.getResponseBuilder().updateComponent(requestersLoop);' method... I tried updating directly the entire form, but doesn't work. My first question is, is it possible ? And the second one is, can any of you see what I'm missing? Thanks in advance, -- Robert Ramírez Vique Computer Science Engineer
Troubles rendering CSS with Tapestry 4.0.2
For some days I've spent hours and hours increating a page that is rendered with the attached CSS. Aftertravelling round in the forum several tutorials and Google, I reallydon't know why the most described solution doesn't work for me. I'msure I overlook an important detail. Now I'm asking you professionalsout there in the world for the golden hint. The test app should load only one page that shows a navigation menu usingCSS. If I load this HTML page directly into the browser, it is shown correctly. If I call the page within the Tapestry application, the CSS styles are not shown. It seems like there wouldn't be any CSS file. The page is shown like written with naked HTML. Could anyone have a short look and *please* post a tip or a solution ? Thank you very much. Peter - The .application file: [code] ?xml version=1.0? !DOCTYPE application PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; application meta key=org.apache.tapestry.page-class-packages value=de.peter_siegel.tapestry.pages/ meta key=org.apache.tapestry.disable-caching value=true/ meta key=org.apache.tapestry.home-page value=Menu/ /application [/code] - The menu's .html file: [code]html jwcid=@Shell stylesheet=ognl:assets.css title=Navigation head jwcid=$remove$ meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 link rel=stylesheet type=text/css href=Menu.css/ /head body div id=navigation ul li a href=# target=app Back /a /li li a href=# target=app Forward /a /li li a href=# target=app Reload /a /li /ul /div /body /html [/code] - The menu's .page file: [code] ?xml version=1.0? !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; page-specification class=de.peter_siegel.tapestry.pages.Menu asset name=css path=context:/WEB-INF/Menu.css/ /page-specification [/code] The menu's CSS file: [code] #navigation { font-family: Arial, Helvetica, sans-serif; font-size: .9em; } #navigation ul { list-style: none; margin: 0; padding: 0; padding-top: 4px; } #navigation li { display: inline; } #navigation a:link, #navigation a:visited { padding: 3px 10px 2px 10px; color: #FF; background-color: #B51032; text-decoration: none; border: 1px solid #711515; } #navigation a:hover { color: #FF; background-color: #711515; } [/code] - The menu's .java page: [code] package de.peter_siegel.tapestry.pages; import org.apache.tapestry.html.BasePage; public class Menu extends BasePage { } [/code] - The rendered output HTML code in the browser: [code] !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; !-- Application: null -- !-- Page: Menu -- !-- Generated: Wed Sep 20 16:02:51 CEST 2006 -- html head meta name=generator content=Tapestry Application Framework, version 4.0.2/ meta http-equiv=Content-Type content=text/html;charset=UTF-8/ base href=http://localhost:8080/TapestryHelloWorld// titleNavigation/title link rel=stylesheet type=text/css href=/TapestryHelloWorld/WEB-INF/Menu.css/ /head body div id=navigation ul li a href=# target=app Back /a /li li a href=# target=app Forward /a /li li a href=# target=app Reload /a /li /ul /div /body /html !-- Render time: ~ 120 ms -- [/code]
OT - [Tapestry-Users] - prefix in mail subject?
Is there any way to set up the mails that go out prefixed with [Tapestry-Users] or something such? Just helps categorization of mails an easier tasks, visually. Thanks, Karthik
RE: OT - [Tapestry-Users] - prefix in mail subject?
Can't you categorize based on the recipient? Gmail offers that as an option when filtering. -Original Message- From: Karthik N [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 10:01 AM To: Tapestry users Subject: OT - [Tapestry-Users] - prefix in mail subject? Is there any way to set up the mails that go out prefixed with [Tapestry-Users] or something such? Just helps categorization of mails an easier tasks, visually. Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OT - [Tapestry-Users] - prefix in mail subject?
Sometimes visual scanning of the Email subject seems to help me a lot. But maybe it's just me ... On 9/21/06, James Carman [EMAIL PROTECTED] wrote: Can't you categorize based on the recipient? Gmail offers that as an option when filtering. -Original Message- From: Karthik N [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 10:01 AM To: Tapestry users Subject: OT - [Tapestry-Users] - prefix in mail subject? Is there any way to set up the mails that go out prefixed with [Tapestry-Users] or something such? Just helps categorization of mails an easier tasks, visually. Thanks, Karthik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Karthik
Re: Troubles rendering CSS with Tapestry 4.0.2
Servers do not serve content out of the WEB-INF folder. I'd move the css file in context/css/menu.css then define asset name=css path=context:/css/menu.css/ and for previewing the templates directly in browsers head jwcid=$remove$ meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 link rel=stylesheet type=text/css href=../css/menu.css/ /head Peter J. Siegel wrote: For some days I've spent hours and hours increating a page that is rendered with the attached CSS. Aftertravelling round in the forum several tutorials and Google, I reallydon't know why the most described solution doesn't work for me. I'msure I overlook an important detail. Now I'm asking you professionalsout there in the world for the golden hint. The test app should load only one page that shows a navigation menu usingCSS. If I load this HTML page directly into the browser, it is shown correctly. If I call the page within the Tapestry application, the CSS styles are not shown. It seems like there wouldn't be any CSS file. The page is shown like written with naked HTML. Could anyone have a short look and *please* post a tip or a solution ? Thank you very much. Peter - The .application file: [code] ?xml version=1.0? !DOCTYPE application PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; application meta key=org.apache.tapestry.page-class-packages value=de.peter_siegel.tapestry.pages/ meta key=org.apache.tapestry.disable-caching value=true/ meta key=org.apache.tapestry.home-page value=Menu/ /application [/code] - The menu's .html file: [code]html jwcid=@Shell stylesheet=ognl:assets.css title=Navigation head jwcid=$remove$ meta http-equiv=Content-Type content=text/html; charset=ISO-8859-1 link rel=stylesheet type=text/css href=Menu.css/ /head body div id=navigation ul li a href=# target=app Back /a /li li a href=# target=app Forward /a /li li a href=# target=app Reload /a /li /ul /div /body /html [/code] - The menu's .page file: [code] ?xml version=1.0? !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; page-specification class=de.peter_siegel.tapestry.pages.Menu asset name=css path=context:/WEB-INF/Menu.css/ /page-specification [/code] The menu's CSS file: [code] #navigation { font-family: Arial, Helvetica, sans-serif; font-size: .9em; } #navigation ul { list-style: none; margin: 0; padding: 0; padding-top: 4px; } #navigation li { display: inline; } #navigation a:link, #navigation a:visited { padding: 3px 10px 2px 10px; color: #FF; background-color: #B51032; text-decoration: none; border: 1px solid #711515; } #navigation a:hover { color: #FF; background-color: #711515; } [/code] - The menu's .java page: [code] package de.peter_siegel.tapestry.pages; import org.apache.tapestry.html.BasePage; public class Menu extends BasePage { } [/code] - The rendered output HTML code in the browser: [code] !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN http://www.w3.org/TR/html4/loose.dtd; !-- Application: null -- !-- Page: Menu -- !-- Generated: Wed Sep 20 16:02:51 CEST 2006 -- html head meta name=generator content=Tapestry Application Framework, version 4.0.2/ meta http-equiv=Content-Type content=text/html;charset=UTF-8/ base href=http://localhost:8080/TapestryHelloWorld// titleNavigation/title link rel=stylesheet type=text/css href=/TapestryHelloWorld/WEB-INF/Menu.css/ /head body div id=navigation ul li a href=# target=app Back /a /li li a href=# target=app Forward /a /li li a href=# target=app Reload /a /li /ul /div /body /html !-- Render time: ~ 120 ms -- [/code] -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tapestry-acegi form based login
On 9/21/06, Jesper Zedlitz [EMAIL PROTECTED] wrote: Is it possible to use a html form for login with tapestry-acegi instead of HTTP basic authentication? I'd like to know that too. I would like to write a third part for my tutorial http://wiki.apache.org/tapestry/AcegiSpringJava5 about that topic. Nice tutorial. I can answer your other wiki question about realm name. contribution configuration-id=hivemind.ApplicationDefaults default symbol=tapestry.acegi.realmName value=Member area / /contribution -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Alternate way to @EventListener with java 1.4
Hello, Is there a way if you are using java 1.4 to have a similar functionality to @EventListener. I am developing a new application and i would like to go with tap 4.1 but this application will run on java 1.4 so i can't use annotations, but i would really like to have a similar functionality to @EventListener. Thanks Numa http://www.le-voyage.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to obtain the servlet instance?
Hi all, I would like to obtain the servlet instance from within my pages in order to call the HttpSevlet methods for logging. My first cut was injecting it using something like: @InjectObject(service:tapestry.globals.HttpServlet) public abstract HttpServlet getHttpServlet(); To my surprise this didn't work :-(, Is there any way to get the servlet instance?, if not, How can I write to the servlet log from within my pages?. Regards, Manuel. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tapestry-acegi form based login
My approach predates tapestry-acegi, but I'm sure it could be adapted. I use a bit of a hybrid approach, where the authentication part is handled as described in the EWDT e-book and all of my protected pages extend a BaseProtectedPage class. My Login page has a UserValidator ASO injected, which in turn has an Acegi AuthenticationManager wired in by a UserValidatorFactory. My UserValidator ASO has validateUser(String username, String password) method that returns a UserProfile object (that implements Acegi's UserDetails). It invokes the AutheticationManager's authenticate method and stores the Authentication object into the SecurityContext. This replaces the pure-Acegi login form handling and allows me to use the EWDT style. There is also a convenience method checkPermission(String ifAnyGranted, String ifAllGranted, String ifNotGranted) that behaves like the Acegi's JSP taglib Authorize tag so I can make fine-grained decisions within a page. Jonathan -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Jesper Zedlitz Sent: Thursday, September 21, 2006 8:30 AM To: users@tapestry.apache.org Subject: tapestry-acegi form based login Is it possible to use a html form for login with tapestry-acegi instead of HTTP basic authentication? I would like to write a third part for my tutorial http://wiki.apache.org/tapestry/AcegiSpringJava5 about that topic. Jesper -- Jesper Zedlitz E-Mail : [EMAIL PROTECTED] Homepage : http://www.zedlitz.de ICQ# : 23890711 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Dynamic Sections on a Page
Hi, I think these components are well suited for this kind of job: http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/RenderBlock .html http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/Block.html /Firas -Original Message- From: Mike Grundvig [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 3:41 PM To: Tapestry users Subject: Dynamic Sections on a Page Hi all; first off, I just wanted to express my thanks to the devs and community for making Tapestry. It's a real piece of art. Thanks! I'm working on a site that has an admin system to store advertisments. These advertisements are small HTML blocks that they want inserted into specific places inside of a page. The entire site is broken into sections and the ads are tied to all the pages in a section. I know I can make a custom component and inject my ad service into it and then use that to load the files from the file system and dump the ad HTML right into the pages but that feels very clumsy. I want the ad HTML to be valid tapestry pages in their own right so they can take advantage of all the capabilities of tapestry. Basically, Id like a component that looks something like this: span jwcid=@AdDisplay adId=1 sectionId=learnAd 1 goes here/span And that would go on every page with a different section id for all locations. Then it would do this internally (psuedo code, obviously): // the url for this ad might be /ads/blah.html (yes, I have friendly urls working) Template template = getAdService().getTemplate(adId, sectionId); template.render(); How can I get a page from the tapestry engine via the name or path or some such in a way that I can dump it into the page? Thanks in advance for any advice! Michael - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanForm and no setter method for persistence id
Are you listing the properties explicitly, i.e. properties=name,description? If that's the case, I don't see how the BeanForm knows anything at all about your ID field. And if there's not even a setId( ) method, there's no way at all for BeanForm to modify the property (it doesn't modify fields directly). Is your Group object marked persistent in the page specification? This sounds like a problem somewhere else... Keep me updated, Daniel On 9/21/06, Claus Myglegaard Vagner [EMAIL PROTECTED] wrote: Hi, Is it possible to use the BeanForm component (http://beanform.sourceforge.net/) for updating a pojo with no setter method for a persistence id? For example I have a Group object with properties id, name, description. In the form only name and description is shown. I don't want to show the id and I don't want to have a setId(id) method on the pojo. This should be controlled by hibernate (with field access) completely. When there is no setter method for id - BeanForm is returning a Group object with a null value for id. This means that what should have been an update in the database becomes an insert since hibernate thinks that it is an not-persisted object (no id). Why cant the BeanForm component just update the fields in action (in the form) for the pojo e.g. just call setName and setDecription and leave the id intact? Regards Claus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: EventListener can update a For component ?
Problem solved, sorry, it was an stupid problem ... just a duplicated id for the addLink element. Anyway now this part works. On 9/21/06, Roberto Ramírez Vique [EMAIL PROTECTED] wrote: Hi everybody, I'm an starter in Tapestry 4.1, using tomcat 5.5 and jdk 1.5 I want to have a link (a plus image :P) that adds a new element to the for loop. I tried this: @EventListener(elements=addLink, events=onclick, submitForm=userForm, async=true) public void addNewRequester(IRequestCycle cycle){ this.getLoanAdvice().getRequesters().add(new PersonEconomicEvaluation()); cycle.getResponseBuilder().updateComponent(requestersLoop); } The html is this: span jwcid=requestersLoop fieldset div a jwcid=[EMAIL PROTECTED]img src=images/images-new/delsigner_01.jpg /a /div /fieldset Obviously, requesterLoop is a loop over the getLoanAdvice().getRequesters() ... the method 'addNewRequester' is supose to add a new item in the for loop. The serverside is called, but the client side doens't update correctly, eventhough I call the ' cycle.getResponseBuilder().updateComponent(requestersLoop);' method... I tried updating directly the entire form, but doesn't work. My first question is, is it possible ? And the second one is, can any of you see what I'm missing? Thanks in advance, -- Robert Ramírez Vique Computer Science Engineer -- Robert Ramírez Vique Computer Science Engineer
Re: Is breadcrumbs component hard in Tapestry?
- Original Message - From: Robert Zeigler [EMAIL PROTECTED] To: Tapestry users users@tapestry.apache.org Sent: Thursday, September 21, 2006 9:10 PM Subject: Re: Is breadcrumbs component hard in Tapestry? I haven't made a breadcrumbs component in tapestry. But I have a comment on implementation: If it's possible that some (or all) pages in the trail need parameters (as you mentioned), don't use page links or Direct Links at all; your pages (at least all of the ones that might end up as a crumb) probably ought to implement the IExternalPage (or is it IExternal? I always forget...) interface, do the setup based on the objectid (or whatever setup) in the activateExternalPage method, and then your component can (should) use ExternalLinks. This will keep your links much nicer, and the page setup logic contained within the appropriate page. Thanx Robert. I also thought that it would maybe work with IExternal stuff because these seem most similar to traditional action-based aproach. Listener method would be a little uglier though. -Vjeran - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Doubt about implementing Ajax request
Anyone? I am using Ajax 4.1. Need to do an ajax request to a class method so this method will do a search on database and return the result to the page. How to do it? On 9/21/06, Daniel Castro [EMAIL PROTECTED] wrote: The problem is that the documentation was not clear, for me, and I dont know what Tapestry API to use to make an Ajax call...to invoke a method of a class of mine and receive the response. and also how to make the binding between my button and the class method to call On 9/21/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Yes it does. Your post looked complicated enough that I figured you already knew that and ran into other issuesIt's fairly trivial to do what you want with all of the built in components if you read the documentation provided for them. Just don't go trying to modify a table. No matter how great our ajax stuff is it can't make IE not suck. (though the new FilteringTable will help when it lands soon) On 9/21/06, Daniel Castro [EMAIL PROTECTED] wrote: Thanks :) I will look :) But I thought tapestry 4.1 would have some features for ajax submit already implemented. On 9/20/06, Karthik N [EMAIL PROTECTED] wrote: you should look at the excellent Tacos framework to help you on this. It makes Ajax with Tapestry a breeze, thanks to some great work done. http://tacos.sourceforge.net/ in addition, if need be, you can look at Dojo and DWR to help you with Ajax. On 9/21/06, Daniel Castro [EMAIL PROTECTED] wrote: Guys, please help me, if possible. I have a page with a search form, and those form fields are used as parameteres for a search query (SQL). There are two content holders, that are div tags with specified ids, to hold the ajax return of the search and ajax return of the search details. Those content holders are placed bellow the search form, on the same page. What is the search result and what is the search detail? Well, the search result is a 6 columns table sqlmodel component (from contrib library) where the first column is the pk of the database entry that is displayed and the last column is a button to invoke the display of the details. The search detail is a table that displays less relevant informations about one row of the search. so lets suppose that 1 - I have the form page with the submit button 2 - I have a tapestry tabel component that returns the search result 3 - I have a class that returns a string containing the html code of that detail table associated with a primary key. 4 - I have a button on the result table, for each row, that passes the id of the row as atttribute or parameter 5 - I have the place holders identified (two div tags) How shoul I implement the ajax call for the search and the detail? Please, step by step explanatuion if possble. My big problem is how to do this call, i tried some approaches to solve this, but none was sucessful. Thanks everyone. -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill -- Thanks, Karthik -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds,
Re: application namespace message catalog question
It should be working, it does for me. Did you put it in the same dir as your .application file? YourApp.application YourApp_en.properties On Thu, 21 Sep 2006 21:41:00 +0200, Scott Jarvi [EMAIL PROTECTED] wrote: Hi, I have a component that makes use of localized messages that may be shared by other components and pages. Because of this, I've put the keys in my application-level message catalog. For some reason, the keys are not found when the component is rendered on my page. This seems like it should be supported based on the documentation, so I must be missing something simple. Any ideas?? Regards, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I intercept an org.apache.hivemind.ApplicationRuntimeException?
This thread might be a little help: http://article.gmane.org/gmane.comp.java.tapestry.user/29684 I've never found a way to override the ugly error page, I believe the exception is thrown by commons fileupload, not Tapestry. So I just set MultipartDecoderImpl's maxSize to -1 and validate the filesize with a validator. HTH Ben -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 21, 2006 12:52 PM To: users@tapestry.apache.org Subject: How do I intercept an org.apache.hivemind.ApplicationRuntimeException? I have a page that allows for file uploads, up to 10MB. The limit is enforced in my hivemodule.xml with this snippet: !-- Maximum upload size of files is 10MB = 10*1024*1024 -- implementation service-id=tapestry.multipart.ServletMultipartDecoder create-instance class=org.apache.tapestry.multipart.MultipartDecoderImpl,maxSize=104857 60 model=threaded / /implementation It works perfectly...if you upload a file larger than 10MB, you get a big ugly error page (pasted below). We catch all other exceptions with a configuration line in the .application file: page name=Exception specification-path=/foo/bar/CustomException.page/ But that isn't getting triggered on these 10MB upload errors. Thoughts? And Thanks, Tom Here's the big ugly error page: --- HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.hivemind.ApplicationRuntimeException: Unable to decode multipart encoded request: the request was rejected because its size (23940489) exceeds the configured maximum (10485760) org.apache.tapestry.multipart.MultipartDecoderImpl.decode(MultipartDecod erImpl.java:56) $ServletMultipartDecoder_10dd1546644.decode($ServletMultipartDecoder_10d d1546644.java) $ServletMultipartDecoder_10dd1546645.decode($ServletMultipartDecoder_10d d1546645.java) org.apache.tapestry.multipart.MultipartDetc ad naseum - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: application namespace message catalog question
Yes, we have an .application and .properties in the same directory. This works for us as well, for all of our pages that share resource keys. In this specific case, my component is referenced in the page, but nested inside our custom border component - is it the nested component that could be causing the problem? On 9/21/06, Martin Strand [EMAIL PROTECTED] wrote: It should be working, it does for me. Did you put it in the same dir as your .application file? YourApp.application YourApp_en.properties On Thu, 21 Sep 2006 21:41:00 +0200, Scott Jarvi [EMAIL PROTECTED] wrote: Hi, I have a component that makes use of localized messages that may be shared by other components and pages. Because of this, I've put the keys in my application-level message catalog. For some reason, the keys are not found when the component is rendered on my page. This seems like it should be supported based on the documentation, so I must be missing something simple. Any ideas?? Regards, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: application namespace message catalog question
I have no idea what could be wrong, nested components work fine with my global message catalog... Sorry. :( On Thu, 21 Sep 2006 22:39:45 +0200, Scott Jarvi [EMAIL PROTECTED] wrote: Yes, we have an .application and .properties in the same directory. This works for us as well, for all of our pages that share resource keys. In this specific case, my component is referenced in the page, but nested inside our custom border component - is it the nested component that could be causing the problem? On 9/21/06, Martin Strand [EMAIL PROTECTED] wrote: It should be working, it does for me. Did you put it in the same dir as your .application file? YourApp.application YourApp_en.properties On Thu, 21 Sep 2006 21:41:00 +0200, Scott Jarvi [EMAIL PROTECTED] wrote: Hi, I have a component that makes use of localized messages that may be shared by other components and pages. Because of this, I've put the keys in my application-level message catalog. For some reason, the keys are not found when the component is rendered on my page. This seems like it should be supported based on the documentation, so I must be missing something simple. Any ideas?? Regards, Scott - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Restart tomcat from within tapestry
guys, i want the ability to restart tomcat from within my web app. i want to provide a button, which the user clicks and it restarts tomcat. can somebody tell me how should i go about this. i am using tap3. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Doubt about implementing Ajax request
Look for the parameters updateComponents/async in most of the Submit/Link / Form type components in the 4.1 documentation. On 9/21/06, Daniel Castro [EMAIL PROTECTED] wrote: Anyone? I am using Ajax 4.1. Need to do an ajax request to a class method so this method will do a search on database and return the result to the page. How to do it? On 9/21/06, Daniel Castro [EMAIL PROTECTED] wrote: The problem is that the documentation was not clear, for me, and I dont know what Tapestry API to use to make an Ajax call...to invoke a method of a class of mine and receive the response. and also how to make the binding between my button and the class method to call On 9/21/06, Jesse Kuhnert [EMAIL PROTECTED] wrote: Yes it does. Your post looked complicated enough that I figured you already knew that and ran into other issuesIt's fairly trivial to do what you want with all of the built in components if you read the documentation provided for them. Just don't go trying to modify a table. No matter how great our ajax stuff is it can't make IE not suck. (though the new FilteringTable will help when it lands soon) On 9/21/06, Daniel Castro [EMAIL PROTECTED] wrote: Thanks :) I will look :) But I thought tapestry 4.1 would have some features for ajax submit already implemented. On 9/20/06, Karthik N [EMAIL PROTECTED] wrote: you should look at the excellent Tacos framework to help you on this. It makes Ajax with Tapestry a breeze, thanks to some great work done. http://tacos.sourceforge.net/ in addition, if need be, you can look at Dojo and DWR to help you with Ajax. On 9/21/06, Daniel Castro [EMAIL PROTECTED] wrote: Guys, please help me, if possible. I have a page with a search form, and those form fields are used as parameteres for a search query (SQL). There are two content holders, that are div tags with specified ids, to hold the ajax return of the search and ajax return of the search details. Those content holders are placed bellow the search form, on the same page. What is the search result and what is the search detail? Well, the search result is a 6 columns table sqlmodel component (from contrib library) where the first column is the pk of the database entry that is displayed and the last column is a button to invoke the display of the details. The search detail is a table that displays less relevant informations about one row of the search. so lets suppose that 1 - I have the form page with the submit button 2 - I have a tapestry tabel component that returns the search result 3 - I have a class that returns a string containing the html code of that detail table associated with a primary key. 4 - I have a button on the result table, for each row, that passes the id of the row as atttribute or parameter 5 - I have the place holders identified (two div tags) How shoul I implement the ajax call for the search and the detail? Please, step by step explanatuion if possble. My big problem is how to do this call, i tried some approaches to solve this, but none was sucessful. Thanks everyone. -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill -- Thanks, Karthik -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall never surrender. Winston Churchill -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com -- We shall go on to the end. We shall fight in France We shall fightover the seas and oceans. We shall fight with growing confidence and growing strength in the air. We shall defend our island whatever the cost may be We shall fight on beaches, we shall fight on the landing grounds, We shall fight in the fields and in the streets, We shall fight on the hills. We shall
Re: Restart tomcat from within tapestry
That would be nice to do if possible, although it would be a huge security risk. I would like it since at the moment I don't have service restart privileges on some servers. =) On a related note, I've been battling jar locking problems when hot deploying my web app on Tomcat. The AntiJARLocking and AntiResourceLocking context flags are not real solutions to paraphrase one Tomcat commiter. So restarting the service is the preferred option. (The jars getting locked were js-cook-menu_1.21.jar and derby.jar, not any Tapesty jars) On 9/21/06, Peter Dawn [EMAIL PROTECTED] wrote: guys, i want the ability to restart tomcat from within my web app. i want to provide a button, which the user clicks and it restarts tomcat. can somebody tell me how should i go about this. i am using tap3. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Restart tomcat from within tapestry
doesnt matter. the security risk is the responsibility of the client, if they want it then I will implement it. I will make them aware of the risks too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Restart tomcat from within tapestry
Perhaps you could simply let your listener method run a shell script? String[] command = {/etc/init.d/tomcat, restart}; Runtime.getRuntime().exec(command); But, Tomcat restarting itself from a web ui? You should ask your client why he believes he needs this... :) On Fri, 22 Sep 2006 00:51:58 +0200, Peter Dawn [EMAIL PROTECTED] wrote: doesnt matter. the security risk is the responsibility of the client, if they want it then I will implement it. I will make them aware of the risks too. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Restart tomcat from within tapestry
am using windows. so whats the location then. thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
What does your project directory structure look like?
Hi, I'm relatively new to Tap, and I am starting with Tap 4 and Eclipse. I've been using the directory structures as seen in Kent Tong's book. I also noticed the Tapestry examples (vlib and workbench) have html files that live in the root of the application, instead of in web-inf. Is this a standard thing to do? I've read that things inside web-inf can't be accessed directly by a web browser, so that seems like the correct place for the .page/.jwc's to go. Like I said, I have something that _works_, I am just curious to see if there are benefits to other methods, or drawbacks to mine (i'm sure my approach is naive): workspace\projectname workspace\projectname\build\classes (output dir for compiled classes) workspace\projectname\deploy (holds my war file when I export from eclipse) workspace\projectname\src\mypackage\ (no .java at this level) workspace\projectname\src\mypackage\model\ (classes that know nothing about tapestry) workspace\projectname\src\mypackage\controller\ (classes for pages and components) workspace\projectname\src\META-INF\ (holds hivemind.xml and sessions.xml) workspace\projectname\WebContent\css (css files) workspace\projectname\images (jpgs) workspace\projectname\META-INF (I think eclipse made this dir and manifest.mf for me) workspace\projectname\WEB-INF (all my .html, .page and .jwc files live directly in WEB-INF, as well as projectname.application and web.xml) workspace\projectname\lib (hold jars for jscookmenu, BIRT, etc) workspace\projectname\reporting\BIRT (holds birt engine, jars, resources, etc) When I export my project to a WAR, things in workspace\projectname\build\classes get put in WEB-INF\classes Please let me know what you think. I'm sure you guys have better organized project structures. For instance, do your Tapestry projects look like this? http://java.sun.com/blueprints/code/projectconventions.html Daniel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat restart through tapestry
Try looking into JMX MBeans. They provide a lot of this and other functionality. Peter Dawn wrote: guys, i have run into this problem. i am able to stop tomcat from the app. but, 1. if i have another button to start tomcat within the app, then that command is not captured as tomcat is not running and hence the web application is not running 2. if i execute a batch file, again the stop works but it does not start again. any ideas. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat restart through tapestry
sure will do. but its a funny problem. once you stop tomcat you cant restart it again, coz without tomcat your application wont run in the first place. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat restart through tapestry
So you need to restart the service from the app, not just stop it. I would think since the jvm Tomcat uses would disappear for a splits second you would need to hand off control to a something non-java, like a wsh so it can start the service afterwards. Unless there is a direct command you can give to Tomcat for restart that will handle this for you without. Or something like net restart tomcat service name if you have it installed as a service. Daniel On 9/21/06, Josh Joy [EMAIL PROTECTED] wrote: Try looking into JMX MBeans. They provide a lot of this and other functionality. Peter Dawn wrote: guys, i have run into this problem. i am able to stop tomcat from the app. but, 1. if i have another button to start tomcat within the app, then that command is not captured as tomcat is not running and hence the web application is not running 2. if i execute a batch file, again the stop works but it does not start again. any ideas. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat restart through tapestry
yes i am using tomcat as a service. and there is nothing called restart command. i can only start, stop or continue. but i have tried to execute a batch file, but due to browser restrictions it wont let me to do that. when i click on the link it doesnt do anything at all. but if i run that page standalone in HTML it runs the batch file. so i am kinda stuck. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat restart through tapestry
Please... Once again, move this to another list. I'm completely against censoring people but this is getting a little silly. On 9/21/06, Peter Dawn [EMAIL PROTECTED] wrote: yes i am using tomcat as a service. and there is nothing called restart command. i can only start, stop or continue. but i have tried to execute a batch file, but due to browser restrictions it wont let me to do that. when i click on the link it doesnt do anything at all. but if i run that page standalone in HTML it runs the batch file. so i am kinda stuck. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: Tomcat restart through tapestry
sorry my bad. point taken. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
template and key
Hi I have been looking at some tapestry examples and I noticed this notation span key=title.location / I figured this is related to the .properties file but how does this work? Is that documented anywhere? In addition I have also noticed the use of binding name=aName value{highlight:{ selectedCountries:'[255,255,184], 500, 500', '${currItem}':'[255,255,184], 500, 500' }} / is the template directive part of ognl or Tapestry and how does that work? I can't locate the documentation. Thanks -- -- e
Re: Expired Session message
Hey Greg, Just curious - did you eventually solve this? If so can you paste your solution? Thanks, Karthik. -- View this message in context: http://www.nabble.com/Asynchronous-form-submission-tf2253801.html#a6441359 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]