Re: workaround for hibernate-module problem (ValueEncoderSource contribution)
The hibernate config is there (before using palette component I had a working tapestry-hibernate module integration). I thought it is a bug from the hibernate-tapestry module? HibernateModule's contributeValueEncoder(...) interferes with the one of the standard TapestryModule. Maybe I just switch to the standard hibernate/spring way and build the bridge with the spring-module to inject a dao. Ville Virtanen schrieb: Provide the hibernate configuration if it is missing. If not, please attach the stack trace so we can take a look at it. - Ville aldana wrote: hi, I am facing problem described in http://www.nabble.com/Hi-Lo-tutorial,-HIbernate-cfg-errors-td22230480.html. In my app I am using palette component and tapestry-hibernate, so the ValueEncoder contribution is interfering with each other. Is there another alternative/workaround as removing hibernate-tapestry module dependency? I cannot remove it because I am using its features. thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
workaround for hibernate-module problem (ValueEncoderSource contribution)
hi, I am facing problem described in http://www.nabble.com/Hi-Lo-tutorial,-HIbernate-cfg-errors-td22230480.html. In my app I am using palette component and tapestry-hibernate, so the ValueEncoder contribution is interfering with each other. Is there another alternative/workaround as removing hibernate-tapestry module dependency? I cannot remove it because I am using its features. thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[docs improvement] Make integration tests live
Are the integration test-apps (app1-app5) of tapestry-core placed somewhere live on a public place? I think the integration tests could greatly be reused to document how to use tapestry features: -they are quite isolated (most of pages test one particular feature) -you see live how things work, which makes learning a much more concrete experience -because integration-tests are maintained together with the current trunk/ we got always an up to date documentation -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [integration-test apps] problems with starting them standalone
thanks this worked. just some detailed program parameters for running with RunJetty: working-directory needs to be: /tapestry-core programm arguments (for running integration-test-application app1): app1 src/test/app1 Ulrich Stärk schrieb: IIRC there's a RunJetty class somewhere in tapestry-core/src/test/../integration that accepts the name of the test application to start and starts it up. This works for me. Uli manuel aldana schrieb: I am trying hard to deploy the integration test webapp from tapestry-core, but I haven't had succeeded so far. Loading webapp itself works (I see the ioc outputs on console). But when going to the context path I would only see a directory listing of the files of the exploded webapp. So it won't load the Index.tml and bind it to TapestryFilter (though web.xml says this). I am starting the webapp under IntelliJ. Problems both occur with running under deploy exploded and war mode. The from IntelliJ built exploded/ dir and war look fine. Any ideas? thanks. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [integration-test apps] problems with starting them standalone
Just in case you browse thread for same problem and wait to have it resolved: I filed a bug under http://www.jetbrains.net/jira/browse/IDEA-22800. manuel aldana schrieb: I found the cause. It seems to be an IntelliJ thing. By default itself maven2 isn't including test-classes (test pages are sitting inside src/test/java) when packaging so pages could not be found. Never the less it is weird that IntelliJ does not include them anyway, because the option (include source-roots -> src/test/java/) inside the Module options is ticked on. I guess this is a IntelliJ bug (IntellIj never packages /target/test-classes to the final war output, even if the option is chosen). manuel aldana schrieb: I am trying hard to deploy the integration test webapp from tapestry-core, but I haven't had succeeded so far. Loading webapp itself works (I see the ioc outputs on console). But when going to the context path I would only see a directory listing of the files of the exploded webapp. So it won't load the Index.tml and bind it to TapestryFilter (though web.xml says this). I am starting the webapp under IntelliJ. Problems both occur with running under deploy exploded and war mode. The from IntelliJ built exploded/ dir and war look fine. Any ideas? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [integration-test apps] problems with starting them standalone
I found the cause. It seems to be an IntelliJ thing. By default itself maven2 isn't including test-classes (test pages are sitting inside src/test/java) when packaging so pages could not be found. Never the less it is weird that IntelliJ does not include them anyway, because the option (include source-roots -> src/test/java/) inside the Module options is ticked on. I guess this is a IntelliJ bug (IntellIj never packages /target/test-classes to the final war output, even if the option is chosen). manuel aldana schrieb: I am trying hard to deploy the integration test webapp from tapestry-core, but I haven't had succeeded so far. Loading webapp itself works (I see the ioc outputs on console). But when going to the context path I would only see a directory listing of the files of the exploded webapp. So it won't load the Index.tml and bind it to TapestryFilter (though web.xml says this). I am starting the webapp under IntelliJ. Problems both occur with running under deploy exploded and war mode. The from IntelliJ built exploded/ dir and war look fine. Any ideas? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Solving the T5 Documentation Dilemma
yes, I know nabble, and I think it is great. I also think usenet is generally great, but at some point of support it does not scale. At mailinglists you don't have topic categories + sticky notes which I think are quite important for navigation. Further more it lacks and a notification system by topic there. In my view a first class spring support (like in spring support forum) wouldn't be possible with a mailinglist only. Ben Gidley schrieb: I must also say I prefer mailing lists - it is easier to follow it. If you want a forum why not use the nabble or markmail interfaces to the mailing lists? e.g. http://tapestry.markmail.org/ or http://www.nabble.com/Tapestry---User-f340.html Ben Gidley www.gidley.co.uk b...@gidley.co.uk On Fri, May 1, 2009 at 12:45 PM, Andy Pahne wrote: except when they are down, just like the hibernate forums recently. I always preferred mailing lists... just my 2 cents manuel aldana schrieb: Otho schrieb: And lastly I would suggest setting up a forum. Information is more easily organized there and searching is more convenient than wíth a mailing list alone. I would think that the barrier of contributing to a forum is lower than that of contributing to / asking on a mailinglist. Well, the latter can also be seen as a feature in a way, but publicity and visibility never really hurt IMO. +1 on this one. mailinglist is really nice, but forum often provides better search and layout advantages (especially for code snippets). Further more you have a better organization (categories, sticky notes etc.). - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[integration-test apps] problems with starting them standalone
I am trying hard to deploy the integration test webapp from tapestry-core, but I haven't had succeeded so far. Loading webapp itself works (I see the ioc outputs on console). But when going to the context path I would only see a directory listing of the files of the exploded webapp. So it won't load the Index.tml and bind it to TapestryFilter (though web.xml says this). I am starting the webapp under IntelliJ. Problems both occur with running under deploy exploded and war mode. The from IntelliJ built exploded/ dir and war look fine. Any ideas? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[bean-edit-form] Render + binding list elements
Hi, how do I handle List properties of my model when using the bean-edit-form? I had a look at http://www.nabble.com/Dynamic-list-of-strings-in-a-form-td16702754.html but it did not mention bean-edit-form. It would be great if there was something like: If the backing object contains a typed List (e.g. with more primitive types like List or List) the page would somehow render a list input inside the form. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Solving the T5 Documentation Dilemma
Otho schrieb: And lastly I would suggest setting up a forum. Information is more easily organized there and searching is more convenient than wíth a mailing list alone. I would think that the barrier of contributing to a forum is lower than that of contributing to / asking on a mailinglist. Well, the latter can also be seen as a feature in a way, but publicity and visibility never really hurt IMO. +1 on this one. mailinglist is really nice, but forum often provides better search and layout advantages (especially for code snippets). Further more you have a better organization (categories, sticky notes etc.). -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: What is NOT beautiful about Tapestry?
Inge Solvoll schrieb: 1. What, politically, made it hard to introduce T5 in your organisation? Who resisted, and why? I am sure there a two things which could help at promotion for convincing decision makers: Real big live sites running under tapestry and a good up to date book. 2. What, technically, made it hard to introduce/teach T5 among your programmer colleagues? (some already mentioned documentation) As bigger sites hardly start from scratch, I see the legacy reason as a big technical point. Usually big codebases rely on action/command focused frameworks (e.g. struts, spring mvc) and it is extremely hard to refactor them to page and component based ones. Also I see that frontend people are being used to work with JSP, freemarker etc. and are a bit hesitating to look at "yet another" templating technology. I really like tapestry concepts and helps a lot to think in different directions even if you don't use it in daily job. About tap-ioc I really like to java-code style injection and configuration instead for XML. - manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [tap-ioc] passing a set of autobuild types to bind()
OK, here an example: A User is encapsulating password details. It gets a plain-text as input is taking security actions internally. Because I want to extract security implementation details (encryption/hashing) from the domain model I want to end up with an injectable security instance. Still things should be handled from the domain object. class User{ ... //provides security actions on a string input, password should not be kept as plaintext @Inject PasswordEncoder ... //one use case to have the password knowledge public boolean isEligible(String password){...} } I know I could handle all this password stuff outside of the User (e.g. AuthentcationService). This is also dependant how it technically fits to a used security framework (authorize/authenticate). With this example I just wanted to show that it can make sense to inject services to a domain-object. I hope you can see my motivation why I want to add a set of classes by package name into SerivceBinder.bind(). E.g. autobuild all my domain-object from a model package. Christian Edward Gruber schrieb: Oh, sorry - ServiceBinder... I was thinking you were injecting a service lookup object into your model - I was clearly too brain-dead and didn't read it properly. So, you're binding services in modules and injecting them with @Inject - that's fine, so far. But I don't understand, then, how you're injecting things into value objects? That just doesn't make sense to me. Can you provide a cleansed example? Christian. On 21-Apr-09, at 06:49 , manuel aldana wrote: I don't see a problem here. I am having dependencies on interface level which should be fine. For testability I can just inject a test-implementation of this interface. I don't see a strong coupling to the container in my model (apart from the @Inject annotation). Christian Edward Gruber wrote: Are your model classes their own controllers? If you're doing what you describe, then you're tightly coupling your model classes to the implementation of the application. It's not forbidden or anything, but it's often not considered best practice (though as with all good practice, there are notable exceptions, so I don't want to judge hastily). But I typically consider this a DI/IoC anti-pattern - injecting the container itself or statically binding the container (via ServiceBinder) into domain objects. Makes things hard to test, hard to disentangle, and really really hard to port later. Christian. On 20-Apr-09, at 15:42 , manuel aldana wrote: Hi, I am injecting services to my domain model classes. For that I am using the ServiceBinder.bind(implementationClass). This is kind of repetitive if I want to add all classes of a certain package. Is it somehow possible to add a set of class at once to autobuild control, for instance by passing a package identifier? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [tap-ioc] point of injection
Thiago H. de Paula Figueiredo wrote: If applicable I try to inject services to domain-objects to add pluggable behaviour to them (so I don't end up with an anemic domain model). I disagree with adding services to domain objects. But please let's not start a discussion about it. This is not the right place. OK, maybe there is a misunderstanding about the term service here. I want to inject just an implementation of an interface and reuse tap-ioc factory facilities for that. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [tap-ioc] point of injection
Christian Edward Gruber wrote: On 20-Apr-09, at 19:39 , Thiago H. de Paula Figueiredo wrote: I think he means value objects or domain models. You can't usefully have the container create an instance of Movie because movie is a data-carrying node. It's a bit like having the IoC container create any random Map you might need. If it's a named Map that is a central store for something, then sure, but if I'm creating a Map of values to be used elsewhere that has limited life-span and/or will be populated from the database then re-generated in another user session - these are examples of things you wouldn't put into the container. Now I get it. Thanks Christian! All you said, to me, is one more reason to not inject services in domain objects . . . :) Yeah - that's such an anti-pattern. If you're injecting things into value objects, you've probably not separated concerns well. OK, some motivation to my approach: Looking to DomainDrivenDesign I am putting behaviour to the domain-objects. Internally I base this behaviour on interfaces, so I decouple things. Because I use dependency injection for my domain-object, why shouldn't I use a dependency injection container like tapestry-ioc then? I try to avoid coding these annoying factories myself. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [tap-ioc] passing a set of autobuild types to bind()
I don't see a problem here. I am having dependencies on interface level which should be fine. For testability I can just inject a test-implementation of this interface. I don't see a strong coupling to the container in my model (apart from the @Inject annotation). Christian Edward Gruber wrote: Are your model classes their own controllers? If you're doing what you describe, then you're tightly coupling your model classes to the implementation of the application. It's not forbidden or anything, but it's often not considered best practice (though as with all good practice, there are notable exceptions, so I don't want to judge hastily). But I typically consider this a DI/IoC anti-pattern - injecting the container itself or statically binding the container (via ServiceBinder) into domain objects. Makes things hard to test, hard to disentangle, and really really hard to port later. Christian. On 20-Apr-09, at 15:42 , manuel aldana wrote: Hi, I am injecting services to my domain model classes. For that I am using the ServiceBinder.bind(implementationClass). This is kind of repetitive if I want to add all classes of a certain package. Is it somehow possible to add a set of class at once to autobuild control, for instance by passing a package identifier? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org Christian Edward Gruber e-mail: christianedwardgru...@gmail.com weblog: http://www.geekinasuit.com/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [tap-ioc] passing a set of autobuild types to bind()
Thiago H. de Paula Figueiredo schrieb: Em Mon, 20 Apr 2009 16:42:23 -0300, manuel aldana escreveu: Hi, I am injecting services to my domain model classes. For that I am using the ServiceBinder.bind(implementationClass). This is kind of repetitive if I want to add all classes of a certain package. Is it somehow possible to add a set of class at once to autobuild control, for instance by passing a package identifier? Use the ClassNameLocator service to find all classes inside a package them loop the results. Inside a module bind() method, you'll need to instantiate ClassNameLocatorImpl yourself, as Tapestry does not do service injection in this method. I see. thanks. but would be cool if there was something like: //add all classes from services package into autobuild set binder.bind("org.foo.bar.services.*"); -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [tap-ioc] point of injection
Thiago H. de Paula Figueiredo schrieb: Em Mon, 20 Apr 2009 16:38:51 -0300, manuel aldana escreveu: When does tapestry-ioc inject stuff to object (@Inject annotation)? I guess it is straight after finishing the constructor... Is it possible to have the injection already available after the call of super() inside the constructor? This way the injection would be available already inside the rest of the constructor code. Wouldn't it be easier to just use constructor injection? I use @Inject just in Tapestry pages, components and mixins, never in services. In them, always constructor injection. It makes it way easier to test them without Tapestry-IoC. Your convention makes sense, but what do you do with objects which are usually created directly by other code and not by tapestry, thus constructor injection won't be the best solution? An example could be for instance domain-model objects, which use services internally. You create them by for instance passing mandatory fields into the constructor. If applicable I try to inject services to domain-objects to add pluggable behaviour to them (so I don't end up with an anemic domain model). So I am right that tapestry-ioc exclusively is injecting fields after having passed the constructor code? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[tap-ioc] passing a set of autobuild types to bind()
Hi, I am injecting services to my domain model classes. For that I am using the ServiceBinder.bind(implementationClass). This is kind of repetitive if I want to add all classes of a certain package. Is it somehow possible to add a set of class at once to autobuild control, for instance by passing a package identifier? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[tap-ioc] point of injection
When does tapestry-ioc inject stuff to object (@Inject annotation)? I guess it is straight after finishing the constructor... Is it possible to have the injection already available after the call of super() inside the constructor? This way the injection would be available already inside the rest of the constructor code. class Foo{ @Inject Service service Foo(){ //service is null in constructor } } -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[tapestry-hibernate] ignoring certain fields to be O/R mapped
Hi, tapestry-hibernate integration is really great. But one thing which wonders me is that all the fields of my domain-object are implicitly taken as persisted fields/columns (maybe this is a tapestry-hibernate feature?). I would like to have control of that and want to only have explictly marked @Column fields included to hibernate mapping, the rest should be ignored. As an alternative maybe there is also a blacklist annotation? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [bean-edit-form] make a sub-set of parameters visible but not editable
Thiago H. de Paula Figueiredo schrieb: Em Sat, 18 Apr 2009 13:00:19 -0300, manuel aldana escreveu: Yes, but as you said it is a workaround and looks not good inside the template. I think it is quite a common formular use-case, that some data columns are displayed but are read only during editing a data-item (e.g. id, email, username). I see such a thing in many webapps. Because bean-edit-form is the handy formular component of tapestry such a support would be very nice. Adding this feature would need to change BeanEditForm, BeanEditor, PropertyEditContext and eventually every single edition block, provided by Tapestry or not. Good luck trying to convince Howard: at http://www.nabble.com/Tabindex-and-accesskey-in-BeanEditForm--to22380749s302.html#a22420266. OK, let's hope Howard comes across this thread and adds his cents ;) As said such read-only columns in formulars are quite typical. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [bean-edit-form] make a sub-set of parameters visible but not editable
Thiago H. de Paula Figueiredo schrieb: I see, but how do I set a property to be read only? Sorry, I misundestood your question. Answer: you don't set a property to be read only. The workaround is to override an edition block with . Yes, but as you said it is a workaround and looks not good inside the template. or even better, to let it control through page class: Maybe it would be cool to add a new component parameter (readonly) to BeanEditForm: That's not how BeanEditForm/BeanEditor is meant to be used. I think it is quite a common formular use-case, that some data columns are displayed but are read only during editing a data-item (e.g. id, email, username). I see such a thing in many webapps. Because bean-edit-form is the handy formular component of tapestry such a support would be very nice. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [bean-edit-form] make a sub-set of parameters visible but not editable
Thiago H. de Paula Figueiredo schrieb: Em Sat, 18 Apr 2009 07:38:53 -0300, manuel aldana escreveu: Generally I would need something more flexible how to tell whether a parameter is read-only or editable inside the form. For my current problem the read-only vs. editable depends on roles (i.e. different roles have different access rights to edit certain fields). This is easy: create a method that returns a BeanModel that will be passed to BeanEditForm/BeanEditor. This method will remove or reorder BeanModel properties according to your requirements. I see, but how do I set a property to be read only? Looking at the api (http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/internal/beaneditor/BeanModelImpl.html) I couldn't find such a thing. Maybe it would be cool to add a new component parameter (readonly) to BeanEditForm: or even better, to let it control through page class: If/else constructs would work inside the page-template, but don't look nice if there are many parameters. They really pollute the page template. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[bean-edit-form] make a sub-set of parameters visible but not editable
Hi, I am using the BeanEditor Form for editing users. For that I would like to have a "partial" editing form, i.e. I want to protect certain columns from being edited. Example is the id of the object: Once it is created I want to have it visible but not editable. Using the @NonVisual flag or exlude parameter of BeanEdit-Form component wouldn't do this, it would just remove the column from the frontend completely. I had a look at overrides but it does not seem to support a read-only flag. Generally I would need something more flexible how to tell whether a parameter is read-only or editable inside the form. For my current problem the read-only vs. editable depends on roles (i.e. different roles have different access rights to edit certain fields). thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: "User" service?
Maybe you should look at the tapestry-spring-security plugin (http://www.localhost.nu/java/tapestry-spring-security/index.html). It works great and integrating is also not that difficult. Good thing is that you can both secure by single page or by page folders. Beware that it is not compatible with 5.1.x yet (works only for 5.0.18). daniel joyce schrieb: So I want to use pages with context so that it is easily bookmarkable. My website uses a DataSourcerealm to determine which pages can be accessed by a user. So normal flow is user logs in, first page he gets directed to sets up the User object as a ASO, other pages use this user. But if he bookmarks a url with context, say "configureProject/124332", and he clickes on the bookmark, logs in to tomcat, and gets redirected to it, the User object may not have been initialized yet. Now configure project is fine, since it is mostly working with projects. But I want the user object to exist so that I confirm the user actually owns it. Now I could have a basepage, whose onActivate() grabs the auth'd user string from the Httpsession, runs a query, and either sets up the User object, or bounces out the login page. And every other page could inherit from this one, and call super.OnActivate in their onActivate method. But I was wondering, is there a service I can write that can examine the HttpSession, and populate the User object. Is HttpSession available to services already? IE, can I inject it in the usual method via my builder? -Daniel - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[bean-grid] master->detail flow with lightbox effect
Hi, I am having a bean-grid, and when I click on a list-item I want to change the view to the corresponding bean-edit-form (master-detail view). For that I want to use the lightbox effect (http://www.huddletogether.com/projects/lightbox2/), so for the user the bean-edit-form comes as a modal window. For that I want to use lightbox and load the detail page with ajax-style. Is there maybe another hook inside bean-grid component for that? If not maybe such a thing could be an interesting feature and could be implemented as a mixin? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [bean-edit-form] error with constructor and enum param
no problem, i like the past :) why can't it cope with the enum parameter constructor? it works fine with the String parameter type. itself tapestry should know how to build an enum instance (for displaying the combo-box it does correctly). Or is there a finite list which "parameter-types" can be injected automatically (I guess all primitive types and String), which does not include enum-types? nillehammer schrieb: Sorry to have messed up the thread. My local clock was wrong nillehammer schrieb: When the BeanEditForm instantiates a new Model instance, it now uses the same code that instantiates service implementations (and injects dependencies). By default, Tapestry will find the constructor with the most parameters for this purpose, and will attempt to match each parameter to a service. That's why you get the Exception "No service matches..." In this case, you don't want that behavior. You surely want BeanEditForm to instantiate via the public no-arguments constructor. By placing an @Inject annotation on the public no-arguments constructor, you can direct BeanEditForm to use that constructor instead. Regards, nillehammer -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[bean-edit-form] error with constructor and enum param
I am using BeanEditForm. I get an exception if I have model-class with a constructor with an enumeration parameter. //WORKS public class Model{ public Model(){..} } //WORKS public class Model{ public Model(String s){..} } //CRASHES with error message: No service implements the interface public class Model{ public Model(MyEnum){..} } public enum MyEnum{...} apart from the constructor problem the bean-edit-form handles the enumeration good (gets displayed as combo-box) am using 5.0.18. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [grid-component] javascript style for ordering rows
Thiago H. de Paula Figueiredo schrieb: [...] javascript enable parameter. You're not exactly right. When Grid has more rows to show than rows per page, you cannot just reorder the objects that are being shown, you must reorder the whole row list. By the way, don't forget the inplace="true" Grid parameter: it reorders the Grid using AJAX. Yes, in my first thread post I overlooked the pagination problem. Thanks for the 'inPlace' parameter hint. Apart from that why was grid-component not desinged to use div-style (vs. tables) for row layout? maybe due to browser compability (especially older IEs)? I'm not following you: it does use a table. Yes, but I wonder why it does not use div-style. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5.1.0.2 and tapestry-spring-security 2.0.1
Thiago H. de Paula Figueiredo schrieb[ [...] session rather than Tapestry's Session. I'm having this issue too. Besides this, the @Secured annotation does not work. I asked the creator about this. He said spring-security is not compatible with 5.1. So I guess we need to wait or help :) - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Start.tml behaviour?
I recently had the same question :) http://www.nabble.com/make-Start-page-default-for-page-subfolder-td22766276.html tapestry changed from Start to Index as default implicit page since a while ago, which makes more sense (Index sounds more standard as Start). daniel joyce schrieb: If my tapestry app is under foo, on host somehost.com, then I know that requests for somehost.com/foo pulls foo.pages.Start.tml But if I go to somehost.com/foo/bar/, that request doesn't appear to be pulling foo.bar.pages.Start.tml Am I missing something? I thought this would work. Basically if a user goes up a level, I want to ensure that they at least get a Start.tml document that will redirect them to a more approproate location. -Daniel - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[localization] reusing facilities for enum-names
I got a java enumeration and would like to reuse the nice localization facilities from tapestry 5. let's say I have an enum: enum A{ ONE,TWO; } If it displays on a page I would like to have it displayed by the language (e.g. 'one' for en or 'zwei' for german). For displaying it on the page tapestry seems to use Enum.toString(). So I would override toString() and read some localized values from property files. How can I access tapestry localization facilities for that? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [grid-component] javascript style for ordering rows
OK, maybe I see the reason for firing the request another time. It is about the pagination if my list result (many entries) spans several pages -> it is far from obvious to let javascript know how to order this... manuel aldana schrieb: I really like the grid component. Especially the built-in ordering (clicking on column headers). what I miss is that javascript is not used when ordering the tables, at each click a complete HTTP request is fired. The data itself is not changed so another server call wouldn't be necessary. I at least did not find a javascript enable parameter. If it is not supported yet, maybe this could be a nice improvement for this component. For non-JS clients maybe there could even be a fallback to standard HTTP request style. Apart from that why was grid-component not desinged to use div-style (vs. tables) for row layout? maybe due to browser compability (especially older IEs)? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[intellij support] how to faster update webapp-content?
After I edit tapestry webapp stuff inside IntelliJ I always have to go +F9 (Make project) until after a few seconds I see the update in my browser. Now I am looking for a quicker feedback cycle for that, because these seconds are annoying from time to time. I know it can go quicker: In other situation where I don't use IntelliJ but use an external editor and 'mvn jetty:run' the update is faster So does somebody know a faster feedback tweak with IntelliJ? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[grid-component] javascript style for ordering rows
I really like the grid component. Especially the built-in ordering (clicking on column headers). what I miss is that javascript is not used when ordering the tables, at each click a complete HTTP request is fired. The data itself is not changed so another server call wouldn't be necessary. I at least did not find a javascript enable parameter. If it is not supported yet, maybe this could be a nice improvement for this component. For non-JS clients maybe there could even be a fallback to standard HTTP request style. Apart from that why was grid-component not desinged to use div-style (vs. tables) for row layout? maybe due to browser compability (especially older IEs)? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: make Start page default for page subfolder
Thiago H. de Paula Figueiredo schrieb: Em Sun, 29 Mar 2009 07:42:26 -0300, manuel aldana escreveu: is there a way to tell tapestry to have the Start page for subpage folders as default also? Why don't you use Index instead of Start? Sorry, this works of course. I mixed something up (thought the tapestry 5 default page would be */start and not */index). -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
make Start page default for page subfolder
Hi, I am categorizing my webapp by sub-page folders Start staff/Start customers/Start currently when entering the http:///staff the staff/Start page is not taken implicitly (in difference to the root page folder). I always need to reference http:///staff/Start explicitly. is there a way to tell tapestry to have the Start page for subpage folders as default also? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Image Asset Help Needed
Currently am working on this tapestry jira issue to provide a patch maybe in around 10 days. As current workaround you could go for: 1) Use plain Apache2 for accessing your images on different port from tapestry app. Of course firewall could be a problem... 2) If port is an issue (has to be 80), then you could use apache mod_jk (mod_jk2), passing tapestry stuff to the servlet-container and serving static images by Apache. 3) If the images aren't dynamic at all (e.g. not uploaded by user) I would use the context asset and place the stuff in the webapp/ root context. Peter Kanze schrieb: Here am I again. I am struggling for 2 days now to load an image from the filesystem into my webpage. The image needs to be loaded based on the product id. The steps I did was: 1. Implemented a FileSystemAssetFactory based on the ClasspathAssetFactory 2. Implemented a FileSystemResource; See the code below: In my html the following code is generated: As you can see the file system path is exposed into the webpage. I don't want this. The second problem is that the image is not loaded/visible in the webpage. What am I doing wrong? Are there tapestry guru's who can help me out? Thanks, Peter /* *My quick example code */ public String getThumbnailPath() { Asset asset = assetSource.getAsset(null, "file:/8/71/1001/thumb1.jpg", null); return asset.toClientURL(); } public class FileSystemAssetFactory implements AssetFactory { private final ClasspathAssetAliasManager aliasManager; private final Map resourceToDefaultPath = CollectionFactory.newConcurrentMap(); private final FileSystemResource rootResource; private final AssetPathConverter converter; private final boolean invariant; public FileSystemAssetFactory(ClasspathAssetAliasManager aliasManager, AssetPathConverter converter) { this.aliasManager = aliasManager; this.converter = converter; rootResource = new FileSystemResource("C:/tmp/pictures/"); invariant = converter.isInvariant(); } private String clientURL(Resource resource) { String defaultPath = resourceToDefaultPath.get(resource); if (defaultPath == null) { defaultPath = buildDefaultPath(resource); resourceToDefaultPath.put(resource, defaultPath); } return converter.convertAssetPath(defaultPath); } private String buildDefaultPath(Resource resource) { //boolean requiresDigest = cache.requiresDigest(resource); String path = resource.getPath(); int lastdotx = path.lastIndexOf('.'); path = path.substring(0, lastdotx + 1) + path.substring(lastdotx); return aliasManager.toClientURL(path); } public Asset createAsset(final Resource resource) { return new AbstractAsset(invariant) { public Resource getResource() { return resource; } public String toClientURL() { return clientURL(resource); } }; } public Resource getRootResource() { return rootResource; } } public class FileSystemResource extends AbstractResource { private static final int PRIME = 37; /** * Constructor with the root path * @param path the root */ public FileSystemResource(String path) { super(path); } /** * */ @Override protected Resource newResource(String path) { return new FileSystemResource(path); } @Override public URL toURL() { String filePath = getPath(); File file = new File(filePath); if (file != null && file.exists()) { try { return file.toURL(); } catch (MalformedURLException ex) { throw new RuntimeException(ex); } } return null; } @Override public String toString() { return getPath(); } @Override public int hashCode() { return PRIME * getPath().hashCode(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final FileSystemResource other = (FileSystemResource) obj; return getPath().equals(other.getPath()); } } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Implication of client side redirect
read this, very interesting: http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost rajesh sukumaran schrieb: Hi, I am evaluating Tapestry 5.1 to see if I can use it in one of my new projects. I see that Tapestry uses client side redirects to handle response for event requests. Will this not affect the performance of Tapestry applications, especially under high load? Redirects will result in an additional HTTP hit on the server for every event request that is rendered by a different page. Will this not degrade the responsiveness of the web application as the load increase? I would like to know what everyone thinks about this? regards, Rajesh Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/ - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: problem tapestry-spring-security plugin: UserDetailsService implementation not found
Thiago H. de Paula Figueiredo schrieb: Em Sun, 08 Mar 2009 18:09:29 -0300, manuel aldana escreveu: Exception constructing service 'RememberMeServices': Error invoking service builder method nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService, String) (at SecurityModule.java:303) (for service 'RememberMeServices'): No service implements the interface org.springframework.security.userdetails.UserDetailsService. It does not find the UserDetailsService implementation though I placed one inside .services.internal. Does somebody know how tapestry spring-security plugin looks for the implementation? It looks it up via Tapestry-IoC. Actually, this error messages is given by T-IoC, not Tapestry-Spring Security yourself. Just make sure you declare your UserDetailsService implementation as a service in your AppModule class (or any other Tapestry-IoC module). Yes, you're right adding this interface->implementation mapping to AppModule made it work. But I wonder why it works in the sample application from the tapestry-spring-security module, which has no AppModule defined. I guess then some tapestry magic comes in place (maybe scanning for implementors of interfaces...). -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
problem tapestry-spring-security plugin: UserDetailsService implementation not found
Hi, I am using tapestry-spring-security plugin (http://www.localhost.nu/java/tapestry-spring-security/index.html). I tried out the included sample application which works fine. I tried to map this to my own application, but I get following exception: Exception constructing service 'RememberMeServices': Error invoking service builder method nu.localhost.tapestry5.springsecurity.services.SecurityModule.build(UserDetailsService, String) (at SecurityModule.java:303) (for service 'RememberMeServices'): No service implements the interface org.springframework.security.userdetails.UserDetailsService. It does not find the UserDetailsService implementation though I placed one inside .services.internal. Does somebody know how tapestry spring-security plugin looks for the implementation? Most likely I forgot to set a property. thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Page navigation passed value not displayed (@InjectPage style)
Original-Nachricht > Datum: Sat, 07 Mar 2009 13:01:33 +0100 > Von: Andy Pahne > An: Tapestry users > Betreff: Re: Page navigation passed value not displayed (@InjectPage style) > manuel aldana schrieb: > > So you mean if I provide a coercion for User, the User gets serialized > > to an activation-context snippet in the URL, and after that the > > snippets gets deserialized back to my User object? > > > > I don't think that serialization is used. It's more that you pass those > values necessary to construct the object in question. > Sorry I did not mean serialization in view of Java objects. Just forth and back encoding inside URL. > > > Maybe an out of the box coercion for custom types would be interesting > > (to an ordered comma separated String list). Surely it will also show > > up problems, especially if my User does not only include simple types > > only (and object graph is more complicated). > > > > > > I don't see the use case. In my opinion, it's not that often in real > life that you have to provide your own type coercions. And this kind of > "out of the box coercion for custom types" cries for too much problems. I guess you're right with that, I will look in an alternative where I just do a creation beforehand and am passing an id. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Page navigation passed value not displayed (@InjectPage style)
So you mean if I provide a coercion for User, the User gets serialized to an activation-context snippet in the URL, and after that the snippets gets deserialized back to my User object? Maybe an out of the box coercion for custom types would be interesting (to an ordered comma separated String list). Surely it will also show up problems, especially if my User does not only include simple types only (and object graph is more complicated). Andy Pahne schrieb: That's possible. Have a look at http://tapestry.formos.com/nightly/tapestry5/tapestry-ioc/coerce.html esp. the section "Contributing new Coercions" Example: I want to pass a User through activation context: class User { private String name; private String password;...} Registration{ ... public void onActivate(User user){...} } - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Page navigation passed value not displayed (@InjectPage style)
manuel aldana schrieb: manuel aldana schrieb: [...] Thanks. Adding @Persist made the trick. But I think I will go for the activation context,[...] But I wonder, how to overcome the HttpSession, if I want to pass multiple values and want to use activation context for that. So far I have only seen onActivation() methods with one parameter of the simple types (int, long, String etc.). Is it possible to pass multiple values through activation context? It seems that such a similar thing is possible with http://code.google.com/p/t5-restful-webservices/wiki/GettingStarted, but I think it would be really cool if such a thing would be included in tapestry out of the box. Example: I want to pass a User through activation context: class User { private String name; private String password;...} Registration{ ... public void onActivate(User user){...} } as URL it could be serialized by tapestry as something like: http://domain/targetPage/paulpaulAtdomain -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Page navigation passed value not displayed (@InjectPage style)
manuel aldana schrieb: [...] Thanks. Adding @Persist made the trick. But I think I will go for the activation context,[...] But I wonder, how to overcome the HttpSession, if I want to pass multiple values and want to use activation context for that. So far I have only seen onActivation() methods with one parameter of the simple types (int, long, String etc.). Is it possible to pass multiple values through activation context? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Page navigation passed value not displayed (@InjectPage style)
Thiago H. de Paula Figueiredo schrieb: On Thu, Mar 5, 2009 at 10:24 PM, Luther Baker wrote: Try adding @Persist to the destination class ... otherwise, I'm not sure you're guaranteed which page instance will get rendered. I would suggest @Persist("flash"): the field is put in the session and then removed after it's read the first time. ;) Manuel, please post you updated code here because the one in the first message should work when you add @Persist or @Persist("flash") to SendingActivationEmail.email. Thanks. Adding @Persist made the trick. But I think I will go for the activation context, because I want to avoid HttpSession, even if it is for one call. This way I make my webapp-server stateless completely and am avoiding sticky-server problems. public class SendingActivationEmail { @Persist("flash") private String email; public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry way for email-templates
Don't get this. So I can't use T5 templateAPI inside my tapestry 5 app. Angelo Chen schrieb: Hi Howard, I like that template API, currently I use Velocity, however T5's templateAPI can't be part of T5 app, would be great if can be part of T5 app like Velocity. Angelo Howard Lewis Ship wrote: http://tapestry.formos.com/nightly/tapestry-templating/ On Thu, Mar 5, 2009 at 4:03 PM, manuel aldana wrote: Hi, for sending out emails I need templates. Is there an internal tapestry way to solve this (currently .tml are bound to pages/components). Is there a .tml way to use templates outside of components and pages or do I need to resort to something like Velocity or Freemarker? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Page navigation passed value not displayed (@InjectPage style)
thanks, but same issue. Anyway I think with the InjectPage pattern and returning an Object you have control which page-instance is passed. I debugged an the same page instance is used to retrieve the value. But further debugging shows that the setter is called, but when displaying the page the email field is reset to 'null' (which I wouldn't expect from the lifecycle when using the InjectPage + returnPage pattern). Luther Baker schrieb: Try adding @Persist to the destination class ... otherwise, I'm not sure you're guaranteed which page instance will get rendered. public class SendingActivationEmail { @Persist private String email; -Luther On Thu, Mar 5, 2009 at 7:10 PM, manuel aldana wrote: Hi, I want to pass one value to one page with the InjectPage pattern ( http://tapestry.apache.org/tapestry5/guide/pagenav.html). But below code does not work (email does not get displayed on other page). public class Registration { @Property private String email; @InjectPage private SendingActivationEmail sendingActivationEmail; @OnEvent(value = "submit", component = "newUser") Object newUser() { //WHEN DEBUGGING VALUE GETS PASSED CORRECTLY sendingActivationEmail.setEmail(email); return sendingActivationEmail; } } --- public class SendingActivationEmail { private String email; public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } --- SendingActivationMail.tml (I would not see email printed here): http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> We send an email to your registrated email ${email}. check it out. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5.1: Wait for Page
I know it is a bit thread off-topic, but is there somewhere a documentation how you setup this nice integration test-suite from the screencast and to run it on localhost and access it through browser? Howard Lewis Ship schrieb: I've uploaded a short clip showing how the wait-for-page functionality works in 5.1. http://blip.tv/file/1844614/ -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Page navigation passed value not displayed (@InjectPage style)
Hi, I want to pass one value to one page with the InjectPage pattern (http://tapestry.apache.org/tapestry5/guide/pagenav.html). But below code does not work (email does not get displayed on other page). public class Registration { @Property private String email; @InjectPage private SendingActivationEmail sendingActivationEmail; @OnEvent(value = "submit", component = "newUser") Object newUser() { //WHEN DEBUGGING VALUE GETS PASSED CORRECTLY sendingActivationEmail.setEmail(email); return sendingActivationEmail; } } --- public class SendingActivationEmail { private String email; public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } --- SendingActivationMail.tml (I would not see email printed here): http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> We send an email to your registrated email ${email}. check it out. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry way for email-templates
ouch (couldn't find the link on tapestry home, but on Google it can be found easily). Nice, there is even a plug for the email stuff :) Howard Lewis Ship schrieb: http://tapestry.formos.com/nightly/tapestry-templating/ On Thu, Mar 5, 2009 at 4:03 PM, manuel aldana wrote: Hi, for sending out emails I need templates. Is there an internal tapestry way to solve this (currently .tml are bound to pages/components). Is there a .tml way to use templates outside of components and pages or do I need to resort to something like Velocity or Freemarker? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry way for email-templates
Hi, for sending out emails I need templates. Is there an internal tapestry way to solve this (currently .tml are bound to pages/components). Is there a .tml way to use templates outside of components and pages or do I need to resort to something like Velocity or Freemarker? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: how to realize subdomain app areas?
got it. thanks. you're right, makes more sense as twiddling around on the Servlet side. Ulrich Stärk schrieb: I think you could do this with Apache and mod_jk in front of your tomcat server. You could forward requests going to the virtual host cs.your.domain.com to your.tomcat.host:port/some/path and requests to login.your.domain.com to your.tomcat.host:port/other/path HTH, Uli manuel aldana schrieb: yeah, but the requests should go to the same webapplication (port should always be 80), so I somehow need to configure this inside my one tapestry app. Markus Lux schrieb: Hi, that wouldn't be relevant to tapestry. You should configure that in your webserver which forwards all your requests to the servlet container running your tapestry application. Different subdomains will lead to different entry points in your application. aldana wrote: hi, I want to structure app-areas by subdomain: http://www.xxx.com/ (public area) https://login.xxx.com/ (non-public area for customers) https://cs.xxx.com/ (non-public internal area) How is it possible to map these different entry points in one tapestry web-application? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org ----- manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: how to realize subdomain app areas?
yeah, but the requests should go to the same webapplication (port should always be 80), so I somehow need to configure this inside my one tapestry app. Markus Lux schrieb: Hi, that wouldn't be relevant to tapestry. You should configure that in your webserver which forwards all your requests to the servlet container running your tapestry application. Different subdomains will lead to different entry points in your application. aldana wrote: hi, I want to structure app-areas by subdomain: http://www.xxx.com/ (public area) https://login.xxx.com/ (non-public area for customers) https://cs.xxx.com/ (non-public internal area) How is it possible to map these different entry points in one tapestry web-application? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
how to realize subdomain app areas?
hi, I want to structure app-areas by subdomain: http://www.xxx.com/ (public area) https://login.xxx.com/ (non-public area for customers) https://cs.xxx.com/ (non-public internal area) How is it possible to map these different entry points in one tapestry web-application? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: accessing assets/files using apache httpd instead of tomcat
Currently this is one of the asset shortcoming. Therefore I want to introduce file assettype (see https://issues.apache.org/jira/browse/TAP5-423) and later also URL alias for tapestry core (so you can include statics through another webroot). Currently there does exist something like URL alias already (http://www.chenillekit.org/chenillekit-tapestry/apidocs/index.html) so you could use it for now. But I am trying to introduce this for tapestry-core also after finishing the filetype asset type. Britske schrieb: for speed reasons, etc. I would like apache httpd to handle css,js and images instead of tomcat Of course apache httpd doesn't know of the resources bundled in the tapestry webapp. For those of you who are using tapestry with tomcat and a apache httpd frontend: I'm interested in knowing what kind of (automatic) deployment setup you are using to get the assets in a folder apache httpd can read. Of course this eliminates tapestry being able to manage the assets. WOuld there be anything I'm missing out what tapestry can do, what can't be done by apache httpd? Is there any other reasons why I should forget this setup as soon as possible? Thanks, Britske - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: assets in src/main/resources (classpath?) vs. src/main/webapp (context?)
Your understanding is correct, root path of context is src/main/webapp as root context-folder and for classpath src/main/resources. Generally I tend to put js libraries or page wide css as context assets (src/main/webapp/js or src/main/webapp/css) and very specific artifacts (e.g. related to one component only) as classpath asset. Jason Tan schrieb: I'm having trouble understanding the difference between classpath vs. context assets -- when is it better to use one or the other? Right now I've been putting Javascript and CSS under src/main/webapp/ , and referencing it old-school using but am learning about the new @IncludeJavaScriptLibrary annotation. It appears to use classpath assets though, and if I understand it correctly, expects files to be in src/main/resources. Another advantage of classpath assets appears to be versioning for cache-busting (although it looks like 5.1 will include this for context assets too?). Should I be putting my JS/CSS/static images in src/main/resources, packaged with .tml files? Anyway, any sort of clarification would be appreciated. Thanks, Jason -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [OT] By boss decided
Well, take the big players like amazon or ebay, most of their system is written in JAVA. The scripting stuff has its place (e.g. quick feedback, cheap availability on web-hosters), but for bigger things most of the time I would refer to static typed languages. Analyzing and refactoring (especially bad encapsulated + modularized codebases, which unfortunately you find often) with dynamic typing and without compiler-help can be a real pain. If the team isn't experienced in good testing habits (unit + integration tests), scripting languages would even be a shootout for me. Anyway, nowadays it is more about integrating and encapsulating technologies (and the HTTP protocol has done a big good job here :). Discussions that a system must completey be implemented in JAVA, PHP only doesn't face reality at all. Reading things like your bosses 'none' and reducing all problems on the technology is always a great amusement again... Maybe you mention on one of your power point slides: 'a fool with a tool is still a fool' ;) I cannot think of bigger T5-apps, but I am sure this will change in future (e.g. Wicket and Tapestry really offer a complete different encapsulated way to build web-applications). Good luck in convincing your boss. Borut Bolčina schrieb: Hello, just want to share a piece of corporate mind set with you. My boss decided that none of the Java frameworks is productive in comparison to PHP, Ruby and Django and that there are no web sites written in any Java framework. Can you believe that? I would like to prove him wrong with Tapestry Cayenne combo. Unfortunately I have no list of T5 success stories. I am sorry for spamming, but I had to let the steam out! -Borut -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: IntelliJ 8.1 + jetty-plugin, make it work
you have to include the jsp-api-xxx.jar somewhere from JETTY_HOME/libs to the library set (it is inside server configuration from jetty-plugin inside IntelliJ). Angelo Chen schrieb: Hi Aldana, That tips works, but got a new problem, when adding a Jetty server(6.1.15.rc3) in IDEA, I got this error : Warning: Class 'javax.servlet.jsp.JspPage' not found in application server, any idea how to fix it? Thanks, Angelo aldana wrote: Just in case one of you also had the problem upgrading to IntelliJ 8.1 and not having the smooth Jetty-integration working: http://www.jetbrains.net/devnet/message/5232219#5232219 -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org ----- manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
IntelliJ 8.1 + jetty-plugin, make it work
Just in case one of you also had the problem upgrading to IntelliJ 8.1 and not having the smooth Jetty-integration working: http://www.jetbrains.net/devnet/message/5232219#5232219 -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: PageTester and services in AppModule
5.1 is not released yet. In maven terminology often SNAPSHOTS are used. You have to pass: 5.1.0.0-SNAPSHOT Angelo Chen schrieb: Hi Howard, Sounds good, is 5.1 as stable as 5.0.18? I did: 5.1 but it did not pull down the 5.1, any idea? thanks. Howard Lewis Ship wrote: I believe this problem is fixed in 5.1. I did some major surgery on PageTester, and it now simulates the Tapestry Request, Response, Session and Context objects (not the Servlet API ones, however). This means you can test much more of your application beyond pages, including Dispatchers contributed to MasterDispatcher, and other filters as well. On Sat, Feb 14, 2009 at 7:12 AM, Angelo Chen wrote: Hi, I'm trying to add some page test into a running application, code is just simple: PageTester tester = new PageTester(appPackage, appName, "src/main/webapp"); PageTester tester = new PageTester(appPackage, appName, "src/main/webapp"); Document doc = tester.renderPage("Index"); but I got an nullPointer exception when MyServices refers to globals: public MyServicesImp(ApplicationGlobals globals) { String infoName = globals.getServletContext().getInitParameter("info.file.name"); } adding this into AppModule fix the error: public static void contributeAliasOverrides(Configuration conf) { conf.add(AliasContribution.create(ApplicationGlobals.class, EasyMock.createMock(ApplicationGlobals.class))); } but another error comes out: Caused by: java.lang.RuntimeException: Exception constructing service 'ComponentMessagesSource': Error invoking service builder method org.apache.tapestry5.internal.services.InternalModule.buildComponentMessagesSource(AssetFactory, String) (at InternalModule.java:132) (for service 'ComponentMessagesSource'): Parameter context was null. Any idea how to fix this? is it a good idea to add PageTester to an app that uses a lot of services? Thanks, Angelo -- View this message in context: http://www.nabble.com/T5%3A-PageTester-and-services-in-AppModule-tp22013582p22013582.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: @Property convention (private field bad for testing)
thanks, I also thought about a package-private property-all inject() method, but then I always need to pass all arguments and null-out, even if I only want to set one property. In test class this is difficult to read (-> inject(null,null,null,value)) or I would need to provide test-internal setter delegates (e.g. inject(bla) maps to inject(null,null,null,bla)) which is kind of cumbersome. I guess the private modifier is for safety + visibility reasons, so we shouldn't change this to default visibility. I guess I will go for setters/getters now, if I want to explicitly set props in test cases. PageTester looks very good, but in my case I just want to test inner logic and no render results. Igor Drobiazko schrieb: You can provide a single package-private setter for all properties which you can use in tests. @Property private Foo foo; @Property private Bar bar; @Property private Baz baz; void inject(Foo foo, Bar bar, Baz baz){ ... } If you test your pages with PageTester, you often don't need any setters because the page is rendered as in production. http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html On Sat, Feb 14, 2009 at 12:24 AM, manuel aldana wrote: Tapestry goes for pojos which is good for testing. Further more I like the @Property annotation which doesn't pollute my class with verbose getters/setters. The not so nice thing is, that when trying to test my component or page I again end up having getters/setters. I place my tests inside the same package as the class to be tested and private fields aren't visible there. Why was the decision taken that fields must be private for @Property (security reasons, so fields can't be changed directly from default visibility -> package level)? From testing perspective this is not so nice. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
@Property convention (private field bad for testing)
Tapestry goes for pojos which is good for testing. Further more I like the @Property annotation which doesn't pollute my class with verbose getters/setters. The not so nice thing is, that when trying to test my component or page I again end up having getters/setters. I place my tests inside the same package as the class to be tested and private fields aren't visible there. Why was the decision taken that fields must be private for @Property (security reasons, so fields can't be changed directly from default visibility -> package level)? From testing perspective this is not so nice. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Intellij 8.1 and template live reloading
I had the same problem Jetty does not work for 8.1 (which is very unfortunate). I already sent a mail to the author two days ago but no reaction yet. Currently I am using Tomcat and IntelliJ 8.1, but thinking about going back to 8.0.1 because Jetty works much smoother with Tapestry 5 (faster loading + reloading). Generally for live reloading I have to press Strg+F9 (otherwise it won't update output folder) but I don't need to restart and maven is not included at all (IntelliJ is grabbing deps behind the scenes). Piero Sartini schrieb: Am Freitag 13 Februar 2009 02:56:20 schrieb Howard Lewis Ship: I just don't get why everyone insists on running the app with Maven ... I just use the Jetty plugin for IDEA and it works like a charm. Unfortunately, the jetty plugin is marked incompatible with IDEA 8.1... Piero - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] filter on parameters
Hi, a question on @Parameter: @Parameter private String param; 1) How is it possible to filter a passed param (e.g. manipulating the value)? Using getters and setters for that would not work. 2) How can I make the parameter available to the template (e.g. to render this), i.e. want to have it passed as a parameter but want to render it as a property in my component. thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [ANN] JumpStart 4.2 released - deploy to Tomcat too!
Great work! thanks. Geoff Callender schrieb: Hi all, JumpStart 4.2 is now available. Now you can develop with Jetty, then deploy to JBoss, Glassfish, and Tomcat! Use it live: http://jumpstart.doublenegative.com.au:8080/jumpstart/ or download it: http://jumpstart.doublenegative.com.au Please keep the feedback and suggestions coming. It always helps! Cheers, Geoff -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Looking for 'magic RuntimeException wrapper' after component throws checked Exception
Thanks, I guess I found it: RenderPhaseMethodWorker.java line 147: builder.addln("catch (RuntimeException ex) { throw ex; }"); builder.addln("catch (Exception ex) { throw new RuntimeException(ex); }"); btw: all this dynamic magic is really nice from runtime-view but also really tough to debug :) Ulrich Stärk schrieb: This probably happens during class transformation. I'd look somewhere in the o.a.t.transform packages. Uli manuel aldana schrieb: Hi, when a custom component throws a checked Exception it seems to be handled by a kind of Interceptor, but I cannot find it while debugging or looking at source code. I am sure there is some higher exception wrapping magic involved here (though I haven't found any Interceptor or AOP style wrapping)... This checked exception gets intercepted: - class Comp{ @BeginRender void renderMessage(MarkupWriter writer) throws Exception{ throw new CheckedException(); } } This unchecked exception does not get intercepted: class Comp{ @BeginRender void renderMessage(MarkupWriter writer) { throw new UncheckedException(); } } thanks. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Looking for 'magic RuntimeException wrapper' after component throws checked Exception
Hi, when a custom component throws a checked Exception it seems to be handled by a kind of Interceptor, but I cannot find it while debugging or looking at source code. I am sure there is some higher exception wrapping magic involved here (though I haven't found any Interceptor or AOP style wrapping)... This checked exception gets intercepted: - class Comp{ @BeginRender void renderMessage(MarkupWriter writer) throws Exception{ throw new CheckedException(); } } This unchecked exception does not get intercepted: class Comp{ @BeginRender void renderMessage(MarkupWriter writer) { throw new UncheckedException(); } } thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Dynamic Variables in Asset declarations
I see, so I guess this environment-info somehow is encoded inside the URL (e.g. test.company.org resources should go to different server as company.org). Then maybe it is worth to introduce kind of a environment service which parses URL and sets environment properties. You could reuse this approach also (e.g. for different DB-modes and connections). Generally I would not put such an environment setup thing to the asset-declaration but encapsulate it somewhere else (EnvironmentModeService + injecting this to AssetFactory). Dave Greggory schrieb: Unless I misunderstand things completely, I don't think this is possible. Because the values for those variables are determined from request params/attributes. - Original Message From: manuel aldana To: Tapestry users Sent: Sunday, February 8, 2009 7:45:32 PM Subject: Re: Dynamic Variables in Asset declarations Instead of passing ${server_host}${css_root} to the asset annotations you could use plain old properties which are then loaded to the environment and passed to the AssetFactory. @Inject @Path("cdn:path/aboveRoot") private Asset asset; Dave Greggory schrieb: I figured out most of it. I had to implement an Asset Factory, an Asset Alias Manager, an Asset Resource and an Asset Provider annotation (pretty similar to URI Asset Factory in chenille kit). No bindings were necessary. Instead of injecting an Asset, I look it up. asset = assetSource.getAsset(null, "paramasset:${server_host}${css_root}/commons.css", null); renderSupport.addStylesheetLink(asset, null); The asset alias manager looks up the values for the variables ${server_host} and ${css_root} provides the right asset. This all works fine, except that I had to do some ugly hacks in my implementation of Resource. 1) toURL(): I return a fake URL because you cannot create a URL instance of a string like "paramasset:${server_host}${css_root}/commons.css" This is not a valid URL string obviously, and variable expansion happens later on by Asset Alias Manager. 2) forLocale(Locale locale): #1 made all calls to toURL() return a non-null value, so it broke localization. So I had to implement forLocale method and have it the non-localized version. Thereby giving up localization. I couldn't extend AbstractResource due to #2. My css files are on a separate server (on a CDN) and I'd rather not create a HTTP connection just to make sure they exist (for performance reasons). Is there a cleaner and simply better way of handling this? Also I'd rather not give up localization. Thanks so much, Dave - Original Message From: Dave Greggory To: Tapestry users Sent: Sunday, February 8, 2009 9:07:18 AM Subject: Re: Dynamic Variables in Asset declarations So, tell me whether I have this straight. In order to create Asset instances based on URL (actual asset CSS files residing on a completely different web server = CDN) like below: @Inject @Path("paramasset:${server_host}${css_root}/commons.css") private Asset myCommonAsset; server_host varies from environment to environment (QA/staging/production). css_root varies from request to request as it depends on request params (basically different users have different themes). To do this, I would need to implement a new Asset Factory, an Asset Binding, an Asset Binding Factory and an Asset Resource. Is that correct? Do I really need the binding and binding factory? Can I implement the above functionality without the new "paramasset" domain? I tried stepping through the Classpath Asset and Context Asset factories and bindings while debugging, but it was little confusing. Can anyone clarify to me how all these fit together? Thanks, Dave - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Dynamic Variables in Asset declarations
Instead of passing ${server_host}${css_root} to the asset annotations you could use plain old properties which are then loaded to the environment and passed to the AssetFactory. @Inject @Path("cdn:path/aboveRoot") private Asset asset; Dave Greggory schrieb: I figured out most of it. I had to implement an Asset Factory, an Asset Alias Manager, an Asset Resource and an Asset Provider annotation (pretty similar to URI Asset Factory in chenille kit). No bindings were necessary. Instead of injecting an Asset, I look it up. asset = assetSource.getAsset(null, "paramasset:${server_host}${css_root}/commons.css", null); renderSupport.addStylesheetLink(asset, null); The asset alias manager looks up the values for the variables ${server_host} and ${css_root} provides the right asset. This all works fine, except that I had to do some ugly hacks in my implementation of Resource. 1) toURL(): I return a fake URL because you cannot create a URL instance of a string like "paramasset:${server_host}${css_root}/commons.css" This is not a valid URL string obviously, and variable expansion happens later on by Asset Alias Manager. 2) forLocale(Locale locale): #1 made all calls to toURL() return a non-null value, so it broke localization. So I had to implement forLocale method and have it the non-localized version. Thereby giving up localization. I couldn't extend AbstractResource due to #2. My css files are on a separate server (on a CDN) and I'd rather not create a HTTP connection just to make sure they exist (for performance reasons). Is there a cleaner and simply better way of handling this? Also I'd rather not give up localization. Thanks so much, Dave - Original Message From: Dave Greggory To: Tapestry users Sent: Sunday, February 8, 2009 9:07:18 AM Subject: Re: Dynamic Variables in Asset declarations So, tell me whether I have this straight. In order to create Asset instances based on URL (actual asset CSS files residing on a completely different web server = CDN) like below: @Inject @Path("paramasset:${server_host}${css_root}/commons.css") private Asset myCommonAsset; server_host varies from environment to environment (QA/staging/production). css_root varies from request to request as it depends on request params (basically different users have different themes). To do this, I would need to implement a new Asset Factory, an Asset Binding, an Asset Binding Factory and an Asset Resource. Is that correct? Do I really need the binding and binding factory? Can I implement the above functionality without the new "paramasset" domain? I tried stepping through the Classpath Asset and Context Asset factories and bindings while debugging, but it was little confusing. Can anyone clarify to me how all these fit together? Thanks, Dave - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] filesystem asset problems
thanks for the hint, it makes more sense now. So there are two parts, when it comes to assets: 1) Presenting the asset as a proper link to the client (as component link inside HTML) 2) Getting tapestry to response it when it is requested as URL. Currently built in as direct context path or assets folder -> http://x/assets/. Jonathan O'Connor schrieb: Manuel, look at the AssetDispatcher class. That will clear up a lot of problems, I think. Ciao, Jonathan On 06/02/2009 00:49, manuel aldana wrote: hi, want to create a new asset-type, which makes images available from filesystem (file:/) to webapp (http:/), but somehow I don't get it... I am sure at least some of my assumptions are wrong: -with Asset framework I can make resources available through tapestry webapp context (http://xxx url is then kind of a gateway to the Resource) -Resource is the real resource (file, other website, relative context path etc.) -AssetFactory implementation tells how to map between the resource and the client-view (-> toClientUrl()) -if everything works fine, the resource is loaded (amongst others AbstractResource.openStream() loads the contents) and is passed to the AssetFactory impl My biggest doubt to my expectations is that for tapestry it should be very difficult to track the toClientUrl() return value to its own webcontext, e.g.: how should it know that http://domain:port/tapestryApp/toClientUrlValue points to file://d:/srv/images/? It then would need to handle a lot of URL redirecting magic internally. Any other option for making my filesystem pics accessible to the same domain:host as the tapestry app is running without putting it to one of the jars or to webapp-context? thanks a lot. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] filesystem asset problems
hi, want to create a new asset-type, which makes images available from filesystem (file:/) to webapp (http:/), but somehow I don't get it... I am sure at least some of my assumptions are wrong: -with Asset framework I can make resources available through tapestry webapp context (http://xxx url is then kind of a gateway to the Resource) -Resource is the real resource (file, other website, relative context path etc.) -AssetFactory implementation tells how to map between the resource and the client-view (-> toClientUrl()) -if everything works fine, the resource is loaded (amongst others AbstractResource.openStream() loads the contents) and is passed to the AssetFactory impl My biggest doubt to my expectations is that for tapestry it should be very difficult to track the toClientUrl() return value to its own webcontext, e.g.: how should it know that http://domain:port/tapestryApp/toClientUrlValue points to file://d:/srv/images/? It then would need to handle a lot of URL redirecting magic internally. Any other option for making my filesystem pics accessible to the same domain:host as the tapestry app is running without putting it to one of the jars or to webapp-context? thanks a lot. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] strategy of tapestry-core vs. third-party modules
I see, but what is the strategy if there is a feature request for tapestry which is covered by a third party module already? Could it still be that it will be reimplemented to tapestry-core or will the feature-request most of the time be referred to the third party module? From framework usage point of view it could be confusing/tedious to include too much tapestry third-party stuff. Of course it is always tricky to judge what is core stuff... Howard Lewis Ship schrieb: That's part of the reason why we're setting up Tapestry360 (http://tapestry.formos.com), as a secondary space for Tapestry projects that can't be part of the project distribution itself, while providing a more consistent set of resources (Bamboo CI, JIRA, Confluence Wiki). On Mon, Feb 2, 2009 at 2:44 AM, manuel aldana wrote: Hi, what is the general strategy for tapestry when it comes to using own modules vs. adding "similar-behaving" third party ones? take the sample, where I need a asset-type which is based on URL (currently tapestry supports only context and relative path). As mentioned in https://issues.apache.org/jira/browse/TAP5-423 chenille-kit provides this already. Never the less I see this as a core module which should be housed in the tapestry-core module. It is always a good idea to not reinvent the wheel and the pluggable module framework of tapestry is great. But when including "core-things" through third party modules problems occur: -quality (test coverage, steady release-cycles, javadocs) is not maintained by tapestry-development team -ending up with tons of tapestry-third party module inclusions (getting even more transitive dependencies) though just a little fraction is used So which strategy does/should tapestry follow? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] strategy of tapestry-core vs. third-party modules
Hi, what is the general strategy for tapestry when it comes to using own modules vs. adding "similar-behaving" third party ones? take the sample, where I need a asset-type which is based on URL (currently tapestry supports only context and relative path). As mentioned in https://issues.apache.org/jira/browse/TAP5-423 chenille-kit provides this already. Never the less I see this as a core module which should be housed in the tapestry-core module. It is always a good idea to not reinvent the wheel and the pluggable module framework of tapestry is great. But when including "core-things" through third party modules problems occur: -quality (test coverage, steady release-cycles, javadocs) is not maintained by tapestry-development team -ending up with tons of tapestry-third party module inclusions (getting even more transitive dependencies) though just a little fraction is used So which strategy does/should tapestry follow? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] metrics about tapestry-5 codebase quality
yes, that was the only point I would moan about ;) I once analyzed the package layout (from 5.0.18): http://aldana-online.de/screenshots/packageOverview.png You mean with 'left the barn', that you are package refactoring for 5.1.0? Howard Lewis Ship schrieb: Thanks. Having your dirty laundry out for all to see is very motivating. To be honest, one area of T5 that isn't so stirling is package layout, but that horse has left the barn. On Fri, Jan 30, 2009 at 2:40 PM, Onno Scheffers wrote: Wow, this looks very good. My compliments to the Howard and the rest of the team. Every time I look an the Tapestry source code for something, I am impressed by how clean the code looks. Many commercial projects could learn a thing or two from Tapestry :o) regards, Onno On Fri, Jan 30, 2009 at 5:35 PM, manuel aldana wrote: This confirms my gut feelings that tapestry framework itself is not only good but also its codebase :) http://nemo.sonar.codehaus.org/project/index/org.apache.tapestry:tapestry-project -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] metrics about tapestry-5 codebase quality
This confirms my gut feelings that tapestry framework itself is not only good but also its codebase :) http://nemo.sonar.codehaus.org/project/index/org.apache.tapestry:tapestry-project -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] programmatically setting/getting @Property values
To give you some background why I would like to use to set the PageLink component programmatically: In a navigation-component (which is built up dynamically) I want to refer to a main-content page. For that I'd like reuse the PageLink component, so I can use tapestry facilities for link creation. So far the navigation-component worked without template, so don't want to create a template for just passing a PageLink component. Howard Lewis Ship schrieb: I think you are asking two different things. You can use the PropertyConduit service to create PropertyConduit instances; these allow you to dynamically read and update an expression on any object; it doesn't even have to be a component. So propertyConduitSource.create(foo.getClass(), "stuff").set(foo, "mojo") will create a PC for the "stuff" property and update it. On Tue, Jan 27, 2009 at 4:15 PM, manuel aldana wrote: hi, @Property is used, so setters/getters are generated in runtime. As an example take PageLink, it is usually set through .tml file (with t:page="xxx"). How is it possible to set @Property fields programmatically in a consise and short way? Or is it always better to use .tml templates for setting @Property fields? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] programmatically setting/getting @Property values
hi, @Property is used, so setters/getters are generated in runtime. As an example take PageLink, it is usually set through .tml file (with t:page="xxx"). How is it possible to set @Property fields programmatically in a consise and short way? Or is it always better to use .tml templates for setting @Property fields? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] loop component -> t:value local variable
Hi Howard, many thanks for explaining the trade-offs thorougly. From user-point of view it just feels a bit unnatural, that one needs to add a property in the page class, which exists as a locally scoped and derived variable in the template. After all tapestry5 looks extremely promising. Am digging deeper to code these days and am hoping to contribute some work in future :) Howard Lewis Ship schrieb: First off, just use the @Property annotation. Field + @Property ... no getters or setters. Tapestry works in a type-safe manner, using real properties on the Java objects. This is good: property access is validated during page construction, not at runtime when a property expression is first evaluated. Further, property access is converted into a PropertyConduit object; a new class is created, and you get all the benefits of hotspot optimizations and no reflection (including, no synchronization issues). The var: binding prefix gives a little bit of the behavior you want. However, it's very hard to introduce a new, type-safe property into an existing class in the way you suggest: that is, the Loop component should create a new property on the containing Page class. This is problematic for a number of lifecycle reasons (the page is instantiated first, so it's a little late to create a new property by the time the Loop component is instantiated an initialized). This could be addressed with considerable effort, and it would introduce some ambiguities w.r.t. how subclasses of pages operate. I don't find the need to define a property onerous; in fact, the separation between template and code is very nice. The property gives me the ability to know easily (using the debugger, for example) the state of the things. Its documented, and defines a specific type. It's easy: a property and an annotation. It's expressive. Lastly, many times you have an integration between template logic, encoded in the template markup and use of components, and container logic. Having a field in the container component is a very natural way to handle that. I guess we all have a threshold for "code magic". Mine is pretty high, I like all the magic and meta-programming that Tapestry does, but sounds like your threshold is a bit higher than mine. On Mon, Jan 26, 2009 at 1:00 PM, manuel aldana wrote: hi, the Loop component is used basically used by (define a list t:source and bind a local iterable var t:value to access the values later): ... ${listItem.name} ... What I find a bit clumsy is that you have to put this local-variable also to your page class: Page{ List listItems; Item listItem; ... //getter+setters } Why is tapestry not holding/creating the listItem local-var on the fly itself, instead of forcing to create a duplicated local variable (listItem is derived from listItems) inside the page class? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] loop component -> t:value local variable
hi, the Loop component is used basically used by (define a list t:source and bind a local iterable var t:value to access the values later): ... ${listItem.name} ... What I find a bit clumsy is that you have to put this local-variable also to your page class: Page{ List listItems; Item listItem; ... //getter+setters } Why is tapestry not holding/creating the listItem local-var on the fly itself, instead of forcing to create a duplicated local variable (listItem is derived from listItems) inside the page class? -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] component for displaying tree like structure
cool, is there some documentation how to use it or do I need to reverse engineer from the sources? Davor Miku schrieb: You can try this one: http://code.google.com/p/tapestry5-treegrid/ On Mon, Jan 26, 2009 at 2:55 PM, manuel aldana wrote: hi, I want to introduce a component which displays dynamically tree like structure. Its purpose is that I want to load a hierachical navigation bar based on a category+item structure (very similar to filesystem). As a navigation bar it should also link to other main-content pages. I had a look whether I could use an existing component for that but I haven't found any. Does such a tree-structure display component exist already? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] component for displaying tree like structure
hi, I want to introduce a component which displays dynamically tree like structure. Its purpose is that I want to load a hierachical navigation bar based on a category+item structure (very similar to filesystem). As a navigation bar it should also link to other main-content pages. I had a look whether I could use an existing component for that but I haven't found any. Does such a tree-structure display component exist already? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] .tml files not recognized in IntelliJ
yes, this made the trick (never used this before, because patterns were always matching my things so far). thanks Lubor Gajda schrieb: IntelliJ resource patterns can be defined in Settings/Compiler/Resource patterns (just add ?*.tml). But I'm not sure if this will work in combination with Maven (I'm not using it). On Fri, Jan 23, 2009 at 12:04 AM, manuel aldana wrote: hi, sorry if I am posting framework-unrelated ide related stuff, but I guess you can help more and I am sure some of you are IntelliJ users and maybe have had similar problem. Unfortunately IntelliJ does not recognize my .tml files in src/main/resouces and they aren't copied to output folder. Other resources (e.g. properties are copied to output correctly). I looked at setting whether I accidently set a filter, but did not find any. I am using IntelliJ 8.0.1 with maven setup, .tml files are bound to XML-type. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] .tml files not recognized in IntelliJ
hi, sorry if I am posting framework-unrelated ide related stuff, but I guess you can help more and I am sure some of you are IntelliJ users and maybe have had similar problem. Unfortunately IntelliJ does not recognize my .tml files in src/main/resouces and they aren't copied to output folder. Other resources (e.g. properties are copied to output correctly). I looked at setting whether I accidently set a filter, but did not find any. I am using IntelliJ 8.0.1 with maven setup, .tml files are bound to XML-type. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Layout component: resolving unclarities
Thiago H. de Paula Figueiredo schrieb: When people here talk about a Layout component, we are talking about something described by the Tapestry documentation as "A Layout component exists to provide common content across all pages in your application.". A Layout is a component, not a page, at least in the vocabulary used in this mailing list. :) It does not mean that you cannot have more than one Layout (but they should be two different components, each page would use zero or one of them) or parameterized Layout or Layouts. ;) yes, it is a bit confusing that you could do your layout-concept directly as a page (see starter mail of thread). But I see now it is not a good idea, so will go for layout as a component :) -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Layout component: resolving unclarities
Thiago H. de Paula Figueiredo schrieb: Em Wed, 21 Jan 2009 21:30:42 -0300, manuel aldana escreveu: looking at this layout injection pattern, i wonder whether a normal template, which references the dynamic site-parts directly wouldn't be even easier (i at least find it more intuitive as using the injection). what are the pros/cons for that? The Layout pattern is just one ordinary Tapestry custom-made component. The pros are the fact that you can each part in its own class/template pair. The con is that there is no way for a component to know what the main content is, as you named in your template below. OK, but why does the layout component need to know what the main content is? As in other mail mentioned the only (but major) cons I can see is that making the Layout as the main-entry page is not very flexible and breaks somehow the tapestry page concept. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Layout component: resolving unclarities
Maybe reason is page flexibility. With below template the target address would always be the same page http://host/site, which is quite static. But when using the wrapper pattern the callee would be the page (e.g. http://host/login, http://host/item). this would feel more natural and layout itself is not exposed as page but as component. manuel aldana schrieb: thanks for the link. looking at this layout injection pattern, i wonder whether a normal template, which references the dynamic site-parts directly wouldn't be even easier (i at least find it more intuitive as using the injection). what are the pros/cons for that? Site.tml (style stuff omitted): http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> SergeEby schrieb: Hi, is the actual content of your page, and the layout component is just a wrapper. This link would probably help you better understand: http://wiki.apache.org/tapestry/Tapestry5Layoutcomponent -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Layout component: resolving unclarities
thanks for the link. looking at this layout injection pattern, i wonder whether a normal template, which references the dynamic site-parts directly wouldn't be even easier (i at least find it more intuitive as using the injection). what are the pros/cons for that? Site.tml (style stuff omitted): http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";> SergeEby schrieb: Hi, is the actual content of your page, and the layout component is just a wrapper. This link would probably help you better understand: http://wiki.apache.org/tapestry/Tapestry5Layoutcomponent -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: [T5] Layout component: resolving unclarities
sorry... there was a discussion about this already (http://www.mail-archive.com/users@tapestry.apache.org/msg17682.html), but found it later as posting... Just tell if information of above thread is out of date and tapestry templates approach changed in latest tapestry. manuel aldana schrieb: Hi, I had a look how to template things (header, footer, navigation) at http://tapestry.apache.org/tapestry5/guide/layout.html. -What is the magic about the inclusion? This tag is a bit unclear to me. How does Layout.tml connect to the Start.tml as the tag in the example? -How would I include another dynamic site part, like navigation bar on the left side (would be another .tml template)? All examples I have seen only play with one layout "injection" (main page content). thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] Layout component: resolving unclarities
Hi, I had a look how to template things (header, footer, navigation) at http://tapestry.apache.org/tapestry5/guide/layout.html. -What is the magic about the inclusion? This tag is a bit unclear to me. How does Layout.tml connect to the Start.tml as the tag in the example? -How would I include another dynamic site part, like navigation bar on the left side (would be another .tml template)? All examples I have seen only play with one layout "injection" (main page content). thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T4: IE Select options to small
Generally, if you're new to tapestry and have not much tapestry 4 code, you should go for tapestry 5. christian bösch schrieb: Hi Everyone, I'm a new Tapestry user. I like tapestry it's very easy to build java webapplications. But i have one little problem. [...] -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] codebase question: transform of methods/classes
Hi, am digging into source code these days. Currently it is a bit unclear, what happens with the marker-annotations and how they are transformed to the respective method signature. Example: In my debugger my custom component's type is shown as type Component, though it is a POJO and thus only inherits from Object. How is this type transformation possible? My debugger shows directly type Component so there should no wrapper/proxy involved (which can mimic some kind of dynamic typing). I guess ClassTransformation, its worker and TransformMethodSignature are the things which do the transformation of POJOs based on marker annotations. Still technically it is unclear how this works (making a POJO to a framework specific type)... BTW: At one point would like to contribute+commit. But before want to get more handy with the code base. While doing this would like to contribute some code-base documentation how Tapestry 5 works internally. Some snippets exist already, but in my view they are worth to be extended. Of course these docs should be more high-level and not go into detail (danger of decaying docs vs. source-code). If you agree which place is the best way to put this (tapestry wiki, or directly to tapestry site-documentation)? thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
[T5] reference/binding field value to @Path
Hi, is it possible to bind a field of a component to an Asset's path? public class AnyPage{ //this should be part of the @Path value private String imageName = "default.png" @Inject //would not work, is a symbol which is somewhat different to class member @Path("context:${imageName}") private Asset img; public getImageName(){...} //for rest style to pass image path info public void onActivate(String...){...} public String onPassivate(){} } - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--reference-binding-field-value-to-%40Path-tp20571654p20571654.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] Providing new Asset type (filesystem)
Thanks this worked. Am starting to like Tapestry way to build things (looking forwards to dig in deeper)... Just one last question. I noticed that when building Resource implementations you pass in a path to Resource constructor and then another path to newResource(String), when creating the "real" asset. Why is that? Maybe in constructor you provide kind of root and with newResource you pass relative path-information? For your curiosity: I am partly from Guatemala, but grew up in Berlin and am living here a happy life :) Thiago H. de Paula Figueiredo wrote: > > Em Tue, 18 Nov 2008 18:19:24 -0300, aldana <[EMAIL PROTECTED]> escreveu: > >> But I cannot find the last step to ad it to the viable AssetSource. By >> default it seems that AssetSourceImpl is active which only supports >> context and classpath style. So how do I ad my new Asset type to the >> AssetSource and how do I register so I can use something like >> @Path("filesystem:/foo/bar.png") annotation? > > You do it through a contribution to the AssetSource service through > Tapestry-IoC. In a module class, add the following method: > > public static void contributeAssetSource(MappedConfiguration AssetFactory> configuration) { > configuration.add("filesystem", yourFilesystemAssetFactory); > } > > To know how something in Tapestry is configured, take a look at the > TapestryModule class and search for the contribute[ServiceName]() methods. > For example, the AssetSource is configured exactly like this: > > public void contributeAssetSource(MappedConfiguration AssetFactory> configuration, >@ContextProvider AssetFactory > contextAssetFactory, >@ClasspathProvider AssetFactory > classpathAssetFactory) > { > configuration.add("context", contextAssetFactory); > configuration.add("classpath", classpathAssetFactory); > } > >> manuel aldana >> software-engineering blog: http://www.aldana-online.de > > Just curious: your name is very Portuguese but your URL and university > information in your site is German . . . :) > > -- > Thiago H. de Paula Figueiredo > Independent Java consultant, developer, and instructor > http://www.arsmachina.com.br/thiago > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--Providing-new-Asset-type-%28filesystem%29-tp20568440p20571556.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] Providing new Asset type (filesystem)
I read part http://tapestry.apache.org/tapestry5/guide/assets.html where a new creation of an asset type was mentioned. I created a new asset type which gets its stuff from file system (wonder why this is not supported out of the box?). So I did: -FileSystemResource extends AbstractResource -AssetFileSystem implements AssetFactory But I cannot find the last step to ad it to the viable AssetSource. By default it seems that AssetSourceImpl is active which only supports context and classpath style. So how do I ad my new Asset type to the AssetSource and how do I register so I can use something like @Path("filesystem:/foo/bar.png") annotation? ----- manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--Providing-new-Asset-type-%28filesystem%29-tp20568440p20568440.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] class reloading for pages, templates, components possible only?
hi, class reloading works fine for pages, template and components. But it does not work for related class dependencies. For instance when I change the implementation of a Dao I don't see any changes on webapp. Is live class reloading supposed to work with pages/templates/components only or do I need to configure something to enable this for all classes? - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--class-reloading-for-pages%2C-templates%2C-components-possible-only--tp20527176p20527176.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] custom RuntimeException type-name shadowed by tapestry
Hi, I could reproduce it in a slight changed simple archetype tapestry 5 project (see below changed Index.java). When I use exception handler wrapper pattern, my ApplicationException gets swallowed away in report: //I see FNFE on error-page, ApplicationException does not occur on stack trace public class Index{ public void getCurrentTime(){ throw new ApplicationException("error",new FileNotFoundException()); } } when using no exception wrap I can see it: //I see ApplicationException on error page public class Index{ public void getCurrentTime(){ throw new ApplicationException(); } } Both cases appear now no matter whether ApplicationException checked or unchecked. So I guess tapestry has a problem with wrapped Exceptions? Howard Lewis Ship wrote: > > I find that very hard to believe, unless you are running in production > mode, which doesn't display the full exception report. > > On Thu, Nov 13, 2008 at 3:14 PM, aldana <[EMAIL PROTECTED]> wrote: >> >> I made a text search in firefox browser. If it is a unchecked exception >> unfortunately it does not :( >> >> Am using 5.0.15. >> >> >> Howard Lewis Ship wrote: >>> >>> Just scroll down :-) >>> >>> Seriously, the nested exception will appear in the console, and the >>> ExceptionReport page will also display the entire stack of exceptions. >>> >>> On Thu, Nov 13, 2008 at 2:47 PM, aldana <[EMAIL PROTECTED]> wrote: >>>> >>>> No, it is fine that they are wrapped to TapestryException, but I just >>>> would >>>> like to know/see the full qualified name of my custom unchecked >>>> Exception >>>> so >>>> my diagnosis is quicker (I always wrap lower level exceptions to >>>> application-specific and more context related exceptions). >>>> >>>> >>>> >>>> Howard Lewis Ship wrote: >>>>> >>>>> Tapestry is capturing any RuntimeExceptions and rethrowing a >>>>> TapestryException, which includes a location property used by the >>>>> ExceptionReport page to display exactly where the error occurred. >>>>> What do you think should happen to such exceptions? What, outside of >>>>> Tapestry, is prepared to catch them? >>>>> >>>>> On Thu, Nov 13, 2008 at 2:05 PM, aldana <[EMAIL PROTECTED]> wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> for different reasons I do abandon checked Exceptions in my app and >>>>>> use >>>>>> a >>>>>> custom Exception hierachy which inherits from RuntimeException. >>>>>> >>>>>> I like the exception page with tapestry but somehow my unchecked >>>>>> exceptions >>>>>> gets swallowed: >>>>>> >>>>>> Message with thrown custom checked exception: >>>>>> Render queue error in BeginRender[Start:maincontent]: Content could >>>>>> not >>>>>> be >>>>>> retrieved File 'D:\bla' does not exist >>>>>> >>>>>> Message with thrown custom unchecked exception (notice the exception >>>>>> type): >>>>>> Render queue error in BeginRender[Start:maincontent]: >>>>>> sample.cms.common.ContentRetrievalException: Content could not be >>>>>> retrieved >>>>>> File 'D:\bla' does not exist >>>>>> >>>>>> >>>>>> Is this a bug or wanted behaviour, that custom unchecked exceptions >>>>>> are >>>>>> not >>>>>> named? In my view they should for the sake error diagnosis. >>>>>> >>>>>> - >>>>>> manuel aldana >>>>>> aldana((at))gmx.de >>>>>> software-engineering blog: http://www.aldana-online.de >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/-T5--custom-RuntimeException-type-name-shadowed-by-tapestry-tp20490549p20490549.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] custom RuntimeException type-name shadowed by tapestry
I made a text search in firefox browser. If it is a unchecked exception unfortunately it does not :( Am using 5.0.15. Howard Lewis Ship wrote: > > Just scroll down :-) > > Seriously, the nested exception will appear in the console, and the > ExceptionReport page will also display the entire stack of exceptions. > > On Thu, Nov 13, 2008 at 2:47 PM, aldana <[EMAIL PROTECTED]> wrote: >> >> No, it is fine that they are wrapped to TapestryException, but I just >> would >> like to know/see the full qualified name of my custom unchecked Exception >> so >> my diagnosis is quicker (I always wrap lower level exceptions to >> application-specific and more context related exceptions). >> >> >> >> Howard Lewis Ship wrote: >>> >>> Tapestry is capturing any RuntimeExceptions and rethrowing a >>> TapestryException, which includes a location property used by the >>> ExceptionReport page to display exactly where the error occurred. >>> What do you think should happen to such exceptions? What, outside of >>> Tapestry, is prepared to catch them? >>> >>> On Thu, Nov 13, 2008 at 2:05 PM, aldana <[EMAIL PROTECTED]> wrote: >>>> >>>> Hi, >>>> >>>> for different reasons I do abandon checked Exceptions in my app and use >>>> a >>>> custom Exception hierachy which inherits from RuntimeException. >>>> >>>> I like the exception page with tapestry but somehow my unchecked >>>> exceptions >>>> gets swallowed: >>>> >>>> Message with thrown custom checked exception: >>>> Render queue error in BeginRender[Start:maincontent]: Content could not >>>> be >>>> retrieved File 'D:\bla' does not exist >>>> >>>> Message with thrown custom unchecked exception (notice the exception >>>> type): >>>> Render queue error in BeginRender[Start:maincontent]: >>>> sample.cms.common.ContentRetrievalException: Content could not be >>>> retrieved >>>> File 'D:\bla' does not exist >>>> >>>> >>>> Is this a bug or wanted behaviour, that custom unchecked exceptions are >>>> not >>>> named? In my view they should for the sake error diagnosis. >>>> >>>> - >>>> manuel aldana >>>> aldana((at))gmx.de >>>> software-engineering blog: http://www.aldana-online.de >>>> -- >>>> View this message in context: >>>> http://www.nabble.com/-T5--custom-RuntimeException-type-name-shadowed-by-tapestry-tp20490549p20490549.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 >>> >>> Creator Apache Tapestry and Apache HiveMind >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> >> >> - >> manuel aldana >> aldana((at))gmx.de >> software-engineering blog: http://www.aldana-online.de >> -- >> View this message in context: >> http://www.nabble.com/-T5--custom-RuntimeException-type-name-shadowed-by-tapestry-tp20490549p20491255.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 > > Creator Apache Tapestry and Apache HiveMind > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--custom-RuntimeException-type-name-shadowed-by-tapestry-tp20490549p20491641.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] custom RuntimeException type-name shadowed by tapestry
No, it is fine that they are wrapped to TapestryException, but I just would like to know/see the full qualified name of my custom unchecked Exception so my diagnosis is quicker (I always wrap lower level exceptions to application-specific and more context related exceptions). Howard Lewis Ship wrote: > > Tapestry is capturing any RuntimeExceptions and rethrowing a > TapestryException, which includes a location property used by the > ExceptionReport page to display exactly where the error occurred. > What do you think should happen to such exceptions? What, outside of > Tapestry, is prepared to catch them? > > On Thu, Nov 13, 2008 at 2:05 PM, aldana <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> for different reasons I do abandon checked Exceptions in my app and use a >> custom Exception hierachy which inherits from RuntimeException. >> >> I like the exception page with tapestry but somehow my unchecked >> exceptions >> gets swallowed: >> >> Message with thrown custom checked exception: >> Render queue error in BeginRender[Start:maincontent]: Content could not >> be >> retrieved File 'D:\bla' does not exist >> >> Message with thrown custom unchecked exception (notice the exception >> type): >> Render queue error in BeginRender[Start:maincontent]: >> sample.cms.common.ContentRetrievalException: Content could not be >> retrieved >> File 'D:\bla' does not exist >> >> >> Is this a bug or wanted behaviour, that custom unchecked exceptions are >> not >> named? In my view they should for the sake error diagnosis. >> >> - >> manuel aldana >> aldana((at))gmx.de >> software-engineering blog: http://www.aldana-online.de >> -- >> View this message in context: >> http://www.nabble.com/-T5--custom-RuntimeException-type-name-shadowed-by-tapestry-tp20490549p20490549.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 > > Creator Apache Tapestry and Apache HiveMind > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--custom-RuntimeException-type-name-shadowed-by-tapestry-tp20490549p20491255.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] custom RuntimeException type-name shadowed by tapestry
Hi, for different reasons I do abandon checked Exceptions in my app and use a custom Exception hierachy which inherits from RuntimeException. I like the exception page with tapestry but somehow my unchecked exceptions gets swallowed: Message with thrown custom checked exception: Render queue error in BeginRender[Start:maincontent]: Content could not be retrieved File 'D:\bla' does not exist Message with thrown custom unchecked exception (notice the exception type): Render queue error in BeginRender[Start:maincontent]: sample.cms.common.ContentRetrievalException: Content could not be retrieved File 'D:\bla' does not exist Is this a bug or wanted behaviour, that custom unchecked exceptions are not named? In my view they should for the sake error diagnosis. - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--custom-RuntimeException-type-name-shadowed-by-tapestry-tp20490549p20490549.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]