kein Betreff
Hi, I want to create a small CMS. The main purpose is to make a limited number of pages configurable. Configurable means that I use a template with placeholders in which components out of a set can be filled in. For example the template: SimpleSkeleton.tml !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html head titleTitletitle /head body t:delegate t:to=component11 / br / t:delegate t:to=component12 / /body /html One of the components could be as follows: SimpleLinkedImage.tml: !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; div xmlns:t=http://tapestry.apache.org/schema/tapestry_5_0_0.xsd; a href=# t:type=pagelink t:page=page t:context=context img src=${imageUrl} alt=${imageName} name=${imageName} / /a /div SimpleLinkedImage.java: public class SimpleLinkedImage { private String _page; private ListString _context; private String _imageUrl; private String _imageName; // setter and getter } Because it's not possible to predict which component would be needed and how often, I want to create it programmatically by using this code. SimpleSkeleton.java public class SimpleSkeleton { public Object getComponent11 () { linkedImage = new SimpleLinkedImage(); linkedImage.setImageUrl( http://tapestry.apache.org/tapestry5/images/tapestry_banner.gif; ); linkedImage.setImageName( Tapestry Banner ); linkedImage.setPage( start ); linkedImage.setContext( null ); return linkedImage; } public Object getComponent12 () { linkedImage = new SimpleLinkedImage(); linkedImage.setImageUrl( http://tapestry.apache.org/tapestry5/images/tapestry_banner.gif; ); linkedImage.setImageName( Tapestry Banner_2 ); linkedImage.setPage( start ); linkedImage.setContext( null ); return linkedImage; } } But as you can imagine it dosen't work. Is there another approach to solve this problem? ___ Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=00 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to call EJB from T5 application?
HHB schrieb: Hi. In a Tapestry 5 application, how to call EJBs? Thanks. Look it up using JNDI or some other method and use it. Uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to call EJB from T5 application?
Is it possible to employ some kind of DI? what about writing a custom service and register it with T5 application? Ulrich Stärk wrote: HHB schrieb: Hi. In a Tapestry 5 application, how to call EJBs? Thanks. Look it up using JNDI or some other method and use it. Uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-call-EJB-from-T5-application--tp16381308p16383212.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: Tap 5.0.9: Why can't Grid column header has blank label
You can have a blank label in grid column header, just override the default property label in page properties: beanModel.add(rowNo, null); rowNo-label= -adam On Sat, Mar 29, 2008 at 10:59 AM, ryanskow [EMAIL PROTECTED] wrote: It can be useful, however, to have a blank heading for columns which may be icons such as edit/delete. It doesn't hurt to have a heading for such columns, but sometimes it is nice to be able to save some horizontal real-estate by utilizing an icon to replace the text. Howard Lewis Ship wrote: The label is also used by BeanEditor and individual fields when composing error messages. On Feb 2, 2008 12:16 PM, Shing Hing Man [EMAIL PROTECTED] wrote: Hi, In the Grid component, I added a custom column with a blank label. beanModel.add(rowNo, null).label( ); This resulted in the following exception. I could use css to make the label non-visible. Is there a more elegant way of having a blank column header. Thanks in advance for any assistance ! Shing java.lang.IllegalArgumentException Parameter label was null or contained only whitespace. Stack trace * org.apache.tapestry.ioc.internal.util.Defense.notBlank(Defense.java:59) * org.apache.tapestry.internal.beaneditor.PropertyModelImpl.label(PropertyModelImpl.java:87) * net.sf.gridDemo.pages.AccessGrid.getBeanModel(AccessGrid.java:110) * org.apache.tapestry.internal.bindings.PropBinding.get(PropBinding.java:54) * org.apache.tapestry.internal.structure.InternalComponentResourcesImpl.readParameter(InternalComponentResourcesImpl.java:209) Home page : http://www.lombok.demon.co.uk/ __ Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Tap-5.0.9%3A-Why-can%27t-Grid-column-header-has-blank-label-tp15246759p16371478.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: tapestery5-components
Dear list, I'm writing to announce that probably a month or so ago, I joined the tapestry5-components project (http://code.google.com/p/tapestry5-components/). Before that I had published a component library (with one component: slideshow) as gc-tapestry-components (http://code.google.com/p/gc-tapestry-components/), and I have since merged that code with the project. The gc-tapestry-components project page and svn has been kept in place at google code, and I see that people are still downloading the last released file. That's great, but I want to encourage you to use tapestry5-components, and also let you know that I will be taking down the maven repo I had set up on my own server sometime soon. I announced this some time ago but people still continue to use it, so I wanted to give those people a heads up. Thanks for using it - now please migrate to tapestry5-components :-). sincerely, chris -- http://thegodcode.net - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5.0.9: Why can't Grid column header has blank label
On 3/29/08, Thiago HP [EMAIL PROTECTED] wrote: Adding the following to your app.properties will do the trick: rowNo= Ooops, that should be rowNo-label= -- Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Javascript error in datefield component
Thank you Florian, I have updated my project to Tapestry 5.0.11 and everything works good. On Sat, Mar 29, 2008 at 4:50 PM, Ektschn [EMAIL PROTECTED] wrote: Hi Yura, as far as I know this is fixed in t5.0.11 Best, Florian Yura Tkachenko wrote: Hi, I'm getting Javascript error when trying to use datefield component on my form. This component works properly in Firefox but it doesn't work with IE7. I'm getting js error: Object doesn't support this property or method on the line 87 in file: /assets/tapestry/corelib/components/datefield.js . 85: this.datePicker = new DatePicker(); 86: 87: this.popup = this.datePicker.create().hide().absolutize(); ... In IE7 method hide() is undefined. I'm using Tapestry 5.0.10. Does anyone else have this problem? Thanks, Yura. -- View this message in context: http://www.nabble.com/Javascript-error-in-datefield-component-tp16245060p16376547.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]
Does Tapestry have something like Converter in JSF?
Hi, I have some experience in JSF and basically even now when I'm trying to create some application in Tapestry sometimes I'm trying to find similar solutions/approaches which I used in JSF. Anyway JSF provided such a good thing like Converters. For example on your form you had text field to input user id and in your POJO during handling submit event you need to load hibernate object using userId parameter. Of course, one of the way to do it is to create String property to userId and then in onSubmit try to load using Hibernate User object by userId parameter. But in JSF I can create Converter with two methods: getAsString(.) // this method will convert User object to userId string getAsObject(.) // this method should convert userId parameter into hibernate User entity After that I need to register this converter and attach it to my text field component. Also in my POJO I need to change property type from String to User. This approach provides a lot of benefits and make possible to reuse it on many pages where user can input 'userId' and we need to load Hibernate entity User. This converter will be run automatically by JSF. Does Tapestry 5 have something like converters?
Re: Does Tapestry have something like Converter in JSF?
On 3/30/08, Yura Tkachenko [EMAIL PROTECTED] wrote: Does Tapestry 5 have something like converters? Yes. Take a look at the Translator interfade (http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Translator.html) and the translate parameter of the TextField component (http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html) and other related ones. -- Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tap 5.0.9: Why can't Grid column header has blank label
Thanks! Shing --- Thiago HP [EMAIL PROTECTED] wrote: On 3/29/08, Thiago HP [EMAIL PROTECTED] wrote: Adding the following to your app.properties will do the trick: rowNo= Ooops, that should be rowNo-label= -- Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Home page : http://www.lombok.demon.co.uk/ ___ Yahoo! For Good helps you make a difference http://uk.promotions.yahoo.com/forgood/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Tapestry have something like Converter in JSF?
Thank you. On 3/30/08, Thiago HP [EMAIL PROTECTED] wrote: On 3/30/08, Yura Tkachenko [EMAIL PROTECTED] wrote: Does Tapestry 5 have something like converters? Yes. Take a look at the Translator interfade ( http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Translator.html ) and the translate parameter of the TextField component ( http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html ) and other related ones. -- Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to call EJB from T5 application?
HHB schrieb: Is it possible to employ some kind of DI? what about writing a custom service and register it with T5 application? Ulrich Stärk wrote: HHB schrieb: Hi. In a Tapestry 5 application, how to call EJBs? Thanks. Look it up using JNDI or some other method and use it. Uli You should have look at http://tapestry.apache.org/tapestry5/tapestry-ioc/. Tapestry-ioc can handle your custom services and inject them into your pages. If you want to know more please refer to the docs and the wiki. Uli - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Tapestry have something like Converter in JSF?
Actually, this looks closer to the ValueEncoder interface. For example, the tapestry-hibernate module includes ValueEncoders to convert between Hibernate entities and their primary keys (as strings). The ValueEncoderSource interface is useful here, since it allows components that need a ValueEncoder to obtain one based on the type of property bound to their value parameter, automatically. On Sun, Mar 30, 2008 at 1:14 PM, Yura Tkachenko [EMAIL PROTECTED] wrote: Thank you. On 3/30/08, Thiago HP [EMAIL PROTECTED] wrote: On 3/30/08, Yura Tkachenko [EMAIL PROTECTED] wrote: Does Tapestry 5 have something like converters? Yes. Take a look at the Translator interfade ( http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Translator.html ) and the translate parameter of the TextField component ( http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html ) and other related ones. -- Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4-AJAX executing client side script from an async listener
yes it's 4.1.5, how would i do that andreas? I find the documentation on this stuff very limited. p Andreas Andreou wrote: Can't you conditionally include a @Script in the response? Also, that's on 4.1.5, right? On Fri, Mar 28, 2008 at 1:32 AM, Paul Stanton [EMAIL PROTECTED] wrote: Hi all, I have a form which is handled via an async listener, which currently just does some component updates: ResponseBuilder builder = getRequestCycle().getResponseBuilder(); builder.updateComponent(dataPanes); builder.updateComponent(filterSubmit); But now I need to be able to execute some script on the client once the updates have completed. I'm assuming this can be achieved, but I can't figure out how. I've tried using the writeBodyScript method, but the builder's writer is null: builder.beginBodyScript(writer, getRequestCycle()); builder.writeBodyScript(writer, alert('here');, getRequestCycle()); builder.endBodyScript(writer, getRequestCycle()); If I change the listener to use JSON the writer is not null, but it still doesn't work, and my update component calls don't work. Any tips appreciated. Thanks, Paul. - 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: Does Tapestry have something like Converter in JSF?
Well in JSF Convertors is a part of validation logic and they are provide a way to notify application that conversion was unsuccessful. In Tapestry I see Translator is almost the same as Converter in JSF. Using Translator I can notify my application that conversion was unsuccessful. I've been looking at http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/ValueEncoder.htmland I didn't find any way in ValueEncoder how I can throw any conversion exception. Maybe someone can provide some more examples how ValueEncoder can be used? On Sun, Mar 30, 2008 at 2:08 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: Actually, this looks closer to the ValueEncoder interface. For example, the tapestry-hibernate module includes ValueEncoders to convert between Hibernate entities and their primary keys (as strings). The ValueEncoderSource interface is useful here, since it allows components that need a ValueEncoder to obtain one based on the type of property bound to their value parameter, automatically. On Sun, Mar 30, 2008 at 1:14 PM, Yura Tkachenko [EMAIL PROTECTED] wrote: Thank you. On 3/30/08, Thiago HP [EMAIL PROTECTED] wrote: On 3/30/08, Yura Tkachenko [EMAIL PROTECTED] wrote: Does Tapestry 5 have something like converters? Yes. Take a look at the Translator interfade ( http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Translator.html ) and the translate parameter of the TextField component ( http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html ) and other related ones. -- Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Does Tapestry have something like Converter in JSF?
That's true, there's another interface, PrimaryKeyEncoder, that is also useful. Generally, a ValueEncoder that fails will return null. That null will be picked up by the validators (say, the Required validator). So there is notification. To me its two seperate use cases; the user will not be typing primary keys in, those will be stored in hidden fields or elsewhere (i.e. URLs). They may not be valid (the underlying record may have been deleted) ... or they may not be up-to date (there may have been a conflicting update). Both of those are cases to be handled by the application, not by Tapestry, because no one solution is appropriate to all applications. On Sun, Mar 30, 2008 at 5:50 PM, Yura Tkachenko [EMAIL PROTECTED] wrote: Well in JSF Convertors is a part of validation logic and they are provide a way to notify application that conversion was unsuccessful. In Tapestry I see Translator is almost the same as Converter in JSF. Using Translator I can notify my application that conversion was unsuccessful. I've been looking at http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/ValueEncoder.htmland I didn't find any way in ValueEncoder how I can throw any conversion exception. Maybe someone can provide some more examples how ValueEncoder can be used? On Sun, Mar 30, 2008 at 2:08 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: Actually, this looks closer to the ValueEncoder interface. For example, the tapestry-hibernate module includes ValueEncoders to convert between Hibernate entities and their primary keys (as strings). The ValueEncoderSource interface is useful here, since it allows components that need a ValueEncoder to obtain one based on the type of property bound to their value parameter, automatically. On Sun, Mar 30, 2008 at 1:14 PM, Yura Tkachenko [EMAIL PROTECTED] wrote: Thank you. On 3/30/08, Thiago HP [EMAIL PROTECTED] wrote: On 3/30/08, Yura Tkachenko [EMAIL PROTECTED] wrote: Does Tapestry 5 have something like converters? Yes. Take a look at the Translator interfade ( http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/Translator.html ) and the translate parameter of the TextField component ( http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html ) and other related ones. -- Thiago - 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] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]