Re: T5: newbie question about tap5 ejb
AFAIK, You can't use the @EJB annotation outside of an actual bean or class managed by the EJB framework (Tapestry is not). You need to bind to the using a JNDI context - I think the Quickstart example has a good example of using a Tapestry ASO (BeanLocator) for that. Pavel Volkovitskiy wrote: Hello! i'm trying to use ejb3 beans from my tap5 app right now i'm doing: mtx/racer/pages/contract/AddContract.java: ... @EJB private SellerFacadeLocal sellerFacade; and then public StreamResponse onSubmit() { ... Seller s = sellerFacade.getSeller(code, dealer, comment); there Seller - entity, sellerFacade - stateless bean and sellerFacadeLocal - interface but this doesn't work, i'm getting javax.naming.NotContextException: geronimo/env/mtx.racer.beans.SellerFacade/entityManager so, i'm doing something wrong... any tips or tap5ejb3 examples? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: illegal character: \64 error when built using jdk1.4
Annotations don't exist in JDK 1.4. You need to use JDK5 or stop using annotations. Ajit Raj wrote: Hi, I got an illegal character: \64 error for the following statement @InjectMeta ^ and @Persist ^ etc when I switch from jdk1.5 to jdk1.4 to compile the project which is using tapestry 4.0. Could anyone let me know where the issue is? Thanks, Ajit _ Play free games, earn tickets, get cool prizes! Join Live Search Club. http://club.live.com/home.aspx?icid=CLUB_wlmailtextlink - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Direct URL to Class Mappings are Inconvenient
As long as we can fix the package foo.pages.bar; class Bar { } turning into /bar/ and not finding the html page bug ;) Howard Lewis Ship wrote: That may not make it into the initial release of Tapestry; there are so many other concerns that are more critical! On 6/12/07, David Peterson [EMAIL PROTECTED] wrote: It's the word view that I'd like to get rid of because the more slashes in your URL, the lower the page is ranked in certain search engines. /article - ArticleViewer /admin/article/edit - ArticleEditor It would be nice to have the mapping strategy from URI to classname (and back) be made pluggable or more configurable. David The current rules allow for this: pages.view.ViewArticle is mapped to view/article (not view/viewarticle). This is very useful, since you'll likely add other options: add/ or edit/ or search/. On 6/12/07, David Peterson [EMAIL PROTECTED] wrote: I'm finding that I often want my pages to have the same names as classes in my model. For example, I have an Article class in my model and I want the article viewer URL to be /article (with a context specifying the article reference). Although this is possible by using fully-qualified class names everywhere, it's messy and error prone. Ideally, I'd like to have the URL /article mapped to com.mydomain.pages.ArticleViewer. Is that easy to do? (If it's possible could you post some code?) If not, how about a Page suffix for page classes, e.g. ArticlePage? I think that would be a useful convention and might avoid having to compromise the URLs, model class names or code readability. David -- Howard M. Lewis Ship TWD Consulting, Inc. Independent J2EE / Open-Source Java Consultant Creator and PMC Chair, Apache Tapestry Creator, Apache HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com - - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry5 ready for use in a new project?
I'm working on two projects using T5 now. In my opinion its very usable, just expect the occasional bug and rough edge at this point. yes, on the one hand it's really good to have existing ajax components, OTOH, if component creation is really simple (with adding stuff to the header), it's also a good option - one can use the preferred ajax library then (i heard jquery shall be really cool)... There is some promising work on custom AJAX stuff, I can point out some conversations on this list detailing how to do simple JSON requests in a page. Could also be used for XML. what's the status with documentation about T5, feedback on the mailing list, and the learning curve? Documentation is decent, though sometimes hard to wrap your head around in my opinion. Learning curve really depends on how much you've used other setups like Struts and how quick you can purge your mind relearn :) Mailing list is a good help. thanx a lot for your feedback, cheers, martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Caching of javascript
It seems the T5 asset javascript files (such as prototype, scriptalicous) are not being cached by browsers (tested IE6 and FF). Using Firebug and having the server on a slow (= cable modem upload) connection shows this problem very well, with about 2-3s page delay in transferring the .js files. Caching appears to work just fine on images though, which are also injected via assets. This may not be a problem with Tapestry per say, but has anyone noticed this/found a solution? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Templating with Tapestry 5
Went down this road recently. You have a Layout component (call it what you want) htmlbodysome static stuff t:body/ /body /html and each page uses the layout; t:layout body body /t:layout if you want more flexibility, you can pass in other components as parameters, and use t:delegate to render them t:layout t:parameter name=sidebar t:sidebar t:id=sidebar/ /t:parameter body body /t:layout and in the layout: t:delegate to=propertyNameOfYourParameter/ bjornharvold wrote: Konstantin, Can you give me an example? thx bjorn - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Incomplete URL requests resulting in Excceptions
Not all of them are going to be well behaved web spiders. Exploit scanners tend to hit specific URL suffixes to feed in their exploit code (looking for vulnerable phpbb, phpnuke, etc), and they don't respond to robots.txt ;) It clogs up traditional Apache error logs as well. I would suggest simply filtering the error emails. jake123 wrote: Hi, we have a similar problem... we are hosting approximately 300 websites that is using our tapestry application to which all the content are red from the database and build up on the fly. We also gets a lot of 'ghost' exceptions when search engine spiders and robots try to access our application. Our application sends us a error email every time an exception occurs in the application and that means at least around a 100 emails a day. I also noticed that we get a lot of pageNotFoundException for page names that do not exists in our application name space... is this normal? How do you prevent the search engines to do this? Thanks in advance for any help, Jacob - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: Best page templating strategy
I'm using T5 to do some experimental testing, creating some mockup applications to teach me more about the framework. My question is, how do you best handle multi-part layouts? For instance, a Layout can be composed of a Body and a Sidebar. The Sidebar can be a component. My current approach is to have a Page.java: public Page { @Component private Layout _layout; @Component private Sidebar _sidebar; } Page.html: t:layout t:id=layout blah div id=main fee fi fo fum /div t:sidebar t:id=sidebar bar=true/ /t:layout This feels suboptimal, as I'm encoding the location of the sidebar into each and every page (namely always coming after the main div). I'd like to have the Sidebar component in the Layout component, but feed this component from the Page to the Layout (as the Sidebar component could be different on every page). I.e., t:layout sidebar=sidebar, but that is a parameter, not a component, so afaik won't work like I expect it to (it didn't in testing, but could have been anything). Any way of accomplishing this? Any better solutions to this problem? Am I missing something? BTW, T5 is a great framework - having lots of fun with it! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: Best page templating strategy
I got a good start on this, but still missing something fundamental. In Page.java, I have the Sidebar component. In Page.html, I pass the component in a parameter t:parameter name=sidebar t:sidebar/ /t:parameter In Layout.java I have a sidebar block @Parameter(required=true) private Block _sidebar; What I can't figure out is how to get the block to render. Thanks for all of your suggestions so far! Howard Lewis Ship wrote: If the sidebar really changes for each page, then it can be a Block parameter to the layout component. This will allow the layout component to control where, within its templates, the sidebar appears. Check out the t:parameter documentation. On 4/10/07, Stephane PAQUET [EMAIL PROTECTED] wrote: Just one question, why don't you use a CSS layout + ASSET in stead of component (this does not apply to the sidebar). Rgds, SP On Apr 10, 2007, at 8:28 AM, Yann Ramin wrote: I'm using T5 to do some experimental testing, creating some mockup applications to teach me more about the framework. My question is, how do you best handle multi-part layouts? For instance, a Layout can be composed of a Body and a Sidebar. The Sidebar can be a component. My current approach is to have a Page.java: public Page { @Component private Layout _layout; @Component private Sidebar _sidebar; } Page.html: t:layout t:id=layout blah div id=main fee fi fo fum /div t:sidebar t:id=sidebar bar=true/ /t:layout This feels suboptimal, as I'm encoding the location of the sidebar into each and every page (namely always coming after the main div). I'd like to have the Sidebar component in the Layout component, but feed this component from the Page to the Layout (as the Sidebar component could be different on every page). I.e., t:layout sidebar=sidebar, but that is a parameter, not a component, so afaik won't work like I expect it to (it didn't in testing, but could have been anything). Any way of accomplishing this? Any better solutions to this problem? Am I missing something? BTW, T5 is a great framework - having lots of fun with it! - 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: T5: Best page templating strategy
Just figured out you can return the block in a render stage to get it to render. Deceptively simple, but the docs (from my reading), didn't mention it. @BeforeRenderBody Block doSidebar() { return _sidebar; } Yann Ramin wrote: I got a good start on this, but still missing something fundamental. In Page.java, I have the Sidebar component. In Page.html, I pass the component in a parameter t:parameter name=sidebar t:sidebar/ /t:parameter In Layout.java I have a sidebar block @Parameter(required=true) private Block _sidebar; What I can't figure out is how to get the block to render. Thanks for all of your suggestions so far! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]