Re: [T5] How to format java.lang.Date when using expansion
you could add you own binding prefix ${date:lastLoginDate} or ${date:lastLoginDate} http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefix Davor Hrg On Dec 13, 2007 7:17 AM, Liu Dapeng [EMAIL PROTECTED] wrote: hi guys i am using expansion to output a Date object like Your last login: ${lastLoginDate} but how to format it ?? currently it gives the whole string as Wed Dec 12 18:36:38 SGT 2007 how to change it to like dd/mm/??? regards - 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]
t4: tr attributes for some rows in a table component?
I would like to render certain rows differently by applying a css class to a row based on a value in that row. I haven't been able to figure out any way to do this. I'm not even sure if it's even possible with the existing table component. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IoC global question
Hi Hugo, It is exactly that and I didn't understand how to do that. Whatever I test, it works but it is intrusive. I re-read the documentation about tapestry-ioc and I still not understand how to do that. I need an example of webapp with 3 layers around the ioc to see how tapestry-ioc gives the services instance to the layers. @Thiago, I read this part but I don't know enought Spring to decide if tapestry-ioc is really better than Spring. I'm not sure better is the word. I would prefer more adapt for Tapestry webapp but it's just my feelling. Just to argue a little more, if it is really better, why the way to use service injection is different between ioc - MVC and ioc - DAO or ioc - WS (example, declare a Logger in these all 3 layers and compare the howto)? Learning a way to do the same thing for each layer is not something better. I'm quite sure it can be better than Spring but for some developper, XML is better than Pojo... just a point of view ;o) For now, I want to try to use Tapestry-ioc because I think again it is more adapt to my needs 2007/12/14, Hugo Palma [EMAIL PROTECTED]: m, i think there's something missing here If i'm understanding correctly you want tapestry-ioc to manage all your services (either presentation stuf, db stuff, etc) and you don't want it to be intrusive. You don't want to reference any tapestry-ioc API inside you service classes. Does that describe the problem ? If so, tapestry-ioc can solve your problem really easily. Michael Bernagou wrote: So I have to call the current Registry (or to manage it myself) and call the myRegistry.getService(MyService.class); Hum, I think it's not ioc anymore if I have to setup my containers (Axis2, Hibernate) to call the tapestry-ioc or I have to create a sort of middle layer between the layer and the tapestry-ioc, and then my classes have to call this middleLayer... hum... How do you do yourself? Webapp have usually more than just a MVC layer. Are you using the tapestry-ioc only for the MVC layer? Its seems to me strange for one class having to use @Inject Logger log; and for another class Logger log = Logger.getLogger( ApplicationDaoImpl.class.getName()); 2 ways to get the logger in the same application for the same target log file... Maybe tapestry-ioc should be extended to take care also to the other layers. Maybe I'm totally wrong ;o) so, how should it be coded to respect ioc pattern between tapestr-ioc and other layers such as Axis2 and Hibernate3 (for T5 we know ;o) ) Thanks 2007/12/14, Michael Bernagou [EMAIL PROTECTED]: Ok I'm going to investigate about that Registry. So, what's the interrest to use tapestry-ioc instead of Spring ioc? If I need my ioc to provide all the services I need, I cannot use tapestry-ioc unless I need my other layers to call explicitely the ioc which is not recommended when you want independant layers working together. @Hugo, ok I'm going to reread again this part. 2007/12/14, Kristian Marinkovic [EMAIL PROTECTED] : hi michael, @Inject only works in Tapestry pages and components (and mixins). By default Tapestry will use the field type as an id and lookup the corresponding ioc service. I assume your Web Service Container was not started by the ioc container so it runs outside its control. Therefore you have to first obtain an ioc Registry first and then ask it explicitly for the service you want to call. The builder methods are not meant to be called except by the container :) g, kris Michael Bernagou [EMAIL PROTECTED] 14.12.2007 10:51 Bitte antworten an Tapestry users users@tapestry.apache.org An Tapestry users users@tapestry.apache.org Kopie Thema IoC global question Hi, I have a sort of general question about tapestry-ioc. In fact, I would like it to manage all the services of my webapp. In theory it should be the case, shouldn't be? So to provides services to my MVC, no problem the syntax @Inject MyService _myService; work perfectly. But, to provide services the same way for my Dao it's different. The same syntax doesn't provide any instance. I used the tapestry-hibernate and declare my dao as services : import org.hibernate.Session; public static UserDao buildUserDao(@InjectService(Session) Session session) { return new UserDaoImpl(session); } public static UserService buildUserService(@InjectService(UserDao) UserDao dao) { return new UserServiceImpl(dao); } So my implementation can work. But to use the service, all the callers have to know a session object! Ok, if my caller is a web service, and this web service want to call the UserService, @Inject UserService _userService; DOES NOT work and _userService is null! So I have to call explicitely the builder of my service FROM the web service... If I do that, I bypass the IoC purpose
Re: IoC global question
Ok, as you can see in the tapestry-ioc documentation there are three ways of injecting dependencies into services. Only one of them is actually intrusive, the As parameters to the service implementation class' constructor (for autobuilt services) one. If you use this way then you will need to use the Inject annotation in your service implementation class which will create the dependency you don't want. So, this leaves you with the other two choices. The As parameters to the service builder method way has an example right in the beginning of the Injecting Dependencies sections of the docs. This way your service class can be completely independent of your IoC container. All the injection stuff is done in the module builder class. All you have to do is declare the dependencies in your service build method in the module builder and use the service class setters to set it's dependencies. Finally, you can use the As parameters passed to the constructor of the service's module builder (cached inside instance variables) way. This in not intrusive also because, again, all the injection stuff is done in the module builder. Only this time instead of the dependencies being injected as parameters in the build method they are injected in you module builder class constructor. Hope this helps... Michael Bernagou wrote: Hi Hugo, It is exactly that and I didn't understand how to do that. Whatever I test, it works but it is intrusive. I re-read the documentation about tapestry-ioc and I still not understand how to do that. I need an example of webapp with 3 layers around the ioc to see how tapestry-ioc gives the services instance to the layers. @Thiago, I read this part but I don't know enought Spring to decide if tapestry-ioc is really better than Spring. I'm not sure better is the word. I would prefer more adapt for Tapestry webapp but it's just my feelling. Just to argue a little more, if it is really better, why the way to use service injection is different between ioc - MVC and ioc - DAO or ioc - WS (example, declare a Logger in these all 3 layers and compare the howto)? Learning a way to do the same thing for each layer is not something better. I'm quite sure it can be better than Spring but for some developper, XML is better than Pojo... just a point of view ;o) For now, I want to try to use Tapestry-ioc because I think again it is more adapt to my needs 2007/12/14, Hugo Palma [EMAIL PROTECTED]: m, i think there's something missing here If i'm understanding correctly you want tapestry-ioc to manage all your services (either presentation stuf, db stuff, etc) and you don't want it to be intrusive. You don't want to reference any tapestry-ioc API inside you service classes. Does that describe the problem ? If so, tapestry-ioc can solve your problem really easily. Michael Bernagou wrote: So I have to call the current Registry (or to manage it myself) and call the myRegistry.getService(MyService.class); Hum, I think it's not ioc anymore if I have to setup my containers (Axis2, Hibernate) to call the tapestry-ioc or I have to create a sort of middle layer between the layer and the tapestry-ioc, and then my classes have to call this middleLayer... hum... How do you do yourself? Webapp have usually more than just a MVC layer. Are you using the tapestry-ioc only for the MVC layer? Its seems to me strange for one class having to use @Inject Logger log; and for another class Logger log = Logger.getLogger( ApplicationDaoImpl.class.getName()); 2 ways to get the logger in the same application for the same target log file... Maybe tapestry-ioc should be extended to take care also to the other layers. Maybe I'm totally wrong ;o) so, how should it be coded to respect ioc pattern between tapestr-ioc and other layers such as Axis2 and Hibernate3 (for T5 we know ;o) ) Thanks 2007/12/14, Michael Bernagou [EMAIL PROTECTED]: Ok I'm going to investigate about that Registry. So, what's the interrest to use tapestry-ioc instead of Spring ioc? If I need my ioc to provide all the services I need, I cannot use tapestry-ioc unless I need my other layers to call explicitely the ioc which is not recommended when you want independant layers working together. @Hugo, ok I'm going to reread again this part. 2007/12/14, Kristian Marinkovic [EMAIL PROTECTED] : hi michael, @Inject only works in Tapestry pages and components (and mixins). By default Tapestry will use the field type as an id and lookup the corresponding ioc service. I assume your Web Service Container was not started by the ioc container so it runs outside its control. Therefore you have to first obtain an ioc Registry first and then ask it explicitly for the service you want to call. The builder methods are not meant to be called except by the container
Re: IoC global question
Sorry, I'm trying to understand enough well to develop my application correctly. So, imagine I have 2 classes ClassA and ClassB from 2 differents layers. With the IoC in ClassA I should have just a member named ServiceClassB sab with its getter and setter. ServiceClassB is the interface ClassB implements. Then the IoC should have the role to create the ClassB instance and call classA.setServiceClassB(classBInstance). But, today in my MVC I have to do that in ClassA : public class ClassA { @Inject ServiceClassB scb; String onSuccess() { User user = scb.getAuthenticatedUser(...); ... } } is THE way to use the IoC? This is an example for pages. I think it's ok but what about this second example, out of pages. So I need to create a ServiceFactory class. public class ServiceFactory { private ServiceClassB scb; private static ServiceFactory instance; static { instance = new ServiceFactory(); } public static ServiceFactory getInstance() { return instance; } private ServiceFactory() { scb = new ClassB(); } public ServiceClassB getSab() { return scb; } } In a ClassA (not anymore a Tapestry page) I have to do that : public class ClassA { private ServiceClassB sab; public ServiceClassB getSab() { return sab; } public void setSab(ServiceClassB sab) { this.sab = sab; } public String aMethod() { sab = ServiceFactory.getInstance().getUserService(); User user = sab.getAuthenticatedUser(...); ... } } I think this is not IoC. It's just management of services. So my goal is to make that IoC and something have to call setSab for me, or maybe it's should be the role of the ServiceFactory? Regarding what Hugo explained to me, (thanks a lot for your time!) one of the way is this : public class UserModule { public static ServiceClassB build(ServiceUserDao userDao){ ClassB cb = new ClassB(userDao); return cb; } public static ServiceUserDao build() { UserDao dao = new UserDao(); return dao; } } But I still don't know how to implement ClassA to get my ServiceClassB instance provided by the IoC. I cannot call the Module without creating a strong link between ClassA and the IoC, or maybe I have to create this link?? In my mind, nothing have to call the IoC since it's the IoC who should call the classes. So I have to say to the IoC which class need it and for now I just know how to tell the IoC which Services I have and the dependencies they have. Or maybe, I'm completely wrong, lol, and in fact the role of IoC is just to expose services to make them available to the all application and I have in ClassA to call explicitely the services via their builder in the module and use them via their interface! 2007/12/17, Hugo Palma [EMAIL PROTECTED]: Ok, as you can see in the tapestry-ioc documentation there are three ways of injecting dependencies into services. Only one of them is actually intrusive, the As parameters to the service implementation class' constructor (for autobuilt services) one. If you use this way then you will need to use the Inject annotation in your service implementation class which will create the dependency you don't want. So, this leaves you with the other two choices. The As parameters to the service builder method way has an example right in the beginning of the Injecting Dependencies sections of the docs. This way your service class can be completely independent of your IoC container. All the injection stuff is done in the module builder class. All you have to do is declare the dependencies in your service build method in the module builder and use the service class setters to set it's dependencies. Finally, you can use the As parameters passed to the constructor of the service's module builder (cached inside instance variables) way. This in not intrusive also because, again, all the injection stuff is done in the module builder. Only this time instead of the dependencies being injected as parameters in the build method they are injected in you module builder class constructor. Hope this helps... Michael Bernagou wrote: Hi Hugo, It is exactly that and I didn't understand how to do that. Whatever I test, it works but it is intrusive. I re-read the documentation about tapestry-ioc and I still not understand how to do that. I need an example of webapp with 3 layers around the ioc to see how tapestry-ioc gives the services instance to the layers. @Thiago, I read this part but I don't know enought Spring to decide if tapestry-ioc is really better than Spring. I'm not sure better is the word. I would prefer more adapt for Tapestry webapp but it's just my feelling. Just to argue a little more, if it is really better, why the way to use service injection is different between ioc - MVC and ioc - DAO or ioc - WS (example, declare a Logger in these all 3 layers and compare the howto)? Learning a way to do the
Re: T5: JumpStart 3.0.0 Preview ready for comments
Hi Penyihir, Michael, and Ted, Thanks for your help. I'm looking forward to the critiques (even if they're bad). Cheers, Geoff On 17/12/2007, at 3:12 PM, Penyihir Kecil wrote: Hi Geoff i've also succesfully installed it i'm looking for user autentification and best practive for ur edit form. thnx a lot On 12/17/07, Michael Courcy [EMAIL PROTECTED] wrote: Hi Geoff I've successfully installed the jumpstart-min on windows XP with JBOSS 4.2.2GA I start digging now. Thanks a lot. Michael Geoff Callender a écrit : Hi all, I've reworked JumpStart to address Tapestry 5, and I need feedback on how to make it as good as it can be... If you don't know JumpStart, its purpose is to get newcomers up-to-speed with Tapestry as fast as possible. It's aim is to dispel the myth of Tapestry's steep learning curve by helping people get productive quickly. The better that JumpStart is, the better I hope it will be for all the Tapestry community. So, I'm looking for heaps of feedback on its strengths, weaknesses, choice of examples, quality of code, correctness, etc., anything that will make it more helpful to more people! To get it, go to http://files.doublenegative.com.au/jumpstart/ , click on Downloads, and look for jumpstart-min-3.0.0.preview.1.zip. Cheers, Geoff Callender http://files.doublenegative.com.au/jumpstart/ You can mail me directly or reply to this thread. Either is fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Courcy http://courcy.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: T4: Returning a file to be downloaded on response
Look harder :-) http://wiki.apache.org/tapestry/SendingDiferentContentTypes Apart from that this topic has been discussed several times on this list, just search the archives. You might also want to look at the http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/contrib/services/impl/RoundedCornerService.html which does something similar. Cheers, Uli Joshua Jackson schrieb: Dear all, Is it possible to return a file to be downloaded on response after form submission with T4? Where can I find tutorial on this? I've searched through the Tapestry wiki, but the only thing I find is regarding Excel. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IoC global question
Why don't you declare your ClassA as a service too ? This way you could inject the ServiceClassB into it without any change on ClassA. Michael Bernagou wrote: Sorry, I'm trying to understand enough well to develop my application correctly. So, imagine I have 2 classes ClassA and ClassB from 2 differents layers. With the IoC in ClassA I should have just a member named ServiceClassB sab with its getter and setter. ServiceClassB is the interface ClassB implements. Then the IoC should have the role to create the ClassB instance and call classA.setServiceClassB(classBInstance). But, today in my MVC I have to do that in ClassA : public class ClassA { @Inject ServiceClassB scb; String onSuccess() { User user = scb.getAuthenticatedUser(...); ... } } is THE way to use the IoC? This is an example for pages. I think it's ok but what about this second example, out of pages. So I need to create a ServiceFactory class. public class ServiceFactory { private ServiceClassB scb; private static ServiceFactory instance; static { instance = new ServiceFactory(); } public static ServiceFactory getInstance() { return instance; } private ServiceFactory() { scb = new ClassB(); } public ServiceClassB getSab() { return scb; } } In a ClassA (not anymore a Tapestry page) I have to do that : public class ClassA { private ServiceClassB sab; public ServiceClassB getSab() { return sab; } public void setSab(ServiceClassB sab) { this.sab = sab; } public String aMethod() { sab = ServiceFactory.getInstance().getUserService(); User user = sab.getAuthenticatedUser(...); ... } } I think this is not IoC. It's just management of services. So my goal is to make that IoC and something have to call setSab for me, or maybe it's should be the role of the ServiceFactory? Regarding what Hugo explained to me, (thanks a lot for your time!) one of the way is this : public class UserModule { public static ServiceClassB build(ServiceUserDao userDao){ ClassB cb = new ClassB(userDao); return cb; } public static ServiceUserDao build() { UserDao dao = new UserDao(); return dao; } } But I still don't know how to implement ClassA to get my ServiceClassB instance provided by the IoC. I cannot call the Module without creating a strong link between ClassA and the IoC, or maybe I have to create this link?? In my mind, nothing have to call the IoC since it's the IoC who should call the classes. So I have to say to the IoC which class need it and for now I just know how to tell the IoC which Services I have and the dependencies they have. Or maybe, I'm completely wrong, lol, and in fact the role of IoC is just to expose services to make them available to the all application and I have in ClassA to call explicitely the services via their builder in the module and use them via their interface! 2007/12/17, Hugo Palma [EMAIL PROTECTED]: Ok, as you can see in the tapestry-ioc documentation there are three ways of injecting dependencies into services. Only one of them is actually intrusive, the As parameters to the service implementation class' constructor (for autobuilt services) one. If you use this way then you will need to use the Inject annotation in your service implementation class which will create the dependency you don't want. So, this leaves you with the other two choices. The As parameters to the service builder method way has an example right in the beginning of the Injecting Dependencies sections of the docs. This way your service class can be completely independent of your IoC container. All the injection stuff is done in the module builder class. All you have to do is declare the dependencies in your service build method in the module builder and use the service class setters to set it's dependencies. Finally, you can use the As parameters passed to the constructor of the service's module builder (cached inside instance variables) way. This in not intrusive also because, again, all the injection stuff is done in the module builder. Only this time instead of the dependencies being injected as parameters in the build method they are injected in you module builder class constructor. Hope this helps... Michael Bernagou wrote: Hi Hugo, It is exactly that and I didn't understand how to do that. Whatever I test, it works but it is intrusive. I re-read the documentation about tapestry-ioc and I still not understand how to do that. I need an example of webapp with 3 layers around the ioc to see how tapestry-ioc gives the services instance to the layers. @Thiago, I read this part but I don't know enought Spring to decide if tapestry-ioc is really better than Spring. I'm not sure better is the word. I would prefer more adapt for Tapestry webapp but it's just my feelling. Just to argue a little more, if it is really better, why the way to
Re: T4: Returning a file to be downloaded on response
Thanks Ulrich, I must've missed that somehow. Cheers, On 12/17/07, Ulrich Stärk [EMAIL PROTECTED] wrote: Look harder :-) http://wiki.apache.org/tapestry/SendingDiferentContentTypes Apart from that this topic has been discussed several times on this list, just search the archives. You might also want to look at the http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/contrib/services/impl/RoundedCornerService.html which does something similar. -- I'm a coder not a drag-n-dropper Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IoC global question
On Mon, 17 Dec 2007 06:35:43 -0200, Michael Bernagou [EMAIL PROTECTED] wrote: It is exactly that and I didn't understand how to do that. Whatever I test, it works but it is intrusive. I re-read the documentation about tapestry-ioc and I still not understand how to do that. I need an example of webapp with 3 layers around the ioc to see how tapestry-ioc gives the services instance to the layers. Try this: http://intranet.eteg.com.br/~thiagohp/frameworks/gerenciador-nucleo.zip. This is the implementation of the presentation and business logic of a simple application. It's also part of a comparison between Java Web frameworks, so the Web code is in another project (http://intranet.eteg.com.br/~thiagohp/frameworks/gerenciador-tapestry5.zip). The code is written in Portuguese, but the DAO interfaces and classes are suffixed with DAO and the business logic ones are suffixed with Controller. Both ZIP files are Eclipse projects and have Maven POMs. Translations: Projeto (project), tarefa (task), pessoa (person). -- Thiago H. de Paula Figueiredo Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da Informação Ltda. http://www.eteg.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IoC global question
On Mon, 17 Dec 2007 08:33:52 -0200, Michael Bernagou [EMAIL PROTECTED] wrote: public class UserModule { public static ServiceClassB build(ServiceUserDao userDao){ ClassB cb = new ClassB(userDao); return cb; } public static ServiceUserDao build() { UserDao dao = new UserDao(); return dao; } } But I still don't know how to implement ClassA to get my ServiceClassB instance provided by the IoC. 1) Rename your build() method to buildServiceUserDao. 2) Your ClassA builder method would be something like that: public static ClassA buildClassA(ServiceClassB serviceClassB) { ServiceClassB object = new ServiceClassBImplementation(); object.setServiceClassB(serviceClassB); return object; } -- Thiago H. de Paula Figueiredo Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da Informação Ltda. http://www.eteg.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IoC global question
Thanks for the TYPO Thiago. Also thanks for the project examples, I'll need to wait beeing at home to test since the security system here at the office block them to be download. Making my ClassA a service? I'm going to try but it means ClassA will be instanciate only by Tapestry-ioc else I will not have my ServiceClassB instance (imagine a ClassC needs an instance of ClassA and doesn't care about services, will I have to make ClassC also a service??). And what about a custom ServiceFactory singleton class that call the Registry to get instances and/or be a sort of Global Service referenced in Tapestry-Ioc? Again, to create a Service is not a problem, my problem is to call them from layers without the @Inject which work only from tapestry-core but without making a link between the layer and tapestry-ioc. The only link I wish is between tapestry-ioc and layers in this order. ioc knows the layers, but the layers don't know the ioc, only the service. Still reading the documentation... 2007/12/17, Thiago H de Paula Figueiredo [EMAIL PROTECTED]: On Mon, 17 Dec 2007 08:33:52 -0200, Michael Bernagou [EMAIL PROTECTED] wrote: public class UserModule { public static ServiceClassB build(ServiceUserDao userDao){ ClassB cb = new ClassB(userDao); return cb; } public static ServiceUserDao build() { UserDao dao = new UserDao(); return dao; } } But I still don't know how to implement ClassA to get my ServiceClassB instance provided by the IoC. 1) Rename your build() method to buildServiceUserDao. 2) Your ClassA builder method would be something like that: public static ClassA buildClassA(ServiceClassB serviceClassB) { ServiceClassB object = new ServiceClassBImplementation(); object.setServiceClassB(serviceClassB); return object; } -- Thiago H. de Paula Figueiredo Desenvolvedor, Instrutor e Consultor de Tecnologia Eteg Tecnologia da Informação Ltda. http://www.eteg.com.br - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Bernagou Java Developper
Re: Adding extra rows to a BeanEditForm / extra columns to a Grid (T5!)
Hello Thiago, Well, in Tapestry 5.0.6, if you just add a column using BeanModel.add, it doesn't show any label, unless you have a added column name-label entry in your app.properties. Don't even have such a property file, but yes - it shows a label (just tried it again to make sure). In your example down there it would be action. beanModel.add(action, null).label(any label you want, including an empty string.); Like I said, when I try giving null, an empty string or a whitespace results in a tapestry exception stating Parameter label was null or contained only whitespace. I've posted a related JIRA, https://issues.apache.org/jira/browse/TAPESTRY-1983, asking for a new parameter in Grid to add new columns without the need to create a BeanModel explicitly as we have to do now. Ah, great! Just added a comment that this would be useful for BeanEditForm too - and voted for it. :) Regad - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 - Upgrade Dojo
Ditto to that. An upgrade to Tapestry 5 still looks a ways off and the continued support of Tapestry 4 is extremely valuable to us. Thanks guys! On Dec 16, 2007 1:34 PM, Martino Piccinato [EMAIL PROTECTED] wrote: +1 tnx to Jesse and Andreas. I think this work is important for T4 users but also for the overall tapestry community as it's important to show that tapestry framework can provide long term support and evolve all his versions/projects in a reasonable way for who invested in it. IMHO even T5 adoption will benefit from T4 support and evolution. On Dec 15, 2007 1:15 PM, fdegrassi [EMAIL PROTECTED] wrote: Let me join you in this.The dedication that Andreas and Jesse put in supporting Tapestry 4 is really something. Sure, it's fantastic to have a brand new web framework every two years, but some of us build real web application with Tapestry and would be screwed if someone didn't take the responsibility for mantaining the old version. Thanks a lot. Francesco Degrassi Matt Brock wrote: Andreas Andreou wrote: I just uploaded the docs, so you can now see what is possible with 4.1.4-SNAPSHOT at: http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html The adapter javascript file mentioned is: https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/tapestry-framework/src/js/tapestry/skeleton/core.js I'm aware we need more docs + an example implementation, but lack of time hasn't made this possible yet. I just wanted to say on behalf on Tap~4 users everywhere: thank you for your efforts! - 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: Contrib:Table and page parameters
Hm, I think my question was not well formulated. Apologies. I'll try once more! Suppose you want to implement an index that shows all files starting with A, B, etc. My page would show A B C D ... X Y Z and you can click on a letter to show the files starting with this letter in a sortable Contrib:Table. How would I do this? Can somebody lead me on the right track? Thanks! Kaspar On 16.12.2007, at 17:08, Kaspar Fischer wrote: Hi list, How can I tell Contrib:Table to pass on page paremeters? When I click on a table column to sort it, the page that opens does not have the page parameters of the old page anymore! More precisely, my page Page.html uses a paremeter (nodeid) to know what content to display. So in Page.java's pageBeginRender() method I have String nodeIdParam = cycle.getParameter(nodeid); and then I load the data from a database and display a few things in a Contrib:Table. Unfortunately, the link that the Contrib:Table generates in order to sort a column does not contain the value for parameter nodeid: http://localhost:8080/kc/ Page,tableColumnComponent.linkColumn.sdirect?container=Contrib% 3ASimpleTableColumnPagesp=APage%2C% 24SortableTable.table.tableViewsp=SnodeTableTitle So when I click the link, my node does not know what data to load from the database! I think I need to tell Contrib:Table to include the nodeid in the link, right? How can I do this? Many thanks, Kaspar - 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: Component with mixed functionality?
On 11.12.2007, at 12:30, Kristian Marinkovic wrote: have you tried: tr class=ognl:cssClass jwcid=@If condition=... public String getCssClass() {...} Wow, so simple! Thanks a lot. I feel almost ashamed: of course, informal properties can be used and they have OGNL-power, too! Thanks, Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Component with mixed functionality?
Thanks, Matt, for your response. On 16.12.2007, at 02:13, Matt Brock wrote: The problem is that I don't think your even/odd requirement will work with any of the regular Tapestry components. Normally you iterate over a collection of values (the @For component, for example), and use an OGNL expression like class=ognl:(index % 2 == 0 ? 'even' : 'odd') to determine whether the row is odd or even. But the problem is, not all of your rows are going to be rendered. So what happens when the first row's @If condition evaluates true, the second row's condition evaluates false, then the third evaluates true? You'll end up with two rows both marked even. That's exactly what was happening in my case! The easiest way to do this would be to write your own renderComponent method. That way you get complete control over the output. This has the added advantage of bypassing the OGNL parser. You don't need a component definition file (.jwc) or an HTML file, either. Just a single java class. Something like this: MyComponent.java public abstract class MyComponent extends AbstractComponent { nbsp;nbsp;@Parameter nbsp;nbsp;public abstract MyObject getMyObject(); nbsp;nbsp;protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) { // You can also use the writer.begin/writer.attribute way of doing things, but this is faster. nbsp;nbsp;nbsp;nbsp;StringBuffer output = new StringBuffer(); nbsp;nbsp;nbsp;nbsp;output.append(lt;tablegt;); nbsp;nbsp;nbsp;nbsp;int i = 0; nbsp;nbsp;nbsp;nbsp;if (getMyObject().getTitle() != null) { nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;output.append(lt;tr).append (i % 2 == 0 ? class=\even\ : ).append(gt;lt;tdgt;).append(getMyObject().getTitle()).append (lt;/tdgt;lt;/trgt;); nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;i++; nbsp;nbsp;nbsp;nbsp;} nbsp;nbsp;nbsp;nbsp;if (getMyObject().getNextProperty() != null) { nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;output.append(lt;tr).append (i % 2 == 0 ? class=\even\ : ).append(gt;lt;tdgt;).append(getMyObject().getNextProperty ()).append(lt;/tdgt;lt;/trgt;); nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;i++; nbsp;nbsp;nbsp;nbsp;} nbsp;nbsp;nbsp;nbsp;...etc... nbsp;nbsp;nbsp;nbsp;output.append( ); nbsp;nbsp;nbsp;nbsp;writer.print(output,true); nbsp;nbsp;} } I get it. -- I finally took Kristian's suggestion as it allowed me to keep my markup in a HTML-file (even though I don't know whether the latter is worth it). Thanks! Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: about ognl and class changes detection
On 13.12.2007, at 09:54, #Cyrille37# wrote: Hello OGNL is very nice but I would like to know how to manage classes changes without testing every pages. Exemple : In pages we have some ognl expression like value=ognl:user.lastname and we change the class's property getLastname() to getName(). Every page are broken, And I could not find a nice method to find thoses errors. How do you manage tis case with Tapestry ?? Thanks Cyrille I am just telling the obvious, I know, but maybe it's a start: - You could leave getLastname() in your code and make it call getName(). With this wrapper you will not have to change any OGNL expressions. - Make a textual search for lastname in all you files...? Kaspar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1.3 - Upgrade Dojo
Same here. I can't see moving to 5 for at least a year, so the continued support for 4.1 is most welcome! -Norman On Dec 17, 2007, at 12:21 PM, Ben Dotte wrote: Ditto to that. An upgrade to Tapestry 5 still looks a ways off and the continued support of Tapestry 4 is extremely valuable to us. Thanks guys! On Dec 16, 2007 1:34 PM, Martino Piccinato [EMAIL PROTECTED] wrote: +1 tnx to Jesse and Andreas. I think this work is important for T4 users but also for the overall tapestry community as it's important to show that tapestry framework can provide long term support and evolve all his versions/projects in a reasonable way for who invested in it. IMHO even T5 adoption will benefit from T4 support and evolution. On Dec 15, 2007 1:15 PM, fdegrassi [EMAIL PROTECTED] wrote: Let me join you in this.The dedication that Andreas and Jesse put in supporting Tapestry 4 is really something. Sure, it's fantastic to have a brand new web framework every two years, but some of us build real web application with Tapestry and would be screwed if someone didn't take the responsibility for mantaining the old version. Thanks a lot. Francesco Degrassi Matt Brock wrote: Andreas Andreou wrote: I just uploaded the docs, so you can now see what is possible with 4.1.4-SNAPSHOT at: http://tapestry.apache.org/tapestry4.1/ajax/beyonddojo.html The adapter javascript file mentioned is: https://svn.apache.org/repos/asf/tapestry/tapestry4/trunk/ tapestry-framework/src/js/tapestry/skeleton/core.js I'm aware we need more docs + an example implementation, but lack of time hasn't made this possible yet. I just wanted to say on behalf on Tap~4 users everywhere: thank you for your efforts! - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: JumpStart 3.0.0 Preview ready for comments
Hi Geoff, I can't find a online demo there, might be nice to have one so we don't have to install it. thanks. A.C. Geoff Callender-2 wrote: Hi Penyihir, Michael, and Ted, Thanks for your help. I'm looking forward to the critiques (even if they're bad). Cheers, Geoff On 17/12/2007, at 3:12 PM, Penyihir Kecil wrote: Hi Geoff i've also succesfully installed it i'm looking for user autentification and best practive for ur edit form. thnx a lot On 12/17/07, Michael Courcy [EMAIL PROTECTED] wrote: Hi Geoff I've successfully installed the jumpstart-min on windows XP with JBOSS 4.2.2GA I start digging now. Thanks a lot. Michael Geoff Callender a écrit : Hi all, I've reworked JumpStart to address Tapestry 5, and I need feedback on how to make it as good as it can be... If you don't know JumpStart, its purpose is to get newcomers up-to-speed with Tapestry as fast as possible. It's aim is to dispel the myth of Tapestry's steep learning curve by helping people get productive quickly. The better that JumpStart is, the better I hope it will be for all the Tapestry community. So, I'm looking for heaps of feedback on its strengths, weaknesses, choice of examples, quality of code, correctness, etc., anything that will make it more helpful to more people! To get it, go to http://files.doublenegative.com.au/jumpstart/ , click on Downloads, and look for jumpstart-min-3.0.0.preview.1.zip. Cheers, Geoff Callender http://files.doublenegative.com.au/jumpstart/ You can mail me directly or reply to this thread. Either is fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Courcy http://courcy.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] -- View this message in context: http://www.nabble.com/T5%3A-JumpStart-3.0.0-Preview-ready-for-comments-tp14346122p14375818.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Anything new preview coming out before year end?
Hi, Anything new preview scheduled for 2007? A.C. -- View this message in context: http://www.nabble.com/T5%3A-Anything-new-preview-coming-out-before-year-end--tp14375819p14375819.html 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: JumpStart 3.0.0 Preview ready for comments
Hi Geoff, This is my first time to try JumpStart on T5. The installation guide is quite straightforward, I went through all things less than 30 minutes. I like it, especially your t:sourcecodedisplay component:) Looking forward to see the maximum version of Jumpstart on T5, especially for the web flow feature. Cheers, Jeffrey Ai Geoff Callender-2 wrote: Hi all, I've reworked JumpStart to address Tapestry 5, and I need feedback on how to make it as good as it can be... If you don't know JumpStart, its purpose is to get newcomers up-to- speed with Tapestry as fast as possible. It's aim is to dispel the myth of Tapestry's steep learning curve by helping people get productive quickly. The better that JumpStart is, the better I hope it will be for all the Tapestry community. So, I'm looking for heaps of feedback on its strengths, weaknesses, choice of examples, quality of code, correctness, etc., anything that will make it more helpful to more people! To get it, go to http://files.doublenegative.com.au/jumpstart/ , click on Downloads, and look for jumpstart-min-3.0.0.preview.1.zip. Cheers, Geoff Callender http://files.doublenegative.com.au/jumpstart/ You can mail me directly or reply to this thread. Either is fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-JumpStart-3.0.0-Preview-ready-for-comments-tp14346122p14375824.html 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: Anything new preview coming out before year end?
Quite likely, but you can always see the latest greatest in the nightly build. On Dec 17, 2007 3:18 PM, Angelo Chen [EMAIL PROTECTED] wrote: Hi, Anything new preview scheduled for 2007? A.C. -- View this message in context: http://www.nabble.com/T5%3A-Anything-new-preview-coming-out-before-year-end--tp14375819p14375819.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship TWD Consulting, Inc. Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: @OnEvent and onActivate
Hi, Can we use @OnEvent to annotate a onActivate method, say: @OnEvent(???) void myActivate() { } Thanks, -- View this message in context: http://www.nabble.com/T5%3A--%40OnEvent-and-onActivate-tp14377507p14377507.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]