Re: problems with layouts
I had same problem. When I ran mvn jetty:run, everything was ok. Problem was in Eclipse, because it did not put maven resources on classpath, so resource not exist for eclipse jetty instance. Sollution for me was to add that path manually to build path. You can also try to make war and check the contents if it is like you expect. Tom Robert Zeigler napsal(a): Both wrong. Component templates need to go in the classpath, same package as the .java file. If you're using maven, they go in: src/main/resources/path/to/components Only page templates may be placed in webapp root. webapp/components would refer to pages in: src/main/java/path/to/pages/components Robert On Mar 19, 2009, at 3/199:59 AM , Anton Marchenkov wrote: On 19/03/09 17:49, Thiago H. de Paula Figueiredo wrote: On Thu, Mar 19, 2009 at 11:41 AM, Anton Marchenkovm...@handybank.ru wrote: Hi, Hi! Without any html, h1, body tags or Layout.tml context... Make sure the Layout.tml file is in the correct place (under your webapp root or in the classpath, in the same package as your Layout class). It's in the correct place. I have Layout.java in components package and i'm tryed to place Layout.tml to webapp root and webapp/components. But I got the same result in both cases. -- Best regards, Anton Marchenkov. - 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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to make link correctly
Hi, as far as I know T5 still does not expose any service to create links the way we need to. I believe that the best solution is just to isolate the problem by creating a service to use when generating links. This way if the used T5 internal services change you have single point to correct in your application. - Ville Francois Armand wrote: Ville Virtanen wrote: Hi, [...] Have you find any solution ? I have the same concern as you especially when working with dispatcher that redirect to T5 pages under certain condition. -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- http://fanf42.blogspot.com InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org -- View this message in context: http://www.nabble.com/How-to-make-link-correctly-tp22450579p22615379.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
Re: New to Tapestry- Lots of questions sorry!
Hi Amit, 1) For exmple: t:parameter name=deleteCell t:if test=bean.condition a t:type=actionlink/ t:parameter name=else spanwhatever/span /t:parameter /t:if /t:parameter 2) You can use whatever you want as long as you manage to pass the data to tapestry and back. Look at the wiki http://wiki.apache.org/tapestry/Tapestry5HowTos for examples about GWT for example. 3) Tapestry is component oriented, while the others are mvc frameworks. Pages in Tapestry are effectively not controllers in the MVC sense, but more aggregators of components and services which in turn can consist of components and services, which in turn... In Tapestry you build your own building blocks or use predefined ones to assemble the functionality that you want. If you do more complex things this differs quite much from the MVC approach where controllers tend to get bloated (at least they do for me ;) ). Furthermore you have a completely different programming model thanks to the annotation driven approach and the Tapestry IOC which makes many things just so much simpler. RoR I cannot say much about, since I don't program in Ruby. Grails is certanly a nice choice for applications which have only one database, but it is somewhat more difficult to debug thanks to the dynamic nature of Groovy (no static typechecking can lead to interesting bugs very easily). I guess the same goes for Ruby. What is better for you in certain circumstances or for a specific jobs is nothing wich anyone here could answer, though. 2009/3/20 Amit Nithian anith...@gmail.com Hi all, My apologies if my questions are ignorant or have been answered already, if so, a link to the answer is more than satisfactory for the question. Basically, I am interested in learning one of the many web frameworks and have narrowed to looking at Java frameworks since I don't have enough experience in PHP, Python or more recently Ruby (and Rails) and I am a Java developer. In looking online, I came across Tapestry and am using that now to write a simple web application for work and ultimately, I am interested in learning how to use Tapestry to write larger scale web applications. I understand the MVC pattern to some end as it applies to Ruby on Rails (and subsequently Grails). My questions are as follows; 1) With Tapestry, I understand the Controller is effectively the Page and Components with the View being the template files. I haven't seen any examples of complex scripting in the templates where you can build complex views. Is that by design or am I missing something? For example, I am using the GridLayout component and I added an extra delete column; however, I would like to only enable the Delete link inside this phony column only if some condition on the current bean is true. How would I go about that? 2) I saw some discussion regarding JQuery vs Prototype etc which is fine ( I don't know either one well) but how does one go about writing complex UIs using Tapestry and template files? Do you use YUI components inside a t:form? How do people build nice looking, complex front ends with Tapestry backends? 3) What are the differences conceptually between Tapestry and Grails or Ruby on Rails, Spring MVC etc and why is Tapestry better? Thanks for reading and I am excited about using Tapestry! - Amit
Re: How to make link correctly
Ville Virtanen wrote: Hi, as far as I know T5 still does not expose any service to create links the way we need to. I believe that the best solution is just to isolate the problem by creating a service to use when generating links. This way if the used T5 internal services change you have single point to correct in your application It's what I do for now, thanks for the answer. -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- http://fanf42.blogspot.com InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Spring and Reload
Geoffrey Wiseman wrote: Ah. Fair enough. ;) Better to have it there than nowhere. For the Spring part, you could try Javarebel [1] which is a class reloader at the JVM level. Hum, I don't know how well (or perhaps how bad) Javarebel and T5 class loader will go together. [1] http://www.zeroturnaround.com/javarebel Disclamer: it's not opensource, and it's not free. -- Francois Armand Etudes Développements J2EE Groupe Linagora - http://www.linagora.com Tél.: +33 (0)1 58 18 68 28 --- http://fanf42.blogspot.com InterLDAP - http://interldap.org FederID - http://www.federid.org/ Open Source identities management and federation - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
textfield picker like DateField ?
Hi all! I search a component which allow to have a kind of pop-up/picker (like for date picker in the DateField). In that one, I want to display a list of elements to fill my textfield. I search on http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ but I don't find a solution to my needs. So, as a solution exists for Date fields, I am asking myself if there is a more global component with that kind of functionality I have not seen? Thanks -- Yannick Martel - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: textfield picker like DateField ?
I read me, and I am not such clear on what I search... On a TextBox, I have an autocomplete on values, but I want to have a link or button that display me a integrated pop-up (not a combo box) on my page with all existing values (with other elements, for example tooltip) and on which a click fills my textField with the value. Le Fri, 20 Mar 2009 11:37:54 +0100, Yannick Martel mar...@codelutin.com a écrit : Hi all! I search a component which allow to have a kind of pop-up/picker (like for date picker in the DateField). In that one, I want to display a list of elements to fill my textfield. I search on http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/ but I don't find a solution to my needs. So, as a solution exists for Date fields, I am asking myself if there is a more global component with that kind of functionality I have not seen? Thanks -- Yannick - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: New to Tapestry- Lots of questions sorry!
On Fri, Mar 20, 2009 at 1:53 AM, Amit Nithian anith...@gmail.com wrote: 1) With Tapestry, I understand the Controller is effectively the Page and Components with the View being the template files. I haven't seen any examples of complex scripting in the templates where you can build complex views. Please give us an example. Your description is a vague enough for me to not understand what you're talking about. How do people build nice looking, complex front ends with Tapestry backends? Again, I don't know exactly what you're talking about. Anything you can do with HTML, CSS and JavaScript you can do with Tapestry. Tapestry deals with the server side of things, but also helps with some JavaScript issues, specially AJAX. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
5.0.18 - 5.1.0.1 upgrade problems
Hi, two problems so far. Can somebody help me migrating those? 1) ComponentActionRequestHandler public void contributeComponentActionRequestHandler (OrderedConfigurationComponentEventRequestFilter configuration, ComponentEventRequestFilter accessController) { configuration.add(ComponentAccessController, accessController, before:*); } --- Contribution se .fsys .klubb .services .AppModule .contributeComponentActionRequestHandler(OrderedConfiguration, ComponentEventRequestFilter) (at AppModule.java:68) is for service 'ComponentActionRequestHandler', which does not exist. 2) ComponentResources - public class ExceptionHandler implements RequestExceptionHandler { public ExceptionHandler(RequestPageCache pageCache, PageResponseRenderer renderer, final Logger logger, final Response response, final ComponentClassResolver resolver, final ComponentResources componentResources, @Inject @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode) { } } --- [ERROR] Registry No service implements the interface org.apache.tapestry5.ComponentResources. [ERROR] Registry Operations trace: [ERROR] Registry [ 1] Realizing service ExceptionHandler [ERROR] Registry [ 2] Invoking se.fsys.klubb.core.handlers.ExceptionHandler(RequestPageCache, PageResponseRenderer, Logger, Response, ComponentClassResolver, ComponentResources, boolean) (at ExceptionHandler.java:32) via se.fsys.klubb.services.TweaksModule.bind(ServiceBinder) (at TweaksModule.java:60) [ERROR] Registry [ 3] Determining injection value for parameter #6 (org.apache.tapestry5.ComponentResources) [ERROR] Registry [ 4] Resolving object of type org.apache.tapestry5.ComponentResources using MasterObjectProvider [ERROR] ExceptionHandler Construction of service ExceptionHandler failed: Error invoking constructor se.fsys.klubb.core.handlers.ExceptionHandler(RequestPageCache, PageResponseRenderer, Logger, Response, ComponentClassResolver, ComponentResources, boolean) (at ExceptionHandler.java:32) via se.fsys.klubb.services.TweaksModule.bind(ServiceBinder) (at TweaksModule.java:60) (for service 'ExceptionHandler'): No service implements the interface org.apache.tapestry5.ComponentResources. /Andreas Pardeike - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
On Fri, Mar 20, 2009 at 9:08 AM, Andreas Pardeike a...@fsys.se wrote: 2) ComponentResources - public class ExceptionHandler implements RequestExceptionHandler { public ExceptionHandler(RequestPageCache pageCache, PageResponseRenderer renderer, final Logger logger, final Response response, final ComponentClassResolver resolver, final ComponentResources componentResources, @Inject @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode) { } } Use field injection for ComponentResources instead of using the constructor. ComponentResources is not a service, so I don't know how this worked before. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5: Navigation Component with Active style, How?
Hello I have a component at the top of the page for navigating to my main pages.. This works perfect, see the xhtml code below.. But the problem is that I want the clicked navigate link to get an class=active attribute. How can I do this? The problem is the component is rerendered after I click a navigate link. And I don't want to store something in the session.. Any Ideas? Thanks! Peter !-- Generated Navigation component xhtml-- div id=header ul id=navigation li a t:type=pagelink page=Index class=active span${message:tab-index}/span /a /li li a t:type=pagelink page=Profile span${message:tab-profile}/span /a /li li a t:type=pagelink page=Chart span${message:tab-chart}/span /a /li li a t:type=pagelink page=Search span${message:tab-search}/span /a /li /ul /div
Re: T5: Navigation Component with Active style, How?
On Fri, Mar 20, 2009 at 9:34 AM, Peter Kanze peterka...@gmail.com wrote: I have a component at the top of the page for navigating to my main pages.. This works perfect, see the xhtml code below.. But the problem is that I want the clicked navigate link to get an class=active attribute. Doesn't using CSS's a:visited selector solve your problem? Other solution would be some JavaScript that inspects each a tag and compares its href attribute to the requested URL. If they match, you add the class attribute. This could be implemented as a mixin . . . -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: textfield picker like DateField ?
On Fri, Mar 20, 2009 at 8:04 AM, Yannick Martel mar...@codelutin.com wrote: I read me, and I am not such clear on what I search... On a TextBox, I have an autocomplete on values, but I want to have a link or button that display me a integrated pop-up (not a combo box) on my page with all existing values (with other elements, for example tooltip) and on which a click fills my textField with the value. Take a look at http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/mixins/Autocomplete.html and http://tapestry.formos.com/nightly/tapestry5/guide/ajax.html (bottom of the page) -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
Thiago, I don't think that will help. ExceptionHandler is a service and I am not sure if I can use field injection in a service (everything should be done in the constructor, right?). If I try to do it your way, I end up with Eclipse complaining that that field isn't initialized... On 20 mar 2009, at 13.11, Thiago H. de Paula Figueiredo wrote: On Fri, Mar 20, 2009 at 9:08 AM, Andreas Pardeike a...@fsys.se wrote: 2) ComponentResources - public class ExceptionHandler implements RequestExceptionHandler { public ExceptionHandler(RequestPageCache pageCache, PageResponseRenderer renderer, final Logger logger, final Response response, final ComponentClassResolver resolver, final ComponentResources componentResources, @Inject @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode) { } } Use field injection for ComponentResources instead of using the constructor. ComponentResources is not a service, so I don't know how this worked before. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: New to Tapestry- Lots of questions sorry!
Thiago, I think he's misunderstanding the point of Tapestry. You never do scripting in the views. In fact, you never do scripting. Scripting (in web templates) mixes display layout and display flow with business logic, data flow, and user workflow. They're all mixed up together. Anyone used to that will have a hard time seeing how to accomplish the same features in their application without access to any ability to embed scripted code into the view. Amit, you need to re-think your orientation when using something like Tapestry. All of your code is in controllers, with the exception of some display layout flows like loops, conditionals, and such. There are components for these, but unlike JSP tags, they do not unwind into code, they are components and all the pages are composed, with a rendering engine that asks components to render themselves or their templates, and their child components, who are in turn asked to render. It's a very different paradigm. In practice though, if you're thinking of having a lot of logic you would imagine going into scriptlets or the like, factor that code into methods which return the displayable result. For instance (this code is made up on the spot): % CreditCard cc = myDao.getCreditCardByNumber(request.getProperty(ccNumber)); % h2%=cc.getType().getName()% card/h2 pCard %=cc.getNumber()% has the following purchases today:p tabletrthDate/ththVendor/ththAmount/ththPosted?/ th/tr % ListCCTransaction txns = myDao.getTransactionsForCC(cc.getNumber()); for (CCTransaction txn: txns) { % tr td%=MyUtil.format(txn.getDate())%/td td%=txn.getVendor()%/td td%=MyUtil.formatCurrency(txn.getAmount(),USD)%/td td%=txn.isPosted()%/td /tr % } % The above is pretty ugly JSP code, and even with Struts or other web MVC frameworks that use JSPs as a base, it can be that ugly. Tapestry goes a different way. (this code was also cooked up at 8am after a red- eye flight... it is uncompiled, let alone untested. Don't cut-and- paste it. This example uses credit card, but doesn't authenticate and is massively insecure. It's only paying attention to a certain aspect of things.) MyPage.java ... public class MyPage { @Inject private MyDao myDao; @Property private CCTransaction currentTransaction; @Parameter(required=true) private String ccNumber; @Property private CreditCard creditCard; @SetupRender public void init() { //do validation stuff... creditCard = myDao.getCreditCardByNumber(ccNumber); } public ListCCTransaction getTransactions() { } } MyPage.tml html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; . h2${creditCard.type} card/h2 pCard ${creditCard.number} has the following purchases today:p table trthDate/ththVendor/ththAmount/ththPosted?/th/tr tr t:id=layout source=transactions value=currentTransaction tdt:output t:format=YY:MM:DD HH:mm t:value=currentTransaction.date//td td${currentTransaction.getVendor}/td tdUSD ${currentTransaction.amount}/td td${currentTransaction.isPosted}/td /tr /table The display logic and flow control is in the template, but no actual data lookups or business calculations. I don't know if it helps, but hopefully it gives you a taste of how things are different. On this note, it might be good to have some side-by-side mini-examples which show how someone would do something in vanilla JSP, in Struts, in JSF, and in Tapestry so people can make the mental leap. Annoying to build, I know, but potentially highly useful. regards, Christian. On 20-Mar-09, at 08:07 , Thiago H. de Paula Figueiredo wrote: On Fri, Mar 20, 2009 at 1:53 AM, Amit Nithian anith...@gmail.com wrote: 1) With Tapestry, I understand the Controller is effectively the Page and Components with the View being the template files. I haven't seen any examples of complex scripting in the templates where you can build complex views. Please give us an example. Your description is a vague enough for me to not understand what you're talking about. How do people build nice looking, complex front ends with Tapestry backends? Again, I don't know exactly what you're talking about. Anything you can do with HTML, CSS and JavaScript you can do with Tapestry. Tapestry deals with the server side of things, but also helps with some JavaScript issues, specially AJAX. -- Thiago - 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/
Re: 5.0.18 - 5.1.0.1 upgrade problems
On Fri, Mar 20, 2009 at 9:54 AM, Andreas Pardeike a...@fsys.se wrote: Thiago, Hi! I don't think that will help. ExceptionHandler is a service Oops, I overlooked that . . . and I am not sure if I can use field injection in a service (everything should be done in the constructor, right?). Yes we can! :) If I try to do it your way, I end up with Eclipse complaining that that field isn't initialized... I guess this wouldn't happen if you don't mark the field as final. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
Thiago, I removed ComponentResources from the constructor and used a field instead. With @InjectResource private ComponentResources _componentResources; I get [ERROR] Registry Unable to determine resource value to inject into field '_componentResources' (of type org.apache.tapestry5.ComponentResources). [ERROR] Registry Operations trace: [ERROR] Registry [ 1] Realizing service ExceptionHandler [ERROR] Registry [ 2] Invoking se.fsys.klubb.core.handlers.ExceptionHandler(RequestPageCache, PageResponseRenderer, Logger, Response, ComponentClassResolver, boolean) (at ExceptionHandler.java:35) via se.fsys.klubb.services.TweaksModule.bind(ServiceBinder) (at TweaksModule.java:60) [ERROR] Registry [ 3] Calculating injection value for field '_componentResources' (org.apache.tapestry5.ComponentResources) [ERROR] ExceptionHandler Construction of service ExceptionHandler failed: Error invoking constructor se.fsys.klubb.core.handlers.ExceptionHandler(RequestPageCache, PageResponseRenderer, Logger, Response, ComponentClassResolver, boolean) (at ExceptionHandler.java:35) via se.fsys.klubb.services.TweaksModule.bind(ServiceBinder) (at TweaksModule.java:60) (for service 'ExceptionHandler'): Unable to determine resource value to inject into field '_componentResources' (of type org.apache.tapestry5.ComponentResources). and with @Inject private ComponentResources _componentResources; I get [ERROR] Registry No service implements the interface org.apache.tapestry5.ComponentResources. [ERROR] Registry Operations trace: [ERROR] Registry [ 1] Realizing service ExceptionHandler [ERROR] Registry [ 2] Invoking se.fsys.klubb.core.handlers.ExceptionHandler(RequestPageCache, PageResponseRenderer, Logger, Response, ComponentClassResolver, boolean) (at ExceptionHandler.java:34) via se.fsys.klubb.services.TweaksModule.bind(ServiceBinder) (at TweaksModule.java:60) [ERROR] Registry [ 3] Calculating injection value for field '_componentResources' (org.apache.tapestry5.ComponentResources) [ERROR] Registry [ 4] Resolving object of type org.apache.tapestry5.ComponentResources using MasterObjectProvider [ERROR] ExceptionHandler Construction of service ExceptionHandler failed: Error invoking constructor se.fsys.klubb.core.handlers.ExceptionHandler(RequestPageCache, PageResponseRenderer, Logger, Response, ComponentClassResolver, boolean) (at ExceptionHandler.java:34) via se.fsys.klubb.services.TweaksModule.bind(ServiceBinder) (at TweaksModule.java:60) (for service 'ExceptionHandler'): No service implements the interface org.apache.tapestry5.ComponentResources. BTW, my exception handler is registered with: public static void contributeAliasOverrides(@InjectService(ExceptionHandler) RequestExceptionHandler myHandler, @Inject @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode, ConfigurationAliasContributionRequestExceptionHandler configuration) { configuration .add(AliasContribution.create(RequestExceptionHandler.class, myHandler)); } and the class/constructor (that worked fine in 5.0.18) looks like this: public class ExceptionHandler implements RequestExceptionHandler { @InjectResource private ComponentResources _componentResources; private final RequestPageCache _pageCache; private final PageResponseRenderer _renderer; private final Logger _logger; private final Response _response; private final ComponentClassResolver _resolver; private final boolean _productionMode; public ExceptionHandler(RequestPageCache pageCache, PageResponseRenderer renderer, final Logger logger, final Response response, final ComponentClassResolver resolver, @Inject @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode) { _pageCache = pageCache; _renderer = renderer; _logger = logger; _response = response; _resolver = resolver; _productionMode = productionMode; } ... } /Andreas On 20 mar 2009, at 14.12, Thiago H. de Paula Figueiredo wrote: On Fri, Mar 20, 2009 at 9:54 AM, Andreas Pardeike a...@fsys.se wrote: Thiago, Hi! I don't think that will help. ExceptionHandler is a service Oops, I overlooked that . . . and I am not sure if I can use field injection in a service (everything should be done in the constructor, right?). Yes we can! :) If I try to do it your way, I end up with Eclipse complaining that that field isn't initialized... I guess this wouldn't happen if you don't mark the field as final. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: 5.0.18 - 5.1.0.1 upgrade problems
On Fri, Mar 20, 2009 at 10:53 AM, Andreas Pardeike a...@fsys.se wrote: Thiago, Hi! Thinking further, ComponentResources is not a service, but something that has special injection logic that only handles components, pages and mixins. It is a way of a component, page or mixin to access all the methods and properties Tapestry adds to them. Thus, I don't know how to inject it in a service. You can file a JIRA asking for some way of doing that. -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
T5: ordering of Dispatchers
Hi, what is the execution order of dispatchers, last in, first out or first in, last out? following are my two dispatchers, which will be called first and why? thanks. public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(MyDispatcher) MyDispatcher myDispatcher) { configuration.add(MyDispatcher, myDispatcher, before:PageRender); } public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(HisDispatcher) HisDispatcher hisDispatcher) configuration.add(HisDispatcher, hisDispatcher, before:PageRender); } -- View this message in context: http://www.nabble.com/T5%3A-ordering-of-Dispatchers-tp22620974p22620974.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
Re: T5: Navigation Component with Active style, How?
Hello, The a:visited is not an option because only one tab button can be active. About the mixin solution, how can I check the requested URL in my mixin? Do you have a quick example? Thanks! Peter On Fri, Mar 20, 2009 at 1:38 PM, Thiago H. de Paula Figueiredo thiag...@gmail.com wrote: On Fri, Mar 20, 2009 at 9:34 AM, Peter Kanze peterka...@gmail.com wrote: I have a component at the top of the page for navigating to my main pages.. This works perfect, see the xhtml code below.. But the problem is that I want the clicked navigate link to get an class=active attribute. Doesn't using CSS's a:visited selector solve your problem? Other solution would be some JavaScript that inspects each a tag and compares its href attribute to the requested URL. If they match, you add the class attribute. This could be implemented as a mixin . . . -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: Navigation Component with Active style, How?
On Fri, Mar 20, 2009 at 11:12 AM, Peter Kanze peterka...@gmail.com wrote: Hello, Hi! The a:visited is not an option because only one tab button can be active. Ok! About the mixin solution, how can I check the requested URL in my mixin? Do you have a quick example? Inject the Request and use its getPath() method: @Inject private Request request; -- Thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Tapestry4e - New free eclipse plugin for Tapestry 5
Hello all, I have started the development of a new open source eclipse plugin, called Tapestry4e. The code is licensed using GPL v3. It is hosted in this address: http://code.google.com/p/tapestry4e/. I would like to invite all of you to try it and send me your feedback. The main feature of the project, is an editor for tapestry templates, that extends eclipse WTP HTML editor, and provides content assist for components and parameters, apart from the HTML, CSS and JS support that the WTP editor provides. Content assist for properties is planned for Milestone 1.0. The project also implements a builder to provide Also, I am implementing wizards to provide support for common tasks, such as: - Switch between a T5 class and a template - New TML template wizard - New Page/Component wizard Please contact me if you are interested in helping. I hope that you find it useful. Kind regards, Juan M Salamanca
Re: Tapestry4e - New free eclipse plugin for Tapestry 5
huge pat on the back for tackling this! :) Though I vote/recommend that you change the name :) because I am already confused.. use Tapestry4e when you want to develop Tapestry v5, but not Tapestry v4. :) And there might be branding confusing as well.. between the Tapestry plugin and the Tapestry framework.. (probably can't include Tapestry in the name).. other than that, I can't wait to try it and have it mature! :) On 3/20/09 8:32 AM, Juan Miguel Salamanca wrote: Hello all, I have started the development of a new open source eclipse plugin, called Tapestry4e. The code is licensed using GPL v3. It is hosted in this address: http://code.google.com/p/tapestry4e/. I would like to invite all of you to try it and send me your feedback. The main feature of the project, is an editor for tapestry templates, that extends eclipse WTP HTML editor, and provides content assist for components and parameters, apart from the HTML, CSS and JS support that the WTP editor provides. Content assist for properties is planned for Milestone 1.0. The project also implements a builder to provide Also, I am implementing wizards to provide support for common tasks, such as: - Switch between a T5 class and a template - New TML template wizard - New Page/Component wizard Please contact me if you are interested in helping. I hope that you find it useful. Kind regards, Juan M Salamanca - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Overriding Templates
Hi, We have been trying to modify tapestry to allow us to - Override templates at runtime (e.g. load them from a CMS) - Override templates at runtime DEPENDING on page data We have pretty much achieved this but only by customising Tapestry Core to a degree that is going to make it hard to maintain. Has anyone got any suggestions as to what we could do to make this easier? We have had to customise the some IOC services - these aren't too hard to override. The ones we are really finding hard to deal with are the follow that don't appear to be services but are quite tightly linked in - org.apache.tapestry5.internal.services.ComponentEventDispatcher - org.apache.tapestry5.internal.services.MessagesSourceImpl As a suggestion :) things that will make overriding services easier would be - Some way to replace contributions (as opposed to just add) - Some way to replace listeners to the event hubs - Always use services - Try and make services friendly for extension (BTW I know this is all our fault for messing around with the internals of tapestry) Ben Gidley www.gidley.co.uk b...@gidley.co.uk
Re: Tapestry4e - New free eclipse plugin for Tapestry 5
It seems that I was requiring 3.4.1 as minimum for the plugin to work. I have updated the manifest file and uploaded to the update site and it should work now. You will probably need to unmark the show only the latest version of software in your update manager. On Fri, Mar 20, 2009 at 4:02 PM, Tapestry Infodea tapes...@infodea.itwrote: I too use the ganymede for jee official release: Version: 3.4.0 Build id: I20080617-2000 with the plugins for Maven and SVN. I like the name of your plugin ;) Roberto. Juan Miguel Salamanca ha scritto: It looks like a problem with the version of your eclipse IDE. I have tested the plugin with the ganymede for jee official release ( http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR2/eclipse-jee-ganymede-SR2-linux-gtk.tar.gz ), and it works for me. Could you please tell me which version of eclipse and plugins you are using? Regards, Juan M Salamanca - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry4e - New free eclipse plugin for Tapestry 5
Thanks Fernando, I will consider changing the name of the plugin, though it will take a few days to move the project (google code does not allow to change the name of the project, so I will have to create a new one and move my source code, and project resources there). At the moment, I am working daily in the project, so I hope to have a decent set of features ready very soon. Regards, Juan M Salamanca On Fri, Mar 20, 2009 at 3:50 PM, Fernando Padilla f...@alum.mit.edu wrote: huge pat on the back for tackling this! :) Though I vote/recommend that you change the name :) because I am already confused.. use Tapestry4e when you want to develop Tapestry v5, but not Tapestry v4. :) And there might be branding confusing as well.. between the Tapestry plugin and the Tapestry framework.. (probably can't include Tapestry in the name).. other than that, I can't wait to try it and have it mature! :) On 3/20/09 8:32 AM, Juan Miguel Salamanca wrote: Hello all, I have started the development of a new open source eclipse plugin, called Tapestry4e. The code is licensed using GPL v3. It is hosted in this address: http://code.google.com/p/tapestry4e/. I would like to invite all of you to try it and send me your feedback. The main feature of the project, is an editor for tapestry templates, that extends eclipse WTP HTML editor, and provides content assist for components and parameters, apart from the HTML, CSS and JS support that the WTP editor provides. Content assist for properties is planned for Milestone 1.0. The project also implements a builder to provide Also, I am implementing wizards to provide support for common tasks, such as: - Switch between a T5 class and a template - New TML template wizard - New Page/Component wizard Please contact me if you are interested in helping. I hope that you find it useful. Kind regards, Juan M Salamanca - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Palette and translators
Hi, I have a slight problem with the Palette component. It does not seem to be picking up my contribution to the translatorSource for my custom property type. The encoding is working fine but the options themselves appear to use toString(). Other single-value fields using this type render ok, so am pretty sure I've registered the Translator correctly. Any pointers appreciated. Thanks, Alfie. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry4e - New free eclipse plugin for Tapestry 5
You could consider moving the source code off of Google and onto Tapestry360 (tapestry.formos.com). On Fri, Mar 20, 2009 at 9:53 AM, Juan Miguel Salamanca juan.m.salama...@gmail.com wrote: Thanks Fernando, I will consider changing the name of the plugin, though it will take a few days to move the project (google code does not allow to change the name of the project, so I will have to create a new one and move my source code, and project resources there). At the moment, I am working daily in the project, so I hope to have a decent set of features ready very soon. Regards, Juan M Salamanca On Fri, Mar 20, 2009 at 3:50 PM, Fernando Padilla f...@alum.mit.edu wrote: huge pat on the back for tackling this! :) Though I vote/recommend that you change the name :) because I am already confused.. use Tapestry4e when you want to develop Tapestry v5, but not Tapestry v4. :) And there might be branding confusing as well.. between the Tapestry plugin and the Tapestry framework.. (probably can't include Tapestry in the name).. other than that, I can't wait to try it and have it mature! :) On 3/20/09 8:32 AM, Juan Miguel Salamanca wrote: Hello all, I have started the development of a new open source eclipse plugin, called Tapestry4e. The code is licensed using GPL v3. It is hosted in this address: http://code.google.com/p/tapestry4e/. I would like to invite all of you to try it and send me your feedback. The main feature of the project, is an editor for tapestry templates, that extends eclipse WTP HTML editor, and provides content assist for components and parameters, apart from the HTML, CSS and JS support that the WTP editor provides. Content assist for properties is planned for Milestone 1.0. The project also implements a builder to provide Also, I am implementing wizards to provide support for common tasks, such as: - Switch between a T5 class and a template - New TML template wizard - New Page/Component wizard Please contact me if you are interested in helping. I hope that you find it useful. Kind regards, Juan M Salamanca - 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
Re: Palette and translators
Hi Alfie, I think you must provie Palette with a SelectModel, OptionModel and ValueEncoder for the objects to display. See page on the wiki: http://wiki.apache.org/tapestry/Tapestry5AnotherSelectWithObjects Hope this helps, nillehammer - original Nachricht Betreff: Palette and translators Gesendet: Fr, 20. Mrz 2009 Von: Alfie Kirkpatrickalfie.kirkpatr...@ioko.com Hi, I have a slight problem with the Palette component. It does not seem to be picking up my contribution to the translatorSource for my custom property type. The encoding is working fine but the options themselves appear to use toString(). Other single-value fields using this type render ok, so am pretty sure I've registered the Translator correctly. Any pointers appreciated. Thanks, Alfie. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org --- original Nachricht Ende - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
BeanDisplay and Long Content
When the content in a beandisplay wraps, it wraps beyond the label, due to the fact that it's a DL at its core. It's probably true that sufficiently advanced CSS could fix that, but wouldn't it be slightly easier to use a table for beandisplay and avoid the problem entirely? I can certainly do that myself, i'm just curious why DL was chosen as the primary structure for beandisplay. - Geoffrey -- Geoffrey Wiseman http://www.geoffreywiseman.ca/
Re: T5: ordering of Dispatchers
There is no order unless you set it with ordering clauses (such as before:PageRender). The order in which the contribute methods are invoked across modules can vary with platform, release, or just arbitrarily. It is not specified. Likewise, the order in which the contributed objects appear when passed to the MasterDispatcher service will vary, unless locked down with ordering clauses. On Fri, Mar 20, 2009 at 7:07 AM, Angelo Chen angelochen...@yahoo.com.hk wrote: Hi, what is the execution order of dispatchers, last in, first out or first in, last out? following are my two dispatchers, which will be called first and why? thanks. public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(MyDispatcher) MyDispatcher myDispatcher) { configuration.add(MyDispatcher, myDispatcher, before:PageRender); } public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(HisDispatcher) HisDispatcher hisDispatcher) configuration.add(HisDispatcher, hisDispatcher, before:PageRender); } -- View this message in context: http://www.nabble.com/T5%3A-ordering-of-Dispatchers-tp22620974p22620974.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
Re: Overriding Templates
Em Fri, 20 Mar 2009 13:05:40 -0300, Ben Gidley b...@gidley.co.uk escreveu: We have pretty much achieved this but only by customising Tapestry Core to a degree that is going to make it hard to maintain. Has anyone got any suggestions as to what we could do to make this easier? Use service decoration and/or method advising. Many interesnting things can be done without touching existing code. The URL rewriting support, for example, is completely built on decoration. -- Thiago H. de Paula Figueiredo Independent Java consultant, developer, and instructor http://www.arsmachina.com.br/thiago - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: ordering of Dispatchers
It's an ordered configuration; it's executed in the order specified. In the event that the constraints don't provide a clear ordering (as in your example), the ordering is undetermined; I wouldn't count on any consistent ordering. Robert On Mar 20, 2009, at 3/209:07 AM , Angelo Chen wrote: Hi, what is the execution order of dispatchers, last in, first out or first in, last out? following are my two dispatchers, which will be called first and why? thanks. public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(MyDispatcher) MyDispatcher myDispatcher) { configuration.add(MyDispatcher, myDispatcher, before:PageRender); } public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(HisDispatcher) HisDispatcher hisDispatcher) configuration.add(HisDispatcher, hisDispatcher, before:PageRender); } -- View this message in context: http://www.nabble.com/T5%3A-ordering-of-Dispatchers-tp22620974p22620974.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 - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: T5: ordering of Dispatchers
Thanks for all the answers. the ordering clauses, you meant something like this: configuration.add(MyDispatcher, myDispatcher, before:PageRender); configuration.add(HisDispatcher, hisDispatcher, before:MyDispatcher); in this case HisDispatcher will be executed always before MyDispatcher, right? Howard Lewis Ship wrote: There is no order unless you set it with ordering clauses (such as before:PageRender). The order in which the contribute methods are invoked across modules can vary with platform, release, or just arbitrarily. It is not specified. Likewise, the order in which the contributed objects appear when passed to the MasterDispatcher service will vary, unless locked down with ordering clauses. On Fri, Mar 20, 2009 at 7:07 AM, Angelo Chen angelochen...@yahoo.com.hk wrote: Hi, what is the execution order of dispatchers, last in, first out or first in, last out? following are my two dispatchers, which will be called first and why? thanks. public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(MyDispatcher) MyDispatcher myDispatcher) { configuration.add(MyDispatcher, myDispatcher, before:PageRender); } public static void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(HisDispatcher) HisDispatcher hisDispatcher) configuration.add(HisDispatcher, hisDispatcher, before:PageRender); } -- View this message in context: http://www.nabble.com/T5%3A-ordering-of-Dispatchers-tp22620974p22620974.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 -- View this message in context: http://www.nabble.com/T5%3A-ordering-of-Dispatchers-tp22620974p22631207.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
t5: profiling tool for t5 app?
Hi, I need to track some heap issues, what is a good tool that you can recommend for T5 application? Thanks. standalone or IDEA plug in Angelo -- View this message in context: http://www.nabble.com/t5%3A-profiling-tool-for-t5-app--tp22631853p22631853.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
t5: exceptions found only in the server log, not in the development machine.
Hi, I found out tat i have a few errors like below in the log, I do use : ${asset:context:images/image1.gif} in many places in the program, and when I run it, it does not generate any error, only can find those errors in the server log, any idea why this happens? Thanks [ERROR] RequestExceptionHandler Processing of request failed with uncaught exception: Input string '${asset:context:images' is not valid; the '$' character at position 1 should be followed by another '$' or a four digit hex number (a unicode value). java.lang.IllegalArgumentException: Input string '${asset:context:images' is not valid; the '$' character at position 1 should be followed by another '$' or a four digit hex number (a unicode value). -- View this message in context: http://www.nabble.com/t5%3A-exceptions-found-only-in-the-server-log%2C-not-in-the-development-machine.-tp22632986p22632986.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