> In AppFuse 2.0, we're requiring JDK 5 and using annotations 
> where it seems appropriate.  AFAIK, we can eliminate .page 
> files if we use annotations instead.  Is that true?  If so, 

Yes that's true.

> how do you define how a @TextField works (displayName, 
> validation rules, etc.)?  Do you use annotations on your 
> model object?  A link to documentation or an example would be great.

Have a look at
http://tapestry.apache.org/tapestry4.1/tapestry-annotations/index.html

Generally, you can push what used to be in the .page (or .jwc) file into
either annotations or the template or both. So, you can either write

@Component( id="myTextField", type="TextField",
                            bindings={"displayName=blubberDi"} )
        public abstract IComponent getMyTextField();


in your page-class (which I'd prefer to categorize as controller rather
than model).
Or you could write:

<input jwcid="[EMAIL PROTECTED]" displayName="blubberDi" />

You can mix as you like. My rule is to put things in the Java-Class if
and only if I actually use the annotated element (getter) in my code. Of
course, there are valid reasons to put more into the class (e.g., if you
want to hand the template to web-designers, you'll want them to only
contain jwcid's)

hth,
Marcus

> 
> Matt
> 
> 
> Schulte Marcus wrote:
> > 
> > You'd have to map between .page- and template-file-name and 
> the Java 
> > class name if you don't want to break the convention for Java class 
> > names.
> > 
> > Since Tap-4 I don't have .page files anymore. So non-CamelCase page 
> > names would simply not be an option for me - even if I found them 
> > aesthetically more pleasing (which I'm not)
> > 
> > Marcus
> > 
> >> -----Original Message-----
> >> From: mraible [mailto:[EMAIL PROTECTED]
> >> Sent: Friday, December 29, 2006 6:11 AM
> >> To: users@tapestry.apache.org
> >> Subject: CamelCase page names/URLs in Tapestry
> >> 
> >> 
> >> Are CamelCase page names and URLs the standard with Tapestry 
> >> applications?
> >> I'm used to doing more lowercase things, for example:
> >> 
> >> http://server/app/userList.html
> >> 
> >> I'm even starting to warm up to doing things all lowercase:
> >> 
> >> http://server/app/userlist.html
> >> 
> >> However, according to HLS, CamelCase is the recommended (and
> >> preferred) way of doing things w/in the Tapestry community.
> >> 
> >> http://server/app/UserList.html
> >> 
> >> Is that true?  This seems odd to me.  I can understand 
> that using an 
> >> uppercase first letter makes everything match, but it leads to 
> >> non-standard URLs, no? I guess Tapestry has never been too keen on 
> >> pretty URLs, so maybe this isn't an issue for most users?
> >> 
> >> Background:
> >> ----------------------
> >> Howard did a thorough review of the Tapestry code in 
> AppFuse about 6 
> >> months ago.  He sent me a private e-mail, which I posted as a JIRA 
> >> issue:
> >> 
> >> http://issues.appfuse.org/browse/APF-404
> >> 
> >> We've since broken up this issue into several subtasks, 
> and the one 
> >> I'm referring to in particular can be found at:
> >> 
> >> http://issues.appfuse.org/browse/APF-499
> >> 
> >> <description>
> >> In Tapestry, the established convention is that page names are 
> >> CamelCase.
> >> Further, the XML specification (.page file), HTML template 
> and Java 
> >> class should all be named the same. Likewise for components.
> >> </description>
> >> 
> >> If UserList.html is the preferred standard among Tapestry users, 
> >> we'll follow it - I just want to make sure that Howard and the 
> >> community agree on this one.
> >> 
> >> Thanks,
> >> 
> >> Matt
> >> --
> >> View this message in context: 
> >> http://www.nabble.com/CamelCase-page-names-URLs-in-Tapestry-tf
> >> 2893433.html#a8083998
> >> 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]
> > 
> > 
> > 
> 
> --
> View this message in context: 
> http://www.nabble.com/CamelCase-page-names-URLs-in-Tapestry-tf
> 2893433.html#a8093597
> 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]

Reply via email to