You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Melidramo <a5...@kochira.com> on 2009/11/05 12:40:39 UTC

Underscore rule(s)?

Hi

I'd like to know the exact rule about prefixed private properties with '_'
in the Java code:
- does that mean that the prop is used without the _ in the Tapestry
template?
- does that mean that Tapestry won't expect method prefixed with 'is' /
'get' / 'set'?

Thanks
-- 
View this message in context: http://old.nabble.com/Underscore-rule%28s%29--tp26211699p26211699.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Underscore rule(s)?

Posted by "Juan E. Maya" <ma...@gmail.com>.
Hi Melidramo,
as far as i know the _ is a shortcut to avoid the use of "this."
inside a java class. So u can still clearly see that you r accessing a
property from the class and not a local variable.

When tapestry uses @Property to generate the get and set of a property
it ingores the _

Therefore the following is equivalent
@Property
private int _id;

@Property
private int id;


On Thu, Nov 5, 2009 at 12:40 PM, Melidramo <a5...@kochira.com> wrote:
>
> Hi
>
> I'd like to know the exact rule about prefixed private properties with '_'
> in the Java code:
> - does that mean that the prop is used without the _ in the Tapestry
> template?
> - does that mean that Tapestry won't expect method prefixed with 'is' /
> 'get' / 'set'?
>
> Thanks
> --
> View this message in context: http://old.nabble.com/Underscore-rule%28s%29--tp26211699p26211699.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org