Re: [T5] Layout component: resolving unclarities
Hi, t:body/ is the actual content of your page, and the layout component is just a wrapper. This link would probably help you better understand: http://wiki.apache.org/tapestry/Tapestry5Layoutcomponent /Serge aldana wrote: Hi, I had a look how to template things (header, footer, navigation) at http://tapestry.apache.org/tapestry5/guide/layout.html. -What is the magic about the t:body/ inclusion? This tag is a bit unclear to me. How does Layout.tml connect to the Start.tml as the t:body/ tag in the example? -How would I include another dynamic site part, like navigation bar on the left side (would be another .tml template)? All examples I have seen only play with one layout injection (main page content). thanks. -- manuel aldana ald...@gmx.de software-engineering blog: http://www.aldana-online.de - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org - manuel aldana aldana((at))gmx.de software-engineering blog: http://www.aldana-online.de -- View this message in context: http://www.nabble.com/-T5--Layout-component%3A-resolving-unclarities-tp21574666p21574839.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: BeanEditForm Screencast
Hi, You are mixing Tapestry 5 and Tapestry 4. From the snippet below, here are a few problems: - The templates in T5 have a .tml as extension - There is no spec file. - Your packages are incorrect (should be .pages) - Pages are not abstract - The BasePage you are extending doesn't exist in T5 BTW, Spindle doesn't work for T5. I would suggest you go through the tapestry 5 notes first and tutorial #1. Then, focus on the BeanEditForm component. For Tapestry 5, There is a dedicated guide here: http://tapestry.apache.org/tapestry5/guide/beaneditform.html And there is an example in the component reference: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/BeanEditForm.html /Serge hemen wrote: Hi, I am new to Tapestry. I have made two or more demo application for tapestry5. in Tomcat5.5 and eclipse plugin splindle and the greatest help of the ScreenCast of Howard (http://tapestry.apache.org/tapestry5/screencast.html)... But in the 4th screencast for the beaneditForm it will not display any thing on the page.. i.e. there is no component display on the form page... as i have written form t:type=beaneditform Object=registration / in Home.html actually i cant found, what is missing ? CODE: Home.html html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; xmlns:p=tapestry:parameter head /head body form t:type=beaneditform Object=registration / /body /html CODE:Home.java package com.hemen.page; import org.apache.tapestry.html.BasePage; import org.apache.tapestry5.annotations.ApplicationState; import com.hemen.data.Registration; public abstract class Home extends BasePage { @ApplicationState private Registration registration; public Registration getRegistration(){ return registration; } public void setRegistration(Registration registration) { this.registration = registration; } } CODE Home.page ?xml version=1.0 encoding=UTF-8? !DOCTYPE page-specification PUBLIC -//Apache Software Foundation//Tapestry Specification 3.0//EN http://jakarta.apache.org/tapestry/dtd/Tapestry_3_0.dtd; !-- generated by Spindle, http://spindle.sourceforge.net -- page-specification class=com.hemen.page.Home /page-specification So suggest me... And also suggest about some useful tutorial with example As all the books are paid (No Free ebooks are available for tapestry though its opensource) -- View this message in context: http://www.nabble.com/BeanEditForm-Screencast-tp21156843p21156850.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: how to make a module that is available to two t5 apps?
Hi, This can help: http://tapestry.apache.org/tapestry5/cookbook/lib.html /Serge Angelo Chen wrote: Hi, I have a project similar to this: 1) T5 web app 2) T5 IOC only app This has been working quite nicely, now I need to have some classes/services which should be used by #1 and #2, that means I need another module that can be compiled into jar file that #1 and #2 can call, any idea how to achieve this? Thanks. Angelo -- View this message in context: http://www.nabble.com/T5%3A-how-to-make-a-module-that-is-available-to-two-t5-apps--tp21129534p21129584.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: Tapestry 5 with Spring Security - problem with unit tests.
Hi, This seems to be related to this thread: http://www.nabble.com/PageLinkTarget%2C-where-did-it-go--to21022001.html#a21022001 /Serge Michał Jedynak wrote: Hi there, I've integrated spring security to my sample tapestry5 application (I'm using version 5.0.18) based on tapestry-spring-security (http://www.localhost.nu/java/tapestry-spring-security), but now my unit tests that use PageTester don't work, because there is no Authentication object in SecurityContext. I thought about creating SecurityContext, something like: SecurityContext securityContext = new SecurityContextImpl(); User user = new User(); user.setId(1L); user.setUsername(user); user.setPassword(password); UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken( user.getUsername(), user.getPassword(), user.getAuthorities()); token.setDetails(user); securityContext.setAuthentication(token); and adding it to the rendered page through PageTester, as it is described in http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html: PageTester tester = new PageTester(appPackage, appName, src/main/webapp); Object[] context = new Object[]{ abc, 123 }; Document doc = tester.invoke(new ComponentInvocation(new PageLinkTarget(MyPage), context)); However this doesn't work, ComponentInvocation is an interface and I don't know how to initialize properly ComponentInvocationImpl. Anyone care to help? -- Michał Jedynak -- View this message in context: http://www.nabble.com/Tapestry-5-with-Spring-Security---problem-with-unit-tests.-tp21126486p21129652.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: integrating T5 a login form with Spring Security?
Hi, Take a look at the Login page in tapestry5-appfuse project here: http://code.google.com/p/tapestry5-appfuse There is an example of direct integration between T5 and Spring Security 2. /Serge Jean Luc wrote: Update: I can get the response with: @Inject private RequestGlobals requestGlobals; and using requestGlobals.getHTTPServletResponse(); I'll need to change the redirect into a forward (to save a trip and to prevent the username/pwd appear in the URL) but that's standard servlet stuff. Thanks. On Sun, Dec 14, 2008 at 8:05 PM, Jean Luc jeanluc2...@gmail.com wrote: Thanks Hugo, I've [tried to] inject the request and the response as mentioned (for the request) at: http://wiki.apache.org/tapestry/Tapestry5ObtainingHttpServletRequest @Inject private HttpServletRequest request; @Inject private HttpServletResponse response; It works for the request, but not for the response (exception below). I've googled for ways to inject the response (I thought it would be similar) but no luck. exception org.apache.tapestry5.internal.services.TransformationException: Error obtaining injected value for field com.foo.tapestry.pages.Login.response: No service implements the interface javax.servlet.http.HttpServletResponse. # org.apache.tapestry5.internal.services.TransformationException Error obtaining injected value for field com.foo.tapestry.pages.Login.response: No service implements the interface javax.servlet.http.HttpServletResponse. In case it matters, I'm using T 5.0.18 and JBoss 4.2.2GA Thanks in advance, JL On Sun, Dec 14, 2008 at 7:44 PM, Hugo Palma hugo.m.pa...@gmail.com wrote: In your page class inject the check url like this: @Inject @Value(${spring-security.check.url}) private String checkUrl; then on your onSuccessMethod: response.sendRedirect(request.getContextPath() + checkUrl + ?j_username= + username + j_password= + password); where username and password are the bound variables for your username and password text fields on the form. Jean Luc wrote: Hello, I've been trying to integrate T5 and Spring Security (2.0.4, not the older Acegi) but haven't succeeded in making the two work together. The standard way to specify a form login with Spring 2.5 is like below. See the form-login element which specified the login page (Login) and what URL Spring will intercept (the standard j_security_check). b:beans xmlns=http://www.springframework.org/schema/security; http form-login login-page=/Login default-target-url=/Start authentication-failure-url=/Login?login_error=1 login-processing-url=j_security_check / /http I have a typical Login.tml (labels and cosmetic stuff removed for brevity) t:form t:id=loginForm tabletrtdinput type=text t:id=j_username t:type=TextField t:value=j_username//td/tr trtdinput type=text t:id=j_password t:type=PasswordField t:value=j_password//td/tr trinput type=submit value=Log In//td /tr /table /t:form What happens is that the POST that occurs when submitting the form goes to the Login.onSubmit() instead of j_security_check. While it is possible to add code there to call Spring's AuthenticationManager, I would end up duplicating what Spring Security does (the logic to redirect to different pages if the login succeeded or not and so on). I'd like to use Spring since it already implements this. Is it possible to submit the login info to j_security_check instead? Or to forward the request from within Login.onSubmit() to /j_security_check? I went through the Tapestry 5 book by Alexander Kolesnikov, but didn't find this info. Also, I am aware of the tapestry5-acegi extension ( http://www.localhost.nu/java/tapestry5-acegi/) but this one seems under development and for such a simple thing I didn't want to add a dependency on another jar. As you can tell, I'm new to T5. I've had some exposure to T4 and an older version of Spring (2.0) but there things were quite different, both in Tapestry itself and in how Acegi is configured in Spring. Advice is appreciated, JL - 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 -- View this message in context: http://www.nabble.com/integrating-T5-a-login-form-with-Spring-Security--tp21006586p21012513.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:
Re: BeanEditForm Component in Tapestry 5
The issue here is described in this bug: https://issues.apache.org/jira/browse/TAP5-414 /Serge nille hammer wrote: Sorry I messed up the code example corrected version: public class Persion { ... @Id @GeneratedValue(strategy = GenerationType.AUTO) @NonVisual //-- that excludes this member from the generated // BeanModel. This could also be done manually whit exclude. // (see BeanModel for further information. public Person getId() { return person; } ... } nillehammer schrieb: With BeanEditForm Person need not be instanciated in onActivate. That is done automagically by the component itself. The Exception surely refers to the id. Id being the only number in your Person class. Although I do not know, why that would be a problem for Tapestry, you surely would not want the user to edit the database id. So try the following. You might get rid of your problem with that: public class Persion { ... @NonVisual //-- that excludes this member from the generated // BeanModel. This could also be done manually whit exclude. // (see BeanModel for further information. public Person getPerson() { return person; } ... } Otho schrieb: You obviously left out some things for brevity, but I can't see Person anywhere instantiated? public class PersonForm { @Persist @Property //no need for accessors private Person person; Object onActivate() { if(person==null) person = new Person(); return null; } Object onSuccessFromPersonEditor() { return null; } } And you also seem to not have an id for the beaneditform. with the above code that would be: t:beaneditform t:id=personEditor t:object=person/ Regards, Otho 2008/12/11 mraible m...@raibledesigns.com I'm working on a simple CRUD example for Tapestry 5 (version 5.0.18) today in order to create the necessary FreeMarker templates for AppFuse's Maven Plugin. Here's my form class: package org.appfuse.webapp.pages; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.ioc.annotations.Inject; import org.appfuse.model.Person; public class PersonForm { @Persist private Person person; public Person getPerson() { return person; } public void setPerson(Person person) { this.person = person; } } My PersonForm.tml: t:layout title=message:personForm.title heading=message:personForm.heading menu=literal:PersonMenu xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; body h1Create New Person/h1 t:beaneditform t:object=person/ /body /t:layout Pretty simple. The Person.java object is as follows: package org.appfuse.model; import javax.persistence.*; @Entity public class Person { private Long id; private String firstName; public void setFirstName(String firstName) { this.firstName = firstName; } public void setId(Long id) { this.id = id; } public void setLastName(String lastName) { this.lastName = lastName; } private String lastName; @Id @GeneratedValue(strategy = GenerationType.AUTO) public Long getId() { return this.id; } @Column(name = first_name, length = 50) public String getFirstName() { return this.firstName; } @Column(name = last_name, length = 50) public String getLastName() { return this.lastName; } public String toString() { return firstName + ' ' + lastName; } } When I access http://localhost:8080/personform, I get the following error: Render queue error in AfterRender[PersonForm:beaneditform.editor.loop]: Failure reading parameter 'validate' of component core/PropertyEditBlocks:numberfield: No object of type org.apache.tapestry5.services.PropertyEditContext is available from the Environment. Available types are org.apache.tapestry5.RenderSupport, org.apache.tapestry5.ValidationDecorator, org.apache.tapestry5.ValidationTracker, org.apache.tapestry5.internal.services.ClientBehaviorSupport, org.apache.tapestry5.internal.services.DocumentLinker, org.apache.tapestry5.services.BeanEditContext, org.apache.tapestry5.services.FormSupport, org.apache.tapestry5.services.Heartbeat. Any ideas? Thanks, Matt -- View this message in context: http://www.nabble.com/BeanEditForm-Component-in-Tapestry-5-tp20964358p20964358.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] Application Message Catalog not read
Hi, I have a sample application supporting multiple languages which doesn't exhibit this behavior: http://code.google.com/p/tapestry5-appfuse/ You may have something else going on. /Serge bbcooper wrote: I found a bug. First entry in properties file is never used. I tried reordering entries and the first entry never gets translated. I used T 5.0.15, 5.0.16 and 5.0.17. This applies not only for application wide catalog but also for page catalogs. I am filing a bug report at https://issues.apache.org/jira/browse/TAP5-409. Regards, Borut 2008/12/4 Howard Lewis Ship [EMAIL PROTECTED] Nothing there has changed; it's still based on the filter name. On Thu, Dec 4, 2008 at 6:02 AM, Stephane Decleire [EMAIL PROTECTED] wrote: Since 5.0.17, my localized messages are not read anymore from the application message catalog. My application message catalog is named backoffice.properties because my filter in web.xml is called backoffice and this file is located in the WEB-INF directory as explained in tapestry localization tutorial (http://tapestry.apache.org/tapestry5/guide/localization.html). I've change nothing since my last tapestry upgrade from 5.0.16-SNAPSHOT and it was working. Has something been modified regarding the application message catalog or the localization process ? I can't find any change in the nightly documentation ... Thanks in advance. Stephane -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-T5--Application-Message-Catalog-not-read-tp20833984p20934027.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]
[ANN] tapestry5-appfuse
Hi, Version 1.0.1 of the tapestry5-appfuse project has been released. It's built with Tapestry 5.0.18 and has several improvements and bug fixes. See details here: http://code.google.com/p/tapestry5-appfuse/ Feedback would be appreciated. /Serge -- View this message in context: http://www.nabble.com/-ANN--tapestry5-appfuse-tp20915072p20915072.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Grid cell labels can't be overridden
Hi, As a workaround, maybe this example could help: http://code.google.com/p/tapestry5-appfuse/source/browse/trunk/src/main/java/org/appfuse/webapp/pages/admin/UserList.java /Serge Andy Pahne-6 wrote: https://issues.apache.org/jira/browse/TAP5-395 Howard Lewis Ship schrieb: BeanModel / BeanModelSource do not do this today, but there's no reason why they should not. Please add a JIRA enhancement issue. On Mon, Dec 1, 2008 at 1:52 PM, Andy Pahne [EMAIL PROTECTED] wrote: I am using T 5.0.17 and trying to override cell labels of the Grid component. I am trying like described here: http://tapestry.formos.com/nightly/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html see section UserList.properties The labels defined in the properties file og my page are not used to label the cells. I searched JIRA but found no related issue. Does anybody have the same problem? Andy TaskList.properties: -- title-label=Titel TaskList.tml -- t:grid t:id=tasks row=task exclude=id reorder=module,title,status,type,resolution add=edit inPlace=true pagerPosition=bottom rowsPerPage=25 t:parameter name=editcell # t:type=PageLink page=administration/task/editTask context=task.idedit /t:parameter /t:grid - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-T5--Grid-cell-labels-can%27t-be-overridden-tp20781389p20784011.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5+Hibernate: Entity class id variables cannot have leading underscores
Hi, This has nothing to do with Tapestry. You have 2 options: 1) Use the @Column annotation on the _id field @Id @GeneratedValue @Column(name=id) private Long _id; 2) Annotate the accessor methods /Serge Bill Holloway wrote: To use the simplified page activation context for a hibernate entity page (e.g., onActivate(Person p)...), it looks like the entity class' primary key id field's name must match VERBATIM the text that follows the word get in the getter (and set in the setter, probably). I.e., this won't work: @Id @GeneratedValue private Long _id; public Long getId() This fails because getId is not named get_id. I normally use underscore prefixes for my instance variables. This is failing in HibernateEntityValueEncoder on this line: propertyAdapter = propertyAccess.getAdapter(this.entityClass).getPropertyAdapter(idPropertyName); It looks for an idPropertyName _id and doesn't find one because according to the getter/setter pattern, the name is id. The propertyAdapter is then null which throws an NPE on line 79: Object id = typeCoercer.coerce(clientValue, propertyAdapter.getType()); Bill in Austin -- Without coding you have no product Without testing, no quality Without refactoring, no future - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%2BHibernate%3A-Entity-class-id-variables-cannot-have-leading-underscores-tp20523653p20527276.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] class reloading for pages, templates, components possible only?
Hi, This is documented here: http://tapestry.apache.org/tapestry5/guide/reload.html /Serge aldana wrote: hi, class reloading works fine for pages, template and components. But it does not work for related class dependencies. For instance when I change the implementation of a Dao I don't see any changes on webapp. Is live class reloading supposed to work with pages/templates/components only or do I need to configure something to enable this for all classes? -- View this message in context: http://www.nabble.com/-T5--class-reloading-for-pages%2C-templates%2C-components-possible-only--tp20527176p20527312.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Combine a form and response in same template/Java class
Hi, You can use a block. Search for examples in the mailing list. /Serge thermus wrote: I currently have a very simple webapp. I have a form and return a pageable grid component based on the form parameters. Right now, I have the form and response as separate tml/Java classes. Everything works fine, but it's getting to be a pain to keep all of these pieces in order (2 templates and 2 Java classes per query x 10 queries). I'd like to combine the form with response so I only have to maintain one tml and one Java class per query. What is the logic I need in my class/template to do this? So far, my attempts have been unsuccessful. I tried to add a Persist boolean and set it to true in the onSuccess method and included an if-else in the template to render the appropriate piece. If I just used @Persist, I couldn't get back to the form to ever load again once it was submitted the first time. If I used @Persist(flash), I could reload the form on demand, but now the grid pager links would take me back to the form (since the boolean would reset to false). Does anyone else combine their forms and response pages? Is this a bad practice? It just seems silly to have to keep track of 4 entities for a simple form/response. Boy do I miss Perl. -- View this message in context: http://www.nabble.com/-T5--Combine-a-form-and-response-in-same-template-Java-class-tp20287170p20293486.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] - How to use a custom resource source, e.g. reading resources from a database instead of .property files
Hi, Please search the list. This has already been answered. Cheers, Serge Ovidiu Hurducas-2 wrote: Greetings! I'm migrating a I18N enabled Tap3 application to Tap5. The current application is using a custom implementation of BaseEngine class (overriding createComponentStringsSource method to use my provided IComponentMessagesSource) to use internationalized resources form a database. The current T5 API has dramatically changed and seems it doesn't have the same mechanism to provide a custom resurce source as T3. There is a similar mecanishm in Tapestry 5? Thanks! -- View this message in context: http://www.nabble.com/-T5How-to-use-a-custom-resource-source%2C-e.g.-reading-resources-from-a-database-instead-of-.property-files-tp19526669p19531418.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: Ideas on transitioning from earlier version to Tapestry 5
Hi, I started documenting this for the migration from T4 to T5. Please refer to the following project: http://code.google.com/p/tapestry5-appfuse/ The code is updated. However, I haven't had a chance to update the steps recently, but this is on my todo list. /Serge Matt Doran-3 wrote: Hi there, PaperCut NG, our commercial print control application uses Tapestry 3 for it's UI layer.It's more of a web application than a typical web-site. We make a heavy use of components, to achieve that application-like feel. Tapestry has been great for us, and has allowed us to build a great web application. I don't think any other framework would have allowed us to build the application we have. Tapestry 3 is starting to show it's age, and we really want to upgrade to Tapesty 5 at some point (T5 looks like an excellent framework). But the only pragmatic way to do it is a gradual transition. It's just not feasible to do the upgrade hundreds of components/pages in one go. So what I'm wondering is if this is something that would be possible with T5. Obviously there's going to be a bit of work, managing session state, handling URLs, etc. And that's fine.Do you guys think handling both T3 and T5 pages/components in the same web application would be feasible? How do you think this integration should be achieved? Could any components/services built within the Tapestry infrastructure/services to simplify this process? I'd think this type of situation would be quite common in the Tapestry community.I'm very keen to hear what the Tapestry experts have to say!! We don't want to stay on T3 forever! ;) PS: I'm a complete T5 noob, but I'm keen to learn the ropes. Regards, Matt Doran == PaperCut Software http://www.papercut.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Ideas-on-transitioning-from-earlier-version-to-Tapestry-5-tp19491540p19531484.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: T5: testing using PageTester and EasyMock
Hi, I had a similar question a few weeks ago and didn't get any response. Can someone else chime in? It would be nice to have real world example in the documentation to showcase TDD features of T5. /Serge Russell Brown-6 wrote: One more related question would be this: in the docs at http://tapestry.apache.org/tapestry5/guide/unit-testing-pages.html you tell the PageTester class the name of your filter so it can load your module. But how can you tell the PageTester to use the Spring filter not the plain tapestry filter? All my services are Spring services so as soon as I try and run a test I get a load of errors about no service realizing interface XXX (which is the type of a field annotated with @Inject). Any ideas on this one either? I'm having quite a hard time testing anything beyond the most rudimentary. I notice that tap core and tap ioc have themselves very high test coverage indeed. Cheers Russell -Original Message- From: Russell Brown [mailto:[EMAIL PROTECTED] Sent: 15 September 2008 17:09 To: Tapestry users Subject: T5: testing using PageTester and EasyMock Hi, Does anyone have any ideas for testing components using mock services? I can create a MyAppMockModule class and use that to configure the page tester. This class builds mocks of my services, so far so good. I use PageTester.getRegistry() and then Registry.getService(MyService.class) and then I have my mock to set up in my test. No? No! I have a proxy wrapped instance instead which I can't use at all. Any ideas out there? How are you testing your components pages when you have expense to construct services with complex external dependencies? Cheers Russell - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-testing-using-PageTester-and-EasyMock-tp19496126p19513126.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 BeanModelSource create Parameters
Hi, Yes, a few changes were introduced in 5.0.14 and are documented here: http://tapestry.apache.org/tapestry5/upgrade.html Use resources.getMessages() instead instead of resource. /Serge moritzgilsdorf-2 wrote: Hi, I'm trying to add an additional column to a grid following this guideline: http://www.infoq.com/articles/tapestry5-intro http://www.infoq.com/articles/tapestry5-intro I have seen in several tutorials that the create Method of BeanModelSource takes a ComponentResources Object as third parameter. When I try to implement this I get complains of my compiler that the third parameter has to be of type org.apache.tapestry5.ioc.Messages. Are the tutorials outdated? I'm using Tapestry 5.0.14. Thanks -- View this message in context: http://n2.nabble.com/T5-BeanModelSource-create-Parameters-tp840998p840998.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5-BeanModelSource-create-Parameters-tp19329560p19341572.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]
[ANN] tapestry5-appfuse
Hi, I've just released an early version of the tapestry5-appfuse project. It is still alpha and the documentation will be finalized in the next few days. It is available via SVN on Google Code at: http://code.google.com/p/tapestry5-appfuse/ Check it out! Feedback would be really appreciated. /Serge -- View this message in context: http://www.nabble.com/-ANN--tapestry5-appfuse-tp19232363p19232363.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 : Let's write a book !
I'll be happy to participate! /Serge Thiago H. de Paula Figueiredo wrote: Em Mon, 25 Aug 2008 18:56:52 -0300, Hugo Palma [EMAIL PROTECTED] escreveu: 2. I definitely think that this would have to be something new. Like you say, they have different purposes and it should be kept that way. +1 4. Like i suggested before, if we could find somewhere to host a Docbook Wiki(http://doc-book.sourceforge.net/homepage/) i think it could work quite well. Even without hosting, hand editing Docbook files isn't that hard and there are tools to help get the job done. What about writing the documentation in pure semantic XHTML and CSS? This way, we can easily have an online and also a printable version. This article suggests one way to do that: http://www.alistapart.com/articles/boom. This way, we don't have to learn yet another language (DocBook), just reuse what we should know by now (HTML, CSS). And, yes, I'm in! Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5-%3A-Let%27s-write-a-book-%21-tp19146710p19164747.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: UTF-8 in tapestry 5.0.13
Hi, This is non longer needed in 5.0.14. Try upgrading if you can. /Serge Ulrich Stärk wrote: I believe http://wiki.apache.org/tapestry/Tapestry5Utf8Encoding is still needed to convert form submissions from/to UTF-8. Uli Argo Vilberg schrieb: Hello! I have postgreSQL 8.1 with utf-8 charset and also web application with meta http-equiv=Content-Type content=text/html; charset=utf-8 / tags. But all estonian letters õüäöÕÜÄÖ are going to crazy. If i use simple text edit field to save value and then query some value from database then i got strange symbols. Why so? Argo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/UTF-8-in-tapestry-5.0.13-tp19047286p19048901.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: Unit testing T5 pages/components
Hey, I am running into the same problem. Since PageTester now accepts extra module classes, I tried using SpringModuleDef.class but no dice. Creating a separate module as shown in previous posts didn't work either :-( Does anybody have a working example with T 5.0.13+? Cheers, /Serge Toby Hobson wrote: Can anyone recommend a suitable testing strategy for T5 components - I've looked at PageTester which seems suitable but I'm injecting spring managed beans into my components and PageTester is unable to see them. I tried to Inject the beans manually using a setter on the component but PageTester still complains about being unable to find my beans. Thanks Toby -- View this message in context: http://www.nabble.com/Unit-testing-T5-pages-components-tp17306817p18774843.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: Passing values to JavaScript function
Hi, Passing a dynamic values from the Java page to a JavaScript function embedded in the .tml file works fine. However, I need to pass that values to an external (basic) JavaScript function. The external javacript files is attached to the page using the IncludeJavaScriptLibrary annotation: @IncludeJavaScriptLibrary(context:scripts/simple.js) public class Start { ... public String getDynamicValue() { // Apply logic here to calculate value return value; } } How do I pass ${prop:dynamicValue} ? Thanks, /Serge -- View this message in context: http://www.nabble.com/T5%3A-Passing-values-to-JavaScript-function-tp18071973p18071973.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] Using a Mixin on a Label component
Hi, I am trying to use a mixin to decorate the label component based on the embedded Field component. Since that field is not accessible, I thought I could use a parameter (like in the Label component) after reading the following: If the component and a mixin both define a parameter with the same name, then the component wins: the component's parameter will be bound, and the mixin's parameter will be unbound. from the docs: http://tapestry.apache.org/tapestry5/tapestry-core/guide/mixins.html How can I access the bound parameter from the mixin in that scenario? Thanks, /Serge -- View this message in context: http://www.nabble.com/-T5--Using-a-Mixin-on-a-Label-component-tp17916465p17916465.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Using a Mixin on a Label component
Yeah, but I don't really need a new one, I just wanted to reuse the parameter passed to the label :( /Serge Lance Java wrote: If you read the next sentence: Alternately, you may prefix the name of the parameter with the *unqualified * name of the Mixin class; this eliminates the ambiguity. So you can use t:label ... mixins=mymixin mymixin.paramName=mixinValue / I haven't tried this tho :) On 17/06/2008, SergeEby [EMAIL PROTECTED] wrote: Hi, I am trying to use a mixin to decorate the label component based on the embedded Field component. Since that field is not accessible, I thought I could use a parameter (like in the Label component) after reading the following: If the component and a mixin both define a parameter with the same name, then the component wins: the component's parameter will be bound, and the mixin's parameter will be unbound. from the docs: http://tapestry.apache.org/tapestry5/tapestry-core/guide/mixins.html How can I access the bound parameter from the mixin in that scenario? Thanks, /Serge -- View this message in context: http://www.nabble.com/-T5--Using-a-Mixin-on-a-Label-component-tp17916465p17916465.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] -- View this message in context: http://www.nabble.com/-T5--Using-a-Mixin-on-a-Label-component-tp17916465p17935143.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: Messages in modules (where to put the *.properties files)
Hi, If you are using Maven, you should put your properties files under src/main/resources/my/package/components See details here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/project-layout.html /Serge Russell Brown-6 wrote: Hi, I have created a couple of components and have jarred them up as a library. I followed the Tapestry 5 book and the how to here http://wiki.apache.org/tapestry/Tapestry5HowToCreateYourOwnComponentLibr ary on the wiki. It is working ok for me so far except that one of my components makes use of the t:beaneditform and the validate regexp pattern contained in related properties file for the component cannot be found. This component started life as a page. When it was a Page (in the *.*.*.pages package) it renedered correctly and the regexp for the corresponding field was found. Now it is a component and packaged up (and referred to as t:prefix.component / thanks to adding a LibraryMapping to the ComponentClasResolver via contributeComponentClassResolver ) I get the exception that follows ender queue error in BeginRender[core/PropertyEditBlocks:textfield]: Failure reading parameter 'validate' of component core/PropertyEditBlocks:textfield: Validator 'regexp' requires a validation constraint (of type java.util.regex.Pattern) but none was provided. Can anyone let me know what I need to do to make this work? The component is called register and the properties file is in the my.package.components package with the component. Is that correct or should it be elsewhere? Cheers Russell Communications on or through ioko's computer systems may be monitored or recorded to secure effective system operation and for other lawful purposes. Unless otherwise agreed expressly in writing, this communication is to be treated as confidential and the information in it may not be used or disclosed except for the purpose for which it has been sent. If you have reason to believe that you are not the intended recipient of this communication, please contact the sender immediately. No employee is authorised to conclude any binding agreement on behalf of ioko with another party by e-mail without prior express written confirmation. ioko365 Ltd. VAT reg 656 2443 31. Reg no 3048367. All rights reserved. -- View this message in context: http://www.nabble.com/Messages-in-modules-%28where-to-put-the-*.properties-files%29-tp17694337p17694525.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: Tapestry Spring Documentation Incomplete
Hi, It seems obvious to me that you need to add any self-contained module such as tapestry-spring, tapestry-hibernate or tapestry-upload to your application only if you use it. /Serge TapestryBeast wrote: Hi, Just to say that I think the documentation here: http://tapestry.apache.org/tapestry5/tapestry-spring/ needs updating. Nowhere does it state that a dependency on tapestry-spring is needed in pom.xml as such: dependency groupIdorg.apache.tapestry/groupId artifactIdtapestry-spring/artifactId version${tapestry-release-version}/version /dependency I know this might seem obvious, but I for one assumed that this would come with the Tapestry-core dependency files. This cost me 3 hours with Tomcat startup failed due to previous errors errors whenever spring was added to web.xml until I remembered to look in the full tomcat log to find out what the problem was. Perhaps the same sort of update is also needed for the file upload page on the Tapestry web site as well. Its probably difficult to decided what to do when half of users are still downloading the full gzip file and the other half are doing this stuff using Maven but I think this is definitely something worth adding. David. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tapestry-Spring-Documentation-Incomplete-tp17422069p17424715.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: Question about select component
Hey, Assuming you are using version 5.0.11, you can add: blankoption=never to the component definition. See details here: http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/Select.html /Serge amebaliu wrote: Hi all, I have a question about select componenet,somehow, my options starts from null, then userone, then usertwo, rahter than start from userone.. I really can not find where is the error.. Hope somebody can help me, thanks a lot Here is my code select t:type=select t:model=users t:value=user/ @Inject private Messages messages; public SelectModel getUsers(){ return new EnumSelectModel(Users.class,messages); } @Persist private Users user; public Users getUser(){ return this.user; } public void setUser(Users user){ this.user = user; } package test.todolist.model; public enum Users { USERONE,USERTWO,USERTHREE } -- View this message in context: http://www.nabble.com/Question-about-select-component-tp17291010p17291503.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: [ANN] JumpStart 3.6: Wizards, Conversations, and more
Hi, Read the tips on Geoff website: http://files.doublenegative.com.au/jumpstart /Serge CG-6 wrote: Not sure whether this is the correct place to ask abt jumpstart or not, however, I really need some hints. Jumpstart is using the hsql embeded in JBoss, I would like to use mysql instead, and i saw the building process does download mysql-connector-java . I wonder how should I configure to use mysql in jumpstart. i'm a newbie in java, hibernate, tapestry , any explanation in detail is much appreciated, thanks. I did some search on google , and I think persistence.xml require modification , am I right ? CG On Sat, May 3, 2008 at 12:41 AM, Howard Lewis Ship [EMAIL PROTECTED] wrote: It's rather anemic by AspectJ standards, but has a number of advantages in terms of working consistently within the T5 IoC framework. Currently, it's just method advice; for services, there is a AspectDecorator service (which may be used from a decorate method). For components, there's a new advise() method on ClassTransformation. The other things you could already do using ClassTransformation (and ComponentClassTransformWorker) also fall into the AOP category. On Thu, May 1, 2008 at 12:30 PM, Adam Zimowski [EMAIL PROTECTED] wrote: Does that mean we'll have T5AOP in 5.0.12 ? Is this going to be a new module or built into core? On Thu, May 1, 2008 at 2:17 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: I can't wait to see what you put together using the new method advice support in 5.0.12; it makes doing interesting things with methods and annotations much, much easier. On Thu, May 1, 2008 at 5:01 AM, Geoff Callender [EMAIL PROTECTED] wrote: Hi all, JumpStart 3.6 is now available. It's for Tapestry 5.0.11. New in this release: * Wizards - 3 styles explored: with form fragments, with components, and with separate pages. * Conversations - implemented in the wizards to handle the Back and Reload buttons and sessions shared by new windows. * Conversations List - shows your conversations and lets you jump to them. * Session Display - see what objects are in your session. * Autocomplete Mixin - see it in action. * The Select component - new and better examples. You'll find JumpStart at: http://files.doublenegative.com.au/jumpstart The implementation of conversations is my own invention and has not been used in anger. I'm sure it could be improved, eg. with annotations. I pray that it doesn't have any holes in it, and I look forward to any contributions that will help it along. As always, comments and suggestions are encouraged. Be helpful or brutal - I don't care which - because it all helps to make this stuff more useful. Cheers, Geoff Callender - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-ANN--JumpStart-3.6%3A-Wizards%2C-Conversations%2C-and-more-tp17000326p17187311.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: how to use maven?
Hi, As the name indicates, this URL is for snapshots only. The official releases are located on standard maven repositories. So commenting out this repo should get you what you need. /Serge luna_guo wrote: i use maven plugin ,and add the following code to pom.xml repositories repository idtapestry5/id urlhttp://tapestry.formos.com/maven-snapshot-repository//url /repository /repositories but when i click add dependency ,i can't find tapesty5.0.11, the lasted version i found is tapestry5.07. can anyone tell me how to solve this problem? thanks in advance. -- View this message in context: http://www.nabble.com/how-to-use-maven--tp16230787p16231781.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: Page activation context question
Hi, You can pass more than one parameter. /Serge Yura Tkachenko wrote: Hi All, I've been reading chapter about Page Activation Context here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html. And I have a question: can I pass using activation context more than one parameter? For example in help we have an example: void onActivate(long productId) { setProductId(productId); loadProduct(); } long onPassivate() { return getProductId(); } Also it was mentioned onPassivate method should be like a mirror of onActivate. Does it means I can't pass more than one parameter? Another approach I tried is it create another Java Bean (wrapper object) and simple try to pass this bean via activation context. In that case my onActivate and onPassivate were: void onActivate(PageWrapper wrappedData) { System.out.println(Activated with message: + wrappedData); setWrapper(wrappedData); } PageWrapper onPassivate() { System.out.println(Page is passivated.); return getWrapper(); } As the result I got exception. From URL I understood that Typestry during passing parameter via activation context is converting it to get request. In my case for wrapped object URL was: http://localhost:8080/t5first/second/com.packtpub.t5first.utils.PageWrapper%40307efc After looking to that URL I realized that T5 just call toString of passed object :-) So my additional questions: 1) Why not allow to user pass his own objects (POJO)? 2) Why not pass data via HTTP POST? Because as far as I know HTTP (at least some browsers and http servers) has some limitations to the length of URLs. Besides sooner or later some smart users will pass string with a few Kbytes and the page will get wrong data (truncated). -- View this message in context: http://www.nabble.com/Page-activation-context-question-tp16231642p16231791.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: your opinion on grid's sorting
You are not alone :) /Serge Adam Zimowski wrote: I'd like to propose enhancement which makes it easier to define which columns are sorted. The grid component, as of 5.0.11, by default applies and enables sorting to all columns. If one wants to change it, one must give grid the model via model parameter. In the spirit of recently changed default grid behavior (include parameter rather then remove, and add parameter which saves the need to mess with the model when adding new columns), I'm wondering if similar evaluation (and possibly change) of current sort defaults makes sense at this time. What I'm proposing is a very unintrusive way to define which columns are sortable. This does two things: allows to easily and quickly define which columns are sortable via the markup, and removes the need to work with model in page class. Do you folks find yourself disabling sort most of the time only to seldom enable it for a column here and there? Currently one must get the model, define sort, and expose it so that it can be passed onto grid: @Inject private BeanModelSource _beanModelSource; @Inject private ComponentResources _componentResources; private BeanModelsomeclass _model; @OnEvent(activated) void disableGridSort() { _model = _beanModelSource.create(someclass, false, _componentResources); for(String property : _model.getPropertyNames()) _model.get(property).sortable(false); } public BeanModel getModel() { return _model; } That's a lot of code for something that could be handled within the template. Would't it be easier if we could do something along those lines: t:grid t:source=articles rowsPerPage=10 pagerPosition=bottom include=id*,text,author*,publishedDate row=article/ The only new syntax is the star appended to column names in the include parameter. If the column has a star appended, then it is to be sortable so the grid should only enable sort on columns suffixed with the star. If, on the other hand no column is suffixed with the star: t:grid t:source=articles rowsPerPage=10 pagerPosition=bottom include=id,text,author,publishedDate row=article/ then grid operates just as it does today, enabling sort on all columns, which gives a nice backward compatibility. I'd be happy to submit JIRA for this improvement, if I'm not the only one who thinks this would be nice. Regards, -adam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-your-opinion-on-grid%27s-sorting-tp16119022p16128507.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: How to create an external URL to a Tapestry page?
Hey, Just return a URL object http://tapestry.apache.org/tapestry5/tapestry-core/guide/pagenav.html /Serge Travis McLeskey wrote: For example, if one wanted to generate a complete URL (including protocol, server name, and port) and send it in an email. I tried ComponentResources.createActionLink() and Component.createPageLink(), but the Link objects returned by those methods do not include the server name, etc. In Tap4 there was the ExternalService. I'm sure there is a Tap5 equivalent...I just can't find it. Thanks, Travis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-How-to-create-an-external-URL-to-a-Tapestry-page--tp15436877p15446980.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: How to access the servlet context in AppModule?
Hey, You can pass Spring Services as argument by using the @Inject @Service annotations. /Serge MrclSchprs wrote: How to access the servlet context in AppModule? Tapestry's Spring integration does not work for the 'services' package. A Spring service is needed for a custom BindingFactory. My idea was to access Spring's application context and instantiate a new BindingFactory with the Spring service as constructor parameter. Any ideas? -- View this message in context: http://www.nabble.com/How-to-access-the-servlet-context-in-AppModule--tp15110070p15110348.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: How to access the servlet context in AppModule?
Not sure what you are doing but the following works fine for me in my AppModule: public class AppModule { ... public static void contributeAliasOverrides ( ConfigurationAliasContribution aConfiguration, @Inject @Service(LabelService) LabelService aService) { } .. } In the example above, LabelSevice is a Spring service. /Serge MrclSchprs wrote: On Jan 26, 2008 6:34 PM, Fernando Padilla [EMAIL PROTECTED] wrote: Within the AppModule you can try accessing the following services: 1) WebContextApplicationContext 2) RequestGlobals 3) @Inject @Service(beanName) The third option does not work; Tapestry does only inject spring service in classes residing in 'pages' or 'components' packages. AppModule is in 'services'. -- View this message in context: http://www.nabble.com/How-to-access-the-servlet-context-in-AppModule--tp15110070p15111202.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: PersistentLocale is lowercasing locales
Hi Geoff, I've seen this in past releases and I had to use the following as a workaround in my AppModule to get my application to work: ... configuration.add(tapestry.supported-locales, en_us,fr_ca,zh_cn); ... This didn't work: configuration.add(tapestry.supported-locales, en_US,fr_CA,zh_CN); This look like a bug! /Serge Geoff Callender-2 wrote: Hi, Before I put this into JIRA I thought I'd check if anyone else is seeing a problem with PersistentLocale (in 5.0.6). I'm seeing it convert locales from mixed case to all lower case, which is useless for formatting. For example, if Page 1 sets the locale like this: @Inject private PersistentLocale _persistentLocaleService; Locale locale = Locale.UK; _persistentLocaleService.set(locale); System.out.println(locale is + locale + - + locale.getDisplayName()); then this is what prints: locale is en_GB - English (United Kingdom) But when I'm in Page 2 I get the locale and find it has mutated... Locale locale = _persistentLocaleService.get(); System.out.println(locale is + locale + - + locale.getDisplayName()); ...this is what prints: locale is en_gb - en_gb This mutated locale in page 2 is useless for formatting. Code like the following produces default-styling instead of UK-styling: _myDateFormat = DateFormat.getDateInstance(DateFormat.LONG, locale); System.out.println(_myDateFormat.format(new Date())); Has anyone else experienced this? Cheers, Geoff -- View this message in context: http://www.nabble.com/T5%3A-PersistentLocale-is-lowercasing-locales-tp14466509p14469664.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: t5 : how to set page paramaters in pagelink ?
Hi, You can use the context parameter: http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentspagelink -- /Serge dalahoo wrote: dear friends, i want to set some value for may page properties, with pagelink compoent, is it posible ? -- sincerely yours M. H. Shamsi -- View this message in context: http://www.nabble.com/t5-%3A-how-to-set-page-paramaters-in-pagelink---tf4621503.html#a13198658 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Escaping espansions
Hi, Did you try the literal: binding prefix? --- /Serge Hans Jörg Hessmann wrote: Hi, I'd like to show a static text containing ${something} on a page. Is there a way to escape the ${? Thanks, Hans Joerg Hessmann - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Escaping-espansions-tf4617082.html#a13199074 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Upgrade to 5.0.6-SNAPSHOT
It's now working fine with the latest jar files built from svn! Thanks, /Serge Howard Lewis Ship wrote: And 2.2 worked fine. On 9/25/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: I'll try downgrading to 2.2. On 9/25/07, Kalle Korhonen [EMAIL PROTECTED] wrote: There's a link to your earlier opened issue now. What's the version javadoc plugin you are using? It seemed like it works in 2.2, maybe the latest snapshot or you may need to build the latest yourself. Kalle On 9/25/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: http://jira.codehaus.org/browse/MJAVADOC-150 I thought I had added it previously, but couldn't find it. So I just (re-)added it. On 9/25/07, Kalle Korhonen [EMAIL PROTECTED] wrote: What's the Maven bug you are trying to work around? Maybe we could help. Kalle On 9/25/07, Howard Lewis Ship [EMAIL PROTECTED] wrote: I'm not sure how upto date the snapshots are. That's likely caused by using too old a version of Log4J in your project. You want to ensure that you are using 1.2.14. I'm trying to work around a Maven bug so that I can set up nightly builds for T5. On 9/25/07, SergeEby [EMAIL PROTECTED] wrote: Hi, I tried to update my application from 5.0.5 to 5.0.6-SNAPSHOT. The main change was the use of slf4j. However, I am getting the following error when starting the application via maven: java.lang.AbstractMethodError at org.apache.tapestry.ioc.internal.RegistryImpl .init( RegistryImpl.java :135) at org.apache.tapestry.ioc.RegistryBuilder.build(RegistryBuilder.java :132) at org.apache.tapestry.internal.TapestryAppInitializer.getRegistry( TapestryAppInitializer.java:152) at org.apache.tapestry.TapestryFilter.init( TapestryFilter.java :77) at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java :40) . It works fine when I revert back to 5.0.5. Does anybody know what's causing this? Thx /Serge -- View this message in context: http://www.nabble.com/T5%3A-Upgrade-to-5.0.6-SNAPSHOT-tf4515211.html#a12878469 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind -- Howard M. Lewis Ship Partner and Senior Architect at Feature50 Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Upgrade-to-5.0.6-SNAPSHOT-tf4515211.html#a12898540 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] tutorial question
Looks like you missed an important section of the tutorial: excerpt --- We do need a basic GameOver page. src/main/webapp/WEB-INF/GameOver.html: html xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; head titleGame Over!/title /head body h1Game Over/h1 p You guessed the secret number! /p /body /html src/main/java/org/apache/tapestry/tutorial/pages/GameOver.java: package org.apache.tapestry.tutorial.pages; public class GameOver { } With this in place, we can make guesses, and get feedback from the application: /Serge Robert A. Decker-2 wrote: I'm teaching myself Tapestry by jumping right into version 5. I'm a pretty experienced developer and so I'm not ready to give up and go back to version 4, but I am having what is probably a very basic problem... I'm trying to do the Tapestry 5 tutorial and I'm on the section where we count the number of guesses on Guess page page: http://tapestry.apache.org/tapestry5/tutorial1/hilo.html The tutorial doesn't fully cover what should be in Guess.java This method: Object onActionFromLink(int guess) { _count++; if (guess == _target) { _gameOver.setup(_count); return _gameOver; } if (guess _target) _message = String.format(%d is too low., guess); else _message = String.format(%d is too high., guess); return null; } GameOver is another page in the app. Not knowing exactly what I should do, I have declared as a variable in Guess.java: @InjectPage GameOver _gameOver; However, this is leading to a NullPointerException, which kind of makes sense because GameOver isn't persisted. So, I tried: @InjectPage @Persist GameOver _gameOver But that doesn't fix the problem, and documentation I found in Tapestry 4 seems to say that you can't declare multiple injection tags per variable. Does anyone have a working Tapestry 5 tutorial? Or can help me with this specific problem? I've also tried something like: GameOver _gameOver = new GameOver(); _gameOver.setup(_count); return _gameOver; (the WebObjects way) but that leads to an even weirder exception... Thanks, Robert A. Decker - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-T5--tutorial-question-tf4487116.html#a12804208 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] component packs? libraries?
Hi, T5 components are listed here: http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html /Serge Fernando Padilla wrote: So I think I've read most if not all of the T5 documentation, and I don't see any mention of the old Component Libraries.. Could someone give me some insight? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-T5--component-packs--libraries--tf4461482.html#a12727079 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: PageLink keeping activantion context when t:context is not set.
Have you thought about using a null context? /Serge Thiago H de Paula Figueiredo-2 wrote: Em Fri, 31 Aug 2007 21:20:00 -0300, Fidel Chavarria [EMAIL PROTECTED] escreveu: If you need a link that points to the same page, create a Pagelink pointing the same page. I need a link to the same page, but without the activation context. I'm using an object edit page to both new objects and edition of existing ones. Without an activation context, my page knows the user wants to create an object. With an activation context, my pages pulls the object from the database so the user can edit it. The problem is that I want to have a Click here to create a new object link in my page when it is showing some object (page rendered with activation context). Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-PageLink-keeping-activantion-context-when-t%3Acontext-is-not-set.-tf4362221.html#a12444914 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Tutorial question.
Do a search in the mailing list. This question was answered a while ago. /Serge Alex Shneyderman wrote: Hi, all! I am trying out tapestry and was going through the tutorial and noticed that in the section about Guess.java the following: Object onActionFromLink(int guess) { _count++; if (guess == _target) { _gameOver.setup(_count); return _gameOver; } if (guess _target) _message = String.format(%d is too low., guess); else _message = String.format(%d is too high., guess); return null; } this however does not work. I changed the name of the handler to Object onAction(int guess) { ... } and things started to work as expected. Did I miss something or it is a mess up in tutorial. -- Thanks, Alex. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Tutorial-question.-tf4166391.html#a11854069 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] redundant declaration of meta tag
Hi. I believe this patch is included in 5.0.5, therefore no longer needed. For the redundant meta tags, you should remove them from the pages, not the layout template. /Serge Nick Westgate wrote: Your templates must be UTF-8 encoded too. Cheers, Nick. Marcelo lotif wrote: i put it right now, but it's simply not working... =( i just followed the howto but it's gaving me the same error Failure parsing template context:WEB-INF/Start.html: Invalid byte 2 of 3-byte UTF-8 sequence. am i missing something? 2007/7/19, Nick Westgate [EMAIL PROTECTED]: Are you using the UTF-8 patch on the wiki? http://wiki.apache.org/tapestry/Tapestry5HowTos Cheers, Nick. Marcelo lotif wrote: Hi all, I'm trying to use some special characters on my pages but i had to put the meta tag in all of them, even when they have a Layout component wrapping it. I thought it is a bit redundant. If i remove the meta tag from the layout(that have not special chars), letting it just into the start page, it works fine, but the layout have the html and head tag, and is a matter of logic that he may have the meta tag. There goes my code: - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-T5--redundant-declaration-of-meta-tag-tf4103661.html#a11688600 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Any way to replace service from InternalModule?
Hi, You must contribute to AliasOverrides service: Details are here: http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html /Serge Ivan Luzyanin wrote: I need to change a behavior of a service provided by Tapestry's InternalModule. Is is possible? If so, how? -- View this message in context: http://www.nabble.com/-T5--Any-way-to-replace-service-from-InternalModule--tf4103794.html#a11701613 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: Trouble deploying T5 with maven
Hi, The HTML templates should go either under the resources directory or WEB-INF Read this: http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html /Serge Moritz Gmelin wrote: Hi, I have created a T5 Application based on the myapp template with its pom.xml. I have added some components and pages to the application and now, I'd like to deploy it on a tomcat server (or create a .war file of it). It does work if I build the application with eclipse and then do a mvn tomcat:deploy because Eclipse copies the components' HTML templates into the resulting target/classes/**/components/ directory. But If I want to do a clean rebuild of the application (pulling it from CVS), the components' HTML templates, which are located in the java source directory are not copied to the target classes directory (nor into the application.jar). What options do I have ? Is there a way I can configure the maven compile task to copy those html files over to target directory ? Thanks Moritz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Trouble-deploying-T5-with-maven-tf4049161.html#a11501768 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] tapestry-spring and WebApplicationContext
Hi, Just import and inject the WAC in your page: import org.springframework.web.context.WebApplicationContext; class Foo { ... @Inject private WebApplicationContext wac; ... } /Serge cyrille37 wrote: Fidel Chavarria a écrit : Hi I think this willhelp you, http://tapestry.apache.org/tapestry5/tapestry-spring/ Thanks, but if you had read my mail, I should see that I'm talked about this page. In this page in Limitations chapter it is writte that we can't inject Spring session bean but we have to retreive the WebApplicationContext and use it. But I don't know howto retreive this so famous WebApplicationContext when I'm in a tapestry code page or component. cyrille. cyrille37 wrote: Hi, In the T5 tapestry-spring documentation it is writed to don't use other Spring beans than Singleton ones. Inject the WebApplicationContext instead. http://tapestry.apache.org/tapestry5/tapestry-spring/ But howto inject the WebApplicationContext ? thanks cyrille - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-T5--tapestry-spring-and-WebApplicationContext-tf3996411.html#a11359690 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 Component library trouble
Hi, Try style t:type=antera.Style / and read the Component Elements section in this document: http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html /Serge texomaleo wrote: In a jar in a separate Eclipse probject I have package us.antera.t5.lib; import org.apache.tapestry.ioc.Configuration; import org.apache.tapestry.services.LibraryMapping; public class LibModule { public static void contributeComponentClassResolver (ConfigurationLibraryMapping configuration) { configuration.add(new LibraryMapping(antera, us.antera.t5.lib)); } } The implementing class us.antera.t5.lib.components.Style is written and works find in a Tapestry project if directly included. The above module loads (I know by mis-naming it in the manifest file for the jar and then watching the T5 IoC failure in the T5 project). I make a jar with the above class and us.antera.t5.lib.components.Style in it, put it in src/main/resources in my T5 project, put it on the build path, in a component class I ask for style t:type=antera/Style /, restart the server, and poof: Unable to resolve component type 'antera/Style' to a component class name. What am I doing wrong? bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5-Component-library-trouble-tf3948185.html#a11200969 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: Is ActionLink deprecated ?
Hi, The URL you mentioned is related to Tapestry 4, not T5. Are you sure you strictly followed all steps mentioned in the tutorial? There are several examples (Integration Tests) in the source code that might be helpful. /Serge Leo Stefanesco wrote: Hello everybody, I'm reading the Tapestry 5 tutorial and when I try to run the example (a Hi/lo) which contain actionlink tag, there is a error message : A runtime exception has occurred. org.apache.tapestry.ioc.internal.util.TapestryException Failure parsing template context:WEB-INF/Start.html: Element t:ActionLink is in the Tapestry namespace, but is not a recognized Tapestry template element. And I've googled tapestry actionlink and I've found this page : http://tapestry.apache.org/tapestry4/tapestry/ComponentReference/ActionLink.html and it's write : Warning This component has been deprecated and will be removed in the next major release of Tapestry. ActionLink represents an inherently unstable approach, since it can easily be confused by changing server-side state. So, can you help me please ? Thanks. PS:I'm sorry for my bad English but I'm a french people who try to learn English. -- View this message in context: http://www.nabble.com/Is-ActionLink-deprecated---tf3932639.html#a11154249 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Using my own localization backend
Hi, You can provide your own implementation by contributing to aliasOverrides: http://tapestry.apache.org/tapestry5/tapestry-core/guide/alias.html /Serge Martin Dietze wrote: Hi, I need to use a particular localization backend for my project. As I understand, T5 provides its own code for retrieving messages based on the .properties files, and if I understand Howard's posting from Mar 4 right, simply plugging in my own ComponentMessageSource implementation is not yet supported. Would it make any sense trying to circumvent T5's message facilities and implement my own which I could access by a different prefix, i.e. msg:, or is this complete nonsense? Cheers, Martin -- --- / http://herbert.the-little-red-haired-girl.org / - =+= manche meinen, lechts und rinks kann man nicht velwechsern. werch ein illtum! -- elnst jandr - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Using-my-own-localization-backend-tf3845988.html#a10892326 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: Empty SelectionList option not rendered properly according to xhtml
Hi, This seems valid to me according to this: http://www.w3.org/TR/xhtml1/#h-4.6 /Serge Jan Vissers wrote: Tapestry renders: option value=Empty/option And it 'should' render: option value=Empty/ Is this something we can workaround? I would have preferred Tapestry rendering the option correctly whenever the label is (an) empty (string). Thx, -J. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Empty-SelectionList-option-not-rendered-properly-according-to-xhtml-tf3809469.html#a10783377 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5 application wide message catalog
Hi, I believe this is now available in 5.0.5-SNAPSHOT. /Serge Jason Lea wrote: I'm using Tapestry 5.0.4 and have some localized fields getting messages from message catalog for the page working correctly, but I cannot get an application wide message catalog to work In the page Target.html: input type=submit t:type=Any value=message:button.next/ (have also tried input type=submit t:type=Any value=message: button.next/ ) In web.xml: filter filter-nameapp/filter-name filter-classorg.apache.tapestry.TapestryFilter /filter-class /filter So from what I have read about the global message catalog coming from the name of the filter, I should put a file here WEB-INF/app.properties: button.next=Next But this gives me the message on my button: [[missing key: button.next]] I have put button.next into Target.properties and it found it. Target.properties was sitting in the same folder as Target.java. So have I called it the wrong name or put it in the wrong place? Thanks for any help, -- Jason Lea -- View this message in context: http://www.nabble.com/T5-application-wide-message-catalog-tf3801451.html#a10756715 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: any idea to inject a ejb to tapestry?
Hi, This post might be helpful: http://www.nabble.com/Inject-EJB-3-into-Tapestry-4-page-tf2841494.html#a8468544 /Serge Heping Zhang wrote: hi, I use tapestry as web tier and want get a slsb in this tier. this is my code: public abstract class Home extends BasePage { // @EJB // Calculator bean; public String getResult() { // Double message = bean.calculate(11, 22, 0.08, 44); // return message.toString(); InitialContext ctx = null; Calculator bean = null; try { ctx = new InitialContext(); bean = (Calculator) ctx .lookup(ejb3TapestryJboss/CalculatorBean/local); } catch (NamingException e) { e.printStackTrace(); } Double message = bean.calculate(22, 22, 0.08, 22); return ok! + message.toString(); } } When I use JNDI's lookup, as showed above, it works. But when I want to inject a slsb to this page, as the commented code showed, it get nothing. No bean is injected. do I misues this annotation? and how can I inject a bean to tapestry? or I can only do this in servlet? By the way, I use jbossAs 5 beta2 as the server. Thanks for your help in advance. -- View this message in context: http://www.nabble.com/any-idea-to-inject-a-ejb-to-tapestry--tf3776725.html#a10681972 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Spring Integration Issue
Hi, There is a new syntax with 5.0.4-SNAPSHOT and the URL http://tapestry.apache.org/tapestry5/tapestry-spring/ was updated a while ago. There is no more @Inject(spring:yourBean). It works fine for me. Here is an excerpt: public class UserView { @Inject @SpringBean(userManager) private UserManager _userManager; public ListUser getAllUsers() { return _userManager.getAllUsers(); } } The error seems to indicate a problem with your spring configuration. /Serge Nick Westgate wrote: Hmm, I'm not sure which way the docs are out of sync - future or past. http://tapestry.apache.org/tapestry5/tapestry-spring/ You'll see further down the page after the example it mentions Spring:UserDAO. That's what I'm using with 5.0.3 SNAPSHOT and it works. Try @Inject(spring:groupRepository) private GroupRepository groupRepository; Cheers, Nick. Matt Welch wrote: I'm sure I must be doing something wrong, but for lthe life of me, I can't figure out what it is. I'm not trying anything complicated. I've confirmed that my Spring beans are accessible in my webapp so I know the Spring part of my configuration is correct. Here's how I'm trying to inject the Spring bean (per the tapestry-spring documentation): @Inject @SpringBean(groupRepository) private GroupRepository groupRepository; However, when I try to access the page that uses this service, I'm seeing the following error: java.lang.RuntimeException: No service implements the interface net.xxx.xxx.repository.GroupRepository. I'm clearly missing a configuration step, but I'm just not sure what it is. Any help would be greatly appreciated. -Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-Spring-Integration-Issue-tf3636078.html#a10159940 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: [WARNING] T5: recordError on BeanEditForm
Hi, You can access the form from the BeanEditForm component: http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/BeanEditForm.html /Serge Massimo Lusetti wrote: On 3/4/07, Olivier Jacquet [EMAIL PROTECTED] wrote: How can I record additional errors on BeanEditForm. I cannot get access to the form with: @Component private Form _form; Does the BeanEditForm's form has form id of form or something else? -- Massimo http://meridio.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/T5%3A-recordError-on-BeanEditForm-tf3342827.html#a9297261 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 Message Catalog Override
Hi I tried to override the default ComponentMessagesSource by creating a contribution in my module (tapestry.ComponentMessagesSource) and a new builder method, but it doesn't seem to work. Am I missing something? /Serge -- View this message in context: http://www.nabble.com/T5-Message-Catalog-Override-tf3341408.html#a9293102 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: Spring Integration
Hi, I know Spring integration will be included later in T5, but was wondering if someone has already figured out how to do that. I am playing around converting an existing application to T5. Thanks, /Serge -- View this message in context: http://www.nabble.com/T5%3A-Spring-Integration-tf3253045.html#a9042869 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]