RE: Does Tapestry work with XHTML?
Please don't give up on the XHTML thing. Alex Russell is completely wrong in the article Jesse referred to. His condemnation of so-called academics (Alex's label) smacks of narrow-mindedness, lack of forethought and wilful unawareness of the very history of web development he briefly covers (i.e. tag soup et al) Yes, he's correct that implementing some standards can be testing and that an overly pedantic approach to them can be debilitating (as one commenter points out in that article: they are recommendations, not edicts). However, that doesn't mean that one should ditch them: the development of standards will, by definition, _always_ be in advance of practice. The idea is that one should always be working _towards_ the fullest possible implementation of relevant standards within the constraints of pragmatism ... for Tapestry, one of those standards _has_ to be XHTML because, in combination with other standards - such as CSS, it is the _only_ solution which offers the possibility of a consistent interface with the client-side - with the added benefit of a transparent incorporation of multi-format documents (e.g. XHTML + SVG + MathML etc) Whilst there is a degree of dissent about the relative merits of standards for client-side technologies at present (caused, in large part, by the failure of a certain leading browser manufacturer to propery implement them), this situation is only exacerbated by developer abandonment. As for Tapestry components that aren't able to produce valid XHTML ... they really should be able to by now and I think it's a bit weak that they don't. But, saying that, it is open source and you would be free to hack these components to produce the required XHTML. Chris -Original Message- From: Galam [mailto:[EMAIL PROTECTED] Sent: 30 May 2006 17:10 To: Tapestry users Subject: Re: Does Tapestry work with XHTML? Thanks everyone for the tips and advices. I'll stick with HTML then. On 5/29/06, Todd Orr [EMAIL PROTECTED] wrote: Yet, not all of Tapestry's components produce compliant xhtml, so you may be wasting your time going through these measures. On 5/29/06, Paul Cantrell [EMAIL PROTECTED] wrote: Right. And just to be clear: the .xhtml is not necessary for XHTML, not just for Tapestry, but in *any* content -- and I don't think the text/xml mime type is necessary either. It's the DOCTYPE that has the last word. Use the W3C validator when in doubt! Use it when not in doubt, too. Cheers, Paul On May 29, 2006, at 2:11 AM, Kristian Marinkovic wrote: hi, to use XHTML it is NOT necessary to rename the .html file to .xhtml. all you have to do is to add the dtd and the ?xml. the only reason i could imagine you want to rename it to .xhtml is because you could configure your webserver to set the correct mime-type (text/xml). but if you do so IE6 (and before) won't be able to display your document correctly. btw. if you put ?xml version=1.0 encoding=UTF-8? into your document IE6 will run in quirksmode and not in standard compliant mode! this may cause some misbehaviours when using css :) (boxmodel...) although it is not absolutly correct you may omit ?xml version=1.0 encoding=UTF-8? completly (or you generate it depending on the current browser :)). regards, kris Galam [EMAIL PROTECTED] omAn Tapestry users 29.05.2006 04:32 users@tapestry.apache.org K opie Bitte antwortenThema an Does Tapestry work with XHTML? Tapestry users [EMAIL PROTECTED] pache.org Hi all, Does Tapestry work with XHTML? I renamed Home.html to Home.xhtml in my test application, but I got an exception saying that Could not find template for page Home in locale en_US. --- org.apache.hivemind.ApplicationRuntimeException Could not find template for page Home in locale en_US. component: [EMAIL PROTECTED] location: context:/WEB-INF/Home.page, line 4, column 55 1 ?xml version=1.0 encoding=UTF-8? 2 !DOCTYPE page- specification PUBLIC -//Apache Software Foundation//Tapestry Specification 4.0// EN 3 http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd; 4 page-specification class=com.ttdev.HelloWorld.Home 5 component id=subject type=Insert 6 binding name=value value=greetingSubject/ 7 /component 8 /page-specification Thanks!
Locale switching question
Hello folks, please share your experience. What is he best way to implement locale switching in Tapestry applications? Say, your application supports English and German and there is a link to switch from one language to another. The problem is: if you just change the engine's locale in the link listener and return the same page - that page will still be in the old (now wrong) locale! Seems to be an old Tapestry issue, the solution would be to display another page. But that is VERY nasty, suppose I want to be able to change language on every page - do I have to double the number of pages in my application??? There must be some clean way (or smart trick), right? TIA Oleg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE: Does Tapestry work with XHTML?
+1 for XHTML and standards. btw. there is a firefox extension for validating pages on the fly: HTML Validator: https://addons.mozilla.org/firefox/249/ IMHO every web developer should use it :) best regards, kris Townson, Chris [EMAIL PROTECTED] .com An Tapestry users 31.05.2006 11:33 users@tapestry.apache.org Kopie Bitte antwortenThema an RE: Does Tapestry work with XHTML? Tapestry users [EMAIL PROTECTED] pache.org Please don't give up on the XHTML thing. Alex Russell is completely wrong in the article Jesse referred to. His condemnation of so-called academics (Alex's label) smacks of narrow-mindedness, lack of forethought and wilful unawareness of the very history of web development he briefly covers (i.e. tag soup et al) Yes, he's correct that implementing some standards can be testing and that an overly pedantic approach to them can be debilitating (as one commenter points out in that article: they are recommendations, not edicts). However, that doesn't mean that one should ditch them: the development of standards will, by definition, _always_ be in advance of practice. The idea is that one should always be working _towards_ the fullest possible implementation of relevant standards within the constraints of pragmatism ... for Tapestry, one of those standards _has_ to be XHTML because, in combination with other standards - such as CSS, it is the _only_ solution which offers the possibility of a consistent interface with the client-side - with the added benefit of a transparent incorporation of multi-format documents (e.g. XHTML + SVG + MathML etc) Whilst there is a degree of dissent about the relative merits of standards for client-side technologies at present (caused, in large part, by the failure of a certain leading browser manufacturer to propery implement them), this situation is only exacerbated by developer abandonment. As for Tapestry components that aren't able to produce valid XHTML ... they really should be able to by now and I think it's a bit weak that they don't. But, saying that, it is open source and you would be free to hack these components to produce the required XHTML. Chris -Original Message- From: Galam [mailto:[EMAIL PROTECTED] Sent: 30 May 2006 17:10 To: Tapestry users Subject: Re: Does Tapestry work with XHTML? Thanks everyone for the tips and advices. I'll stick with HTML then. On 5/29/06, Todd Orr [EMAIL PROTECTED] wrote: Yet, not all of Tapestry's components produce compliant xhtml, so you may be wasting your time going through these measures. On 5/29/06, Paul Cantrell [EMAIL PROTECTED] wrote: Right. And just to be clear: the .xhtml is not necessary for XHTML, not just for Tapestry, but in *any* content -- and I don't think the text/xml mime type is necessary either. It's the DOCTYPE that has the last word. Use the W3C validator when in doubt! Use it when not in doubt, too. Cheers, Paul On May 29, 2006, at 2:11 AM, Kristian Marinkovic wrote: hi, to use XHTML it is NOT necessary to rename the .html file to .xhtml. all you have to do is to add the dtd and the ?xml. the only reason i could imagine you want to rename it to .xhtml is because you could configure your webserver to set the correct mime-type (text/xml). but if you do so IE6 (and before) won't be able to display your document correctly. btw. if you put ?xml version=1.0 encoding=UTF-8? into your document IE6 will run in quirksmode and not in standard compliant mode! this may cause some misbehaviours when using css :) (boxmodel...) although it is not absolutly correct you may omit ?xml version=1.0 encoding=UTF-8? completly (or you generate it depending on the current browser :)). regards, kris Galam [EMAIL PROTECTED] omAn
RE: Tapernate Moved (finally)...
It hasn't been published yet to Howard's maven repository. It's in mine. I don't have permission to publish to Howard's. -Original Message- From: 罗天 [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 5:07 AM To: Tapestry users Subject: Re: Tapernate Moved (finally)... Hi James, But there isn't a tapernate folder under http://howardlewisship.com/repository/com/javaforge/tapestry/ 2006/5/29, James Carman [EMAIL PROTECTED]: Hugo, I just checked in a version of the ePluribus application that has been Tapernatized. It's in a branch: http://svn.javaforge.com/svn/tapestry/epluribus/brances/tapernate-impl I actually deleted more code than I wrote to get this working! :-) The application was based on an older version of the Java Persistence API, so I had to change some stuff around. But, it appears to be working (at least as much as it was in the first place). James -Original Message- From: Hugo Palma [mailto:[EMAIL PROTECTED] Sent: Friday, May 26, 2006 6:53 AM To: Tapestry users Subject: Re: Tapernate Moved (finally)... One more question to the list: - Are you going to move tapernate-example too ? I don't see it in the new svn repo. On 5/26/06, Massimo Lusetti [EMAIL PROTECTED] wrote: On 5/26/06, James Carman [EMAIL PROTECTED] wrote: Well, it's downloadable via SVN at (credentials: anonymous/anon): http://svn.javaforge.com/svn/tapestry/tapernate/trunk I have a version of the site set up, but I need to get it published to the main [EMAIL PROTECTED] site and I don't have control over that. If you want to view it, you can checkout tapernate and do a mvn site. The site docs will be available in the target directory (target/site/index.html). Enjoy! Thats great James, just two questions: - So the carmanconsulting.com svn repo is deprecated now? - From a fresh co it miss com.javaforge.hivemind:spring-hibernate3:jar:0.1 -- Massimo http://meridio.blogspot.com - 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: Tapestry 3.0.4 and Friendly URLs patch problem
Bernard Lange wrote: 'http://localhost:8080/edu-high/oswiata/?sp=logo.gifsp=MDSUMGOESHERE' Correction. The link goes of course as: 'http://localhost:8080/edu-high/oswiata/asset.do?sp=logo.gifsp=MDSUMGOESHERE' - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Locale switching question
Overriding the engine's setupForRequest does it for me: class YourEngine extends BaseEngine { protected void setupForRequest( RequestContext context ) { super.setupForRequest( context ); String lang = context.getParameter(lang); if (lang!=null) setLocale( new Locale(lang, CH)); // That's Tap3, in Tap4 you'll probably have to hook into some RequestServicer-Pipeline instead ... -Original Message- From: Bondarenko, Oleg [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 11:43 AM To: Tapestry users Subject: Locale switching question Hello folks, please share your experience. What is he best way to implement locale switching in Tapestry applications? Say, your application supports English and German and there is a link to switch from one language to another. The problem is: if you just change the engine's locale in the link listener and return the same page - that page will still be in the old (now wrong) locale! Seems to be an old Tapestry issue, the solution would be to display another page. But that is VERY nasty, suppose I want to be able to change language on every page - do I have to double the number of pages in my application??? There must be some clean way (or smart trick), right? TIA Oleg - 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]
Contributed ControlCheckbox, ControlledCheckboxes with given CheckboxGroup
I have been trying out the contributed CheckboxGroup, ControlCheckbox and ControlledCheckbox. Everyhing is fine when the ControlCheckbox, ControlledCheckboxes are enclosed by a CheckboxGroup. However, I have problem when my CheckboxGroup does not enclose the ControlledCheckbox and ControlledCheckboxes. (In this case, the parameter group in component ControlCheckbox, ControlledCheckedbox are explicted set to the CheckboxGroup.) In the generated html source, the ControlCheckbox is : input onclick=null(this.checked) type=checkbox/input The above 'null' should be setCheckboxGroup(value). My code is pasted at the end. (This example is available online at http://lombok.demon.co.uk/tapestry4Demo/app?page=TestCheckboxes2service=page ) What is the correct usage when the CheckboxGroup does not enclose the ControlCheckbox, ControlledCheckboxes ? Thanks in advance for any assistance! Shing .page : component id=colorControlledCB type=contrib:ControlledCheckbox binding name=value value=ognl:selected / binding name=group value=component:colorCBGroup / /component component id=colorControlCB type=contrib:ControlCheckbox binding name=group value=component:colorCBGroup / /component component id=colorCBGroup type=contrib:CheckboxGroup/ component id=colorLoop type=Foreach binding name=source value=ognl:colors/ binding name=value value=ognl:color/ binding name=element value=literal:tr/ /component .html : form jwcid=@Form listener=ognl:listeners.submitForm focus=ognl:false table tr th span jwcid=colorControlCB/ Select all colours/th /tr tr jwcid=colorLoop td span jwcid=colorControlledCB/ span jwcid=@Insert value=ognl:color/ /td /tr /table span jwcid=colorCBGroup/span input type=submit value=Submit/ /form Home page : http://uk.geocities.com/matmsh/index.html ___ All new Yahoo! Mail The new Interface is stunning in its simplicity and ease of use. - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to implement a 'application property with persistence strategy client:app' ?
Well, this is bad news :( I redesigned a part of my application to use only one 'flag' and implemented a strategy which is able to persist this flag in application scope (adding a simple '?myflag=myvalue' key/value pair to the url). I can control the lifecycle of the flag from inside the strategy - so for my problem I am currently done ... *happy* But seeing a solution mentioned in your JIRA issue in 4.1 would be really really cool ... Thanks, Gerald Henri Dupre wrote: I asked here long ago and Howard answered that in Tapestry 4 this is not possible due to some internal design. I opened an JIRA issue http://issues.apache.org/jira/browse/TAPESTRY-729. Is there any chance for this to make it for tapestry 4.1? Henri. On 5/30/06, Gerald Schöffel [EMAIL PROTECTED] wrote: Hi Norbert, thank you for your quick reply ! The problem with client:app is, that it stores the property of the page in a application scope. So every time I browse to this page the property is set to the persisted value. I need exactly this behaviour independent of a page, so every page with a @Persist(mystrategy:app) annotation gets the associated property set. When looking at ClientPropertyPersistenceStrategy in every method there is a parameter 'pageName' :( Anyone an idea, how to get rid of it ? :) Thanks Gerald Norbert Sándor wrote: What about the strategy client:app? If not then check out ClientPropertyPersistenceStrategy and the related classes for reference (eg. how to add a value into every URL). Regards, Norbi Gerald Schöffel wrote: Hi there ! I need to persist a application-scope property on the client side, without using of a session and/or an ASO and without a reference to a specific page. In fact I need to be able to compare a value stored in a visit-ASO with the persisted property send from the client. This property should by added to every url until a condition is met to erase the state from the client. But I have no idea, how to do so :( Every example and/or the docs I've found so far are dealing with page-properties and therefor the code is very page-centric. Could I just omit the pageName in those examples and I am done ? Thank you in advance, Gerald - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: List loaded twice from DB
Hi Marcus, Ok, I start to understand now. Are you sure that under production settings (with cache turned on) it will re-initialize the property when the page is put back in the pool, and not when it is checked out of the pool? I understand the thing about "putting a pristine instance of the page back to the pool" so that no data of one user gets carried over to another user, but if the list is loaded when it is returned to the pool it may be outdated by the time the page is used the next time. Thanks, MARK Schulte Marcus wrote: do you have caching disabled? I suspect the following? Tap inits your prop 1. whenever your page is built from the spec/template 2. whenever it's put back into the pool after use. With caching disabled 1. and 2. will occur in each request-cycle. With production settings, 1 *and* 2 will only occur in the first cycle, subsequent cycles will only have 2. btw: I don't disable caching anymore since I discoved the invaluable reset-Service -Original Message- From: Mark [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 31, 2006 7:28 AM To: Tapestry users Subject: Re: List loaded twice from DB Hi Ron, it sounds like this would work, but isn't this just a workaround for something that really should not happen this way in the first place? Thanks, MARK Ron Piterman wrote: just an idea: try to implement the 'roomlist' property yourself, as I described in my previous postings, instead of letting tapestry do it. may be this will help. don't forget to implement a pageDetachListener which sets the property to null. I always had good experience when doing it like this. Cheers, Ron Mark wrote: Hi Ron, I don't understand what you mean by "instead of doing it on finishLoad()". I did not do anything with finishLoad(), I don't know why it calls the getList. Here is my .page file: page-specification class="com.mark_arnold.sample.rbs1.web.tapestry.page.admin.Roo mListPage" inject property="administrationService" object="spring:rbsRoomAdminService" / inject property="pageService" object="engine-service:page"/ inject property="messageResource" object="spring:applicationContext"/ property name="roomList"ognl:administrationService.getAllRooms()/property property name="debug"true/property property name="room"/ property name="editPageName" initial-value="literal:admin/RoomAdminPage"/ /page-specification My Page class extends BasePage, but only overwrites pageAttached() (nothing related to the list in here). MARK Ron Piterman wrote: use lazy initialization for the list instead of doing it on finishLoad() : public List getXXXList() { if (this.xxxList == null ) this.xxxList = readXXXList(); return this.xxxList; } + pageDetachListener - this.xxxList = null. Cheers, Ron Mark wrote: Hi, I have a simple CRUD scenario with a "ListPage" and a "ModifyPage". The ListPage gets all records from the DB by calling the method "getAllRooms()" of a "RoomAdminService" and lists them in a table. For some reason the query "select * from rooms" is executed twice every time the page is accessed. getAllRooms() is only referenced once in the .page file to plug a page property, the .html file then references that property I compared the StackTraces of the two calls, they have identical tops and bottoms, but differ somwhere in the middle: at $RoomListPage_3.finishLoad($RoomListPage_3.java) at org.apache.tapestry.pageload.PageLoader.constructComponent(Pag eLoader.java:439) at org.apache.tapestry.pageload.PageLoader.loadPage(PageLoader.java:613) at $IPageLoader_10b79e6e7bf.loadPage($IPageLoader_10b79e6e7bf.java) at $IPageLoader_10b79e6e7c0.loadPage($IPageLoader_10b79e6e7c0.java) at org.apache.tapestry.pageload.PageSource.getPage(PageSource.java:120) at $IPageSource_10b79e6e724.getPage($IPageSource_10b79e6e724.java) at
Re: List loaded twice from DB
Hi Nick, thanks for this response. The next question is probably to be decided by the Tapestry developers, but maybe somebody else has some insights on this or knows if this has been discussed before: Would it not make more sense to be able to specify a attach-value and a detach-value instead of a initial-value? This way I could explicitly specify two different values for the two points in time of the page's lifecycle. I could do: property name=myList attach-value=ognl:service.loadListFromDb() detach-value=ognl:null/ The reason being that it doesn't seem to make much sense to perform resource-expensive operations like DB queries for cleanup AFTER the page is used. As far as I understand, this post-use initialization is mainly done to prevent data that belongs to one user from being accidentally carried over to the next user. So setting the property to null when the page is returned to the pool should be enough for that purpose. Especially since by the time the next user gets the page from the pool, the cached value might long be outdated. On the other hand, this idea sounds too simple for it to never have come up before, so maybe there is a good reason against it?! Thanks, MARK Nick Westgate wrote: Hi Mark. The initial-value attribute is poorly named. What it does is initialize your page property when the page is being *returned* to the pool, so that a page pulled from the pool has this initial property value. Of course, to facilitate the above, when a page is first constructed it must be initialized. That's why you're seeing two invocations: on construction and on return to the pool. I suggest you carefully read this entire section: http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.page-properties And the FAQ Where do I initialize values for a page?: http://wiki.apache.org/tapestry/MoreFrequentlyAskedQuestions I'm still using T3, not 4, and I use the PageRenderListener approach: public void pageBeginRender(PageEvent event) { // initialize properties etc if (!event.getRequestCycle().isRewinding()) { if (getXXX() == null) { ... setXXX(...); } } } Cheers, Nick. Mark wrote: Hi Ron, it sounds like this would work, but isn't this just a workaround for something that really should not happen this way in the first place? Thanks, MARK ... property name=roomListognl:administrationService.getAllRooms()/property - 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: Directly requesting a page
Are you in tap4? If so, enable Friendly URLs and you can invoke the page by doing: http://localhost:8080/test.html -Original Message- From: Ryan Cuprak [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 2:33 PM To: users@tapestry.apache.org Subject: Directly requesting a page Hello, How do I directly invoke a page using the page service? I have a test page at the root of the application which I want to invoke. From the Manning book I thought the url would look like: http://127.0.0.1:8080/app?service=page/test This is just a page for tinkering... was trying to test a new component and thought I could throw it up on a test page (instead of logging into the app and drilling through the menus). Thanks, Ryan - 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: Directly requesting a page
Yup, I am using version 4. That returns the page unprocessed - jwcid and everything. From the blog (http://howardlewisship.com/blog/2004/12/tapestry-urls-half-way-there.html) I added the following to my web.xml: servlet-mapping servlet-nameapp/servlet-name url-pattern*.html/url-pattern /servlet-mapping However, I then get the login page for the application- servlet mapping is definitely doing something. Excluding some JAXRPC stuff, the other entries in my web.xml are: servlet servlet-nameKMI/servlet-name servlet-classorg.apache.tapestry.ApplicationServlet/servlet-class load-on-startup0/load-on-startup /servlet servlet-mapping servlet-nameKMI/servlet-name url-pattern/app/url-pattern /servlet-mapping servlet-mapping servlet-nameKMI/servlet-name url-pattern*.page/url-pattern /servlet-mapping filter filter-nameredirect/filter-name filter-classorg.apache.tapestry.RedirectFilter/filter-class /filter filter-mapping filter-nameredirect/filter-name url-pattern//url-pattern /filter-mapping welcome-file-list welcome-file/app/welcome-file /welcome-file-list Thanks, -Ryan On Wednesday, May 31, 2006, at 11:36AM, James Carman [EMAIL PROTECTED] wrote: Are you in tap4? If so, enable Friendly URLs and you can invoke the page by doing: http://localhost:8080/test.html -Original Message- From: Ryan Cuprak [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 2:33 PM To: users@tapestry.apache.org Subject: Directly requesting a page Hello, How do I directly invoke a page using the page service? I have a test page at the root of the application which I want to invoke. From the Manning book I thought the url would look like: http://127.0.0.1:8080/app?service=page/test This is just a page for tinkering... was trying to test a new component and thought I could throw it up on a test page (instead of logging into the app and drilling through the menus). Thanks, Ryan - 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: HTML editor for tapestry
I think tacos also has an editor component that is based on the dojo Editor, which is used in the wiki system at http://jot.com. There doesn't appear to be a current published documentation set for this component on the tacos website but I know it's in there. (Sorry, I'm not working on tacos as much these days - Andreas Andreau is the lead dev on that project now. Will come back to tacos when 4.1 is done :) ) http://tacos.sourceforge.net On 5/31/06, Shing Hing Man [EMAIL PROTECTED] wrote: There are a couple (FCKEditor and JSEditor) in tassle http://equalitylearning.org/Tassel/app Both of them have online demos at the following respectively. http://www.hannebauer.org/jseditordemo/ http://lombok.demon.co.uk/tapestry4Demo/app Shing --- Carl Pelletier [EMAIL PROTECTED] wrote: Hi everyone, I looking for a HTML editor component. Someone can point me on where I can find that information ? I search on google and found that somebody have port FCK Editor to Tapestry, but The link doesnt work anymore. Thanks for any help ! Carl Pelletier Home page : http://uk.geocities.com/matmsh/index.html Send instant messages to your online friends http://uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tacos/Tapestry, team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind.
RE: Loading resources from classpath in components
I think you're right. The ClassLoader that's assigned to the class generated by Javassist might not support that method. Print out the type of the classloader to make sure. -Original Message- From: Dan Adams [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 3:39 PM To: Tapestry users Subject: Loading resources from classpath in components How do you load resources from classpath within a component? If I do: this.getClass().getClassLoader().getResourcesAsStream(path); then it returns null but if I do: writer.getClass().getClassLoader().getResourcesAsStream(path); then it returns the resource fine. I'm guesssing it has to do with writer (which is an IMarkupWriter) not being an enhanced class. What is it about the tapestry classloading that causes it not to work as expected? -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - 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: Loading resources from classpath in components
Could you try using the thread context classloader? -Original Message- From: Dan Adams [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 31, 2006 3:39 PM To: Tapestry users Subject: Loading resources from classpath in components How do you load resources from classpath within a component? If I do: this.getClass().getClassLoader().getResourcesAsStream(path); then it returns null but if I do: writer.getClass().getClassLoader().getResourcesAsStream(path); then it returns the resource fine. I'm guesssing it has to do with writer (which is an IMarkupWriter) not being an enhanced class. What is it about the tapestry classloading that causes it not to work as expected? -- Dan Adams Software Engineer Interactive Factory 617.235.5857 - 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: Issues with Label Components with Tapestry 4.0
Your problem getting the span tag where you want it is due to how the FieldLabel component renders itself. Here's the relevant part of FieldLabel.renderComponent(): delegate.writeLabelPrefix(field, writer, cycle); writer.begin(label); if (id != null) writer.attribute(for, id); delegate.writeLabelAttributes(writer, cycle, field); renderInformalParameters(writer, cycle); writer.print(displayName, getRaw()); writer.end(); delegate.writeLabelSuffix(field, writer, cycle); You could argue that writeLabelPrefix() and writeLabelSuffix() should both be inside the label tag (makes sense to me), but the current code is symmetrical and not necessarily wrong. Your best bet is probably to override the FieldLabel component with your own version that renders the delegate prefix and/or suffix inside the label tag. And I'm sure you won't hesitate to file a bug report if you feel strongly about it ;) -Ryan Matt Raible wrote: Matt Raible wrote: Andreas Andreou wrote: try component.getBinding(class) if that's not null, do a getObject() on it Thanks. This works, but it also prints out duplicate class attributes. class=text large error class=text large It'd be nice to have something like: writer.appendAttribute(class, values to append); Another question - it seems my full label and input is getting wrapped with font color=red Is there anyway to get rid of that? It's problematic b/c the closing /font isn't getting rendered until right before /form. Fixed this by using: public void writeLabelPrefix(IFormComponent component, IMarkupWriter writer, IRequestCycle cycle) { // does nothing put prevent font color=red from getting written } Thanks, Matt Matt Raible wrote: Hmmm, I'm guessing the answers to my questions below are no, this isn't possible. ;-) Here's another question - is it possible in my custom Validator to get the existing CSS classes on a component? For example, I currently have: public void writeLabelAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component) { if (isInError(component)) { writer.attribute(class, error); } } public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, IValidator validator) { if (isInError()) { writer.attribute(class, error); } } But I'd prefer to have something like this: public void writeLabelAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component) { if (isInError(component)) { writer.attribute(class, error + component.getAttribute(class)); } } public void writeAttributes(IMarkupWriter writer, IRequestCycle cycle, IFormComponent component, IValidator validator) { if (isInError()) { writer.attribute(class, error + component.getAttribute(class)); } } In other words, is there a method on component that allows me to get the current CSS classes? Matt Matt Raible wrote: I have two different Label components I'm trying to create. Issue #1 --- The first is a simple component (just a Label.jwc and Label.html file in WEB-INF) that writes a label. I'd like to include the option to write a required indicator. However, I'm having a difficult time retrieving a parameter's value. Here's what I have so far: Label.jwc component-specification allow-informal-parameters=yes parameter name=key required=yes/ parameter name=class required=no/ component id=label type=Any inherit-informal-parameters=yes/ /component-specification Label.html label jwcid=labelspan jwcid=@Insert value=ognl:getMessages().getMessage(key)/ div jwcid=@If condition=ognl:class == 'required'span class=req */span/label I'm pretty sure class won't work as a parameter name b/c I've seen a stacktrace using this already. Regardless, let's pretend it does (I've tried using other names). Here's the desired usage: label class=required desc jwcid=@Label for=phoneNumber key=user.phoneNumberPhone Number/label produces: label class=desc jwcid=@Label for=phoneNumberPhone Numberspan class=req */label I'm fine with the result having class=required desc - I basically just need some indicator to show a field is required when I'm not wiring up it's input field as a component. Issue #2 --- I'm overriding ValidationDelegate in order to add required field indicators. I used to be pre-pending an asterisk to the beginning of the field, and I had that working. Now I want to add span class=req to the end of the label before the /label shows up. I'm using @FieldLabel and everything *almost* works. I've eliminating error styling in the class below so it's easier to read. public class Validator extends
NullPointerException when using WML component @Go
Hi all, I'm implementing a WAP interface for a project using Tapestry's WML components. The only code example I've found is one from the 3.0.4 component reference. I've modified this example a bit, but I can't get it working. When using the Go component, I get a NullPointerException (see below). This is what my template currently looks like: ?xml version=1.0 encoding=UTF-8 ? !DOCTYPE wml PUBLIC -//WAPFORUM//DTD WML 1.1//EN http://www.wapforum.org/DTD/wml_1.1.xml; wml card jwcid=@Card id=Hello title=Hello pName: input jwcid=[EMAIL PROTECTED] value=ognl:username//p do type=accept label=Accept go jwcid=[EMAIL PROTECTED] action=listener:onSubmit postfield id=[EMAIL PROTECTED] name=ognl:components.userInput.name value=ognl:username /go /do /card /wml If I remove the Go component, the Card and the Input components get rendered properly ... Does anyone have an idea of what I'm doing wrong? (my Java class extends Deck instead of BasePage) Regards, Emil Jönsson -- java.lang.NullPointerException Stack Trace: * org.apache.tapestry.form.Form.renderComponent(Form.java:243) * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) * org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434) * org.apache.tapestry.wml.Card.renderComponent(Card.java:58) * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) * org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92) * org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617) * org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275) * org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:366) ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTML editor for tapestry
The best documentaiton on the dojo editor that I have found appears to be: http://dojotoolkit.org/docs/rich_text.html which you can find by clicking on a rather obscure link 3 levels down from the top page in the 'Manual' somewhere. My biggest gripe with dojo at the moment is that they spend rather more time telling you how great it is than actually telling you how it works... I resorted to down loading and reading the source - but then, that's what open-source is all about! :-) I have successfully but rather clumsily tested it within a tapestry app. Regards Alan Chaney Jesse Kuhnert wrote: I think tacos also has an editor component that is based on the dojo Editor, which is used in the wiki system at http://jot.com. There doesn't appear to be a current published documentation set for this component on the tacos website but I know it's in there. (Sorry, I'm not working on tacos as much these days - Andreas Andreau is the lead dev on that project now. Will come back to tacos when 4.1 is done :) ) http://tacos.sourceforge.net On 5/31/06, Shing Hing Man [EMAIL PROTECTED] wrote: There are a couple (FCKEditor and JSEditor) in tassle http://equalitylearning.org/Tassel/app Both of them have online demos at the following respectively. http://www.hannebauer.org/jseditordemo/ http://lombok.demon.co.uk/tapestry4Demo/app Shing --- Carl Pelletier [EMAIL PROTECTED] wrote: Hi everyone, I looking for a HTML editor component. Someone can point me on where I can find that information ? I search on google and found that somebody have port FCK Editor to Tapestry, but The link doesnt work anymore. Thanks for any help ! Carl Pelletier Home page : http://uk.geocities.com/matmsh/index.html Send instant messages to your online friends http://uk.messenger.yahoo.com - 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]
Problem with @Persist
Hi, I have 2 pages, one with a list of Users (UsersPage) and another with Details for a given User (DetailsPage). In UsersPage, I have a onEditUser() listener, which do: page = getDetailsPage() // = With @InjectPage page.setUserId(selectedId); return page; And in DetailsPage, I have: @Persist getUserId(); setUserId(id); But as soon as I have called *one* *time* the DetailsPage with a User (I clicked on onEditUser() DirectLink), the DetailsPage appears with the *first* user I selected, no matter if I go to UsersPage and select another user. It seems that the getUserId() method always return the first ID the page got the first time I used it. This behaviour appears only in production, not on my DevMachine... A... Does anyone have a quick idea on what could caus that prolem? Thanks a lot for any help. -jec - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] TapIDEA 0.4
Hey Tapestry community, TapIDEA 0.4 release is out. This is the first release that only works with IDEA Demetra(6.0), so you'll need to download that to use TapIDEA. The good news is that Demetra is actually quite usable right now so you won't have many unpleasant surprises. You can find a complete list of changes on the project site http://tapidea.javaforge.com/changes-report.html . There's also on the site a new Online-docs section. That shows the exact same help system that is shown inside of IDEA and also helps show some of the features in action. Now some bad news and some good news. The bad news is that there was no progress on the Spindle integration. Geoff is working really hard on Spindle 4T4 but it's not quite working well enough to make TapIDEA integration possible. The good news is that, if everything goes according to plan, Geoff will be able to provide a first working version of Spindle-core very very soon. This means that i'll concentrate all the core stuff like auto-completion, navigation and building for the 0.5 release, and later provide some more advanced gui stuff. Cheers Hugo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: HTML editor for tapestry
It is worth pointing out that neither of these works in Safari, the default browser on the Mac. FCK blames Safari: http://www.fckeditor.net/safari.html ...but the bottom line is, it's probably not a good idea to use these for a public site. Of course, if you're doing an internal app, it may not matter. P On May 31, 2006, at 1:04 PM, Shing Hing Man wrote: There are a couple (FCKEditor and JSEditor) in tassle http://equalitylearning.org/Tassel/app Both of them have online demos at the following respectively. http://www.hannebauer.org/jseditordemo/ http://lombok.demon.co.uk/tapestry4Demo/app Shing --- Carl Pelletier [EMAIL PROTECTED] wrote: Hi everyone, I looking for a HTML editor component. Someone can point me on where I can find that information ? I search on google and found that somebody have port FCK Editor to Tapestry, but The link doesnt work anymore. Thanks for any help ! Carl Pelletier Home page : http://uk.geocities.com/matmsh/index.html Send instant messages to your online friends http:// uk.messenger.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Piano music podcast: http://inthehands.com Other interesting stuff: http://innig.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]