Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
Erik Vullings wrote: 3. Related to Q2, are there any T5 tutorials on how to develop a tree component, similar to a grid component? Or does someone already have it? I have an example tree component here : http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-t5/trunk/src/main/java/org/interldap/wui/tapestry/components/Tree.java?view=markuprev=97 And an example of use : http://svn.forge.objectweb.org/cgi-bin/viewcvs.cgi/interldap/interldap-wui-t5/trunk/src/t5-test/resources/org/interldap/wui/tapestry/pages/TestTree.html?view=markuprev=139 Basically, the component take a DefaultMutableTreeNode as parameter and print it in a preorder traversal. You can specify a (unique) html element as a level separator. I think it would be a good idea to clean the code and extend it in a more generic way ;) Hope it may help (and sorry for the delay, I missed your post) -- Francois Armand Etudes Développements J2EE LINAGORA SA - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
I do this : In AppModule.java : public void contributeApplicationInitializer(OrderedConfigurationApplicationInitializerFilter configuration) { configuration.add(mainModuleInitializer, new MainModuleInitializer()); } With MainModuleInitializer implementing ApplicationInitializerFilter Robin Helgelin wrote: On 8/23/07, Ben Tomasini [EMAIL PROTECTED] wrote: I have the same requirement mentioned in #2. What is the best approach to handle this with Tapestry 5? I am thinking of just eager loading a service and invoking the init method in the builder method of the module. Any other thoughts? 1. I've started changing the quickstart project to move a current struts2-spring-jdbc application to T5. Where can I put my dao initialization (creation of hsqldb tables, which used to be done via my ContextListener class in struts2)? I use an @EagerLoad service similar to this, example code can be found here: http://www.localhost.nu/svn/public/tapestry5-acegi-example/src/main/java/nu/localhost/tapestry/acegi/example/services/AppModule.java -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5-questions%3A-adding-my-own-initializations--outputing-pre-formatted-HTML--tree-component--javadoc-tf3872028.html#a12309051 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
On 8/24/07, Kheldar666 [EMAIL PROTECTED] wrote: I do this : In AppModule.java : public void contributeApplicationInitializer(OrderedConfigurationApplicationInitializerFilter configuration) { configuration.add(mainModuleInitializer, new MainModuleInitializer()); } With MainModuleInitializer implementing ApplicationInitializerFilter Oh, nice! Didn't even know there was such a filter :) -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
Erik Vullings wrote: In the end, to create the Tree component ( http://wiki.apache.org/tapestry/Tapestry5TreeComponent) ho :) I didn't make the link between this page and you :) I just opened a Jira issue to ask for the addition of a Tree element in the code lib, so that every users may use the same base in place of reinventing the wheel. Moreover, if the core developers are ok to add such a component, we may hope that it will be more generic, idiomatic of Tapestry 5, deeply tested, etc than ours. I post our two reference implementations as examples. -- Francois Armand Etudes Développements J2EE LINAGORA SA - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
I have the same requirement mentioned in #2. What is the best approach to handle this with Tapestry 5? I am thinking of just eager loading a service and invoking the init method in the builder method of the module. Any other thoughts? I think this was the Tapestry 4 way: http://tapestry.apache.org/tapestry4/tapestry/hivedocs/module/tapestry.init.html Ben On 6/5/07, Erik Vullings [EMAIL PROTECTED] wrote: Hi, I've recently started working with T5 because I liked a lot what I've seen! I therefore have some basic questions, and I hope you can help me with them: 1. I've started changing the quickstart project to move a current struts2-spring-jdbc application to T5. Where can I put my dao initialization (creation of hsqldb tables, which used to be done via my ContextListener class in struts2)? 2. In my existing application, I use a (folder-like) tree based on the www.dhtmlgoodies.com drag-drop-folder-tree. It is based on a standard HTML unordered list, which I generate in my page's java class. In the accompanying HTML file, I use ${formattedTree} However, when I return the formattedTree ulli... it becomes lt;ulgt; etc. How can I change the encoding, in other words, output raw HTML to the HTML template file. 3. Related to Q2, are there any T5 tutorials on how to develop a tree component, similar to a grid component? Or does someone already have it? 4. Is it possible to enable T5 javadoc help to display in the Eclipse IDE? Thanks for your help, Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
On 8/23/07, Ben Tomasini [EMAIL PROTECTED] wrote: I have the same requirement mentioned in #2. What is the best approach to handle this with Tapestry 5? I am thinking of just eager loading a service and invoking the init method in the builder method of the module. Any other thoughts? 1. I've started changing the quickstart project to move a current struts2-spring-jdbc application to T5. Where can I put my dao initialization (creation of hsqldb tables, which used to be done via my ContextListener class in struts2)? I use an @EagerLoad service similar to this, example code can be found here: http://www.localhost.nu/svn/public/tapestry5-acegi-example/src/main/java/nu/localhost/tapestry/acegi/example/services/AppModule.java -- regards, Robin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
I don't follow how invoking an init method in your builder is related to the problem of the html generation. Can you expand on that? I would use a component and the MarkupWriter in the beginRender/afterRender methods. Something like this: (this code has not been compiled so compilation/functional defects may exist) public class MyComponent { void beginRender(MarkupWriter writer) { writer.element(ul); // if you have a tree then you could recursively build out the unordered list... for (String item : itemValues ) { writer.element(li); writer.write(item); writer.end(); } // you could end the element here, ending it in afterrender // allows the component body to be evalutated. } void afterRender(MarkupWriter writer) { writer.end(); } } Josh On 8/23/07, Ben Tomasini [EMAIL PROTECTED] wrote: I have the same requirement mentioned in #2. What is the best approach to handle this with Tapestry 5? I am thinking of just eager loading a service and invoking the init method in the builder method of the module. Any other thoughts? I think this was the Tapestry 4 way: http://tapestry.apache.org/tapestry4/tapestry/hivedocs/module/tapestry.init.html Ben On 6/5/07, Erik Vullings [EMAIL PROTECTED] wrote: Hi, I've recently started working with T5 because I liked a lot what I've seen! I therefore have some basic questions, and I hope you can help me with them: 1. I've started changing the quickstart project to move a current struts2-spring-jdbc application to T5. Where can I put my dao initialization (creation of hsqldb tables, which used to be done via my ContextListener class in struts2)? 2. In my existing application, I use a (folder-like) tree based on the www.dhtmlgoodies.com drag-drop-folder-tree. It is based on a standard HTML unordered list, which I generate in my page's java class. In the accompanying HTML file, I use ${formattedTree} However, when I return the formattedTree ulli... it becomes lt;ulgt; etc. How can I change the encoding, in other words, output raw HTML to the HTML template file. 3. Related to Q2, are there any T5 tutorials on how to develop a tree component, similar to a grid component? Or does someone already have it? 4. Is it possible to enable T5 javadoc help to display in the Eclipse IDE? Thanks for your help, Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
Hehe... I suppose if I'd read the old post more closely (as opposed to just looking at #2) I could have figured that out. Sounds like the @EagerLoad that Robin pointed to is what you want. On 8/23/07, Ben Tomasini [EMAIL PROTECTED] wrote: Doh. I meant #1. Thanks. Ben On 8/23/07, Josh Canfield [EMAIL PROTECTED] wrote: I don't follow how invoking an init method in your builder is related to the problem of the html generation. Can you expand on that? I would use a component and the MarkupWriter in the beginRender/afterRender methods. Something like this: (this code has not been compiled so compilation/functional defects may exist) public class MyComponent { void beginRender(MarkupWriter writer) { writer.element(ul); // if you have a tree then you could recursively build out the unordered list... for (String item : itemValues ) { writer.element(li); writer.write(item); writer.end(); } // you could end the element here, ending it in afterrender // allows the component body to be evalutated. } void afterRender(MarkupWriter writer) { writer.end(); } } Josh On 8/23/07, Ben Tomasini [EMAIL PROTECTED] wrote: I have the same requirement mentioned in #2. What is the best approach to handle this with Tapestry 5? I am thinking of just eager loading a service and invoking the init method in the builder method of the module. Any other thoughts? I think this was the Tapestry 4 way: http://tapestry.apache.org/tapestry4/tapestry/hivedocs/module/tapestry.init.html Ben On 6/5/07, Erik Vullings [EMAIL PROTECTED] wrote: Hi, I've recently started working with T5 because I liked a lot what I've seen! I therefore have some basic questions, and I hope you can help me with them: 1. I've started changing the quickstart project to move a current struts2-spring-jdbc application to T5. Where can I put my dao initialization (creation of hsqldb tables, which used to be done via my ContextListener class in struts2)? 2. In my existing application, I use a (folder-like) tree based on the www.dhtmlgoodies.com drag-drop-folder-tree. It is based on a standard HTML unordered list, which I generate in my page's java class. In the accompanying HTML file, I use ${formattedTree} However, when I return the formattedTree ulli... it becomes lt;ulgt; etc. How can I change the encoding, in other words, output raw HTML to the HTML template file. 3. Related to Q2, are there any T5 tutorials on how to develop a tree component, similar to a grid component? Or does someone already have it? 4. Is it possible to enable T5 javadoc help to display in the Eclipse IDE? Thanks for your help, Erik - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox. -- -- TheDailyTube.com. Sign up and get the best new videos on the internet delivered fresh to your inbox.
Re: T5 questions: adding my own initializations; outputing pre-formatted HTML; tree component; javadoc
2. In my existing application, I use a (folder-like) tree based on the www.dhtmlgoodies.com drag-drop-folder-tree. It is based on a standard HTML unordered list, which I generate in my page's java class. In the accompanying HTML file, I use ${formattedTree} However, when I return the formattedTree ulli... it becomes lt;ulgt; etc. How can I change the encoding, in other words, output raw HTML to the HTML template file. Use the OutputRaw component. 4. Is it possible to enable T5 javadoc help to display in the Eclipse IDE? You just need to have source attached to the jars you are using. Cheers, Nick. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]