Re: [T5] Javascript links rendered on bottom of page?
hi chris, after having a second look at your code i think you don't even need the replacement at all as the new version uses the replaceTextArea() instead of assigning the text via javascript. in writeScript() the replacement of \r,' occurs but _value is written out before in afterRender() and is not used again after the replacement. harald Chris Lewis schrieb: Harald, Can I convince you to file an issue, if that is an issue? http://code.google.com/p/tapestry5-components/issues/list If you can, provide an example situation that would cause a problem. thanks! Harald Geritzer wrote: Chris Lewis schrieb: Hi Harald, tapestry5-components has an editor component (which uses fck): http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/components/Editor.html ty, guess in writeScript(): _value = _value.replace('\r', '\\'); //this is needed for javascript to be able to extend a string across multiple lines _value = _value.replace(', #39;); //this is needed because the string delimiter is ' for the script below _value.replace should be better replaced by _value.replaceAll ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] - 5.0.11 - Componente é Datefield não formato para dd/mm/yyyy?
Hi, The DateField component was changed due to a license incompatibility issue and the new one currently isn't as flexible as the old one. -Filip On 2008-04-25 02:19, Estevam Henrique Portela Mota e Silva wrote: Hi, Do I need to format dd / mm / is standard in Brazil but not worked. Only worked 5.0.9 When can test, which is different 5.0.9 and 5.0.11 *Start.java (source) * Public Class Start { @ Persist Date _dateTest private; GetDateTest public Date () (return _dateTest;) public void setDateTest (Date dateTest) (_dateTest = dateTest;) } *Start.tml * ** html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head title System Start Page /title / head body t:form t:datefield value=dateTest format=%d/%m/%Y/ /t:form / body /html POM.xml - I put 5.0.11 5.0.11 - does not work the date format is mm / dd / . *How resolved?* -- Regards, Estevam Henrique Portela Mota e Silva [EMAIL PROTECTED] Programmer Java and Tapestry Brazil - Fortaleza / CE Handicapped Auditory = deaf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: where does onActivate method's pramameter come from?
Hi, Please see http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html. -Filip On 2008-04-25 04:08, luna_guo wrote: i have the following code: int onPassivate(){ System.out.println(passivate is running); return 3; } void onActivate(int a){ System.out.println(onActivate:+a); } void onActivate(){ System.out.println(onActivate); } i get the debug information: onActivate:3 onActivate return a object page passivate is running after that is a redirect response onActivate is running before onPassivate,so where is the parameter '3' come from? i click a actionLink with context of a number,not 3. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] component is not Datefield format for dd / mm / yyyy?
because of licensing issues, tapestrz has fallen back to a calendar with less features Davor Hrg On Fri, Apr 25, 2008 at 2:21 AM, Estevam Henrique Portela Mota e Silva [EMAIL PROTECTED] wrote: Hi, Do I need to format dd / mm / is standard in Brazil but not worked. Only worked 5.0.9 When can test, which is different 5.0.9 and 5.0.11 Start.java (source) Public Class Start { @ Persist Date _dateTest private; GetDateTest public Date () (return _dateTest;) public void setDateTest (Date dateTest) (_dateTest = dateTest;) } Start.tml html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head title System Start Page /title / head body t:form t:datefield value=dateTest format=%d/%m/%Y/ /t:form / body /html POM.xml - I put 5.0.11 5.0.11 - does not work the date format is mm / dd / . How resolved? -- Regards, Estevam Henrique Portela Mota e Silva [EMAIL PROTECTED] Programmer Java and Tapestry Brazil - Fortaleza / CE Handicapped Auditory = deaf
Re: [T5] Javascript links rendered on bottom of page?
Harald, I'm honestly not clear on what the initial issue with that was (I'm not the original author), but it may have had to do with the fact that the component wrote out script code directly using the MarkupWriter instead of PageRenderSupport. It was originally written for a much earlier version of T5, so naturally things have streamlined. Anyway, it's been removed and committed as my quick tests didn't yield any problems. For further chats/concerns/requests with this component, please use its associated user list or issue system: http://groups.google.com/group/t5components-user http://code.google.com/p/tapestry5-components/issues/list sincerely, chris Harald Geritzer wrote: hi chris, after having a second look at your code i think you don't even need the replacement at all as the new version uses the replaceTextArea() instead of assigning the text via javascript. in writeScript() the replacement of \r,' occurs but _value is written out before in afterRender() and is not used again after the replacement. harald Chris Lewis schrieb: Harald, Can I convince you to file an issue, if that is an issue? http://code.google.com/p/tapestry5-components/issues/list If you can, provide an example situation that would cause a problem. thanks! Harald Geritzer wrote: Chris Lewis schrieb: Hi Harald, tapestry5-components has an editor component (which uses fck): http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/components/Editor.html ty, guess in writeScript(): _value = _value.replace('\r', '\\'); //this is needed for javascript to be able to extend a string across multiple lines _value = _value.replace(', #39;); //this is needed because the string delimiter is ' for the script below _value.replace should be better replaced by _value.replaceAll ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://thegodcode.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: accessing another page/component's message catalog
Thanks Waldo! This solves my problem exactly how I needed to attack it. The little extra code doesn't bother me, it's just how it's done. I simply didn't know enough about Tapestry, specifically ComponentMessagesSource and ComponentSource interfaces! Thanks again, this rocks. On Thu, Apr 24, 2008 at 1:52 PM, Waldo Mendoza [EMAIL PROTECTED] wrote: Adam Zimowski zimowski74 at gmail.com writes: Is there a way to access message catalog of some page or component from another page or component? I know of two ways to do this, but both are hacks IMHO: class SomePage { @Inject private Messages _messages; public getMessages() { return _messages; } } class Foo { @InjectPage private SomePage _page; // now I can access messages from _page } Above way is a pain because every page/component needs to explicitly expose message catalog for use by other page. Another way to do this would be to obtain page/component resource path, and do it old-fashioned way with java.util.Property - ughh... ! What I was looking for is some support by Messages, perhaps overriden method get(String key): Messages.get(String resourcePath, String key) Messages.get(Class component, String key) The thing is, that I need to read another componen't message catalog not knowing ahead of time what the comopnent is. I don't see a clean way of doing it at the moment, any ideas? -adam - To unsubscribe, e-mail: users-unsubscribe at tapestry.apache.org For additional commands, e-mail: users-help at tapestry.apache.org Hello Adam One posibility is to Inject ComponentSource and ComponentMessageSource, after that you can use ComponentSource to get the page by name, and use ComponentMessageSource to get the page Messages, something like: private ComponentMessagesSource _componentMessageSource; private ComponentSource _componentSource; ... Component page = _componentSource.getPage(foo); Messages messages = _componentMessageSource.getMessages( page.getComponentResources().getComponentModel(), page.getComponentResources().getLocale()); Maybe it would be more clean to create a specific service that you can inject to your page. Hope this helps. Bye - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: ComponentSource throws undeclared exception
I'm not sure if this is a bug or simply missed javadoc within ComponentSource interface, but as stated: public interface ComponentSource { /** * Gets a component by its complete id. * * @param componentId complete component id * @return the component * @throws IllegalArgumentException if the component can not be found * @see ComponentResourcesCommon#getCompleteId() */ Component getComponent(String componentId); ... } calling getComponent(..) one may expect IllegalArgumentException be thrown if component cannot be found. However, the exception being thrown instead is TapestryException which obviously wasn't in my catch block so I got the error page. The simple fix of catching TapestryException handled the issue properly, but I'm wondering if ComponentSourceImpl should catch TapestryException and rethrow it as IllegalArgumentException, or should the interface have TapestryException in its @throws. I traced code in debugger and TapestryException is throwed from: PropBinding.get Tapestry 5.0.11 -adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] component is not Datefield format for dd / mm / yyyy?
Is there any way of using old calendar or (better) is there any component similar to this one but with more features (localisation, data formatting, etc.)? Regards -- Tomasz Dziurko - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: T5 and EJB3
Hi Geoff, I am not able to build the t5-jumpstart, the get-dependency target stop at http://213.160.23.119:8080/t5components/maven-repository/org/apache/tapestry/t5c-commons/0.5.11/t5c-commons-0.5.11.jar Any help ? CG On Thu, Apr 24, 2008 at 10:37 PM, Geoff Callender [EMAIL PROTECTED] wrote: CG, Sorry, no max version for T5 yet. At the moment min is gradually mutating toward max with each release, but a full max version won't exist for quite a while yet. Regarding authentication and authorisation, I'm investigating jSecurity and when I'm happy with it I'll release a min version that includes roles and user-roles done properly, but I think that's at least a few weeks away. Cheers, Geoff On 24/04/2008, at 10:06 PM, CG wrote: Hi Geoff, Thanks for your link. It could serve as a good start for me. I just wonder , is there a max-package for T5 ? I only saw min package for T5, and I am very interested in the max package feature like authorization, role-user etc. thx On Wed, Apr 23, 2008 at 6:36 AM, Geoff Callender [EMAIL PROTECTED] wrote: Have a look at JumpStart. http://files.doublenegative.com.au/jumpstart/ It injects a business services locator rather than the proxies, but it's pretty resilient. If you develop improvements then please contribute them back for everyone. Cheers, Geoff On 22/04/2008, at 12:48 AM, CG wrote: Hi all, I am a newbie in Java Web Application programming. I am now plan to use Tapestry 5 + EJB3 to write a web application. After googling , I found that T4 does not support EJB3 due to Hivemind's EJBProxyFactory service does not support EJB3 . Therefore, I try to search again in Google for EJB3 support in T5. I found an old mail(2006) in this mailing list which stated that T5 may wrap the EJBProxyFactory as a workaround. I do try to find whether the new Hivemind already supported EJB3 or not but no luck , I can't find any useful info. I am totally new to Hivemind or Tapestry, I would like to know whether T5 already support EJB3 or not , if yes, is there any example that can I refer , to learn how to get my stateless bean and stateful bean work in Tapestry UI. Any guidance is appreciated. Thanks. CG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 答复: Strange return for grid component
This looks like an ArrayOutOfBoundsException, but without the stack trace we cannot see where is the error... try to set the production mode to false adding the line below to the contributeApplicationDefaults() method in your AppModule, and then paste the error page here. configuration.add(tapestry.production-mode, false); 2008/4/24 滕训华 [EMAIL PROTECTED]: Yes,I think you are right,follow is the relate source files === CustomerList.tml t:pagelayout t:pageTitle=${message:label_pageTitle} xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head /head body t:form t:id=customerListForm table tr td align=left ${message:label_searchTitle}:input type=text t:type=TextField t:value=searchKey / input type=submit t:type=Submit t:id=button_search value=${message:button_Search} / /td /tr tr td t:grid t:source=allCustomers rowsPerPage=5 pagerPosition=bottom exclude=CustomerCode,customerDestCode,controlSaleDept,controlSale reorder=customerName,customerTel,customerLocation,customerPost/ /td /tr /table /t:form /body /t:pagelayout == CustomerList.java=== package com.sacf.viewlayer.web.pages.securePage; import com.sacf.servicelayer.iface.*; import org.apache.tapestry.ioc.annotations.Inject; import org.apache.tapestry.annotations.Service; import com.sacf.domain.model.CustomerInfo; import java.util.List; public class CustomerList { private String searchKey; public void setSearchKey(String searchKey){ this.searchKey=searchKey; } public String getSearchKey(){ return searchKey; } @Inject @Service(customerManager) private CustomerManager customerManager; public ListCustomerInfo getAllCustomers(){ System.out.println(you input the key is:+searchKey); if(searchKey==null||searchKey.equals() ){ return customerManager.getCustomers(); } else{ return customerManager.search(searchKey); } } } ===CustomerManagerImpl.java== package com.sacf.servicelayer.impl; import java.util.List; import com.sacf.domain.model.CustomerInfo; import com.sacf.servicelayer.iface.CustomerManager; import com.sacf.domain.dao.CustomerDao; public class CustomerManagerImpl implements CustomerManager { private CustomerDao customerDao; public void setCustomerDao(CustomerDao customerDao){ this.customerDao=customerDao; } public void deleteCustomer(CustomerInfo custObj) { customerDao.deleteCustomer(custObj); } public ListCustomerInfo getCustomers() { return customerDao.getCustomerList(); } public void saveCustomer(CustomerInfo custObj) { customerDao.saveorupdateCustomer(custObj); } public ListCustomerInfo search(String searchKey) { return customerDao.search(searchKey); } } =CustomerDaoImpl.java= package com.sacf.domain.dao.hibernate; import java.util.List; import com.sacf.domain.dao.CustomerDao; import com.sacf.domain.model.CustomerInfo; import org.hibernate.Session; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import org.hibernate.Query; import org.springframework.dao.DataAccessException; public class CustomerDaoImpl extends HibernateDaoSupport implements CustomerDao { public void deleteCustomer(CustomerInfo customerObj) { try{ Session session=getHibernateTemplate().getSessionFactory().openSession(); session.delete(customerObj); } catch(DataAccessException e){ e.printStackTrace(); } } public ListCustomerInfo getCustomerList() { try{ Session session=getHibernateTemplate().getSessionFactory().openSession(); Query query=session.createQuery(from CustomerInfo); return query.list(); } catch(DataAccessException e){ return null; } } public void saveorupdateCustomer(CustomerInfo cust) { getHibernateTemplate().save(cust); } public ListCustomerInfo search(String searchKey) { try{ Session
Re: T5: T5 and EJB3
server address has changed to 87.193.218.134 2008/4/25, CG [EMAIL PROTECTED]: Hi Geoff, I am not able to build the t5-jumpstart, the get-dependency target stop at http://213.160.23.119:8080/t5components/maven-repository/org/apache/tapestry/t5c-commons/0.5.11/t5c-commons-0.5.11.jar Any help ? CG On Thu, Apr 24, 2008 at 10:37 PM, Geoff Callender [EMAIL PROTECTED] wrote: CG, Sorry, no max version for T5 yet. At the moment min is gradually mutating toward max with each release, but a full max version won't exist for quite a while yet. Regarding authentication and authorisation, I'm investigating jSecurity and when I'm happy with it I'll release a min version that includes roles and user-roles done properly, but I think that's at least a few weeks away. Cheers, Geoff On 24/04/2008, at 10:06 PM, CG wrote: Hi Geoff, Thanks for your link. It could serve as a good start for me. I just wonder , is there a max-package for T5 ? I only saw min package for T5, and I am very interested in the max package feature like authorization, role-user etc. thx On Wed, Apr 23, 2008 at 6:36 AM, Geoff Callender [EMAIL PROTECTED] wrote: Have a look at JumpStart. http://files.doublenegative.com.au/jumpstart/ It injects a business services locator rather than the proxies, but it's pretty resilient. If you develop improvements then please contribute them back for everyone. Cheers, Geoff On 22/04/2008, at 12:48 AM, CG wrote: Hi all, I am a newbie in Java Web Application programming. I am now plan to use Tapestry 5 + EJB3 to write a web application. After googling , I found that T4 does not support EJB3 due to Hivemind's EJBProxyFactory service does not support EJB3 . Therefore, I try to search again in Google for EJB3 support in T5. I found an old mail(2006) in this mailing list which stated that T5 may wrap the EJBProxyFactory as a workaround. I do try to find whether the new Hivemind already supported EJB3 or not but no luck , I can't find any useful info. I am totally new to Hivemind or Tapestry, I would like to know whether T5 already support EJB3 or not , if yes, is there any example that can I refer , to learn how to get my stateless bean and stateful bean work in Tapestry UI. Any guidance is appreciated. Thanks. CG - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- with regards Sven Homburg http://tapestry5-components.googlecode.com
Re: [T5] component is not Datefield format for dd / mm / yyyy?
There is an issue regarding this https://issues.apache.org/jira/browse/TAPESTRY-2304 let's vote and pray to get this resolved soon! =) 2008/4/25 Tomasz Dziurko [EMAIL PROTECTED]: Is there any way of using old calendar or (better) is there any component similar to this one but with more features (localisation, data formatting, etc.)? Regards -- Tomasz Dziurko - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Atenciosamente, Marcelo Lotif
T5 - how to have every request have one jpa 'session'
Hi, We're about to use JPA in our T5 application. Does someone have some good pointers for us how to introduce 'session-per-request' functionality for that combo. Basically what I want is to introduce a fresh EntityManager at the start of T5's request and commit (or rollback) at the end of it. Obviously from within our pages/services we need to get access to the EntityManager instance as well. Thx, -J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 - how to have every request have one jpa 'session'
Jan, The tapestry-hibernate module does exactly that: http://tapestry.apache.org/tapestry5/tapestry-hibernate/index.html Even if you don't use that module (or even hibernate), the source will show you everything you need. chris Jan Vissers wrote: Hi, We're about to use JPA in our T5 application. Does someone have some good pointers for us how to introduce 'session-per-request' functionality for that combo. Basically what I want is to introduce a fresh EntityManager at the start of T5's request and commit (or rollback) at the end of it. Obviously from within our pages/services we need to get access to the EntityManager instance as well. Thx, -J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- http://thegodcode.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Use of Servlet spec declarative security and a login page not using the j_security_check form action
The Wiki includes three very interesting articles describing how to create an AccessController dispatcher whith Tapestry 5. For authentication and access control aspects, we rather consider in using : the Servlet spec declarative security an application login page not using the j_security_check form action, but for example the JAAS API for authentication. Has anyone already done that ? Does anyone see problems with this approach ? Any feedback is welcome. Thanks in advance. Regards
Re: [T5] component is not Datefield format for dd / mm / yyyy?
And https://issues.apache.org/jira/browse/TAPESTRY-2198 On 25/04/2008, at 10:35 PM, Marcelo Lotif wrote: There is an issue regarding this https://issues.apache.org/jira/browse/TAPESTRY-2304 let's vote and pray to get this resolved soon! =) 2008/4/25 Tomasz Dziurko [EMAIL PROTECTED]: Is there any way of using old calendar or (better) is there any component similar to this one but with more features (localisation, data formatting, etc.)? Regards -- Tomasz Dziurko - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Atenciosamente, Marcelo Lotif - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Select component + onchange()
It seems to me that Zones would make it very simple. Perhaps you would like to vote for this issue: Add Zone parameter to Select component https://issues.apache.org/jira/browse/TAPESTRY-2361 Cheers, Geoff http://files.doublenegative.com.au/jumpstart/ On 25/04/2008, at 12:04 AM, Marcelo Lotif wrote: Yeah, i know this, but none of these responses suit to my needs (maybe a Page response, but this will force a reload)... i tried to return a block with the part of the code that i was trying to change, but i had no success And i don't have the enough knowledge of the JSON api and javascript... So i'm using the onchange='this.form.submit()'... =) 2008/4/24 Sven Homburg [EMAIL PROTECTED]: the JSONObject/JSONArray response too 2008/4/24, Sven Homburg [EMAIL PROTECTED]: the return type is not limited to StreamResponse. all you can respond all that tapestry allowes here http://tapestry.apache.org/tapestry5/tapestry-core/guide/ pagenav.html its up to you 2008/4/24, Marcelo Lotif [EMAIL PROTECTED]: I had the same issue as Leon some days ago (and this seems to be a very common issue), and i tried your component. It's very good, with some ajax, but the return type is a little bit limited for what i was trying to achieve(update a combo with information from another combo, which has your mixin). The only way to do it was hardcoding the select in my java(or javascript, whatever), that was too creepy for me. My questions: 1 - Is there any way of change my page data with something more elaborate than TextStreamResponse? 1 - Is there any efforts on adding some similar behavior to future releases? Thank you! 2008/4/24 Sven Homburg [EMAIL PROTECTED]: try this http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html 2008/4/24, Leon Derks [EMAIL PROTECTED]: Hello Is it possible to catch the onChange event from a select component in the java page? I would expect something like: onChangeFromSelect(long id) {} Because I want to update information on my page, based on the value that is selected. How can I do that? Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- with regards Sven Homburg http://tapestry5-components.googlecode.com -- Atenciosamente, Marcelo Lotif -- with regards Sven Homburg http://tapestry5-components.googlecode.com -- with regards Sven Homburg http://tapestry5-components.googlecode.com -- Atenciosamente, Marcelo Lotif
Re: T5: Select component + onchange()
hmmm, I thought about it earlier, but i did not search for a JIRA... this would be really nice! and nice piece of code Sven, I'll try to get this working and take off the workaround with submit... 2008/4/25 Geoff Callender [EMAIL PROTECTED]: It seems to me that Zones would make it very simple. Perhaps you would like to vote for this issue: Add Zone parameter to Select component https://issues.apache.org/jira/browse/TAPESTRY-2361 Cheers, Geoff http://files.doublenegative.com.au/jumpstart/ On 25/04/2008, at 12:04 AM, Marcelo Lotif wrote: Yeah, i know this, but none of these responses suit to my needs (maybe a Page response, but this will force a reload)... i tried to return a block with the part of the code that i was trying to change, but i had no success And i don't have the enough knowledge of the JSON api and javascript... So i'm using the onchange='this.form.submit()'... =) 2008/4/24 Sven Homburg [EMAIL PROTECTED]: the JSONObject/JSONArray response too 2008/4/24, Sven Homburg [EMAIL PROTECTED]: the return type is not limited to StreamResponse. all you can respond all that tapestry allowes here http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html its up to you 2008/4/24, Marcelo Lotif [EMAIL PROTECTED]: I had the same issue as Leon some days ago (and this seems to be a very common issue), and i tried your component. It's very good, with some ajax, but the return type is a little bit limited for what i was trying to achieve(update a combo with information from another combo, which has your mixin). The only way to do it was hardcoding the select in my java(or javascript, whatever), that was too creepy for me. My questions: 1 - Is there any way of change my page data with something more elaborate than TextStreamResponse? 1 - Is there any efforts on adding some similar behavior to future releases? Thank you! 2008/4/24 Sven Homburg [EMAIL PROTECTED]: try this http://87.193.218.134:8080/t5components/t5c-commons/ref/org/apache/tapestry/commons/mixins/OnEvent.html 2008/4/24, Leon Derks [EMAIL PROTECTED]: Hello Is it possible to catch the onChange event from a select component in the java page? I would expect something like: onChangeFromSelect(long id) {} Because I want to update information on my page, based on the value that is selected. How can I do that? Leon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- with regards Sven Homburg http://tapestry5-components.googlecode.com -- Atenciosamente, Marcelo Lotif -- with regards Sven Homburg http://tapestry5-components.googlecode.com -- with regards Sven Homburg http://tapestry5-components.googlecode.com -- Atenciosamente, Marcelo Lotif -- Atenciosamente, Marcelo Lotif
accessing core services
Hi, sorry for the newbie question again, but what is the canonic or suggested way to access core services or facilities of the T5? I mean, from classes, into which nothing gets injected (say, I'm writing a dispatcher, where I'd like to resolve page names, component names). I'd like to have a ComponentClassResolver for instance. Is that possible? (I hope so :)) thx cu janos
Re: accessing core services
You define your dispatcher as a service (with a build method) in your IoC module and pass the services that you need injected into the constructor. See: http://tapestry.apache.org/tapestry5/tapestry-ioc/service.html Peter Beshai On Fri, Apr 25, 2008 at 1:49 PM, János Jarecsni [EMAIL PROTECTED] wrote: Hi, sorry for the newbie question again, but what is the canonic or suggested way to access core services or facilities of the T5? I mean, from classes, into which nothing gets injected (say, I'm writing a dispatcher, where I'd like to resolve page names, component names). I'd like to have a ComponentClassResolver for instance. Is that possible? (I hope so :)) thx cu janos
Re: accessing core services
i hope it helps you: put this code into your ApplicationModule public static buildMyDispachter(ComponentClassResolver resolver) { return MyDispatcher(resolver); } 2008/4/25, János Jarecsni [EMAIL PROTECTED]: Hi, sorry for the newbie question again, but what is the canonic or suggested way to access core services or facilities of the T5? I mean, from classes, into which nothing gets injected (say, I'm writing a dispatcher, where I'd like to resolve page names, component names). I'd like to have a ComponentClassResolver for instance. Is that possible? (I hope so :)) thx cu janos -- with regards Sven Homburg http://tapestry5-components.googlecode.com
Re: accessing core services
Hi, thx for the quick replies first of all, here is how I'm doing it now: public void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(MyDispatcher) Dispatcher myDispatcher) { configuration.add(MyDispatcher, myDispatcher, before:RootPath); } and public static void bind(ServiceBinder binder) { binder.bind(MyDispatcher.class).withId(MyDispatcher); } Isn't it ok? thx again! janos 2008/4/25 Sven Homburg [EMAIL PROTECTED]: i hope it helps you: put this code into your ApplicationModule public static buildMyDispachter(ComponentClassResolver resolver) { return MyDispatcher(resolver); } 2008/4/25, János Jarecsni [EMAIL PROTECTED]: Hi, sorry for the newbie question again, but what is the canonic or suggested way to access core services or facilities of the T5? I mean, from classes, into which nothing gets injected (say, I'm writing a dispatcher, where I'd like to resolve page names, component names). I'd like to have a ComponentClassResolver for instance. Is that possible? (I hope so :)) thx cu janos -- with regards Sven Homburg http://tapestry5-components.googlecode.com
T5 Running Jetty, log4j jar, FAQ
I've been using Netbeans but I'm now trying to run T5 out of IntelliJ IDEA 7.0.3. I decided to try to use the Jetty, ie, jetty:run-war from mavel - the target that Tapestry provides. When I do this I get java.lang.NoSuchMethodError: org.apache.log4j.Logger.isTraceEnabled when I try to run my app. I search on this and find the FAQ: http://tapestry.apache.org/tapestry5/faq/general.html This suggests I need to add log4j 1.2.14 to Jetty/lib/ext or something along those lines, but it seems that it is using Maven's Jetty, not the Jetty I have installed on my system elsewhere. This appears to be an issue, as I am a super Maven-noob. I found my Maven repository but don't see any log4j's in there that aren't 1.2.14. I sure don't see a Maven ext directory anywhere. I am just feeling completely lost as to where to look. Maybe this should be an extension to the FAQ or am I just being silly about something? -- View this message in context: http://www.nabble.com/T5-Running-Jetty%2C-log4j-jar%2C-FAQ-tp16902110p16902110.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: accessing core services
Yeah that looks ok (at a glance). These wikis should help you: http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher http://wiki.apache.org/tapestry/Tapestry5HowToCreateADispatcher2 http://wiki.apache.org/tapestry/Tapestry5HowToControlAccess They relate directly to what it seems like you are doing. good luck chris János Jarecsni wrote: Hi, thx for the quick replies first of all, here is how I'm doing it now: public void contributeMasterDispatcher(OrderedConfigurationDispatcher configuration, @InjectService(MyDispatcher) Dispatcher myDispatcher) { configuration.add(MyDispatcher, myDispatcher, before:RootPath); } and public static void bind(ServiceBinder binder) { binder.bind(MyDispatcher.class).withId(MyDispatcher); } Isn't it ok? thx again! janos 2008/4/25 Sven Homburg [EMAIL PROTECTED]: i hope it helps you: put this code into your ApplicationModule public static buildMyDispachter(ComponentClassResolver resolver) { return MyDispatcher(resolver); } 2008/4/25, János Jarecsni [EMAIL PROTECTED]: Hi, sorry for the newbie question again, but what is the canonic or suggested way to access core services or facilities of the T5? I mean, from classes, into which nothing gets injected (say, I'm writing a dispatcher, where I'd like to resolve page names, component names). I'd like to have a ComponentClassResolver for instance. Is that possible? (I hope so :)) thx cu janos -- with regards Sven Homburg http://tapestry5-components.googlecode.com -- http://thegodcode.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5.0.11 help in update my own components
Take a look at http://www.nabble.com/T5%3A-Select-component-%2B-onchange%28%29-to16876151.html 2008/4/24 孟凡振 [EMAIL PROTECTED]: Thank u for ur warm answer,your suggestion give me some idea indeed. but I want to code something special. first, a select(A) is rendered for ready,when a onchange event is activated,there will be another select(B) which is a children set of some value in select(A) is rendered...and it is in the same way when select(B)'s onchange envent is trigerd .select(C)... some structure in my table is: id name pid 0 a1 0|1b1 0 0|2b2 0 0|1|3 c1 0|1 0|3b3 0 0|2|1 c2 0|2 I have no idea do I describe my problem in detail.but I have tryed my best. thank u very much!! -- View this message in context: http://www.nabble.com/t5.0.11-help-in-update-my-own-components-tp16836395p16880136.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] -- Atenciosamente, Marcelo Lotif
T5: How can I initialize a logged-in user ASO from tapestry5-acegi?
I'm using tapestry5-acegi for authentication. I'd like to use @ApplicationState to make the logged-in user object accessible in my pages, e.g. @ApplicationState private User user; Somewhere, however, I must initialize my ASO variable when the user logs in. Where can I do this? The only place I have thought of is in my UserDetailsServiceImpl.loadUserByUsername method, which Acegi calls during login. I tried injecting the ApplicationStateManager into UserDetailsServiceImpl and calling asoManager.set(User.class, user) from loadUserByUsername, but that throws an exception. Note that I cannot do it in my Login page class, because that submits to something internal to Acegi; I do not get access to the logged-in user there. Surely someone out there has done this already. Any help greatly appreciated. Even better, please add the solution to the tapestry5-acegi documentation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creating components - best practices
Hi, I've been migrating some of my T4 components to T5, but now - also triggered by some useful feedback on this mailing list - are wondering whether I've been using the right approach. Let me start by saying that my components are fairly simple, the visible part is all made up from .tml (no programmatic render processing going on). I think it is best to share with you, one component that is built in a way that is typical for the way I've been doing stuff up until now. This is a customized 'feedback' component, which allows me to easily add feedback information from any page to a flash persisted property, for one time only display. For instance - after some action it would say: 'Import has been accepted and started'. Now the way I'm able to easily add feedback info is to have a basepage class hold on to a collection of entries and have some utility addFeedback() methods on that class. Each concrete page then can use these methods to add their stuff. I'm starting to think that this isn't the nicest approach, since pages that need this way of feedback functionality now have to subclass a basepage class. Another thing I have that some of my components need access to this basepage's properties - so I inject that page into the component. My main questions are: a) although this approach works - isn't it better to try and have each component stand on itself? b) if so - what would be the best way to have functionality like depicted above (regarding feedback) in order for each page to easily allow adding feedback information? Looks to me that the collection holding feedback entries should be as close - preferably within - the same code as the component itself. Let me know what you think. -J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: ajax component ids with namespaces
After fiddling with protoype the $$ coupled with the !^ selector seems to work. I'm including some custom helper code to accomplish getting an element by id without regard to the tapestry id namespace. If this is/was obvious or there is better solution, I apologize but hopefully this will be helpful to others. // gets the first element where the id begins with the 'id_starts_with' argument. function $G(id_starts_with) { return( $G_(id_starts_with)[0] ); } // gets all elements where their id's begin with the 'id_starts_with' argument. function $G_(id_starts_with) { return( $$([id^='+id_starts_with+']) ); } to get access to this T5 namespaced node : form id=foo:1234 / call $G('foo') cheers, B -- View this message in context: http://www.nabble.com/T5%3A-ajax-component-ids-with-namespaces-tp16826268p16908236.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: Getting Request Info
Dear all, There is a generic Request component in T5, but it hasn't got some method in HttpServletRequest such as: getRemoteUser() . I wanted to get the user that access the apps. How do I do this in T5? Could anyone give me an insights on this? Thanks in advance -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Getting Request Info
Never mind, I made a workaround as such: @Inject private RequestGlobals requestGlobals; private HttpServletRequest request = requestGlobals.getHTTPServletRequest(); Cheers, On 4/26/08, Joshua Jackson [EMAIL PROTECTED] wrote: Dear all, There is a generic Request component in T5, but it hasn't got some method in HttpServletRequest such as: getRemoteUser() . I wanted to get the user that access the apps. How do I do this in T5? Could anyone give me an insights on this? Thanks in advance -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.com/ -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Getting Request Info
You can also just inject the HttpServletRequest. It is a shadow of the request in the RequestGlobals object. On Fri, Apr 25, 2008 at 8:10 PM, Joshua Jackson [EMAIL PROTECTED] wrote: Never mind, I made a workaround as such: @Inject private RequestGlobals requestGlobals; private HttpServletRequest request = requestGlobals.getHTTPServletRequest(); Cheers, On 4/26/08, Joshua Jackson [EMAIL PROTECTED] wrote: Dear all, There is a generic Request component in T5, but it hasn't got some method in HttpServletRequest such as: getRemoteUser() . I wanted to get the user that access the apps. How do I do this in T5? Could anyone give me an insights on this? Thanks in advance -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.com/ -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.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]
RE: T5: How can I initialize a logged-in user ASO from tapestry5-acegi?
There was a thread a month or so ago that I participated in that covered doing authentication within a login page class. Take a look at: http://thread.gmane.org/gmane.comp.java.tapestry.user/59931/ There was an important part cut off from the code I posted that wound up in another thread: http://article.gmane.org/gmane.comp.java.tapestry.user/60045 Jonathan -Original Message- From: Franz Amador [mailto:[EMAIL PROTECTED] Sent: Friday, April 25, 2008 6:49 PM To: users@tapestry.apache.org Subject: T5: How can I initialize a logged-in user ASO from tapestry5- acegi? I'm using tapestry5-acegi for authentication. I'd like to use @ApplicationState to make the logged-in user object accessible in my pages, e.g. @ApplicationState private User user; Somewhere, however, I must initialize my ASO variable when the user logs in. Where can I do this? The only place I have thought of is in my UserDetailsServiceImpl.loadUserByUsername method, which Acegi calls during login. I tried injecting the ApplicationStateManager into UserDetailsServiceImpl and calling asoManager.set(User.class, user) from loadUserByUsername, but that throws an exception. Note that I cannot do it in my Login page class, because that submits to something internal to Acegi; I do not get access to the logged-in user there. Surely someone out there has done this already. Any help greatly appreciated. Even better, please add the solution to the tapestry5-acegi documentation. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Getting Request Info
On 4/26/08, Howard Lewis Ship [EMAIL PROTECTED] wrote: You can also just inject the HttpServletRequest. It is a shadow of the request in the RequestGlobals object. Wow I didn't know that :) Great. Thanks Howard. -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Display Zone after form Submission?
Dear all, Is it possible to display a zone after form submission? How do I do this? Or does zone only applicable for link? Thanks in advance -- Let's show the world what we've got. Blog: http://joshuajava.wordpress.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]