Re: Maintaining a bookmarkable URL after submitting a form

2006-04-30 Thread andyhot
See http://svn.apache.org/repos/asf/tapestry/tapestry4/branches/4.0/framework/src/java/org/apache/tapestry/engine/encoders/PageServiceEncoder.java for an example. Implementing both decode and encode of ServiceEncoder is all it takes. Perhaps you might also like to declare your encoder to be befor

Re: Maintaining a bookmarkable URL after submitting a form

2006-04-30 Thread Michael Lake
Thanks for replying, okay, so I've got this "redirect after post" pattern thing figured out.. The code below is what i'm using. @InjectObject("engine-service:external") public abstract IEngineService getExternalService(); public ILink onSearch() { Object[] parms = new Object[] { "crack

Generic creation of an ICallback: surely there's a better way?

2006-04-30 Thread Paul Cantrell
I want to create a generic utility method to check whether a user is logged in, and redirect them to a login page if necessary. To do this, I need to create an ICallback in the general case. In other words, I don't know whether I'm create an ExternalCallback or a PageCallback or a DirectCal

Re: Conditional validation

2006-04-30 Thread Nick Westgate
Hi Bianca. I'm working in T3, but T4 still uses a validation delegate, so perhaps this might be helpful to you. To make things easier, I extended ValidationDelegate to add: public boolean isComponentInError(String componentName) { List trackings = getAssociatedTrackings();

Re: [OT] OMG! A dynamic div component in JSF

2006-04-30 Thread Pedro Viegas
I believe this has escalated far more than anticipated, hasn't it Geoff? :-D I believe we are all basically in sync in what's been discussed here (leaving aside the fw comparisons and flame wars! :-)) I agree that Tapestry still need to address some core issues! Absolutely priority! That's what e

Re: tapastry vs struts

2006-04-30 Thread Pedro Viegas
I'm not an experienced user so I can't give advice on a topic like this. Others have already done it! Nevertheless something I can call your attention to... You mentioned: Struts Pros : huge user base and hence good support Tapestry Cons : not as big user base as struts. The user base, I would a

Re: newbie: how to use tapestry component

2006-04-30 Thread Sam Gendler
OK, I see your point, given the content of chapter 8 of enjoying web development. That chapter pretty much covers what you want, including defining a service that supports building a photo album, but depending upon some of the other constraints of your application, you may or may not need that le

Re: newbie: how to use tapestry component

2006-04-30 Thread Sam Gendler
On 4/30/06, Peter Svensson <[EMAIL PROTECTED]> wrote: This is curiously enough non-trivial in trapestry. All dynamic things you want to put in you pages or download have to come from a separate service. Why would you need a separate service to render a table of img tags? As for paging in a tab

Re: Required field decoration

2006-04-30 Thread Stephane Decleire
Thanks a lot Ryan, it works ! Ryan Holmes wrote: Instead of: if (validator != null && validator.isRequired()) try: if (component.isRequired()) "component" will never be null, so you don't have to worry about the null check. Also, make sure you are setting the "delegate" parameter of your f

Re: Required field decoration

2006-04-30 Thread Ryan Holmes
Instead of: if (validator != null && validator.isRequired()) try: if (component.isRequired()) "component" will never be null, so you don't have to worry about the null check. Also, make sure you are setting the "delegate" parameter of your form component to an instance of your custom IValida

Re: MultipartDecoder maxSize setting?

2006-04-30 Thread Ryan Holmes
Yes, that's correct. The docs need to be updated. The tapestry.multipart.MultipartDecoder service id was changed to tapestry.multipart.ServletMultipartDecoder, probably to help differentiate it from the tapestry.portlet.multipart.PortletMultipartDecoder service id. An easy way to look up Hive

Re: Tapernate ?

2006-04-30 Thread ZedroS Schwart
It's ok, no worries. On my side, I just use Hibernate to put my data into a database. These data are "business related" and somehow session related. Up to now (but I'm not that far...) I didn't encounter special issues. That's why I don't understand the interest of a special layer. But as I don

Required field decoration

2006-04-30 Thread Stephane Decleire
Hi, I've tried to reuse in my T4 application the way HLS has implemented required field decoration with an "*" in his book "Tapestry In Action" : My field is set "required" in my registration.page : value="validators:required,maxLength=30"/> And i've subclasse

Re: newbie: how to use tapestry component

2006-04-30 Thread Peter Svensson
This is curiously enough non-trivial in trapestry. All dynamic things you want to put in you pages or download have to come from a separate service. However, there's a very good example of doing that in "Enjoying web development with Tapestry" at http://www.agileskills2.org/EWDT/ Cheers, PS On 4

RE: Access Registry

2006-04-30 Thread James Carman
You can create a service implementation factory which injects the contributing module into your service implementation. From there, you can lookup stuff in the registry. Refer to an example here: http://www.carmanconsulting.com/svn/public/tapernate-example/trunk/src/java/ org/apache/tapestry/enh