Re: Template customisation depending on certain parameters
Hello Carl. I do not have much experience on the subject, but I'm facing the same problem. At the moment, if use t:if statements depending on the server agent, which works, because I only need to support a few smart phone models, but which be difficult to maintain as soon as new devices come in line. I think that you're idea is great, but I'm far from a Tapestry expert, thus I cannot help you on the development, just on the requirements. Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to call a method of a tapestry page when the page is called using anchor tag
Hi Sonu. I'm far from being a Tapestry expert, but what you are asking is feasible by: 1. injecting the Register page into the Login page (user @Inject private Register register in the Login.java), 2. adding an action link t:actionlink t:id=registerRegister/t:actionlink in the Login.tml, 3. add the Object onActionFromRegister() { register.initialize(); return register; } However, this will all the same trigger eventually the Register.onActivate() method. Or, in step 3, just return null if you do not want the Register page to be displayed. Otherwise, you should really take a look at the Tapestry JumpStart Application (http://files.doublenegative.com.au/jumpstart/home.html), which covers many Tapestry use cases. Hope this helps. Cheers, Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Loops in Form - where are my serialized
Hello. I'm not sure to quite understand your problem, but in case your concern is to retrieve the values of the checkboxes, please take a look at a previous thread at http://markmail.org/search/?q=list%3Aorg.apache.tapestry.users+dynamic+form#query:list%3Aorg.apache.tapestry.users%20dynamic%20form+page:1+mid:n7mevugncgalq6kt+state:results (I had a similar problem): it's about radiogroups, but the way of handling checkboxes is similar. Hope this helps. Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
How to access an ASO in a non-servlet thread
Hi everyone. I'm currently facing the following problem: my T5 (0.15) web application receive notifications in a dedicated non servlet thread inside some of my Tapestry components, which have an ApplicationStateObject attribute. I would like to update the state of the ASO, but the problem is that the thread that triggers some callback in my Tapestry component cannot thus access the AOS (since I guess resort to ThreadLocal attributes inside the IoC). I can bind the dedicated notification thread to the servlet thread that created it. Is there a way in Tapestry to work this around, please? Thank you. Cheers, Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Access the ApplicationGlobals inside the AppModule::bind() method
Thank you for this very quick and clear answer! Does it mean that I will be able to inject the PropertiesFileSymbolProvider object inside the AppModule::bind(ServiceBinder binder, @InjectService(PropertiesFileSymbolProvider) SymbolProvider propertiesFileSymbolProvider) method this way? Or should I declare a @Inject @Symbol(value=MyParam) private String myParam; (should be static) inside my AppModule (after having declared the properties symbol provider via the public PropertiesFileSymbolProvider buildPropertiesFileSymbolProvider(Logger logger) and public static void contributeSymbolSource(OrderedConfigurationSymbolProvider configuration, ... methods)? Because I need to access the property before the service is created, since it's implementation should depend on some property. Thank you. Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Access the ApplicationGlobals inside the AppModule::bind() method
Hello again. I would like the service implementation binding (inside the AppModule::bind(ServiceBinder binder)) to depend on the web.xml configuration file. This is the reason why I would like to access the ApplicationGlobal instance inside the method (in order to call as globals.getServletContext().getInitParameter(MyParam)), so as to provide the right implementation depending on some context-param value. Is it feasible? Is there a work-around, or another way to achieve that, please? Thank you so much for your help. Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to access an ASO in a non-servlet thread
Thank you Uli. I had already taken a look at the two pointers you have provided, without really understanding them: I'm a bit lost on how to start with. I've understood that I must create a service and declare it inside the AppModule class. I've seen that I should declare an interface for such a service, and of course an implementation. I've seen that the PerthreadManager instance seems to be injected into the service implementation. But: - I do not understand the exact purpose of this PerthreadManager class (since we only use its cleanup() method) - I do not know how to declare the service in the IoC (is that like any regular service in the bind() method ?) I must also indicate that each client servlet will create its own notification thread, and I am afraid that a central service will not help... Thank you for your help. Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Creating inner components on the fly in a form custom component
Thank you so much Kris for your answer. The Tapestry 5 BeanEditor source code gives some kind of vertigo, but I will look at it, in order to better understand what you mean. In the meantime, I had another idea: using some .tml inside my component with a t:loop and t:if statements inside that nest some t:select/t:radioGroup...: I think that it might solve my problem (do you agree?). As soon as I have something which works, I will let you know. Cheers, Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creating inner components on the fly in a form custom component
Hello. I've been digging the web with no success, but I'm a Tapestry 5 newbie (running the v5.0.15), thus maybe I missed something. I'm currently attempting to develop a custom Tapestry component that aims at inserting HTML select/checkbox/textfield tags into an existing HTML form. Let's say that I have a .tml which contains a t:form, in which I have my t:myCustomComponent element. This myCustomComponent component is supposed to render multiple HTML select/checkbox/textfield elements, depending on its main Tapestry parameter. But, instead of writing plain HTML via the traditional beginRender/afterRender() methods, I'd prefer to re-user the built-in Select/CheckBox/TextField Tapestry classes, and add instances of those classes as inner components of my myCustomComponent component. The idea is, on the enclosing form submission, to be able to retrieve the values of those various HTML form sub elements. I do not know whether this is feasible. Is it possible to add components on-the-fly to an existing component during its rendering process (or at another relevant moment)? I do not even know where to start with. Could someone, please give me a hint on how to achieve that? Thank you for your help and time. Cheers, Édouard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]